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

Module V - Graph Theory Notes.

1. The document discusses matrix representations of graphs, including adjacency, incidence, circuit and path matrices. 2. It provides an example of constructing the incidence matrix of a graph by assigning 1's and 0's based on whether each edge is incident to each vertex. 3. Key properties of incidence matrices are that each column has exactly two 1's and the number of 1's in each row equals the degree of the corresponding vertex.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Module V - Graph Theory Notes.

1. The document discusses matrix representations of graphs, including adjacency, incidence, circuit and path matrices. 2. It provides an example of constructing the incidence matrix of a graph by assigning 1's and 0's based on whether each edge is incident to each vertex. 3. Key properties of incidence matrices are that each column has exactly two 1's and the number of 1's in each row equals the degree of the corresponding vertex.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

Module V

• Matrix representation of graphs-


• Adjacency matrix
• Incidence Matrix
• Circuit Matrix
• Path Matrix
• Coloring- Chromatic number, Chromatic polynomial
• Matching-Covering
• Four colour problem.
Matrix representation of Graph
• A matrix is a conventional and useful way of representing a graph to a
computer.
• Matrices lend themselves easily to mechanical manipulation.
• Many known results of matrix algebra can be readily applied to study
the structural properties of graphs from an algebraic point of view.
• In many applications of graph theory, such as in electrical network
analysis and operations research, the application of matrices play a
very Important role.
Incidence Matrix
• Let 𝐺 be a graph with 𝑛 vertices, 𝑒 edges and no self-loops.
• Define an 𝑛 by 𝑒 matrix 𝐴 = 𝑎𝑖𝑗 , whose 𝑛 rows corresponds to the
𝑛 vertices and the 𝑒 columns to 𝑒 edges as follows.
• The matrix element
𝑎𝑖𝑗 = 1, if 𝑗𝑡ℎ edge 𝑒𝑗 is incident on 𝑖 𝑡ℎ vertex 𝑣𝑖 , and
= 0, otherwise.
Incidence Matrix
• Find the incidence matrix of the following graph

𝑣3 a 𝑣6
h

e
𝑣2
𝑣4 b

g
f c

𝒗𝟏 d 𝑣5
𝑣3
h
a 𝑣6 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ
0 0 0 1 0 1 0 0
e 𝑣1
𝑣2
𝑣4 0 0 0 0 1 1 1 1
b 𝑣2
0 0 0 0 0 0 0 1
f
g
c 𝑣3 1 1 1 0 1 0 0 0
𝑣4
𝑣5 0 0 1 1 0 0 1 0
𝒗𝟏 d 𝑣5
𝑣6 1 1 0 0 0 0 0 0
𝑣3
h
a 𝑣6 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ
0 0 0 1 0 1 0 0
e 𝑣1
𝒗𝟐
𝑣4 0 0 0 0 1 1 1 1
b 𝑣2
0 0 0 0 0 0 0 1
f
g
c 𝑣3 1 1 1 0 1 0 0 0
𝑣4
𝑣5 0 0 1 1 0 0 1 0
𝒗𝟏 d 𝑣5
𝑣6 1 1 0 0 0 0 0 0
𝒗𝟑
h
a 𝑣6 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ
0 0 0 1 0 1 0 0
e 𝑣1
𝑣2
𝑣4 0 0 0 0 1 1 1 1
b 𝑣2
0 0 0 0 0 0 0 1
f
g
c 𝑣3 1 1 1 0 1 0 0 0
𝑣4
𝑣5 0 0 1 1 0 0 1 0
𝒗𝟏 d 𝑣5
𝑣6 1 1 0 0 0 0 0 0
𝑣3
h
a 𝑣6 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ
0 0 0 1 0 1 0 0
e 𝑣1
𝑣2
𝒗𝟒 0 0 0 0 1 1 1 1
b 𝑣2
0 0 0 0 0 0 0 1
f
g
c 𝑣3 1 1 1 0 1 0 0 0
𝑣4
𝑣5 0 0 1 1 0 0 1 0
𝒗𝟏 d 𝑣5
𝑣6 1 1 0 0 0 0 0 0
𝑣3
h
a 𝑣6 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ
0 0 0 1 0 1 0 0
e 𝑣1
𝑣2
𝑣4 0 0 0 0 1 1 1 1
b 𝑣2
0 0 0 0 0 0 0 1
f
g
c 𝑣3 1 1 1 0 1 0 0 0
𝑣4
𝑣5 0 0 1 1 0 0 1 0
𝒗𝟏 d 𝒗𝟓
𝑣6 1 1 0 0 0 0 0 0
𝑣3
h
a 𝒗𝟔 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ
0 0 0 1 0 1 0 0
e 𝑣1
𝑣2
𝑣4 0 0 0 0 1 1 1 1
b 𝑣2
0 0 0 0 0 0 0 1
f
g
c 𝑣3 1 1 1 0 1 0 0 0
𝑣4
𝑣5 0 0 1 1 0 0 1 0
𝒗𝟏 d 𝑣5
𝑣6 1 1 0 0 0 0 0 0

