Math 1 Module 11

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Math of Graphs

11111
MODULE 11
LEARNING OUTCOMES

General Objectives
The purpose of this module is to introduce students to Graph Theory

Specific Objectives
As a result of this lesson, students will be able to:
1. Define and identify different types of graph.
2. Categorize and distinguish graphs based on its properties.
3. Apply the knowledge on graphs in programming and other related works.

Introduction
Graph Theory was first explored and systematically investigated by D. König in the
1930’s (Gardner, 1984,). The word "graph" has more than one meanings in mathematics.
Graph commonly refers to a function graph or "graph of a function," and usually
represented by a plot.

Definition of Graph
A graph G consists of a finite nonempty set V of objects called vertices and a set
E of 2-elements subsets of V called edges. The sets V and E are the vertex set and
edge set of G, respectively. So a graph G is an ordered pair of two sets V and E. For
this reason, some write G =(V,E). At times, it is useful to write V(G) and E(G) rather than
V and E to emphasize that these are the vertex and edge sets of a particular graph G.
Although G is the common symbol to use for a graph, we also use F and H as well as G’,
G’’ and G1, G2, etc. Vertices are sometimes called points or nodes and edges are
sometimes called lines. Two graphs G and H are equal if V(G)=V(H) and E(G)=E(H), in
which case we write G=H.
A graph G = (V, E) consists of a (finite) set denoted by V, or by V(G)
if one wishes to make clear which graph is under consideration, and
a collection E, or E(G), of unordered pairs {u, v} of distinct elements
from V. Each element of V is called a vertex or a point or a node, and
each element of E is called an edge or a line or a link.
Formally, a graph G is an ordered pair of disjoint sets (V, E), where
E = V × V. Set V is called the vertex or node set, while set E is the
edge set of graph G.

It is common to represent a graph by a diagram in the plane where the vertices are
represented by points (small circles-open or solid) and whose edges are indicated by the
presence of a line segment or curve between the two points in the plane corresponding
to the appropriate vertices. The diagram itself is then referred to as a graph.

URS-IM-AA-CI-0167 Rev 00 Effective Date: August 24, 2020


Math of Graphs

Example 1:

G:

V(G)= {a,b,c,d} E(G) = {ab,ad,cd,de}


The number of vertices, the cardinality of V, is called the order of graph and
devoted by |V|. We usually use n to denote the order of G. The number of edges, the
cardinality of E, is called the size of graph and denoted by |E|. We usually use m to denote
the size of G.
The degree deg(v) of vertex v is the number of edges incident on v or equivalently,
deg(v) = |N(v)|. The degree sequence of graph is (deg(v1), deg(v2), ..., deg(vn)), typically
written in nondecreasing or nonincreasing order. The minimum and maximum degree of
vertices in V(G) are denoted by d(G) and ∆(G), respectively. If d(G) = ∆(G) = r, then graph
G is said to be regular of degree r, or simply r-regular.
Formally, given a graph G = (V, E), the degree of a vertex is the number of its
neighbors in the graph.

Example 2:

Adjacency List
a: b d
b: a c
c: b d e
d: a c e
e: c d

Adjacency Matrix
a b c d e
a 0 1 0 1 0
b 1 0 1 0 0
c 0 1 0 1 1
d 1 0 1 0 1
e 0 0 1 1 0
Math of Graphs

SELF ASSESSMENT QUESTION

Using the graph below;

Find:
1. Vertices
2. Edges
3. Determine the order, size and degree of its vertices
4. Make an adjacency list and matrix

ANSWER TO SELF ASSESSMENT QUESTION

1. .V(G)= {a, b, c, d, e}
2. E(G) = {ab, ac, ad, bc, cd, ce, de}
3. |V|=5, m=7, d(a)=3, d(b)=2, d(c)=4, d(d)=3, d(e)=2
4. Adjacency List
a: b c d
b: a c
c: a b d e
d: a c e
e: c d

Adjacency Matrix
a b c d e
a 0 1 1 1 0
b 1 0 1 0 0
c 1 1 0 1 1
d 1 0 1 0 1
e 0 0 1 1 0
Math of Graphs

EXERCISE No. 1

1. Type Text Consider the set S={ 2,3,5,8,13,21} of six specific Fibonacci
numbers. There are some pairs of distinct integers belonging to S whose
sum or difference (in absolute value) also belongs to S, namely, {2,3},
{2,5}, {3,5}, {3,8}, {5,8}, {5,13}, {8,13}, {8,21}, and {13,21}.
a. Make a more visual way of identifying these pairs using
V(G)= { 2,3,5,8,13,21} and E(H)={ {2,3}, {2,5}, {3,5}, {3,8}, {5,8}, {5,13},
{8,13}, {8,21},{13,21}}
b. Determine the order, size and degree of its vertices
c. Make an adjacency list and matrix

Types of Graphs
There are many types of graphs based on the sequence or movement from one
vertex to another. Here are the examples.

Walk
A u-v walk W in G is a sequence of vertices in G, beginning with u and ending at
v such that consecutive vertices in the sequence are adjacent, that is we can express W
as 𝑾: 𝒖 = 𝒗𝟎 , 𝒗𝟏 , … , 𝒗𝒌 = 𝒗 where 𝒌 ≥ 𝟎 and 𝒗𝒊 and 𝒗𝒊+𝟏 are adjacent for
𝒊 = 𝟎, 𝟏, 𝟐, … , 𝒌 − 𝟏

