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.
k-Colorable Graph
A graph is -colorable iff it can be colored using colors.
If a graph is 2-colorable, then it is bipartite.
Chromatic Number
The minimum number of colors required for a proper vertex coloring. Denoted by .
Equal for all isomorphic graphs. .
For ,
For . One color for each bipartite group.
Suppose and are undirected simple connected graphs with at least 2 vertices. Then:
- If = and joined with a single edge then
- If = all verties of are connected with all vertices of then .
Every graph can be colored with one more color than the maximum vertex degree.
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 :
For a path of vertices: .
For , .
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