Such a matrix A is called the vertex- edge incidence matrix or simply


incidence matrix.
Observations about the incidence matrix:
1. Since every edge is incident on exactly two vertices, each column of A has
exactly two 1’s.
2. The number of 1’s in each row equals the degree of the corresponding vertex
3. A row with all 0’s represents an isolated vertex
4. Parallel edges in a graph produce identical columns in its incidence matrix
5. In the above example Column 1 and 2 in the previous figure.
6. If a graph G is disconnected and consists of two components, 𝑔1 and 𝑔2 , the
incidence matrix A (G) of graph G can be written in a block-diagonal form as
𝐴 𝑔1 0
𝐴 𝐺 = where 𝐴 𝑔1 and 𝐴 𝑔2 are the incident
0 𝐴(𝑔2 )
matrices of the components 𝑔1 and 𝑔2 .
Theorem: If A(G) is an incidence matrix of a connected graph G
with “n” vertices, then the rank of A(G) is (𝑛 − 1).
Proof:
• If A(G) is an incidence matrix of a connected graph G with “n” vertices,
and “m” edges. Then
𝑎11 𝑎12 −−− − 𝑎1𝑚
𝑎21 𝑎22 −−− − 𝑎2𝑚
𝐴 𝐺 = −− −− −− −−
𝑎𝑛1 𝑎𝑛2 −−− − 𝑎𝑛𝑚
• Let the vectors in the first row be called 𝐴1 , in the second row 𝐴2 , and
𝐴1
𝐴2
so on, thus 𝐴 𝐺 =

𝐴𝑛
• Since there are exactly two 1’s in every column, the sum of all these vectors
is ‘0’ (this being a modulo 2 sum of the corresponding entries)
• Thus the vectors 𝐴1 , 𝐴2 , … 𝐴𝑛 are not linearly independent.
• Therefore, the rank of 𝐴 < 𝑛, ∴ rank 𝐴 ≤ 𝑛 − 1 −−−− −(1).
• Now we prove for any 𝑘 where 1 ≤ 𝑘 ≤ (𝑛 − 1) the set {𝐴1 , 𝐴2 , … 𝐴𝑘 } is
linearly independent.
• We can find no 𝑘 × 𝑘 submatrix of A(G) such that sum of these k rows are
equal to zero
• That is no linear combination of 𝑘 row vectors of 𝐴(𝐺) can be equal to 0.
∴ rank of 𝐴(𝐺) ≥ (𝑛 − 1)-------(2)
• Hence from(1) and (2) we can conclude that rank of 𝐴(𝐺) = 𝑛 − 1.
Q1.
• Given the incidence matrix of G, draw the graph of G.

1 1 0 0 0 0
1 1 1 0 1 0
0 0 1 1 0 0
0 0 0 1 1 1
0 0 0 0 0 1
Q1.
• Given the incidence matrix of G, draw the graph of G.

1 1 0 0 0 0
1 1 1 0 1 0
0 0 1 1 0 0
1 a 0 0 0 1 1 1
0 0 0 0 0 1
b 2

c e 5
3 f
d 4
Q2.
• Construct the incidence matrix A for the graph shown below
𝑒1 𝑣2 𝑒2 𝑣3
𝑣1
𝑒6 𝑒3
𝑒5 𝑒4
𝑣5 𝑣4
Q2.
• Construct the incidence matrix M for the graph shown below
𝑒1 𝑣2 𝑒2 𝑣3
𝑣1
𝑒6 𝑒3 e1 e2 e3 e4 e5 e6
𝑒5 𝑒4
𝑣5 𝑣4 v1 1 0 0 0 0 1
v2 1 1 0 1 1 0
M= v3 0 1 1 0 0 0
v4 0 0 1 1 0 0
v5 0 0 0 0 1 1
Q3.
• Consider the following disconnected graph G with two components.
Find the incidence matrix of G.
𝑣4 𝑒3 𝑣3 𝑣6
𝑒6 𝑒9
𝑒4 𝑒5 𝑒2 𝑣5
𝑒8 𝑣8
𝑣1 𝑒7
𝑒1 𝑣2 𝑣7
Q3.
• Consider the following disconnected graph G with two components.
Find the incidence matrix of G.
𝑣4 𝑒3 𝑣3 𝑣6
e1 e2 e3 e4 e5 e6 e7 e8 e9
𝑒6 𝑒9 v1 1 0 0 1 0 0 0 0 0
𝑒4 𝑒5 𝑒2 𝑣9
𝑒8 v2 1 1 0 0 1 0 0 0 0
𝑣8
v3 0 1 1 0 0 0 0 0 0
𝑣1 𝑒7 A(G) = v4 0 0 1 1 1 0 0 0 0
𝑒1 𝑣2 𝑣7 v5 0 0 0 0 0 1 1 0 0
v6 0 0 0 0 0 1 0 1 1
v7 0 0 0 0 0 0 1 1 0
v8 0 0 0 0 0 0 0 0 1
Circuit Matrix
• Let the number of different circuits in a graph G be q and the number
of edges in G be e. Then the circuit matrix 𝐵 = 𝑏𝑖𝑗 of G is a q by e,
(0,1) matrix defined as follows
𝑏𝑖𝑗 = 1, if 𝑖 𝑡ℎ circuit includes 𝑗𝑡ℎ edge, and
= 0, otherwise.

