0% found this document useful (0 votes)
2 views

chapter 4

Chapter 4 covers the fundamentals of graph theory, including definitions, types of graphs, and their representations through adjacency and incidence matrices. Key concepts such as isomorphic graphs, connectivity, and various graph types like trees and bipartite graphs are discussed. The chapter also introduces the handshaking lemma and its implications in graph analysis.

Uploaded by

sami21.good.bad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

chapter 4

Chapter 4 covers the fundamentals of graph theory, including definitions, types of graphs, and their representations through adjacency and incidence matrices. Key concepts such as isomorphic graphs, connectivity, and various graph types like trees and bipartite graphs are discussed. The chapter also introduces the handshaking lemma and its implications in graph analysis.

Uploaded by

sami21.good.bad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Chapter 4: Elements of graph theory

4.1 Definition and examples of a graph


4.2 Matrix representation of a graph
4.3 Isomorphic graphs
4.4 Path and connectivity of a graph
4.5 Complete, regular and bipartite graphs
4.6 Eulerian and Hamiltonian graphs
4.7 Trees and forests (Rooted and Binary trees)
4.8 Planar graphs
4.9 Graph coloring
1
Objective
 At the end of this chapter, you will be able to:
 Definition different terminologies of a graph
 Represent a graph by adjacent and incident Matrix

2
Introduction to Graph Theory
Graph Theory is originated from Konigsberg Bridge
Problem (Euler 1736). The problem is described as
follows.
 The river Pregel is flowing through the middle of
Konigsberg town. There were two islands in the river,
denoted by I1 & I2, both of which were also part of the
town and seven bridges each joining a pair of land areas
of the town as in figure below:

Pregel

b6

3
Konigsberg Bridge Question
Question: Is there a route which begins at a place in
one of the land areas, passing through every bridges
once and only once, and returning to the starting
place?
Specify the route or proof that such a route doesn’t
exist C

D
A

B
4
4.1 Definition and examples of a graph
Definition: A graph G is a pair of sets (𝑉, 𝐸) consisting of
two things
i. A set 𝑉 = 𝑉(𝐺) which is a nonempty set of vertices,
Points or node of 𝐺
ii. A set 𝐸 = 𝐸(𝐺) of unordered pairs of distinct
elements of 𝑉 called edges𝐺.
V is called a vertex set and E is called an edge list.
Vertices u and v are said to be adjacentif there is an edge
𝑒 = *𝑢, 𝑣+between them. In such a case u and v are
called the end points of e.
Two edges are said to be adjacent if they are incident
with a common vertex.
5
Note:
If G is a finite:

 𝑉(𝐺) denotes the number of vertices in G.

 𝐸(𝐺) denotes the number of edges in G.

An edge should not pass through more than two vertices.

Graphs are pictured by diagrams in a natural way,


specifically, each vertex 𝑣 in 𝑉 is represented by a dot
(small circle), and edge 𝑒 = *𝑣1 , 𝑣2 + is represented by a
curve which connects its end points 𝑣1 and 𝑣2 .
6
Example
Example 1: consider the graph G given below.

G is a graph with 𝐺 = (𝑉, 𝐸) where


 𝑉 = *𝐴, 𝐵, 𝐶, 𝐷+and
 𝑉(𝐺) = 4
 𝐸 = *𝑒1 , 𝑒2 , 𝑒3 , 𝑒4 , 𝑒5 + with𝑒1 = 𝐴, 𝐵 , 𝑒2 = 𝐵, 𝐶 ,
𝑒3 = *𝐶, 𝐷+, 𝑒4 = *𝐴, 𝐶+ and 𝑒5 = *𝐵, 𝐷+
 𝐸(𝐺) = 5
7
Definitions
Parallel edges are two or more edges incident with
same two vertices
Loop is an edge joining a vertex to itself
Simple graph is a graph that contains no parallel edges
and also no loop. A graph which is not simple is called
multiple graph.
Complete Graph: A simple graph G is said to be
complete if every two vertices on G are adjacent to one
another
 Pseudo graph: A graph which consists of loops and
