Vertex Coloring
Definition
A proper vertex coloring assigns colors to vertices so that no two adjacent vertices have the same color.
A graph is -colorable if it can be properly colored with colors.
Chromatic Number
The chromatic number is the minimum number of colors needed:
Basic Examples
Complete Graph
Every vertex is adjacent to every other.
Cycle
Bipartite Graph
Tree
Bounds on Chromatic Number
Upper Bounds
Greedy bound: where is maximum degree.
Brooks' Theorem: For connected graph that is neither complete nor an odd cycle:
Lower Bounds
Clique bound: where is the size of the largest clique.
Independence bound: where is the independence number (largest independent set).
Chromatic Polynomial
The chromatic polynomial gives the number of proper -colorings.
Examples
Empty graph :
Complete graph :
Cycle :
Tree with vertices:
Deletion-Contraction
For edge :
where deletes edge and contracts edge .
Four Color Theorem
Every planar graph is 4-colorable.
Proved in 1976 (Appel and Haken) using computer verification.
Five Color Theorem: Easier to prove: every planar graph is 5-colorable.
Edge Coloring
Definition
A proper edge coloring assigns colors to edges so that no two edges sharing a vertex have the same color.
Chromatic Index
= minimum number of colors for proper edge coloring.
Vizing's Theorem
For any simple graph :
Graphs achieving lower bound: Class 1 Graphs requiring upper bound: Class 2
Examples
- Bipartite graphs: (Class 1)
- Petersen graph: (Class 2)
Greedy Coloring Algorithm
1. Order vertices: v_1, v_2, ..., v_n
2. For each v_i in order:
Assign v_i the smallest color not used by its neighbors
Always uses colors, but ordering matters.
Applications
Scheduling
Tasks as vertices, edge if tasks conflict. Colors = time slots. = minimum time slots needed.
Register Allocation
Variables as vertices, edge if both needed simultaneously. Colors = CPU registers.
Map Coloring
Regions as vertices, edge if regions share a border. Four colors suffice for any map.
Frequency Assignment
Transmitters as vertices, edge if too close. Colors = frequencies.
Graph Coloring Complexity
Decision problem: Is -colorable?
- : Polynomial (bipartite testing)
- : NP-complete
Computing chromatic number: NP-hard
Special Classes
Chordal Graphs
Graphs where every cycle of length has a chord. Can be optimally colored in polynomial time.
Perfect Graphs
Graphs where for all induced subgraphs . Includes bipartite, chordal, and complement of bipartite.