Aka. proper vertex coloring. The assignment of colors to vertices such that no two adjacent vertices have the same color. If a maximum of colors are used, then referred to as -coloring.
Chromatic Number
The minimum number of colors required for a proper vertex coloring. Denoted by .
Equal for all isomorphic graphs. .
For ,
Chromatic Polynomial
A polynomial representing the number of proper vertex colorings of a graph for number of colors. Denoted as . Depends on graph structure.
For a null graph with vertices,
For a graph with multiple connected components ,
In the polynomial, absolut value of the coeffecient of gives the number of edges in the graph where is the number of vertices.
Deletion–Contraction Method
A recursive method to compute the chromatic polynomial.
Here:
- : an edge
- : resulting graph when is removed from
- : resulting graph when ednpoints of is merged
Explanation:
- counts colorings excluding conflicts (via subtraction)
- reduces complex graphs step-by-step
Key properties: • parallel edges after contraction can be treated as one • loops result in zero colorings
Algorithms
Greedy Coloring Algorithm
Assigns colors sequentially based on a chosen vertex order.
Steps:
- Initialize empty coloring
- Choose an order of vertices
- For each vertex:
- assign smallest available color not used by neighbors
- create new color if needed
- repeat until all vertices are colored
Simple. Efficient. Not optimal. Depends on vertex ordering.
Other algorithms
Several algorithms aim to improve solution quality.
- Welsh–Powell algorithm
- DSatur algorithm
Applications
Map Coloring
Assign colors to regions such that adjacent regions differ.
Regions are modelled as vertices and shared boundaries are modelled as edges.
Timetable Scheduling
Assign time slots to exams such that no student has overlapping exams.
Exams are modelled as vertices. Shared students are edges. Time slots are colors. Minimum number of required time slots is the chromatic number.
Other Applications
- Register allocation in compilers
- Mobile frequency assignment
- Sudoku solving