The chromatic number records the least number of colors needed to color a graph. The chromatic polynomial records more information. It counts how many proper colorings are possible when a fixed number of colors is available.
For a graph , the chromatic polynomial is usually written
or
In this chapter, we write to avoid confusion with the chromatic number .
69.1 Definition
Let be a finite graph. For a positive integer , let denote the number of proper vertex colorings of using colors from the set
Thus counts all functions
such that
The surprising fact is that this counting function is always a polynomial in . This polynomial is called the chromatic polynomial of . The deletion-contraction identity is one standard way to prove polynomiality.
69.2 First Examples
Let be the graph with vertices and no edges. Since there are no adjacency restrictions, each vertex may receive any of the colors. Therefore
For the complete graph , all vertices must receive distinct colors. The first vertex has choices, the second has , and so on. Hence
For the path with , the first vertex has choices. Each later vertex must avoid the color of the previous vertex, so it has choices. Thus
For a tree with vertices, the same formula holds:
A tree has no cycles, so after choosing a root, each non-root vertex only needs to avoid the color of its parent.
69.3 Relation to Chromatic Number
The chromatic polynomial determines the chromatic number.
A graph is -colorable exactly when
Therefore
The chromatic number gives the first positive integer at which the chromatic polynomial becomes positive.
For example, if
then
Thus the chromatic polynomial refines the chromatic number. It does not merely say whether a coloring exists. It counts how many colorings exist for every allowed number of colors.
69.4 Deletion and Contraction
The most important recursive method for chromatic polynomials uses deletion and contraction.
Let be an edge of .
The deletion is the graph obtained by removing the edge while keeping all vertices.
The contraction is the graph obtained by identifying and as a single vertex and then removing the edge . In simple graphs, parallel edges created by contraction may be replaced by a single edge.
Deletion removes a constraint. Contraction identifies the two endpoints of that constraint.
These two operations are related because every proper coloring of falls into one of two classes:
| Case | Meaning |
|---|---|
| and have different colors | The coloring is a proper coloring of |
| and have the same color | The coloring corresponds to a coloring of |
This gives the deletion-contraction formula:
This identity is the standard recursive formula for the chromatic polynomial. It follows by subtracting the colorings of in which the endpoints of receive the same color.
69.5 Base Cases
The deletion-contraction formula reduces the number of edges. Repeated use eventually reaches graphs with no edges, whose chromatic polynomials are known.
If has vertices and no edges, then
If has a loop, then
A loop joins a vertex to itself. Proper coloring would require a vertex to have a color different from itself, which is impossible.
These two base cases allow recursive computation.
69.6 Example: A Triangle
Let . Choose an edge . Then is a path on three vertices, and is .
Thus
We know
and
Therefore
Factor:
Hence
This agrees with the direct count for a complete graph on three vertices.
69.7 Example: A Cycle
Let be a cycle with vertices. Its chromatic polynomial is
This formula explains the parity behavior of cycles.
For an even cycle,
There are exactly two proper 2-colorings, corresponding to the two choices of color for the first vertex.
For an odd cycle,
Thus an odd cycle is not 2-colorable.
69.8 Basic Properties
Let be a graph with vertices, edges, and connected components.
The chromatic polynomial has several important structural properties:
| Property | Statement |
|---|---|
| Degree | has degree |
| Leading coefficient | The leading coefficient is |
| Second coefficient | The coefficient of is |
| Constant term | If , then |
| Lowest nonzero degree | The lowest nonzero power is |
The degree and leading coefficient follow from the fact that, without edge restrictions, there would be colorings. Edges remove some assignments, but they do not change the leading term.
The coefficient of records the number of edges with a negative sign. These facts are standard consequences of deletion-contraction and induction on the number of edges.
69.9 Disconnected Graphs
If a graph is the disjoint union of components
then colorings of the components may be chosen independently.
Therefore
For example, if is the disjoint union of a triangle and an isolated vertex, then
Thus
Independence of components turns the chromatic polynomial into a product.
69.10 Complete Bipartite Examples
Consider the complete bipartite graph , also called a star. The center has choices. Each leaf must avoid the color of the center, but leaves are mutually nonadjacent. Hence
More generally, complete bipartite graphs have more complicated chromatic polynomials. One can compute them by first choosing the set of colors used on one part, then assigning colors to the other part while avoiding those colors.
This illustrates a common theme: symmetry can simplify counting, but dense adjacency between parts still creates nontrivial combinatorics.
69.11 Roots of the Chromatic Polynomial
A number is called a chromatic root of if
All nonnegative integers smaller than are chromatic roots. For example, if , then
Chromatic roots are also studied over the real and complex numbers. Their behavior is subtle and connects graph coloring with algebra, statistical physics, and the Tutte polynomial.
For elementary graph theory, the most important roots are the integer roots, since they indicate impossible numbers of colors.
69.12 Chromatic Equivalence
Two graphs and are chromatically equivalent if
Chromatically equivalent graphs need not be isomorphic. The chromatic polynomial records important information, but it does not determine the graph completely.
A graph is chromatically unique if every graph with the same chromatic polynomial is isomorphic to it.
Thus chromatic polynomials give a graph invariant, but not a complete invariant.
69.13 Connection with the Tutte Polynomial
The chromatic polynomial is a specialization of the Tutte polynomial.
The Tutte polynomial is a two-variable graph polynomial that unifies many graph invariants, including the chromatic polynomial, flow polynomial, and number of spanning trees. Deletion-contraction is one of its central principles.
This connection places graph coloring inside a broader algebraic framework.
In advanced graph theory, the chromatic polynomial is often studied as part of this larger family of deletion-contraction invariants.
69.14 Computational Aspects
Deletion-contraction gives a conceptually simple algorithm, but it may be computationally expensive.
Each edge creates two recursive branches:
and
Thus a naive implementation may require exponentially many steps.
For special graph classes, faster methods exist. Trees, cycles, complete graphs, and certain decomposable graphs have closed formulas. More generally, algorithms exploit structure such as low treewidth, cut vertices, separations, or chordality.
Computing chromatic polynomials belongs to the broader study of graph counting problems, many of which are computationally hard.
69.15 Summary
The chromatic polynomial counts proper -colorings of a graph.
It refines the chromatic number by recording not only whether a coloring exists, but how many such colorings exist.
The main ideas are:
| Concept | Meaning |
|---|---|
| Number of proper -colorings | |
| Chromatic number | First positive integer with |
| Deletion | Remove an edge |
| Contraction | Identify the endpoints of an edge |
| Deletion-contraction | |
| Chromatic root | Root of |
| Chromatic equivalence | Same chromatic polynomial |
The chromatic polynomial is one of the first examples of a graph polynomial. It connects coloring, recursion, algebraic invariants, and enumerative combinatorics.
69.16 Exercises
Compute the chromatic polynomial of .
Compute the chromatic polynomial of .
Compute the chromatic polynomial of .
Prove that if has no edges and vertices, then .
Prove that if has a loop, then .
Use deletion-contraction to compute the chromatic polynomial of .
Verify that
for and .
- Prove that if is the disjoint union of and , then
Show that the coefficient of in is .
Give two non-isomorphic graphs with the same chromatic polynomial.
Prove that if and only if is -colorable.
Compute the chromatic polynomial of the star .
Explain why the chromatic polynomial is a graph invariant.
Use deletion-contraction to show that is a polynomial in .
Find the chromatic roots of .