parallel edges is called pseudo graph
8
Example

 Parallel edges: e2 & e3


 Loop: e5
 e1 & e4 are adjacent but not e3 & e5

9
Example 2
Example 2: State the nature of following graph G'.

G' is a graph with set of pairs (V,E) where


i. 𝑉 = *𝐴, 𝐵, 𝐶, 𝐷+ is a vertex set
ii. 𝐸 = *𝑒1 , 𝑒2 , 𝑒3 , 𝑒4 , 𝑒5 , 𝑒6 +is an edge list
𝑒6 is a loop where as 𝑒4 𝑎𝑛𝑑 𝑒5 are multiple edges
The graph is not a multigraph but it is a pseudo graph
10
Subgraph
Subgraph: Let G=(VG, EG) be a graph. A graph
H = (VH, EH) is said to be a subgraph of G if VH  VG
and EH  EG.
Then, H is a subgraph of G.
e1 e1
Example v2 v2
v1 v1 e2 e6
Let G: e3 e2 e 6 e5 e3
e4 v3 e8 v5 and H: e4 v3
v4 e9 v4 e9
e10
e7 V6
v6

If H = (VH, EH) is a subgraph of G= (VG, EG) and


VH = VG , then H is called a spanning subgraph of G.
11
Degree of a vertex
DefinitionThe degree of a vertex 𝑣in a graph G is equal to:
i. The number of edges in G which contain 𝑣 if it has no
loops.
ii. The number of edges in G which contain 𝑣 plus twice
the number of loop(s) if it has loop(s)
Note:
The number of edges incident with a vertex 𝑣 is called the
degree of that vertex and is denoted 𝒅𝒆𝒈 𝒗.
For a graph with loops, each loop contributes 2 to the
degree of the corresponding vertex

12
Example
Example1: Determine the degree of each vertex of the
graph given below.

Solution:
deg(𝑣1) = 2
deg(𝑣2) = 3
deg(𝑣3) = 2
deg(𝑣4) = 3
13
Even, Odd, Isolated & Pendant vertex
Definition
i. A vertex is said to be even if its degree is even
number and odd if its degree is odd number.
ii. A vertex of degree zero is called isolated vertex.
iii. A vertex of degree one is called pendant vertex.
Example 2: Consider the following graph G.
deg 𝑣1 = 1 = deg(𝑣3),
deg(𝑣2) = 2,deg(𝑣4) = 0
V2 and V4 are even vertices
V1 and V3 are odd vertices
Moreover,
V3 and V4 are not adjacent
V2 and V3 are adjacent
14
Minimum and maximum degree
Let G be a graph. The minimum and maximum degrees
of G are denoted by δ(𝐺)and ∆(𝐺) respectively and
given by:
 δ 𝐺 = Min*𝑑𝑖𝑔 𝑣 : 𝑣 ∈ 𝑉(𝐺)+ and
 ∆ 𝐺 = Max 𝑑𝑖𝑔 𝑣 : 𝑣 ∈ 𝑉 𝐺
Example: Find the minimum and maximum degree of G
given below.
δ 𝐺 = 2and ∆ 𝐺 = 4

15
The hand shaking lemma
 In any graph:
 Each edge has two ends and thus contributes 2 to the sum of
vertices degrees.
 In a group of people shaking hands in a party, exactly two
hands are involved in each hand shakes.
 The hand shaking lemma: Let G be a graph with vertex set
𝑉 = *𝑣1, 𝑣2, 𝑣3, … . 𝑣𝑛+ then
𝑛

deg(𝑣𝑖) = 2𝑒
𝑖=1
 This is so because each edge contributes the count of two to the
sum since both end of each edge is counted in the sum

