Graph Coloring
Objective
 Graph coloring is an important concept in graph theory,
which is the study of graphs, their properties, and their
applications.
 Graph coloring is often used as a tool for optimization
problems, such as scheduling and resource allocation.
 Graph coloring is an important concept in computer
science, as it is used in various algorithms and data
structures.
 Graph coloring is a topic of interest in mathematics which
has led to significant research in the field of mathematics.
What is Graph Coloring?
In a simple sentence, it is a way of coloring the
vertices of a graph such that no two adjacent
vertices are of the same color.
Chromatic Number
 it is the smallest number of colors needed to
color each vertex of the graph so that no two
adjacent vertices have the same color.
In the example above, the chromatic number is 4.
Chromatic Number of Some
Common Types of Graph
Chromatic Number of Cycle Graph
 If the Number of Vertices in the Cycle Graph is even, then
its Chromatic Number is 2
 If the Number of Vertices in the Cycle Graph is odd, then
its Chromatic Number is 3
Chromatic Number of Planer Graph
 The Chromatic Number of any Planer Graph is less than
or Equal to 4. (All the Cycle graphs are also Planer
Graph)
Chromatic Number of Complete Graph
 The Chromatic Number of any Complete Graph is the
number of vertices in that complete graph.
Chromatic Number of Bipartite Graph
 The Chromatic Number of any Bipartite Graph is 2.
Chromatic Number of Tree
 A tree is always a 2-chromatic
But what are the techniques
of Graph Coloring?
The Basic Steps for Graph Coloring
 Order the vertices
 Assign the first color
 Assign colors to the remaining vertices
 Repeat step 3 for all remaining vertices
 Determine the chromatic number
Chromatic partitioning
 A proper coloring of a graph introduce a partitioning of
the vertices into different subset.
 G={B,C} B={A,D}
A B
C D
Chromatic polynomial
 A graph G of n vertices can be colored properly in different ways by a
sufficiently large of colors. ꭓ(G)
 This property of a graph is expressed by a means of polynomial called
chromatic polynomial
 It is denoted by pn(λ) of a graph(n=number of vertices)
 Pn (λ) = ∑ci(λ /!i) Where i range from 1 to n
 Pn(λ)=c1* λ /!1+c2* λ*(λ -1)/!2+….+cn* λ*(λ -1)*(λ -2)/!n
 1 2 3
 1 3 2
 2 1 3
 2 3 1
 3 1 2
 3 2 1
 6
 C1=0
 C2=0
 C3=!3
 0+0+ 6*λ*(λ -1)*(λ -2)/6
 =λ*(λ -1)*(λ -2)
Matching and covering
 A matching graph is a subgraph of a graph G where
there are no edges adjacent to each other. { degree of
all vertices <= 1}
A B
C
D
1
5 2
3
4
A B
1
C D
3
A B
1
C D
3
A B
C
D
G1 G2
G3
Grahp G
Matching and covering
 Line covering: A subset is called a line covering of G if
every vertex of G is incident with at least one edge.
 S1={1,3} s2={2,4} s3={1,5,2} s5={4,3,5}
 S4={1,3,5}
A B
1
3
2
5
4
D C
A B
D C
1
3
 Vertex covering: A subset is called vertex covering if every edge of G is
incident with/covered by a vertex in subset.
 S1={A,B,C,D}
 S2={A,B,C}
 S3={A,B,D}
 S4={B,D}
Greedy Coloring Algorithm
The greedy coloring algorithm is a simple heuristic for graph coloring, where the
goal is to assign colors to the vertices of a graph such that no two adjacent
vertices share the same color while using as few colors as possible.
Algorithm Steps
1. Sort the vertices in a specific order (e.g., arbitrary, degree-based, etc.).
2. Assign the first available color to the first vertex.
3. For each subsequent vertex, assign the smallest available color that is not
used by its adjacent vertices.
4. Repeat until all vertices are colored.
The Others Different Technique and
Algorithm for Graph Coloring
 Greedy Algorithm
 Back-Tracking
 Branch and Bound
 Integer Programming
 Welsh-Powell Algorithm
 Tabu Search
 Genetic Algorithm
What is the Four Color Theorem?
The Four Color theorem
The Four Color Theorem also known as The Four Color
Map Theorem states that no more than four colors are
required to color the regions of any map so that no two
adjacent regions have the same color.
The four-color theorem was proved in 1976 by Kenneth
Appel and Wolfgang Haken after many false proofs.
Example of Four Color Theorem
Applications of Graph Coloring
 Map Coloring
 Register Allocation
 Frequency Assignment
 Scheduling
 Timetabling
 Sudoku
 Traffic Light Scheduling
 Resource Allocation

