# Chromatic polynomial

All non-isomorphic graphs on 3 vertices and their chromatic polynomials, clockwise from the top. The independent 3-set: ${\displaystyle k^{3}}$. An edge and a single vertex: ${\displaystyle k^{2}(k-1)}$. The 3-path: ${\displaystyle k(k-1)^{2}}$. The 3-clique: ${\displaystyle k(k-1)(k-2)}$.

The chromatic polynomial is a polynomial studied in algebraic graph theory, a branch of mathematics. It counts the number of graph colorings as a function of the number of colors and was originally defined by George David Birkhoff to attack the four color problem. It was generalised to the Tutte polynomial by H. Whitney and W. T. Tutte, linking it to the Potts model of statistical physics.

## History

George David Birkhoff introduced the chromatic polynomial in 1912, defining it only for planar graphs, in an attempt to prove the four color theorem. If ${\displaystyle P(G,k)}$ denotes the number of proper colorings of G with k colors then one could establish the four color theorem by showing ${\displaystyle P(G,4)>0}$ for all planar graphs G. In this way he hoped to apply the powerful tools of analysis and algebra for studying the roots of polynomials to the combinatorial coloring problem.

Hassler Whitney generalised Birkhoff’s polynomial from the planar case to general graphs in 1932. In 1968 Read asked which polynomials are the chromatic polynomials of some graph, a question that remains open, and introduced the concept of chromatically equivalent graphs. Today, chromatic polynomials are one of the central objects of algebraic graph theory.[1]

## Definition

All proper vertex colorings of vertex graphs with 3 vertices using k colors for ${\displaystyle k=0,1,2,3}$. The chromatic polynomial of each graph interpolates through the number of proper colorings.

The chromatic polynomial of a graph G counts the number of its proper vertex colorings. It is commonly denoted ${\displaystyle P_{G}(k)}$, ${\displaystyle \chi _{G}(k)}$, ${\displaystyle \pi _{G}(k)}$, and ${\displaystyle P(G,k)}$ which we will use from now on.

For example, the path graph ${\displaystyle P_{3}}$ on 3 vertices cannot be colored at all with 0 or 1 colors. With 2 colors, it can be colored in 2 ways. With 3 colors, it can be colored in 12 ways.

 Available colors ${\displaystyle k}$ 0 1 2 3 Number of colorings ${\displaystyle P(P_{3},k)}$ 0 0 2 12

For a graph G with n vertices, the chromatic polynomial is defined as the unique interpolating polynomial of degree at most n through the points

${\displaystyle \left\{(0,P(G,0)),(1,P(G,1)),\cdots ,(n,P(G,n))\right\}.}$

If G does not contain any vertex with a self-loop, then the chromatic polynomial is a monic polynomial of degree exactly n. In fact for the above example we have:

${\displaystyle P(P_{3},t)=t(t-1)^{2},\qquad P(P_{3},3)=12.}$

The chromatic polynomial includes at least as much information about the colorability of G as does the chromatic number. Indeed, the chromatic number is the smallest positive integer that is not a root of the chromatic polynomial,

${\displaystyle \chi (G)=\min\{k:P(G,k)>0\}.}$

## Properties

For fixed G on n vertices, the chromatic polynomial ${\displaystyle P(G,t)}$ is in fact a polynomial of degree n. By definition, evaluating the chromatic polynomial in ${\displaystyle P(G,k)}$ yields the number of k-colorings of G for ${\displaystyle k=0,1,\cdots ,n}$. The same hold for k > n.

The expression

${\displaystyle (-1)^{|V(G)|}P(G,-1)}$

yields the number of acyclic orientations of G.[2]