16
Example
Example : If a graph G has 10 edges with 2 vertices of
degree 4 each and all others are of degree 3 each, and
then find the number of vertices .
Solution 𝐸 = 10 and 2 vertices have degree 4. Let the
other vertices which are of degree 3 each be k in number
𝑛
𝑖=1 deg(𝑣𝑖) = 2 𝐸 , 𝑛 = 2 + 𝑘
⇒ 2(4) + 𝑘(3) = 2(10)
⇒ 8 + 3𝑘 = 20
⇒ 3𝑘 = 12
⇒𝑘 = 4
𝑇𝑕𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑛 = 2 + 𝑘 = 2 + 4 = 6

17
Consequences of the hand shaking lemma
I. In any graph the sum of all the vertex-degrees is an even number.

II. In any graph the number of vertices of odd degrees is even

Example a. Is there a graph with degree sequence (1,2,3,4,5)?

Solution: By the second consequence of the hand shaking lemma,


such a graph cannot exist since the number of odd vertices is not even.
Or 1+2+3+4+5=15 which is not even. Therefore such a graph cannot
exist.

b. Is there a simple graph with degree sequence (1,1,3,3,3,4,6,7)?

18
Graphs have proven to be an extremely useful tool for
analyzing situations involving a set of elements in which
various pairs of elements are related by some property.
The following are some examples dealing with real life
situations.
 Electrical network: Transistors(vertices) and Wire (edges).
 Telephone communication: Telephones and switching
(vertices) center Telephone lines(edges)
 Computer flow chart: Instructions(vertices) & Logical flow-
(edge)
 Organization chart People:-People(vertices) & Link between
the people(edge)

19
4.2 Matrix representation of Graphs
The essential features of a graph are:
i. The adjacency relationships between vertices
ii. The incidence relationships between vertices and
edges
Thus graphs can be represented by any one of the
following types of matrices.
I. Adjacency matrix :-a matrix that describes the
adjacency relationships between vertices of a graph.
II. Incidence Matrix:-A matrix that describes the
incidence relationships between vertices and edges of
a graph.
20
Adjacency matrix

Definition: Suppose G is a graph with 𝑚 vertices and


suppose the vertices have been ordered, say
𝑣1 , 𝑣1 , 𝑣1 , … 𝑣𝑚 . Then the adjacency matrix 𝐴 = ,𝑎𝑖𝑗 - of
the graph G is the matrix defined by:

n, if *𝑣𝑖 , 𝑣𝑗 + ∈ 𝐺(𝐸)
𝐴 = ,𝑎𝑖𝑗 - =
0 , 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒

21
Adjacency Matrix Example

c
To
a b c d e f
b d From
f a 0 1 0 0 1 1
b 1 0 1 0 0 1
a e c 0 1 0 1 0 1
d 0 0 1 0 1 1
W5 e 1 0 0 1 0 1
f 1 1 1 1 1 0
{v1,v2}
row column
22
Examples
Draw the adjacency matrix for:

A)

B) G:

23
Note
i. If the entries in a vertex are all zero, then the vertex is
isolated.
ii. In the adjacency matrix of any graph G, the degree of
each vertex 𝑣𝑖 is:
a) The sum of all the entries in the ith row (or jth
column) if there is no loop at 𝑣𝑖 .
b) Row (or column) sum plus number of loop(s) if there
is (are) loop(s) at 𝑣𝑖 .
iii. If G is a simple graph, then the adjacency matrix A(G)
a) Has leading diagonal entries all zero, 𝑎𝑖𝑖 = 0 for all 𝑖.
b) Is a Boolean matrix or a (0,1) matrix.

24
Examples
Let G be a graph with adjacency matrix

Then
i. Find the degree of each vertex.
ii. Find the cardinal number of the edge list.
iii. Draw the graph.

25
Incidence Matrix
Definition(Incidence Matrix):Le 𝐺 = (𝑉, 𝐸) be
undirected graph. Suppose v1,v2,v3,….,vn are the vertices
and e1,e2,e3,….,em are edges of G, then the incidence
matrix is the 𝑛𝑥𝑚 matrix 𝑀 = ,𝑚𝑖𝑗 - where
0 if 𝑣𝑖 ∉ 𝑒𝑗 .
𝑀 = 𝑚𝑖𝑗 = 1 if 𝑣𝑖 ∈ 𝑒𝑗 𝑎𝑛𝑑𝑒𝑗