• The circuit matrix may be written as B(G)


𝑣3 a 𝑣6
The graph has four different circuits
h
{a,b}, {c,e,g}, {d,f,g}, and {c,d,f,e}
e therefore a circuit matrix is a 4x8, (0,1)
𝑣2
𝑣4 b
matrix as shown
g
f c
a b c d e f g h
𝒗𝟏 𝑣5
1 1 1 0 0 0 0 0 0
d
B(G) = 2 0 0 1 0 1 0 1 0
3 0 0 0 1 0 1 1 0
4 0 0 1 1 1 1 0 0
Observations about the circuit matrix
1. A column of all 0’s corresponds to a non-circuit edge. (i.e. an edge that
does not belong to any circuit)
2. Each row of B(G) is a circuit vector. The number of 1’s in the row equal
to the number of edges in the circuit.
3. Unlike the incidence matrix, a circuit matrix is capable of representing
a self-loop; the corresponding row will have a single 1.
4. If graph G is separable or disconnected and consists of two blocks (or
components) 𝑔1 and 𝑔2 the circuit matrix B(G) can be written in a
block diagonal form as
𝐵 𝑔1 0
𝐵 𝐺 = where 𝐵 𝑔1 and 𝐵 𝑔2 are the circuit
0 𝐵(𝑔2 )
matrices of 𝑔1 and 𝑔2 .
Q1.
• Consider the following disconnected graph G with two components.
Find the circuit matrix of G.
𝑣4 𝑒3 𝑣6
𝑣3
𝑒6 𝑒9
𝑒4 𝑒5 𝑒2 𝑣5
𝑒8
𝑒7 𝑣8 𝑒10
𝑣1 𝑒1 𝑣2 𝑣7
• The circuits of the given graph are 𝐶1 = 𝑒1 , 𝑒4 , 𝑒5 , 𝐶2 = 𝑒2 , 𝑒3 , 𝑒5 ,
𝐶3 = 𝑒1 , 𝑒2 , 𝑒3 , 𝑒4 , 𝐶4 = 𝑒6 , 𝑒7 , 𝑒8 , 𝐶5 = 𝑒10 . The circuit matrix
of the given graph is a 5 × 10 matrix as given.

1 0 0 1 1 0 0 0 0 0
0 1 1 0 1 0 0 0 0 0
𝐵 𝐺 = 1 1 1 1 0 0 0 0 0 0
0 0 0 0 0 1 1 1 0 0
0 0 0 0 0 0 0 0 0 1
Theorem:
• Let B and A be respectively the circuit
matrix and the incidence matrix of a self
loop free graph, whose columns are 𝑣3
arranged using the same order of edges.
a
Then every row of B is orthogonal to h 𝑣6

every row of A. That is 𝐴𝐵𝑇 = 𝐵𝐴𝑇 ≡ e


0 𝑚𝑜𝑑2 . 𝑣2
𝑣4 b
• Consider the graph G given in the first g
c
example f

𝒗𝟏 d 𝑣5
1 0 0 0
0 0 0 1 0 1 0 0 1 0 0 0 0 0 2 2
0 0 0 0 1 1 1 1 0 1 0 1 0 2 2 2
• 𝐴𝐵𝑇 = 0 0 0 0 0 0 0 1 × 0 0 1 1=0 0 0 0
1 1 1 0 1 0 0 0 0 1 0 1 2 2 0 2
0 0 1 1 0 0 1 0 0 0 1 1 0 2 2 2
1 1 0 0 0 0 0 0 0 1 1 0 2 0 0 0
0 0 0 0

