Module 7 - Matching - Covering
Module 7 - Matching - Covering
Dr. R. Jayagopal_Module 7
1
Bipartite Graph
A graph is bipartite if its vertex set can be partitioned into two
subsets 𝑋 and 𝑌 so that every edge has one end in 𝑋 and one end in 𝑌
; such a partition (𝑋, 𝑌) is called a bipartition of the graph. We denote
a bipartite graph 𝐺 with bipartition (𝑋, 𝑌) by 𝐺[𝑋, 𝑌 ].
1 2 3 4 5 6 7
Here, 𝑋 = 1, 3, 5, 7 𝑎𝑛𝑑 𝑌 = {2, 4, 6}
Complete Bipartite graph:
Star graph:
5
Here, 𝑋 = 1
4 1 2 𝑎𝑛𝑑
𝑌 = {2, 3, 4, 5}
3
Dr. R. Jayagopal_Module 7 3
Coloring
Given a graph on 𝑛 vertices. Color all the vertices such that no two
adjacent vertices have the same color.
𝑮: a b 𝑮: a b 𝑮: a b
d c d c d c
4 colors 3 colors 2 colors
Dr. R. Jayagopal_Module 7 4
Partitioning
Grouping the vertices into different sets based on the colors.
▪ There are 4 partitions namely {𝑎}, {𝑏}, {𝑐}, {𝑑}
▪ There are 3 partitions namely 𝑎, 𝑐 , 𝑏 , 𝑑
▪ There are 2 partitions namely 𝑎, 𝑐 , {𝑏, 𝑑}
𝑮: a b 𝑮: a b 𝑮: a b
d c d c d c
4 colors 3 colors 2 colors
Dr. R. Jayagopal_Module 7 5
Dr. R. Jayagopal_Module 7 6
Chromatic number
Proper coloring: Coloring all the vertices of a graph such that no
two adjacent vertices receive the same color.
Minimum number of colors needed for proper coloring a graph 𝐺 is
called chromatic number of 𝐺 (denoted by 𝜒(𝐺)). The graph 𝐺 is
called a chromatic graph.
▪ A path on 𝑛 vertices is 2-chromatic, 𝑛 ≥ 2
▪ A tree with 2 or more vertices is 2- chromatic
▪ A bipartite graph (or complete bipartite graph) is 2-chromatic
▪ A complete graph on 𝑛 vertices is 𝑛-chromatic
Dr. R. Jayagopal_Module 7 7
Try this!
𝑮:
Dr. R. Jayagopal_Module 7 8
Characterization of 2-chromatic graphs
Theorem:
A graph 𝐺 is 2-chromatic if and only if 𝐺 is bipartite.
Dr. R. Jayagopal_Module 7 9
Chromatic Polynomial
𝑃(𝐺, 𝝀) is the chromatic polynomial of a graph 𝐺 on 𝑛 vertices equal
to the number of different ways of properly coloring the graph
using at most 𝞴 colors.
𝑃 𝐺, 𝝀 = 𝞴(𝞴 − 1)7
Dr. R. Jayagopal_Module 7 10
Theorem:
Let 𝐺 be a path on 𝑛 vertices then 𝑃 𝐺, 𝝀 = 𝞴 𝞴 − 1 𝑛−1 ,
𝜆 ≥ 2.
Theorem:
A graph 𝐺 is a tree (or a Path) on 𝑛-vertices if and only if its
chromatic polynomial is 𝑃(𝐺, 𝝀) = 𝝀 (𝝀 − 1)𝑛−1 , 𝜆 ≥ 2.
Dr. R. Jayagopal_Module 7 11
Theorem:
Let 𝐺 be an empty graph on 𝑛 vertices then 𝑃 𝐺, 𝞴 = 𝞴𝑛
𝑮: 𝞴 𝞴
𝞴 𝞴
𝑃 𝐺, 𝞴 = 𝞴5
Dr. R. Jayagopal_Module 7 12
Theorem:
Let 𝐺 be a complete graph on 𝑛 vertices then
𝑃(𝐺, 𝞴) = 𝞴 𝞴 − 1 𝞴 − 2 . . . 𝞴 − 𝑛 − 1 , 𝜆 ≥ 𝑛
𝑮: 𝞴
𝞴−𝟑
𝞴−𝟐 𝞴−𝟏
Dr. R. Jayagopal_Module 7 13
Theorem:
Let 𝐺 be a disconnected graph with 𝑛 components say 𝐺1 , 𝐺2 , . . . , 𝐺𝑛
then 𝑃 𝐺, 𝝀 = 𝑃 𝐺1 , 𝞴 𝑃 𝐺2 , 𝞴 . . . 𝑃(𝐺𝑛 , 𝞴).
𝑮
𝑮𝟏 𝑮𝟐 𝞴
𝞴−𝟑
𝞴−𝟐 𝞴−𝟏
𝑃 𝐺, 𝝀 = 𝑃 𝐺1 , 𝞴 𝑃 𝐺2 , 𝞴
= 𝞴(𝞴 − 1)3 𝞴(𝞴 − 1)(𝞴 − 2)(𝞴 − 3)
= 𝞴2 (𝞴 − 1)4 (𝞴 − 2)(𝞴 − 3)
Dr. R. Jayagopal_Module 7 14
Decomposition Theorem:
Let 𝑒 be any edge in 𝐺, where 𝑢 and 𝑣 are end vertices of 𝐺.
Let 𝐺𝑒 be a graph obtained by deleting the edge 𝑒 from 𝐺.
Let 𝐺𝑒′ be a simple graph obtained from 𝐺 by fusing the
vertices 𝑢 & 𝑣 together and replacing sets of parallel edges
with single edges.
Then 𝑃 𝐺, 𝝀 = 𝑃 𝐺𝑒 , 𝝀 − 𝑃(𝐺𝑒′ , 𝝀)
Dr. R. Jayagopal_Module 7 15
Dr. R. Jayagopal_Module 7 16
Problem 1:
𝑃 𝐺, 𝝀 = 𝑃 𝐺𝑒 , 𝝀 − 𝑃(𝐺𝑒′ , 𝝀)
= 𝑃 𝐻1 , 𝝀 − 𝑃(𝐻2 , 𝝀)
= 𝑃 𝐻1 , 𝝀 − 𝑃 𝐻3 , 𝝀 − 𝑃(𝐻4 , 𝝀)
𝑷(𝑮, 𝝀) = 𝝀 𝝀 − 𝟏 𝟒 − 𝝀 𝝀−𝟏 𝟑 − 𝝀(𝝀 − 𝟏)(𝝀 − 𝟐)
Dr. R. Jayagopal_Module 7 17
Problem 2:
Dr. R. Jayagopal_Module 7 18
Dr. R. Jayagopal_Module 7 19
Dr. R. Jayagopal_Module 7 20
Matching
• A matching graph is a subgraph of a graph where there
are no edges adjacent to each other.
• Simply, there should not be any common vertex between
any two edges.
Dr. R. Jayagopal_Module 7 21
Example:
Dr. R. Jayagopal_Module 7 22
Maximal and Maximum Matching
▪ A maximal matching is a matching to which no edge in
the graph can be added.
▪ Maximum matching is defined as the maximal
matching with maximum number of edges.
▪ The number of edges in the maximum matching of 𝐺 is
called its matching number 𝑴(𝑮).
Dr. R. Jayagopal_Module 7 23
Example:
Dr. R. Jayagopal_Module 7 24
Perfect Matching
Dr. R. Jayagopal_Module 7 25
Example:
Dr. R. Jayagopal_Module 7 26
Dr. R. Jayagopal_Module 7 27
Note: If a graph 𝐺 has a perfect matching, then the number
of vertices is even. The converse need not be true.
Example:
Dr. R. Jayagopal_Module 7 28
Note: A maximum matching of graph need not be perfect.
Dr. R. Jayagopal_Module 7 29
Covering
• A covering in a graph is a subgraph which contains either
all the vertices or all the edges corresponding to some
other graph.
• A subgraph which contains all the vertices is called a
edge covering.
• A subgraph which contains all the edges is called a vertex
covering.
Dr. R. Jayagopal_Module 7 30
Example:
Dr. R. Jayagopal_Module 7 31
Example:
Dr. R. Jayagopal_Module 7 35
Example:
Dr. R. Jayagopal_Module 7 36
• A vertex covering 𝑆 of graph 𝐺 is said to be minimal
vertex covering of 𝑮 if no vertex can be deleted from 𝑆.
• A minimal vertex covering of graph 𝐺 with minimum
number of vertices is called the minimum vertex
covering.
• The number of vertices in a minimum vertex covering of
𝐺 is called the vertex covering number 𝛼2(𝐺).
Dr. R. Jayagopal_Module 7 37
Example:
Dr. R. Jayagopal_Module 7 38
Dr. R. Jayagopal_Module 7 39
Dr. R. Jayagopal_Module 7 40
Four Color Theorem
The four-color theorem states that any map in a plane can be colored
using four-colors in such a way that regions sharing a common
boundary (other than a single point) do not share the same color.
Dr. R. Jayagopal_Module 7 41
f
Plane Surface:
a b
e
d c
Dr. R. Jayagopal_Module 7 42
f
Plane Surface:
a b
e
d c
𝑮: a b
e f
d c
Dr. R. Jayagopal_Module 7 43
Outer surface can be
f given green color
Plane Surface:
a b
e
d c
𝑮: a b
e f
d c
Dr. R. Jayagopal_Module 7 44
Radius, diameter and center of graph
Dr. R. Jayagopal_Module 7 45
Dr. R. Jayagopal_Module 7 46
Eccentricity
𝑒 𝑎 = max 𝑑 𝑎, 𝑏 , 𝑑 𝑎, 𝑐 , 𝑑 𝑎, 𝑑 , 𝑑 𝑎, 𝑒 , 𝑑 𝑎, 𝑓 , 𝑑 𝑎, 𝑔
= max 1,2,2,2,3,3
𝑒 𝑎 =3
Similarly,
𝑒 𝑏 =2 𝑒 𝑒 =2
𝑒 𝑐 =3 𝑒 𝑓 =3
𝑒 𝑑 =2 𝑒 𝑔 =2
Center of 𝐺 = 𝑏, 𝑒
Since, 𝑒 𝑏 = 𝑟𝑎𝑑𝑖𝑢𝑠 𝐺 and 𝑒 𝑒 = 𝑟𝑎𝑑𝑖𝑢𝑠 𝐺
Dr. R. Jayagopal_Module 7 48
Thank You
Dr. R. Jayagopal_Module 7 49