Note: 1. The incident matrix of a graph is not necessarily a


square matrix.
2. An incident matrix I has a row for each vertex and
a column for each edge.

26
Incidence Matrix Example
Represent the graph shown with an
incidence matrix.

e1 e2 e3 e4 e5 e6 edges
v1 v2 v3
e6 v1 1 1 0 0 0 0
e3 v2 0 0 1 1 0 1
e1 e4 v3
e5 0 0 0 0 1 1
e2 v4 1 0 1 0 0 0
v4 v5 v5 0 1 0 1 1 0

vertices
27
4.3 Isomorphic graphs (optional)
 It is possible for two graph diagrams two look different but to
represent the same graph. On the other hand, it is possible to look
similar but to represent different graphs.
 Consider the following diagrams which connects three houses
H1,H2,H3 to three utilities tel., water and electricity.

 G1 and G2 are the same but they look different.


 G1 and G3 are different but they look the same
28
Isomorphic graphs
Two simple graphs are isomorphic if:

 there is a one-to one correspondence between the


vertices of the two graphs

 the adjacency relationship is preserved

Definition. The simple graphs G1=(V1,E1) and G2=(V2,E2)


are isomorphic if there is a one-to-one and onto function f
from V1 to V2 with the property that a and b are adjacent in
G1 iff f(a) and f(b) are adjacent in G2, for all a and b in V1.
29
Example
u1 u2 v1 v2

u3 u4 v3 v4
G H
Are G and H isomorphic?
f(u1) = v1, f(u2) = v4, f(u3) = v3, f(u4) = v2

30
Invariants
Invariants – properties that two simple graphs must
have in common to be isomorphic
 Same number of vertices
 Same number of edges
 Degrees of corresponding vertices are the same
 If one is bipartite, the other must be; if one is
complete, the other must be; and others …
Example Are G and H isomorphic?
b b
a c a c

e d e d
G H 31
Example
Are these two graphs isomorphic?
u1 u2 v1 v2
v5
v3
u5 u3
u4 v4
G H
– They both have 5 vertices
– They both have 8 edges
– They have the same number of vertices with
the same degrees: 2, 3, 3, 4, 4.
32
4.4 Path and connectivity of a graph
Definition:A path from v1 to 𝑣𝑡 (or between 𝑣1&𝑣𝑡) in a
graph G is the sequence of adjacent edges
*𝑣1, 𝑣2},{𝑣2, 𝑣3},…, {𝑣𝑡−1 , 𝑣𝑡 } where no edge and also no
intermediate vertex is repeated.
Its is denoted by: v1-v2-v3- …. – vt. (v1 is initial &vt is
terminal vertex of the path; all other vertices are called
intermediate vertices.) b
Example:
a-b-c-d-f is a path from vertex a to f. d

 a-b-c-d-b-e is not considered as a path.


G

33
Cycle & Connected graph
b

c e
d

G f

Closed path : If initial and terminal vertices of a path is


the same, then it is called closed path.
Example: a-b-c-d-a is a closed path.
Connected graph: a graph is said to be connected if
there is a path between every pair of its vertices.

34
4.5 Complete, regular and bipartite graphs

Definition The complete graph on n vertices (Kn) is the


simple graph that contains exactly one edge between
each pair of distinct vertices.
The figures below represent the complete graphs, Kn,
for n = 1, 2, 3, 4, 5, and 6.

35
Regular graph
Regular graph: A graph G is said to be regular of degree
k or K-regular if every vertex
has degree k. In other words, a graph is regular if every
vertex has the same degree.

36
Con’t

37
Cycle and Wheel
Definition The cycle Cn (n  3), consists of n vertices v1,
v2, …, vn and edges {v1,v2}, {v2,v3}, …, {vn-1,vn}, and
{vn,v1}.
Examples (cycle)

C3 C4 C5 C6
Definition When a new vertex is added to a cycle Cn and
this new vertex is connected to each of the n vertices in
Cn, we obtain a wheel Wn.
38
Examples (Wheel)