≡ 0 𝑚𝑜𝑑2 .
Problem
• Verify 𝐴𝐵𝑇 = 𝐵𝐴𝑇 ≡ 0 𝑚𝑜𝑑2 , where B and A be respectively the
circuit matrix and the incidence matrix of the given graph

𝑣1 𝑒1 𝑣2 𝑒2 𝑣3

𝑒4 𝑒6
𝑒5 𝑒3

𝑣5
𝑣4
Path matrix
• Another (0,1) matrix often convenient to use in communication and
transportation networks is the path matrix.
• A path matrix is defined for a specific pair of vertices in a graph, say
(x,y) and is written as P(x,y).
• The rows in P(x,y) corresponds to different paths between the
vertices x and y and the column corresponds to the edges in G i.e. the
path matrix for (x,y) vertices is
1 𝑖𝑓 𝑗 𝑡ℎ 𝑒𝑑𝑔𝑒 𝑙𝑖𝑒𝑠 𝑖𝑛 𝑖 𝑡ℎ 𝑝𝑎𝑡ℎ
• 𝑝 𝑥, 𝑦 = 𝑃𝑖𝑗 where 𝑃𝑖𝑗 = ቊ
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Example
𝑣3
• Consider all paths from 𝑣3 to 𝑣4 , there are 3
different paths {h,e},{h,g,c},{h,f,d,c} h
a 𝑣6

• Let’s number these paths 1, 2 and 3 e


𝑣2
respectively, then we get a 3×8 path matrix 𝑣4 b
g
f c
a b c d e f g h
1 0 0 0 0 1 0 0 1 𝒗𝟏 d 𝑣5
𝑃(𝑣3 , 𝑣4 ) =
2 0 0 1 0 0 0 1 1
3 0 0 1 1 0 1 0 1
Properties
• Some of the observations one can make at once about a path matrix
P(x,y) of a graph G are
1. A column of all zeroes corresponds to an edge that does not lie in any path
between x and y.
2. A column of all 1’s corresponds to an edge that lies in every path between x
and y.
3. There is no row with all zeroes
4. The ring sum of any two rows in P(x,y) corresponds to a circuit of an edge-
disjoint union of circuits.
Adjacency Matrix
• The adjacency matrix of a graph G with “n” vertices and no parallel
edges is an 𝑛 × 𝑛 symmetric binary matrix 𝑋 = 𝑥𝑖𝑗 defined as

1, 𝑖𝑓 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑎𝑛 𝑒𝑑𝑔𝑒 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑖 𝑡ℎ 𝑎𝑛𝑑 𝑗𝑡ℎ 𝑣𝑒𝑟𝑡𝑖𝑐𝑒𝑠


𝑥𝑖𝑗 = ൝
0, 𝑖𝑓 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑛𝑜 𝑒𝑑𝑔𝑒 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑡ℎ𝑒𝑚
Simple graph and its adjacency matrix
𝑣3
𝑣2 𝑒4 𝑒8
0 1 0 0 1 1
𝑒3
𝑣4
1 0 0 1 1 0
𝑒1 𝑣5 𝑒5 𝑒7
𝑋= 0 0 0 1 0 0
𝑒2 0 1 1 0 1 1
𝑣6
𝑒6
𝑣1 1 1 0 1 0 0
1 0 0 1 0 0
• Construct an adjacency matrix X for the following graph.
1. 𝑒5 𝑣 𝑣
4 𝑒3 3
0 1 0 1
𝑒4 𝑒2 1 1 1 0
0 1 0 1
𝑣1 𝑒1 𝑣2 1 0 1 1
𝑒6

2.
𝑣4 𝑣6 0 1 0 1 0 0 0 0
𝑒3 𝑣3
𝑒6 1 0 1 1 0 0 0 0
𝑒9 0 1 0 1 0 0 0 0
𝑒4 𝑒5 𝑣5 𝑣8 1 1 1 0 0 0 0 0
𝑒2 𝑒8
0 0 0 0 0 1 1 0
𝑒7 0 0 0 0 1 0 1 1
𝑣2 𝑣7 0 0 0 0 1 1 0 0
𝑣1 𝑒1
0 0 0 0 0 1 0 0
Observation about the adjacency matrix X of
a graph G
• The entries along the principal diagonal of X are all 0’s iff the graph
has no self-loops. A self-loop at the 𝑖 𝑡ℎ vertex corresponds to 𝑥𝑖𝑖 = 1
• The definition of adjacency matrix makes no provision for parallel
edges. This is why the adjacency matrix X was defined for graphs
without parallel edges.
• If the graph has no self loops (and no parallel) the degree of a vertex
equals the number of 1’s in the corresponding row or column of X.
• A graph G is disconnected and is in two components 𝑔1 and 𝑔2 iff its
adjacency matrix X(G) can be partitioned as 𝑋(𝑔1 ) 0
𝑋 𝐺 =
0 𝑋(𝑔2 )

where 𝑋(𝑔1 ) is the adjacency matrix of the component 𝑔1 and 𝑋(𝑔2 ) is


that of the component 𝑔2
This partitioning clearly implies that there exists no edge joining any
vertex in subgraph 𝑔1
• Given any square, symmetric, binary matrix Q of order n, one can
always construct a graph G of ‘n’ vertices (and no parallel edges) such
that Q is the adjacency matrix of G.
Theorem
Theorem: If A(G) is an incidence matrix of a connected graph G with “n”
vertices, the rank of A(G) is 𝑛 − 1 .
Theorem: If B is a circuit matrix of a connected graph G with “e” edges and “n”
vertices; rank of B = 𝑒 − 𝑛 + 1
• Proof: If A is an incidence matrix of G
𝐴. 𝐵𝑇 = 0 𝑚𝑜𝑑 2
Therefore By Sylvester’s theorem
rank of A + rank of B ≤ e
i.e rank of B ≤ e – rank of A
≤ 𝑒 − (𝑛 − 1)
But rank of B ≥ 𝑒 − 𝑛 + 1
therefore rank of B = 𝑒 − 𝑛 + 1
Coloring of Graphs
• We have a graph G having n vertices.
• The question is to paint the vertices such that no two adjacent
vertices have the same color.
• What is the minimum number of colors that we will require?
• So, the questions posed above are pertaining to a COLORING
problem.
Vertex coloring
• K – vertex coloring:
• A k-vertex coloring of a graph G is an assignment of k colors, 1,2,…,k to the
vertices of G. The coloring is proper if no two distinct adjacent vertices have
the same color.
• K-vertex colourable:
• A graph G is k-vertex colourable if G has a proper k-vertex coloring. K- vertex
colourable is also called as k-colourable.
• Chromatic Number 𝜒 𝐺 = 𝜅:
• The chromatic number of a graph G is denoted by 𝜒 𝐺 = 𝜅 is the minimum 𝜅
for which, G is 𝜅 -colourable.
Chromatic Number
• Painting all the vertices of a graph with colors such that no two
adjacent vertices have the same color is called the PROPER COLORING
of a graph.

• Typically, a given graph can be properly colored in many ways. To


understand this, let’s refer to the figure
• Now, as we see the graphs have been colored properly; but what is
important is to have the minimum number of colors.

• This is understood by the following definition.