The derivative evaluated at 1, ${\displaystyle P'(G,1)}$ equals the chromatic invariant, ${\displaystyle \theta (G)}$, up to sign.

If G has n vertices, m edges, and c components ${\displaystyle G_{1},\cdots ,G_{c}}$, then

A graph G with n vertices is a tree if and only if

${\displaystyle P(G,t)=t(t-1)^{n-1}.}$

### Chromatic equivalence

The three graphs with a chromatic polynomial equal to ${\displaystyle (x-2)(x-1)^{3}x}$.

Two graphs are said to be chromatically equivalent if they have the same chromatic polynomial. Isomorphic graphs have the same chromatic polynomial, but non-isomorphic graphs can be chromatically equivalent. For example, all trees on n vertices have the same chromatic polynomial:

${\displaystyle (x-1)^{n-1}x,}$

in particular,

${\displaystyle (x-1)^{3}x}$

is the chromatic polynomial of both the claw graph and the path graph on 4 vertices.

### Chromatic uniqueness

A graph is chromatically unique if it is determined by its chromatic polynomial, up to isomorphism. In other words, G is chromatically unique, then ${\displaystyle P(G,t)=P(H,t)}$ would imply that G and H are isomorphic.

All Cycle graphs are chromatically unique.[4]

### Chromatic roots

A root (or zero) of a chromatic polynomial, called a “chromatic root”, is a value x where ${\displaystyle P(G,x)=0}$. Chromatic roots have been very well studied, in fact, Birkhoff’s original motivation for defining the chromatic polynomial was to show that for planar graphs, ${\displaystyle P(G,x)>0}$ for x ≥ 4. This would have established the four color theorem.

No graph can be 0-colored, so 0 is always a chromatic root. Only edgeless graphs can be 1-colored, so 1 is a chromatic root for every graph with at least an edge. On the other hand, except for these two points, no graph can have a chromatic root at a real number smaller than or equal to 32/27. A result of Tutte connects the golden ratio ${\displaystyle \phi }$ with the study of chromatic roots, showing that chromatic roots exist very close to ${\displaystyle \phi ^{2}}$: If ${\displaystyle G_{n}}$ is a planar triangulation of a sphere then

${\displaystyle P(G_{n},\phi ^{2})\leq \phi ^{5-n}.}$

While the real line thus has large parts that contain no chromatic roots for any graph, every point in the complex plane is arbitrarily close to a chromatic root in the sense that there exists an infinite family of graphs whose chromatic roots are dense in the complex plane.[5]

## Algorithms

{{#invoke:Infobox|infobox}} {{#invoke:Infobox|infobox}}

Computational problems associated with the chromatic polynomial include

The first problem is more general because if we knew the coefficients of ${\displaystyle P(G,t)}$ we could evaluate it at any point in polynomial time because the degree is n. The difficulty of the second type of problem depends strongly on the value of k and has been intensively studied in computational complexity. When k is a natural number, this problem is normally viewed as computing the number of k-colorings of a given graph. For example, this includes the problem #3-coloring of counting the number of 3-colorings, a canonical problem in the study of complexity of counting, complete for the counting class #P.

### Efficient algorithms

For some basic graph classes, closed formulas for the chromatic polynomial are known. For instance this is true for trees and cliques, as listed in the table above.

Polynomial time algorithms are known for computing the chromatic polynomial for wider classes of graphs, including chordal graphs[6] and graphs of bounded clique-width.[7] The latter class includes cographs and graphs of bounded tree-width, such as outerplanar graphs.

### Deletion–contraction

A recursive way of computing the chromatic polynomial is based on edge contraction: for a pair of vertices ${\displaystyle u}$ and ${\displaystyle v}$ the graph ${\displaystyle G/uv}$ is obtained by merging the two vertices and removing any edges between them. Then the chromatic polynomial satisfies the recurrence relation

${\displaystyle P(G,k)=P(G-uv,k)-P(G/uv,k)}$

where ${\displaystyle u}$ and ${\displaystyle v}$ are adjacent vertices and ${\displaystyle G-uv}$ is the graph with the edge ${\displaystyle uv}$ removed. Equivalently,

${\displaystyle P(G,k)=P(G+uv,k)+P(G/uv,k)}$

if ${\displaystyle u}$ and ${\displaystyle v}$ are not adjacent and ${\displaystyle G+uv}$ is the graph with the edge ${\displaystyle uv}$ added. In the first form, the recurrence terminates in a collection of empty graphs. In the second form, it terminates in a collection of complete graphs. These recurrences are also called the Fundamental Reduction Theorem.[8] Tutte’s curiosity about which other graph properties satisfied such recurrences led him to discover a bivariate generalization of the chromatic polynomial, the Tutte polynomial.

The expressions give rise to a recursive procedure, called the deletion–contraction algorithm, which forms the basis of many algorithms for graph coloring. The ChromaticPolynomial function in the computer algebra system Mathematica uses the second recurrence if the graph is dense, and the first recurrence if the graph is sparse.[9] The worst case running time of either formula satisfies the same recurrence relation as the Fibonacci numbers, so in the worst case, the algorithm runs in time within a polynomial factor of

${\displaystyle \phi ^{n+m}=\left({\frac {1+{\sqrt {5}}}{2}}\right)^{n+m}\in O\left(1.62^{n+m}\right),}$

on a graph with n vertices and m edges.[10] The analysis can be improved to within a polynomial factor of the number ${\displaystyle t(G)}$ of spanning trees of the input graph.[11] In practice, branch and bound strategies and graph isomorphism rejection are employed to avoid some recursive calls, the running time depends on the heuristic used to pick the vertex pair.

### Cube Method

There is a natural geometric perspective on graph colorings by observing that, as an assignment of natural numbers to each vertex, a graph coloring is a vector in the integer lattice. Since two vertices ${\displaystyle i}$ and ${\displaystyle j}$ being given the same color is equivalent to the ${\displaystyle i}$’th and ${\displaystyle j}$’th coordinate in the coloring vector being equal, each edge can be associated with a hyperplane of the form ${\displaystyle \{x\in R^{d}:x_{i}=x_{j}\}}$. The collection of such hyperplanes for a given graph is called its graphic arrangement. The proper colorings of a graph are those lattice points which avoid forbidden hyperplanes. Restricting to a set of ${\displaystyle k}$ colors, the lattice points are contained in the cube ${\displaystyle [0,k]^{n}}$. In this context the chromatic polynomial counts the number of lattice points in the ${\displaystyle [0,k]}$-cube that avoid the graphic arrangement.

### Computational complexity

The problem of computing the number of 3-colorings of a given graph is a canonical example of a #P-complete problem, so the problem of computing the coefficients of the chromatic polynomial is #P-hard. Similarly, evaluating ${\displaystyle P(G,3)}$ for given G is #P-complete. On the other hand, for ${\displaystyle k=0,1,2}$ it is easy to compute ${\displaystyle P(G,k)}$, so the corresponding problems are polynomial-time computable. For integers ${\displaystyle k>3}$ the problem is #P-hard, which is established similar to the case ${\displaystyle k=3}$. In fact, it is known that ${\displaystyle P(G,x)}$ is #P-hard for all x (including negative integers and even all complex numbers) except for the three “easy points”.[12] Thus, from the perspective of #P-hardness, the complexity of computing the chromatic polynomial is completely understood.

In the expansion

${\displaystyle P(G,t)=a_{1}t+a_{2}t^{2}+\dots +a_{n}t^{n},}$

the coefficient ${\displaystyle a_{n}}$ is always equal to 1, and several other properties of the coefficients are known. This raises the question if some of the coefficients are easy to compute. However the computational problem of computing ar for a fixed r and a given graph G is #P-hard.[13]

No approximation algorithms for computing ${\displaystyle P(G,x)}$ are known for any x except for the three easy points. At the integer points ${\displaystyle k=3,4,\dots }$, the corresponding decision problem of deciding if a given graph can be k-colored is NP-hard. Such problems cannot be approximated to any multiplicative factor by a bounded-error probabilistic algorithm unless NP = RP, because any multiplicative approximation would distinguish the values 0 and 1, effectively solving the decision version in bounded-error probabilistic polynomial time. In particular, under the same assumption, this rules out the possibility of a fully polynomial time randomised approximation scheme (FPRAS). For other points, more complicated arguments are needed, and the question is the focus of active research. Template:As of, it is known that there is no FPRAS for computing ${\displaystyle P(G,x)}$ for any x > 2, unless NP = RP holds.[14]

## References

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }} Template:Refend