W3 W4 W5 W6

39
Definition: (Bipartite Graphs)

A graph G is said to be bipartite if its vertices V can


be partitioned in to two subsets M and N such that
each edge of G connects a vertex of M to a vertex of
N.
we mean that each vertex of M is connected to each
vertex of N. this graph is denoted by km,n where m is
the number of vertices in M and n is the number of
vertices in N. we will assume 𝑚 ≤ 𝑛, the figure
below shows the graphs k2,3, k3,3 and k2,4, clearly the
graph km,n has mxn edges.
40
Example(bipartite)
a b a
b 𝐾2,3 .
c d d
c
e e
Example Is C6 Bipartite?
a b

f c

e d

41
4.6 Eulerian and Hamiltonian graphs
The Seven bridges of Königsberg

C
c

D
A
a d

B
b

42
Euler Paths and Circuits

An Euler path is a path using every edge


of the graph G exactly once.
An Euler circuit is an Euler path that
returns to its start.
C

Does this graph have an


A D
Euler circuit?
No.
B
43
EXAMPLE
EXAMPLE Which of the undirected graphs in Figure 3
have an Euler circuit? Of those that do not, which have an
Euler path?

44
Solution
Solution: The graph G1 has an Euler circuit, for
example, a, e, c, d, e, b, a. Neither of the graphs G2
or G3 has an Euler circuit. However, G3 has an Euler
path, namely, a, c, d, e, b, d, a, b. G2 does not have
an Euler path.

45
Necessary and Sufficient Conditions
A connected multigraph has a Euler circuit iff
each of its vertices has an even degree.
A connected multigraph has a Euler path but
not a Euler circuit iff it has exactly two vertices
of odd degree.

46
Example
Which of the following graphs has an
Euler circuit?
a b a b a b

e e

d c d c c d e

yes no no
(a, e, c, d, e, b, a)
47
Example
Which of the following graphs has an
Euler path?
a b a b a b

e e

d c d c c d e

yes no yes
a-e- c- d- e- b-a a- c- d- e- b- d-a-b
48
Hamilton Paths and Circuits

A Hamilton path in a graph G is a path


which visits every vertex in G exactly once.

A Hamilton circuit is a Hamilton path that


returns to its start.

49
Hamilton Circuits

Is there a circuit in this graph that passes through each


vertex exactly once? 50
Hamilton Circuits

Yes; this is a circuit that passes through each vertex


exactly once. 51
Finding Hamilton Circuits

• G1 has a Hamilton circuit: a, b, c, d, e, a


• G2 does not have a Hamilton circuit, but does have a
Hamilton path: a, b, c, d
• G3 has neither. 52
Finding Hamilton Circuits

Unlike the Euler circuit problem, finding


Hamilton circuits is hard.
There is no simple set of necessary and
sufficient conditions, and no simple
algorithm.

53
Properties to look for ...

No vertex of degree 1


If a node has degree 2, then both edges
incident to it must be in any Hamilton
circuit.
No smaller circuits contained in any
Hamilton circuit (the start/endpoint of any
smaller circuit would have to be visited
twice).
54
A Sufficient Condition
Let G be a connected simple graph with n
vertices with n 3.Ghas a Hamilton circuit
𝑛
if the degree of each vertex is ≥ .
2

55
4.7 Trees and forests (Rooted and Binary trees)
Definition: Let T = (V,E) be a graph. T is said to be a tree
iff it is a connected graph and contains no cycle
A vertex u on a tree is called a leaf if deg(u)=1.
Definition: A rooted tree is a connected diagraph D with no
cycles and with a unique vertex r which has zero indegree.
The vertex r is called the root of the tree.
Remark:
i. A rooted tree has unique root.
ii. An undirected tree can be made into a rooted tree by
choosing one vertex as the root and then directing all
edges away from the root.
56
Definitions:

i. The length of the path from the root r to any vertex


u is called the level of u.
ii. The maximum vertex level is called the depth of
the tree.
iii. Those vertices with zero outdegree are called leaves
of the tree.
iv. The directed path from a vertex to a leaf is called a
branch.