• A graph G that requires 𝜅 different colors for its proper coloring and
no less is called a 𝜅 -chromatic graph and the number 𝜅 is called the
chromatic number of G.
• From the figure we can identify that the graph is 3-chromatic.
Basic fulfilling conditions
• In coloring graphs, there is no point in considering disconnected
graphs. (because coloring vertices in one component of a
disconnected graph has no effect on the coloring of the other
components).
• Therefore, we should consider coloring of connected graphs only.
• We should also consider only simple connected graphs (Self – loops
should be disregarded)
Coloring of Graph – Important observations
• A graph consisting of only isolated vertices is 1-chromatic.
• A graph with one or more edges (not a self-loop) is at least 2-
chromatic. (called bichromatic)
• A complete graph of n vertices is n-chromatic, as all its vertices are
adjacent. Hence a graph containing a complete graph of ‘r’ vertices is
at least ‘r’-chromatic.
• A graph consisting of simple one circuit with n>=3 vertices is 2 –
chromatic if n is even and 3-chromatic if n is odd.
Theorem 1: Every tree with two or more
vertices is 2-chromatic
Proof:
• Select any vertex ‘v’ in the given tree T.
• Consider T as a rooted tree at vertex ‘v’.
• Paint ‘v’ with color 1.
• Paint all vertices adjacent to ‘v’ with color 2.
• Now, paint the vertices adjacent to these (colored as 2) with color 1.
• Continue this process till every vertex in T is colored.
• What we find is alternate colors for all vertices along a path.
• There we can say; a tree is 2-chromatic, but not every 2-chromatic graph is
a tree.
Proper coloring of a tree
Theorem 2: A graph with at least one edge is 2-chromatic if
and only if it has no circuits of odd length.
Proof:
• Let G be a connected graph with circuits of only even lengths.
• Consider a spanning tree T in G.
• Using the coloring procedure and the theorem 1, we will color T with 2
colors. Add the chords to T one by one.
• Since G has no circuits of odd length, the end vertices of every chord being
replaced are different colored in T.
• Thus G is colored with 2 colors, with no adjacent vertices having the same
color. Therefore G is 2-chromatic.
• Conversely, if G has a circuit of odd length, we will need at least 3 colors for
that circuit.
Chromatic Polynomial
• We have seen, that a given graph G of n vertices can be properly
colored in many different ways using a sufficient large number of
colors.
• This property of a graph is expressed by means of a polynomial. This
polynomial is called the chromatic polynomial of G
• Definition:
• The value of the chromatic polynomial 𝑃𝑛 (𝜆) of a graph with 𝑛 vertices gives
the number of ways of properly coloring the graph, using 𝜆 or fewer colors.
Chromatic Polynomial
• Let 𝑐𝑖 be the different ways of properly coloring G using 𝑖 different colors.
𝜆 𝜆
• Since 𝑖 colors can be chosen out of 𝜆 colors in different ways, there are 𝑐𝑖
𝑖 𝑖
different ways of properly coloring G using exactly 𝑖 colors out of 𝜆 colors.
• Since 𝑖 can be any positive integer from 1 to 𝑛 ( it is not possible to use more than 𝑛
colors on 𝑛 vertices), the chromatic polynomial is a sum of these terms. That is
𝑛 𝜆 𝜆(𝜆−1) 𝜆(𝜆−1)(𝜆−2) 𝜆 𝜆−1 …(𝜆−𝑛+1)
• 𝑃𝑛 𝜆 = σ𝑖=1 𝑐𝑖 = 𝑐1 𝜆 + 𝑐2 + 𝑐3 + ⋯ + 𝑐𝑛
𝑖 2! 3! 𝑛!
• Note: Each 𝑐𝑖 is evaluated individually for a given graph. For example, any graph with
one edge requires at least 2 colors for proper coloring and hecnce 𝑐1 = 0.
• A graph with 𝑛 vertices and using 𝑛 colors can be properly colored in 𝑛! Different ways.
That is 𝑐𝑛 = 𝑛!
Theorem 4: A graph of 𝑛 vertices is a complete graph iff its
chromatic polynomial is 𝑃𝑛 𝜆 = 𝜆 𝜆 − 1 … 𝜆 − 𝑛 + 1 .
Proof:
• With 𝜆 colors there are 𝜆 different ways of coloring any selected
vertex.
• A second vertex can be properly colored in exactly in 𝜆 − 1
different ways, third in 𝜆 − 2 different ways,…, and the 𝑛th in
𝜆 − 𝑛 + 1 ways iff every vertex is adjacent to every other vertices.
• Which is possible if and only if the graph is complete.
Theorem 5: An 𝑛 −vertex graph is a tree iff its chromatic
polynomial 𝑃𝑛 𝜆 = 𝜆 𝜆 − 1 (𝑛−1)
Proof:
• Proof of this theorem can be done by induction on number of vertices of
the graph.
• When 𝑛 = 1, that is an isolated vertex can be colored using 𝜆 colors hence
the chromatic polynomial 𝑃𝑛 𝜆 = 𝑃1 𝜆 = 𝜆.
• When 𝑛 = 2, 𝑃2 𝜆 = 𝜆 𝜆 − 1 . 𝜆 𝜆−1

• Assume that the result is true for all trees with number of vertices ≤ 𝑘
vertices.
• ∴ the chromatic polynomial 𝑃𝑛 𝜆 = 𝑃𝑘 𝜆 = 𝜆 𝜆 − 1 (𝑘−1) .
Proof continuation
• Consider a tree with 𝑘 + 1 vertices we know that a tree
with more than 2 vertices have 2 pendant vertices.
• If we remove a pendant vertex along with the edge of the
tree with 𝑘 + 1 vertices we are left with a tree with k
vertices. ∴ the resulting tree will have 𝜆(𝜆 −
1)(𝑘−1) different ways of coloring.
• ∴ after coloring all the vertices, the removed pendent
vertex can be colored in 𝜆 − 1 different ways.
• Hence the chromatic polynomial of the tree with 𝑘 + 1
vertices is 𝑃𝑘 𝜆 = 𝜆 𝜆 − 1 (𝑘−1) 𝜆 − 1 = 𝜆 𝜆 − 1 𝑘 .
Find the chromatic polynomial of the
following graphs
1.
• 1. For a tree with n vertices has chromatic
polynomial 𝑃𝑛 𝜆 = 𝜆 𝜆 − 1 (𝑛−1) .
Hence 𝑃5 𝜆 = 𝜆 𝜆 − 1 4
2. 𝑃7 𝜆 = 𝜆 𝜆 − 1 6