Module 5 - GraphColo blhyhfhuufring.pptx

  • 1.
  • 2.
    Objective  Graph coloringis an important concept in graph theory, which is the study of graphs, their properties, and their applications.  Graph coloring is often used as a tool for optimization problems, such as scheduling and resource allocation.  Graph coloring is an important concept in computer science, as it is used in various algorithms and data structures.  Graph coloring is a topic of interest in mathematics which has led to significant research in the field of mathematics.
  • 3.
    What is GraphColoring? In a simple sentence, it is a way of coloring the vertices of a graph such that no two adjacent vertices are of the same color.
  • 4.
    Chromatic Number  itis the smallest number of colors needed to color each vertex of the graph so that no two adjacent vertices have the same color. In the example above, the chromatic number is 4.
  • 5.
    Chromatic Number ofSome Common Types of Graph
  • 6.
    Chromatic Number ofCycle Graph  If the Number of Vertices in the Cycle Graph is even, then its Chromatic Number is 2  If the Number of Vertices in the Cycle Graph is odd, then its Chromatic Number is 3
  • 7.
    Chromatic Number ofPlaner Graph  The Chromatic Number of any Planer Graph is less than or Equal to 4. (All the Cycle graphs are also Planer Graph)
  • 8.
    Chromatic Number ofComplete Graph  The Chromatic Number of any Complete Graph is the number of vertices in that complete graph.
  • 9.
    Chromatic Number ofBipartite Graph  The Chromatic Number of any Bipartite Graph is 2.
  • 10.
    Chromatic Number ofTree  A tree is always a 2-chromatic
  • 11.
    But what arethe techniques of Graph Coloring?
  • 12.
    The Basic Stepsfor Graph Coloring  Order the vertices  Assign the first color  Assign colors to the remaining vertices  Repeat step 3 for all remaining vertices  Determine the chromatic number
  • 13.
    Chromatic partitioning  Aproper coloring of a graph introduce a partitioning of the vertices into different subset.  G={B,C} B={A,D} A B C D
  • 14.
    Chromatic polynomial  Agraph G of n vertices can be colored properly in different ways by a sufficiently large of colors. ꭓ(G)  This property of a graph is expressed by a means of polynomial called chromatic polynomial  It is denoted by pn(λ) of a graph(n=number of vertices)  Pn (λ) = ∑ci(λ /!i) Where i range from 1 to n  Pn(λ)=c1* λ /!1+c2* λ*(λ -1)/!2+….+cn* λ*(λ -1)*(λ -2)/!n
  • 15.
     1 23  1 3 2  2 1 3  2 3 1  3 1 2  3 2 1  6  C1=0  C2=0  C3=!3  0+0+ 6*λ*(λ -1)*(λ -2)/6  =λ*(λ -1)*(λ -2)
  • 16.
    Matching and covering A matching graph is a subgraph of a graph G where there are no edges adjacent to each other. { degree of all vertices <= 1} A B C D 1 5 2 3 4 A B 1 C D 3 A B 1 C D 3 A B C D G1 G2 G3 Grahp G
  • 17.
    Matching and covering Line covering: A subset is called a line covering of G if every vertex of G is incident with at least one edge.  S1={1,3} s2={2,4} s3={1,5,2} s5={4,3,5}  S4={1,3,5} A B 1 3 2 5 4 D C A B D C 1 3
  • 18.
     Vertex covering:A subset is called vertex covering if every edge of G is incident with/covered by a vertex in subset.  S1={A,B,C,D}  S2={A,B,C}  S3={A,B,D}  S4={B,D}
  • 19.
    Greedy Coloring Algorithm Thegreedy coloring algorithm is a simple heuristic for graph coloring, where the goal is to assign colors to the vertices of a graph such that no two adjacent vertices share the same color while using as few colors as possible. Algorithm Steps 1. Sort the vertices in a specific order (e.g., arbitrary, degree-based, etc.). 2. Assign the first available color to the first vertex. 3. For each subsequent vertex, assign the smallest available color that is not used by its adjacent vertices. 4. Repeat until all vertices are colored.
  • 24.
    The Others DifferentTechnique and Algorithm for Graph Coloring  Greedy Algorithm  Back-Tracking  Branch and Bound  Integer Programming  Welsh-Powell Algorithm  Tabu Search  Genetic Algorithm
  • 25.
    What is theFour Color Theorem?
  • 26.
    The Four Colortheorem The Four Color Theorem also known as The Four Color Map Theorem states that no more than four colors are required to color the regions of any map so that no two adjacent regions have the same color. The four-color theorem was proved in 1976 by Kenneth Appel and Wolfgang Haken after many false proofs.
  • 27.
    Example of FourColor Theorem
  • 28.
    Applications of GraphColoring  Map Coloring  Register Allocation  Frequency Assignment  Scheduling  Timetabling  Sudoku  Traffic Light Scheduling  Resource Allocation