57
Example
Example:- Consider the rooted tree T.
The root of the tree is vertex a.
Vertex a is at level 0.
Vertex b and c are at level 1.
Vertices d, e, f, g and h are at level 2.
Depth of T is 4 which is level of k.
The vertices d, k, j, f, g, and h with out degree zero are
called leaves of the tree.
Definition: If there is a directed edge from a vertex U to
V, we say that U is the parent of V and that V is the child
of U 58
Note
We say that a is a parent of d and d is a child of a since
there is a direct edge from a to d.
Vertices of the same parent are called siblings.
e.g:- d&e, a, b&c, i&j are siblings.
Vertices which have children are called internal
vertices. e.g. a, b, c, f, e, r are internal vertices.
Binary tree
M-ary tree: A rooted tree is called an m-ary tree if
every internal vertex has not more than m-children.
The tree is called a full-m-ary if every internal vertex
has exactly m children.
59
Definition: An 𝑚 −ary tree with 𝑚 = 2 is called a Binary
tree.
Note: A tree T is a full binary tree if there is only one
vertex with degree 2(sum of in degree & out degree) and
the remaining vertices are of degree 1 or 3.
Example: Consider the following two rooted trees
rooted at r.

60
Properties of Trees

Let T= (V,E) be a tree. Then


1. There is a unique path connecting any two vertices of
T.
2. |E| = |V|  1.
3. T + {e}, i.e., inclusion of one more edge to T,
creates a unique cycle on T.
4. Non-trivial tree T contains at least 2 leaves.
5. Removal of an edge of T results disconnection of T.

61
The numbers of edges, leaves and vertices of various
types in trees.
 THEOREM 6.3.2 : A tree with n vertices has n − 1 edges.
 THEOREM 6.3.3 : A full m-ary tree with i internal vertices
contains n = mi + 1 vertices.
 THEOREM 6.3.4 : A full m-ary tree with
 (i ) 𝑛 vertices has 𝑖 = (𝑛 − 1)/𝑚 internal vertices and
𝑙 = ,(𝑚 − 1)𝑛 + 1-/𝑚 leaves,
 (ii ) 𝑖 internal vertices has 𝑛 = 𝑚𝑖 + 1 vertices and
𝑙 = (𝑚 − 1)𝑖 + 1 leaves,
(iii ) 𝑙 leaves has 𝑛 = (𝑚𝑙 − 1)/(𝑚 − 1) vertices and 𝑖 = (𝑙 −
1)/(𝑚 − 1) internal vertices.
Example: 1. How many internal vertices & leaves do have a full 5-
ary tree with 2,001 vertices?
2. How many vertices & leaves do have a full 5-ary tree with 100
internal vertices? 62
4.8 Planar graphs
The House-and-Utilities Problem

63
Planar graphs …
Consider the previous slide. Is it possible to join the
three houses to the three utilities in such a way that
none of the connections cross?
Phrased another way, this question is equivalent to:
Given the complete bipartite graph K3,3, can K3,3 be
drawn in the plane so that no two of its edges cross?

K3,3

64
Planar graphs …
Definition A graph is called planar if it can be drawn in
the plane without any edges crossing.
A crossing of edges is the intersection of the lines or arcs
representing them at a point other than their common
endpoint.
Such a drawing is called a planar representation of the
graph.
Remark: A graph may be planar even if it is usually drawn
with crossings, since it may be possible to draw it in
another way without crossings

65
Planar graphs …
Note:
We can prove that a particular graph is planar by
showing how it can be drawn without any crossings.
However, not all graphs are planar.
It may be difficult to show that a graph is non planar.
We would have to show that there is no way to draw the
graph without any edges crossing.

66
Planar graphs …

A graph may be planar even if it represents


a 3-dimensional object.
Example:- Consider the following

67
Planar graphs …
Euler showed that all planar
representations of a graph split the plane
into the same number of regions,
including an unbounded region.
Example:-
R4 R3 R2