2.
Find the chromatic polynomial of the graph G.
• For the given graph n = 4, since the graph contain a
triangle minimum 3 colors are needed for proper
coloring. Hence 𝑐1 = 𝑐2 = 0, 𝑐3 = 3!, 𝑐4 = 4!
σ𝑛𝑖=1 𝜆
• 𝑃𝑛 𝜆 = 𝑐𝑖 ,n=4
𝑖
4 𝜆 𝜆 𝜆
• 𝑃4 𝜆 = σ𝑖=1 𝑐𝑖 =6 + 24
𝑖 3 4
G 𝜆(𝜆−1)(𝜆−2) 𝜆 𝜆−1 (𝜆−2)(𝜆−3)
=3! + 4!
3! 4!
= 𝜆 𝜆 − 1 𝜆 − 2 2.
Find the chromatic polynomial of the graph G.
G • Since G has a triangle, we need at least 3 colors for proper
coloring. ∴ 𝑐1 = 𝑐2 = 0. Now 3 colors can be assigned to
a the vertices of the graph in 3! different ways, ∴ 𝑐3 = 6.
• To find 𝑐4 , out of 4 colors 3 can be selected and assigned to
the vertices a,b,c in 4𝑃3 = 24 different ways. Now the vertex
‘d’ will have two choice , 4th color or take the color of the
vertex ‘b’.
b c d e
• ∴ 𝑐4 = 2 × 24 = 48 ways and 𝑐5 = 5!
𝑃𝑛 𝜆 = σ𝑛𝑖=1 𝑐𝑖
𝜆
𝜆 𝜆 𝜆
+5! 𝜆
,n=5
𝜆
𝑖 • 𝑃5 𝜆 = σ5𝑖=1 𝑐𝑖 =6 + 48
𝑃5 𝜆 = σ𝑖=15 𝑐𝑖
𝑖
, we have 𝑖 3 4 5
to find 𝑐1 , 𝑐2 ,…, 𝑐5 . 𝜆(𝜆−1)(𝜆−2) 𝜆 𝜆−1 (𝜆−2)(𝜆−3)
= 3! + 48 +
𝜆 𝜆−1 3!
(𝜆−2)(𝜆−3))(𝜆−4) 4!
5!
5!
= 𝜆 𝜆 − 1 (𝜆 − 2) 𝜆 − 3 (𝜆2 − 5𝜆 + 7)
Find the chromatic polynomial of the graph G.
• Since G contains a complete graph of 4
vertices, we need at least 4 colors for proper
a b coloring. ∴ 𝑐1 = 𝑐2 = 𝑐3 = 0. Now 4 colors
can be assigned to the 4 vertices of the graph
in 4! different ways.
c
• There will be two choices for the vertex ‘c’.
The vertex ‘c’ can be colored with color of the
e d
vertex ‘a’ or the color of the vertex ‘e’ ∴ 𝑐4 =
2 × 24 = 48 ways and 𝑐5 = 5!
𝜆 𝜆
• 𝑃5 𝜆 = σ5𝑖=1 𝑐𝑖 = 48 +5! 𝜆 .
𝑖 4 5
Decomposition Theorem
• Given G be a graph with n vertices. Let x and y be two non-adjacent
vertices in G. From G, we can compute two graphs G1 and G2 as
• G1 be a simple graph obtained from G by adding an edge between x
and y.
• G2 be a simple graph obtained from G by fusing the vertices x and y
together and replacing the parallel edges with single edge. Then the
chromatic polynomial of G
• Decomposition of the graph can be done till all the vertices become
adjacent.
• 𝑃𝑛 𝜆 of G = 𝑃𝑛 𝜆 of G1 + 𝑃𝑛−1 𝜆 of G2
Find the chromatic polynomial for the
following graph.
a a (a, d)

c d c d c
b b b
G
𝐺21

a a a
(b,d)
c d c d
b b c
G1 G2 𝐺22
Matching/Independent edge set
• Let G be a graph with no self loop. A subset M of the
edge set E of a graph G is called a matching in G if no
two edges in M are adjacent in G.
𝑣1 𝑣4 𝑒4 𝑣5
• Consider the graph in the figure, then 𝐸 𝐺 =
𝑒1 , 𝑒2 , 𝑒3 , 𝑒4 . Here 𝑀1 = 𝑒1 , 𝑒3 , 𝑀2 = 𝑒2 , 𝑒4 , 𝑀3 = 𝑒1 𝑒3
{𝑒1 , 𝑒4 } are matching. But 𝑀4 = {𝑒2 , 𝑒3 , 𝑒4 } is not a 𝑣2 𝑣3
𝑒2
matching.
G
M-Saturated vertex
• Let M be a matching in a graph G. A vertex ‘v’ is said to be M-
saturated if there is an edge in M incident with ‘v’.
• Otherwise ‘v’ is said to be M-unsaturated.
• In the above example 𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 are M1-saturated and 𝑣5 is
unsaturated with respect to M1.
• Now consider the matching M2, The vertices 𝑣2 , 𝑣3 , 𝑣4 , 𝑣5 are M2 –
saturated and 𝑣1 is unsaturated with respect to M2.
Perfect Matching
• A matching M in the graph G is said to be perfect if it saturates every
vertex of G.
• Consider the graph G, here 𝑀1 = {𝑒1 , 𝑒3 } is a perfect 𝑣1 𝑣4

