Lecture 06 Graph Coloring
Lecture 06 Graph Coloring
Introduction
Graph coloring is a fundamental concept in graph theory with numerous applications
in various fields. At its core, graph coloring deals with assigning “colors” to elements
of a graph (vertices or edges) subject to certain constraints. The two primary types are:
• Vertex coloring: Assign colors to vertices such that no adjacent vertices share the
same color
• Edge coloring: Assign colors to edges such that no adjacent edges share the same
color
Basic Definitions
A proper vertex coloring of 𝐺 = (𝑉 , 𝐸) is a function 𝑐 : 𝑉 → {1, 2, . . . , 𝑘} where
𝑐(𝑢) ≠ 𝑐(𝑣) for every edge (𝑢, 𝑣) ∈ 𝐸.
The chromatic number 𝜒(𝐺) is the minimum 𝑘 for which 𝐺 has a proper 𝑘-coloring. If
𝜒(𝐺) = 𝑘, 𝐺 is 𝑘-colorable.
Graph Coloring 2
A clique is a subset of mutually adjacent vertices. The clique number 𝜔(𝐺) is the size
of the largest clique in 𝐺.
In a clique of size 𝜔(𝐺), all vertices are mutually adjacent, requiring 𝜔(𝐺) distinct
colors.
The maximum degree Δ(𝐺) is the maximum number of edges incident to any vertex.
[Brooks’ Theorem] If 𝐺 is connected and neither complete nor an odd cycle, then
𝜒(𝐺) ≤ Δ(𝐺). For 𝐾 𝑛 : 𝜒(𝐾 𝑛 ) = 𝑛, for 𝐶2𝑘+1 : 𝜒 = 3.
Examples
[Complete Graphs 𝐾 𝑛 ] 𝜒(𝐾 𝑛 ) = 𝑛 since all vertices are pairwise adjacent.
𝐾3 , 𝜒 = 3 𝐾4 , 𝜒 = 4
3D Cube, 𝜒 = 2
Applications
Scheduling Problems
• Vertices: Tasks or events
Register Allocation
• Vertices: Variables in a program
Map Coloring
• Vertices: Geographical regions
D
C
B
A
Artificial Intelligence
• Constraint Satisfaction Problems (CSPs): Framework for solving AI problems
𝐾 3 has 𝜒 ′ = 3:
𝜒′(𝐾 3 ) = 3
Conclusion
Key takeaways:
Practice Problems
1. Find 𝜒 and 𝜒 ′ for 𝐾 3,3
3. Design a class schedule using graph coloring (vertices = classes, edges = time
conflicts)
References
[1] Bondy, J. A., & Murty, U. S. R. (2008). Graph theory with applications. Elsevier.
[3] West, D. B. (2001). Introduction to graph theory (2nd ed.). Prentice Hall.