R1

68
Planar graphs …
Example (non-planar graph):-In any
planar representation of K3,3, vertex v1 must
be connected to both v4 and v5, and v2 also
v
must be v
connected
v
to both v 4 and v5.
1 2 3

v4 v5 v6 69
Planar graphs …
The four edges {v1, v4}, {v4, v2}, {v2, v5},
{v5, v1} form a closed curve that splits the
plane into two regions, R1 and R2.

v1 v5

R2 R1

v4 v2 70
Planar graphs …
Next, we note that v3 must be in either R1 or R2.
Assume v3 is in R2. Then the edges {v3, v4} and {v4, v5}
separate R2 into two subregions, R21 and R22.

v1 v5 v1 v5

R21

R2 R1 → v3

R22

v4 v2 v4 v2
71
Planar graphs …
Now there is no way to place vertex v6
without forcing a crossing:
 If v6 is in R1 then {v6, v3} must cross an edge
 If v6 is in R21 then {v6, v2} must cross an edge
 If v6 is in R22 then {v6, v1} must cross an edge
v1 v5

R21

v3 R1

R22

v4 v2 72
Planar graphs …
Alternatively, assume v3 is in R1. Then the
edges {v3, v4} and {v4, v5} separate R1 into
two subregions, R11 and R12.

v1 v5

R11

R2 R12 v3

v4 v2
73
Planar graphs …
Now there is no way to place vertex v6 without forcing a
crossing:
 If v6 is in R2 then {v6, v3} must cross an edge
 If v6 is in R11 then {v6, v2} must cross an edge
 If v6 is in R12 then {v6, v1} must cross an edge
v1 v5

R11

R2 R12 v3

v4 v2
74
Planar graphs …
Consequently, the graph K3,3 must be
non-planar.

K3,3

75
Euler’s Formula
Euler devised a formula for expressing the
relationship between the number of
vertices, edges, and regions of a planar
graph.
These may help us determine if a graph can
be planar or not.

76
Euler’s Formula …

Let G be a connected planar simple graph


with e edges and v vertices. Let r be the
number of regions in a planar
representation of G. Then r = e - v + 2.

R4 R3 R2 # of edges, e = 6
R1 # of vertices, v = 4
# of regions, r = e - v + 2 = 4
77
Euler’s Formula …

Corollary 1: If G is a connected planar


simple graph with e edges and v vertices
where v  3, then e  3v - 6.
Example:- Is K5 planar?

K5

78
Euler’s Formula …

K5 has 5 vertices and 10 edges.


We see that v  3.
So, if K5 is planar, it must be true that e  3v – 6.
3v – 6 = 3*5 – 6 = 15 – 6 = 9.
So e must be less than 9.
But e = 10.
So, K5 is non-planar.

K5
79
Euler’s Formula …

Corollary 2: If G is a connected planar


simple graph, then G has a vertex of degree
not exceeding 5.

80
Euler’s Formula …

Corollary 3: If a connected planar simple


graph has e edges and v vertices with v  3
and no circuits of length 3, then e  2v - 4.
Example:- Is K3,3 planar?

81
Euler’s Formula …
K3,3 has 6 vertices and 9 edges.
Obviously, v  3 and there are no circuits of length 3.
If K3,3 were planar, then e  2v – 4 would have to be true.
2v – 4 = 2*6 – 4 = 8
So e must be  8.
But e = 9.
So K3,3 is nonplanar.

K3,3
82
Ex:- Suppose that a connected planar simple graph has
20 vertices, each of degree 3. Into how many regions
does a representation of this planar graph split the
plane?
Solution : deg 𝑣𝑖 = 2𝑒
20𝑥3 = 2𝑒 ⟹ 60 = 2𝑒 ⟹ 𝑒 = 30
𝑟 = 𝑒 − 𝑣 + 2 ⟹ 𝑟 = 30 − 20 + 2 = 12
Exercise: a connected planar graph has 17 edges,
dividing the plane into 9 regions. How many vertices
does the graph have? Answer 10.

83

You might also like