matching as it saturates 𝑒1 𝑒3
all the vertices 𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 of G. 𝑣2 𝑒2 𝑣3
G
Coverings
• In a graph G, a set E of edges is said to cover G if every vertex in G is
incident on at least one edge of E. A set of edges that covers a graph
G is said to be an edge covering, a covering subgraph, or simply a
covering of G.
• A graph G is trivially its own covering.
• A spanning tree in a connected graph is another covering.
• A Hamiltonian circuit (if it exists) in a graph is also a covering.
Minimal covering
• A covering from which no edge can be removed without destroying
its ability to cover the graph.
Observations
1. A covering exist for a graph if and only if the graph has no isolated vertex.
𝑛
2. A covering of n-vertex graph will have at least edges. ( 𝑥 denotes the smallest
2
integer not less than 𝑥).
3. Every pendent edge in a graph will included in every covering of graph.
4. Every covering contain minimal covering.
5. If we denote the remaining edges of the graph by (𝐺 − 𝐸), the set of edges in E is a
covering if and only if, for every vertex v, the degree of the vertex in
(𝐺 − 𝐸) ≤ (degree of the vertex v in G)-1.
6. No minimal covering can contain a circuit. Therefore, a minimal covering of an n-
vertex graph can contain no more than (n – 1) edges.
7. A graph, in general, has many minimal coverings, and they may be of different sizes.
The number of edges in a minimal covering of smallest size is called the covering
number of the graph.
4 color theorem
• In graph-theory, the four color theorem states that the vertices of
every planer graph can be colored with at most four colors so that no
two adjacent vertices receive the same color. i.e. Every planar graph is
four-colourable.

• The four – color came into focus during 1852 when attempt was
made to color the counties of England with color representation. They
found that using only 4 colors sufficed for this work. But it could not
be generalized.
Issues with 4 color problem.
• When it came to applying this theorem with other countries, there
arose issues.
• Like for example, representing the countries with a part outside its
boundary is not feasible. E.g. Alaska as part of the United States, since
it is not a continuous boundary.
• So if we required the entire country in such instance to be covered
with the same color, then four colors are always not sufficient.
• In this case, region represented by A is the same
country but not continuous. Hence 5 colors are
needed. This is the four color problem.

• Therefore the four color theorem holds good only if


the graph is planar. In that case, we can say “Every
planar graph is four-colourable”.
5 color theorem
• The five color theorem is a result from graph theory that given a plane
separated into regions, such as a political map of the counties of a state,
the regions may be colored using no more than five colors in such a way
that no two adjacent regions receive the same color.

• The 5 color theorem was proposed in 1879 when an attempt was made
to color a map and the 4 color theorem failed. Hence we say that the 5
color theorem is implied by the 4 color theorem.
Greedy coloring algorithm
• In the study of graph coloring problems in mathematics and computer
science, a greedy coloring is a coloring of the vertices of a graph
formed by a greedy algorithm that considers the vertices of the graph
in sequence and assigns each vertex its first available color.
Basic Greedy Coloring Algorithm:

• 1. Color first vertex with first color.


• 2. Do following for remaining V-1 vertices.
• a) Consider the currently picked vertex and color it with the lowest
numbered color that has not been used on any previously colored vertices
adjacent to it.
• b)If all previously used colors appear on vertices adjacent to v, assign a new
color to it.
Drawbacks of Greedy Algorithm-
There are following drawbacks of the above Greedy Algorithm-
• The above algorithm does not always use minimum number of colors.
• The number of colors used sometimes depend on the order in which
the vertices are processed.
Find chromatic number of the following
graph by Greedy Algorithm
• Applying Greedy Algorithm, we have

• From here,
• Minimum number of colors used to color the given graph are 3.
• Therefore, Chromatic Number of the given graph = 3.
• The given graph may be properly colored using 3 colors as shown
below
Find chromatic number of the following
graph
Example for non isomorphic graph with same
chromatic polynomial.

You might also like