a
b e

c d
W1: a-b-d-a-b-c
W2: a-b-c-d-e-b
W3: a-b-c-d-e
W4: a-b-c-d-e-b-d
Math of Graphs

If u=v, then walk W is closed; while if u≠v, then W is open.


Closed W : a-b-c-d-b-e-d-a
Open W : a-b-c-d-e

As we move from one vertex of W to the next, we are actually encountering or


traversing edges of G, possibly traversing some edges of G more than once. The number
of edges encountered in a walk (including multiple occurrences of an edge) is called the
length of the walk.

W3: a-b-c-d-e-a, it is an a-a walk of length 5


W4: a-b-c-d-e-b-d, it is an a-d walk of length 6

Simply, length of a walk is one less than the number of occurrences of vertices in
the walk.
A walk of length 0 is a trivial walk.

W: v is a trivial walk

Trail

A u-v trail in a graph G to be a u-v walk in which no edge is traversed more than
once.

a
e
b
d
c
T: a-b-c-d-e-b-d

An a-d trail in the graph G, notice that this trail T repeats the vertex b and d, which
is perfectly permissible. Although the definition of a trail stipulates that no edge can be
repeated, no such condition is placed on vertices.

Path

A u-v walk in a graph in which no vertices are repeated is a u-v path. While the a-
d trail T above is not an a-d path in the graph G since the vertices b and d are repeated.

P: a-b-c-d-e is an a-e path


Math of Graphs

If no vertex in a walk is repeated (thereby producing a path), then no edge is


repeated either. Hence every path is a trail.
If a u-v walk in a graph is followed by a v-w walk, then a u-w walk results. In
particular, a u-v path followed by a v-w path is a u-w walk W, but not necessarily a u-w
path, as vertices in W may be repeated.

Circuit

A circuit in a graph G is a closed trail of length 3 or more. Hence a circuit begins


and ends at the same vertex but repeats no edges. A circuit can be described by choosing
any of its vertices as the beginning and ending vertex provided the vertices are listed in
the same cyclic order. In a circuit, vertices can be repeated, in addition to the first and
last.

C: a-b-c-d-e-b-d-a

Cycle

A circuit that repeats no vertex, except for the first and last, is a cycle. A k-cycle is
a cycle of length k. A 3-cycle is also referred to as a triangle. A cycle of odd length is
called odd cycle; while not surprisingly, a cycle of even length is called an even cycle.

C: a-b-c-d-e-b-d-a is not a cycle


C’: a-b-c-d-a is a cycle, namely a 4-cycle

If a vertex of a cycle is deleted, then a path is obtained. This is not necessarily true
for circuits, however.

EXERCISE No. 2

For the graph W of the figure in the next page, give an example of each of the
following or explain why no such examples exists.

1. An a-e walk of length 5


2. A b-d trail that is not a b-d path
3. A c-e path of length 3
4. A e-b path of length 4
5. A circuit of length 8
6. A cycle of length 5
Math of Graphs

W: a M:
r s t

b e u v w
x y z

d
c
EXERCISE No. 3

For the graph M of the figure above give an example of each of the following
or explain why no such examples exists.

1. An x-y walk of length 6


2. A v-w trail that is not a v-w path
3. A r-z path of length 2
4. A x-z path of length 3
5. A circuit of length 10
6. A cycle of length 8

Connected Graphs
If G contains a u-v path, then u and v are said to be connected and u is connected
to v ( and v is connected to u). So, u and v are connected only means that there is some
u-v path in G; it does not say that u and v are joined by an edge. Of course, if u is joined
to v, then u is connected to v as well. A graph G is connected if every two vertices of G
are connected, that is, if G contains a u-v path for every pair u,v of distinct vertices of G.
G is connected if and only if G contains a u-v walk for every pair u,v of vertices of
G. Since every vertex is connected to itself, the trivial graph is connected. A graph G that
is not connected is called disconnected.
Regular Graphs
If deg v = r for every vertex v of G, where 0  r  n – 1, then G is r- regular or
regular of degree r.
The following are the only regular graphs of order 4.
Math of Graphs

2 2 2
1
4 4 4

2 4
1 1 1
3 3 3 3
0-regular 1-regular 2-regular 3-regular

SELF ASSESSMENT QUESTION

Construct an r-regular graph of order 6 for all possible values of r.

ANSWER TO SELF ASSESSMENT QUESTION


Math of Graphs

EXERCISE No. 4

I. Using the graph above. Determine or give an example of the following;

1. Vertices
2. Edges
3. Order, size and degree of its vertices
4. Adjacency list and matrix
5. 1-7 walk of length 7
6. 1-6 trail that is not a 1-6 path
7. 1-4 path of length 5
8. A circuit of length 7
9. A cycle of length 5
10. Trivial walk

EXERCISE No. 5

Answer the following:

1. Construct a regular graph of order 5 for all possible values of r.


2. The degree of every vertex of a graph G of order 25 and size 62 is 3,
4, 5, or 6. There are 2 vertices of degree 4 and 11 vertices of degree
6. How many vertices of G have degree 5?
Math of Graphs

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy