Graph Coloring and Chromatic Polynomials
Graph coloring assigns labels ("colors") to the vertices of a graph so that adjacent vertices receive different colors; the minimum number of colors needed is the chromatic number . The chromatic polynomial counts the number of proper colorings using colors and is a polynomial in . Applies to scheduling, register allocation, frequency assignment, and map coloring. Foundational work by Birkhoff (1912), Whitney (1932), and the Four Color Theorem (Appel–Haken, 1976).
Two questions live side by side. Existence: how few colors suffice? That's . Enumeration: how many ways can we color with colors? That's . The astonishing bridge between them is deletion–contraction: removing an edge versus merging its endpoints relates the colorings of three graphs by one identity. This single recurrence proves is a polynomial, lets you compute it, and reveals that all coloring information about is captured by a finite list of integer coefficients.
Formal Statement
Let be a finite simple graph with vertices and edges. A proper -coloring is a map with for every edge . The chromatic number is
Derivation hint: well-defined because (all distinct colors) always works, so the set is nonempty and bounded below by 1. A graph is -colorable if and -chromatic if .
The chromatic polynomial is the number of proper colorings of using a palette of available colors (colors need not all be used). It satisfies
Derivation hint: iff at least one proper -coloring exists, which is the definition of -colorability. For the empty graph (no edges) and the complete graph :
Derivation hint: with no edges each vertex is free ( choices each); for all vertices mutually adjacent so colors must be distinct — a falling factorial.
For a graph with vertices, edges, and connected components: 1. is a polynomial in of degree exactly , with leading coefficient . 2. The coefficient of is . 3. Coefficients alternate in sign: with . 4. The constant term is (i.e. ); more precisely . 5. The smallest power of dividing equals the number of connected components .
For any edge of , let denote with deleted and denote with identified (contraction, merging parallel edges). Then
Derivation hint: proper colorings of split into those with (= colorings of ) and those with (= colorings of ).
Why It Holds / Derivation
Step 1 — Partition the colorings of . Take any proper coloring of where . In the vertices are not constrained relative to each other, so two disjoint cases occur:
- (A) : this coloring is also proper for (the only extra edge is satisfied).
- (B) : this coloring corresponds bijectively to a proper coloring of , since identifying and into one vertex (which now carries that common color) gives a valid coloring, and conversely.
Step 2 — Count. Case (A) has colorings; case (B) has ; together they exhaust :
Derivation hint: the two cases are mutually exclusive and exhaustive among proper colorings of . Rearranging gives equation [4].
Step 3 — Polynomiality by induction on . Base case : with , a polynomial. Inductive step: any graph with edges has both (with edges) and (with vertices and edges) of strictly smaller edge count. By induction both are polynomials in , hence so is their difference.
Step 4 — Degree and leading terms. has vertices, has . By induction and . Subtracting:
Derivation hint: track only the top two coefficients through equation [4]; the terms accumulate .
∎Multiplicativity. If is the disjoint union , a proper coloring is an independent choice on each part, so
Derivation hint: the color of a vertex in places no constraint on any vertex in — independent counting.
Constant term. Each connected component contributes a factor with (zero colors color nothing on a nonempty vertex set), and one shows each connected factor is divisible by exactly once when joined; more carefully, a connected graph has but , so .
∎Birkhoff introduced the chromatic polynomial in 1912 as a strategic detour: rather than prove directly that every planar map needs only four colors, he proposed to count the four-colorings and show this count is always positive. While the program did not by itself crack the Four Color Theorem, it founded the entire theory of chromatic polynomials. Birkhoff, an American mathematician at Harvard better known for his ergodic theorem in dynamical systems, treated the polynomial's coefficients and roots as objects of independent interest. His student-era collaborator Daniel Lewis and later Hassler Whitney developed the structural and subgraph-counting interpretations. The dream of attacking the four-color problem via the analytic behavior of persists in modern work on the location of chromatic roots.
Building Intuition
Think of coloring as constraint satisfaction. Each vertex is a slot; each edge is a "must differ" rule. The chromatic number asks: how few categories do I need so that no two things that conflict share a category? Two extremes anchor your intuition:
- No edges → every vertex independent → colorings, .
- All edges (clique ) → maximal conflict → and only the falling factorial colorings.
A bipartite graph (one with no odd cycle) needs only 2 colors — color the two sides of the partition. So exactly when has at least one edge but no odd cycle. The presence of an odd cycle is the simplest obstruction forcing a third color. For the polynomial, picture deletion–contraction as a binary tree: each edge you process branches into "keep it (delete)" and "merge it (contract)." The leaves are edgeless graphs whose polynomials are pure powers . Summing the leaves with signs reconstructs — a fully mechanical, if exponential, algorithm.
Worked Examples
Given: the path ( vertices in a line, edges) and the cycle ( vertices in a ring, edges).
Path . Color vertices left to right. The first vertex has choices; each subsequent vertex must merely differ from its single colored predecessor, giving choices:
Derivation hint: greedy left-to-right counting; no later vertex constrains earlier ones, so choices multiply. So for (it is bipartite).
Cycle . Apply deletion–contraction to one edge of the cycle. Then (the cycle opens into a path) and . Thus
Derivation hint: deleting one edge of a ring gives a path; contracting it gives a shorter ring. Solving this recurrence (with ) gives the closed form
Derivation hint: the homogeneous solution is ; check the base case to fix the correction term.
Numerical check, , : . Direct count of 3-colorings of a 4-cycle indeed gives .
Given: a company schedules 5 final exams (vertices A,B,C,D,E). Two exams conflict (edge) if some student takes both: pairs . We have available time slots ("colors"). How many valid timetables exist, and what is the minimum number of slots?
Build the graph: edges = AB, AC, BC, CD, DE. Vertices A,B,C form a triangle ; D attaches to C; E attaches to D — a triangle with a pendant path.
Decompose. This graph is " with a path hanging off." Use the rule for adding a vertex adjacent to exactly one already-colored vertex (it multiplies by ):
Derivation hint: attaching a leaf to an already-colored vertex multiplies the count by since the leaf only avoids its one neighbor.
Plug in :
Minimum slots: the triangle forces ; three slots suffice (color A,B,C distinctly, then D≠C, E≠D), so .
Common Misconceptions
is not always equal to the maximum degree plus one. A common error is to assume . In fact Brooks' Theorem says always, with equality only for complete graphs and odd cycles. For most graphs is strictly smaller. A long even path has but , not .
A graph's chromatic polynomial does not determine the graph. Different (non-isomorphic) graphs can share the same chromatic polynomial; they are called chromatically equivalent. So is a powerful invariant but not a complete one.
Containing a large clique gives only a lower bound. If the largest clique has size , then , but the gap can be arbitrarily large: there exist triangle-free graphs () with arbitrarily large chromatic number (Mycielski's construction).
Claim (false): "If has no triangle, then is 2-colorable."
Refutation: The 5-cycle has no triangle (its shortest cycle has length 5) yet . By equation [10], , confirming no proper 2-coloring exists, while . More dramatically, the Grötzsch graph is triangle-free with , and Mycielski's iteration produces triangle-free graphs of every chromatic number. Absence of triangles bounds neither from above nor near 2.
Connections
Graph coloring threads through much of discrete mathematics:
- <span class="wiki-link-missing">Bipartite Graphs</span>: exactly the 2-colorable graphs; equivalently, graphs with no odd cycle (König's characterization).
- <span class="wiki-link-missing">Chromatic Number and Independent Sets</span>: a color class is an independent set, so a -coloring is a partition of into independent sets. Thus is the minimum number of independent sets covering .
- <span class="wiki-link-missing">The Tutte Polynomial</span>: is a specialization of the two-variable Tutte polynomial, linking coloring to flows and the structure of matroids.
- <span class="wiki-link-missing">Planar Graphs and the Four Color Theorem</span>: every planar graph is 4-colorable, the celebrated and computer-aided result.
- <span class="wiki-link-missing">Computational Complexity and NP-Completeness</span>: deciding whether is NP-complete, placing exact coloring among the hardest tractable-to-state problems.
- <span class="wiki-link-missing">Edge Coloring and Vizing's Theorem</span>: the dual notion coloring edges so no two sharing a vertex match; .
Real-World Applications
Historical Development
Subtleties & Limits
Where can the roots of live? The real and complex zeros of chromatic polynomials ("chromatic roots") are far from understood. Key facts and open questions:
- No chromatic root lies in the intervals , , or — proven by Jackson and Thomassen for connected graphs.
- It is a theorem (Tutte) that has no roots in , but the distribution of complex roots is largely conjectural; they are dense in the complex plane for general graphs (Sokal, 2004).
- Birkhoff–Lewis conjecture: for planar graphs, for all real (known for and large , open in between historically; resolved positively in key cases but the full real-line behavior remains delicate).
- Hadwiger's Conjecture (1943), among the deepest open problems in the field, asserts every graph with contains as a minor — proven for , open for .
- Computational reality: evaluating exactly is #P-hard, and even deciding is NP-complete, so the elegant theory coexists with intrinsic computational intractability.
See Also
Bipartite Graphs · Chromatic Number and Independent Sets · The Tutte Polynomial · Planar Graphs and the Four Color Theorem · Brooks' Theorem · List Coloring and Choosability · Edge Coloring and Vizing's Theorem · Hadwiger's Conjecture · Computational Complexity and NP-Completeness