The chromatic polynomial of a finite simple
graph
with at least one graph vertex, also denoted
(Biggs 1993, p. 106) and
(Godsil and Royle 2001, p. 358),
is a polynomial which counts proper
colorings of the vertices of
(where colorings are counted as distinct even if they differ
only by permutation of colors). For a graph
on
vertices that can be colored
in
ways with no colors,
way with one color, ..., and
ways with
colors, the chromatic polynomial of
is defined as the unique Lagrange
interpolating polynomial of degree
through the
points
,
, ...,
. Evaluating the chromatic polynomial in the variable
at the points
, 2, ...,
then recovers the numbers of 1-, 2-, ..., and
-colorings. In fact, evaluating
at integers
still gives the numbers of
-colorings.
The chromatic polynomial is called the "chromial" for short by Bari (1974).
The chromatic number of a graph gives the smallest number of colors with which a graph
can be colored, which is therefore the smallest positive
integer such that
(Skiena 1990, p. 211).
For example, the cubical graph has 1-, 2-, ... k-coloring
counts of 0, 2, 114, 2652, 29660, 198030, 932862, 3440024, ... (OEIS A140986),
resulting in chromatic polynomial
|
(1)
|
Evaluating
at
,
2, ... then gives 0, 2, 114, 2652, 29660, 198030, 932862, 3440024, ... as expected.
The number of minimum vertex colorings of a graph is given by
, where
is the chromatic polynomial of
and
is its chromatic number.
A root of a chromatic polynomial is known as a chromatic root and an interval containing no chromatic root is called a chromatic root-free interval.
The chromatic polynomial of a graph in the variable
can be determined in the Wolfram
Language using ChromaticPolynomial[g,
z]. Precomputed chromatic polynomials for many named graphs
can be obtained using GraphData[graph,
"ChromaticPolynomial"][z].
The chromatic polynomial is multiplicative over graph components, so for a graph having connected components
,
, ..., the chromatic polynomial of
itself is given by
|
(2)
|
The chromatic polynomial for a forest on vertices,
edges, and with
connected components
is given by
|
(3)
|
For a graph with vertex count and
connected components,
the chromatic polynomial
is related to the rank
polynomial
and Tutte polynomial
by
|
(4)
| |||
|
(5)
|
(extending Biggs 1993, p. 106). The chromatic polynomial of a connected planar graph is related to the flow polynomial
of its dual
graph
by
|
(6)
|
Chromatic polynomials are not diagnostic for graph isomorphism, i.e., two nonisomorphic graphs may share the same chromatic polynomial. A graph that is determined by its chromatic polynomial is said to be a chromatically unique graph; nonisomorphic graphs sharing the same chromatic polynomial are said to be chromatically equivalent.
Chromatic polynomials of the ladder graph and grid graph
are considered by Yadav
et al. (2024). The following table summarizes the chromatic polynomials for some simple graphs.
Here
is the falling factorial.
The following table summarizes recurrence relations for chromatic polynomials of some families of graphs. Here
is the chromatic polynomial of the member with parameter
, and each recurrence applies when all its subscripts lie in
the corresponding family's parameter range.
The chromatic polynomial of a disconnected graph is the product of the chromatic polynomials of its connected
components. The chromatic polynomial of a graph of
order
has degree
,
with leading coefficient 1 and constant term
0. Furthermore, the coefficients alternate signs,
with zero coefficients allowed. The coefficient
of
is
,
where
is the number of edges. Interestingly,
is equal to the number of acyclic
orientations of
(Stanley 1973).
Deletion-contraction algorithms for calculating have exponential worst-case running time (Skiena 1990,
pp. 211-212). Computing the chromatic polynomial is an NP-hard
problem, since its value at
decides whether
is 3-colorable, an NP-complete
problem.
Tutte (1970) proved an upper bound on the absolute value of the chromatic polynomial of a planar graph
that triangulates a sphere. If such a graph has
vertices, then
|
(7)
|
where
is the golden ratio and
(OEIS A104457;
Tutte 1970; Le Lionnais 1983, p. 46).
Read (1968) conjectured that, for any chromatic polynomial
|
(8)
|
there does not exist a such that
and
(Skiena 1990, p. 221). Huh (2012) proved
that, for every finite simple
graph, the absolute values of the coefficients
of its chromatic polynomial form a logarithmically
concave sequence with no internal zeros and hence a unimodal
sequence, proving Read's conjecture.