Chromatic polynomial explained

The chromatic polynomial is a graph 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 study the four color problem. It was generalised to the Tutte polynomial by Hassler 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

P(G,k)

denotes the number of proper colorings of G with k colors then one could establish the four color theorem by showing

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, Ronald C. 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

For a graph G,

P(G,k)

counts the number of its (proper) vertex k-colorings. Other commonly used notations include

PG(k)

,

\chiG(k)

, or

\piG(k)

.There is a unique polynomial

P(G,x)

which evaluated at any integer k ≥ 0 coincides with

P(G,k)

; it is called the chromatic polynomial of G.

P3

on 3 vertices with k colors, one may choose any of the k colors for the first vertex, any of the

k-1

remaining colors for the second vertex, and lastly for the third vertex, any of the

k-1

colors that are different from the second vertex's choice.Therefore,

P(P3,k)=k(k-1)(k-1)

is the number of k-colorings of

P3

.For a variable x (not necessarily integer), we thus have
2=x
P(P
3,x)=x(x-1)

3-2x2+x

.(Colorings which differ only by permuting colors or by automorphisms of G are still counted as different.)

Deletion–contraction

See main article: Deletion–contraction formula. The fact that the number of k-colorings is a polynomial in k follows from a recurrence relation called the deletion–contraction recurrence or Fundamental Reduction Theorem. It is based on edge contraction: for a pair of vertices

u

and

v

the graph

G/uv

is obtained by merging the two vertices and removing any edges between them. If

u

and

v

are adjacent in G, let

G-uv

denote the graph obtained by removing the edge

uv

.Then the numbers of k-colorings of these graphs satisfy:

P(G,k)=P(G-uv,k)-P(G/uv,k)

Equivalently, if

u

and

v

are not adjacent in G and

G+uv

is the graph with the edge

uv

added, then

P(G,k)=P(G+uv,k)+P(G/uv,k)

This follows from the observation that every k-coloring of G either gives different colors to

u

and

v

, or the same colors. In the first case this gives a (proper) k-coloring of

G+uv

, while in the second case it gives a coloring of

G/uv

.Conversely, every k-coloring of G can be uniquely obtained from a k-coloring of

G+uv

or

G/uv

(if

u

and

v

are not adjacent in G).

The chromatic polynomial can hence be recursively defined as

P(G,x)=xn

for the edgeless graph on n vertices, and

P(G,x)=P(G-uv,x)-P(G/uv,x)

for a graph G with an edge

uv

(arbitrarily chosen).Since the number of k-colorings of the edgeless graph is indeed

kn

, it follows by induction on the number of edges that for all G, the polynomial

P(G,x)

coincides with the number of k-colorings at every integer point x = k. In particular, the chromatic polynomial is the unique interpolating polynomial of degree at most n through the points

\left\{(0,P(G,0)),(1,P(G,1)),\ldots,(n,P(G,n))\right\}.

TG(x,y)

.

Examples

Chromatic polynomials for certain graphs
Triangle

K3

x(x-1)(x-2)

Complete graph

Kn

x(x-1)(x-2)(x-(n-1))

Edgeless graph

\overlineKn

xn

Path graph

Pn

x(x-1)n-1

Any tree on n vertices

x(x-1)n-1

Cycle

Cn

(x-1)n+(-1)n(x-1)

x(x-1)(x-2)\left(x7-12x6+67x5-230x4+529x3-814x2+775x-352\right)

Properties

For fixed G on n vertices, the chromatic polynomial

P(G,x)

is a monic polynomial of degree exactly n, with integer coefficients.

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 zero of the chromatic polynomial,

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

The polynomial evaluated at

-1

, that is

P(G,-1)

, yields

(-1)|V(G)|

times the number of acyclic orientations of G.

The derivative evaluated at 1,

P'(G,1)

equals the chromatic invariant

\theta(G)

up to sign. If G has n vertices and c components

G1,\ldots,Gc

, then

x0,\ldots,xc-1

are zeros.

xc,\ldots,xn

are all non-zero and alternate in signs.

xn

is 1 (the polynomial is monic).

xn-1

is

-|E(G)|.

We prove this via induction on the number of edges on a simple graph G with

n

vertices and

k

edges. When

k=0

, G is an empty graph. Hence per definition

P(G,x)=xn

. So the coefficient of

xn-1

is

0

, which implies the statement is true for an empty graph. When

k=1

, as in G has just a single edge,

P(G,x)=xn-xn-1

. Thus coefficient of

xn-1

is

-1=-|E(G)|

. So the statement holds for k = 1. Using strong induction assume the statement is true for

k=0,1,2,\ldots,(k-1)

. Let G have

k

edges. By the contraction-deletion principle,

P(G,x)=P(G-e,x)-P(G/e,x),

Let

P(G-e,x)=xn-an-1xn-1+an-2xn-2- … ,

and

P(G/e,x)=xn-1-bn-2xn-2+bn-3xn-3- … .


Hence

P(G,x)=xn-(an-1+1)xn-1+ …

.
Since

G-e

is obtained from G by removal of just one edge e,

an-1=k-1

, so

an-1+1=k

and thus the statement is true for k.

x1

is

(-1)n-1

times the number of acyclic orientations that have a unique sink, at a specified, arbitrarily chosen vertex.

\scriptstyleP(G,x)=P(G1,x)P(G2,x)P(Gc,x)

The last property is generalized by the fact that if G is a k-clique-sum of

G1

and

G2

(i.e., a graph obtained by gluing the two at a clique on k vertices), then

P(G,x)=

P(G1,x)P(G2,x)
x(x-1)(x-k+1)

.

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

P(G,x)=x(x-1)n-1.

Chromatic equivalence

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.In particular,

(x-1)3x

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

A graph is chromatically unique if it is determined by its chromatic polynomial, up to isomorphism. In other words, G is chromatically unique, then

P(G,x)=P(H,x)

would imply that G and H are isomorphic.All cycle graphs are chromatically unique.

Chromatic roots

A root (or zero) of a chromatic polynomial, called a “chromatic root”, is a value x where

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,

P(G,x)>0

for x ≥ 4. This would have established the four color theorem.

\varphi

with the study of chromatic roots, showing that chromatic roots exist very close to

\varphi2

:If

Gn

is a planar triangulation of a sphere then
2)
P(G
n,\varphi

\leq\varphi5-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.

Colorings using all colors

For a graph G on n vertices, let

ek

denote the number of colorings using exactly k colors up to renaming colors (so colorings that can be obtained from one another by permuting colors are counted as one; colorings obtained by automorphisms of G are still counted separately).In other words,

ek

counts the number of partitions of the vertex set into k (non-empty) independent sets.Then

k!ek

counts the number of colorings using exactly k colors (with distinguishable colors).For an integer x, all x-colorings of G can be uniquely obtained by choosing an integer k ≤ x, choosing k colors to be used out of x available, and a coloring using exactly those k (distinguishable) colors.Therefore:

P(G,x)=

x
\sum
k=0

\binom{x}{k}k!ek=

x
\sum
k=0

(x)kek,

where

(x)k=x(x-1)(x-2)(x-k+1)

denotes the falling factorial.Thus the numbers

ek

are the coefficients of the polynomial

P(G,x)

in the basis

1,(x)1,(x)2,(x)3,\ldots

of falling factorials.

Let

ak

be the k-th coefficient of

P(G,x)

in the standard basis

1,x,x2,x3,\ldots

, that is:

P(G,x)=

n
\sum
k=0

akxk

Stirling numbers give a change of basis between the standard basis and the basis of falling factorials.This implies:

ak=

n
\sum
j=0

(-1)j-k\begin{bmatrix}j\\k\end{bmatrix}ej

  and  

ek=

n
\sum
j=0

\begin{Bmatrix}j\\k\end{Bmatrix}aj.

Categorification

The chromatic polynomial is categorified by a homology theory closely related to Khovanov homology.

Algorithms

Above:Chromatic polynomial
Abovestyle:background: #DD9; font-size: 125%;
Labelstyle:font-weight:normal
Label1:Input
Data1:Graph G with n vertices.
Label2:Output
Data2:Coefficients of

P(G,x)

Label3:Running time
Data3:

O(2nnr)

for some constant

r

Label4:Complexity
Data4:
  1. P
-hard
Label5:Reduction from
Data5:
  1. 3SAT

}}

Above:
  1. k-colorings
Abovestyle:background: #DD9; font-size: 125%;
Labelstyle:font-weight:normal
Label1:Input
Data1:Graph G with n vertices.
Label2:Output
Data2:

P(G,k)

Label3:Running time
Data3:In P for

k=0,1,2

.

O(1.6262n)

for

k=3

. Otherwise

O(2nnr)

for some constant

r

Label4:Complexity
Data4:
  1. P
-hard unless

k=0,1,2

Label5:Approximability
Data5:No FPRAS for

k>2

Computational problems associated with the chromatic polynomial include

P(G,x)

of a given graph G;

P(G,x)

at a fixed x for given G.

The first problem is more general because if we knew the coefficients of

P(G,x)

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 x and has been intensively studied in computational complexity. When x is a natural number, this problem is normally viewed as computing the number of x-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
  1. 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[2] and graphs of bounded clique-width.[3] The latter class includes cographs and graphs of bounded tree-width, such as outerplanar graphs.

Deletion–contraction

The deletion-contraction recurrence gives a way of computing the chromatic polynomial, called the deletion–contraction algorithm. In the first form (with a minus), the recurrence terminates in a collection of empty graphs. In the second form (with a plus), it terminates in a collection of complete graphs. This forms the basis of many algorithms for graph coloring. The ChromaticPolynomial function in the Combinatorica package of the computer algebra system Mathematica uses the second recurrence if the graph is dense, and the first recurrence if the graph is sparse. 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

\varphin+m=\left(

1+\sqrt{5
} \right)^\in O\left(1.62^\right),

on a graph with n vertices and m edges. The analysis can be improved to within a polynomial factor of the number

t(G)

of spanning trees of the input graph. 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

i

and

j

being given the same color is equivalent to the

i

’th and

j

’th coordinate in the coloring vector being equal, each edge can be associated with a hyperplane of the form
d:x
\{x\inR
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

k

colors, the lattice points are contained in the cube

[0,k]n

. In this context the chromatic polynomial counts the number of lattice points in the

[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

  1. P
-complete problem, so the problem of computing the coefficients of the chromatic polynomial is #P-hard. Similarly, evaluating

P(G,3)

for given G is #P-complete. On the other hand, for

k=0,1,2

it is easy to compute

P(G,k)

, so the corresponding problems are polynomial-time computable. For integers

k>3

the problem is #P-hard, which is established similar to the case

k=3

. In fact, it is known that

P(G,x)

is #P-hard for all x (including negative integers and even all complex numbers) except for the three “easy points”.[4] Thus, from the perspective of #P-hardness, the complexity of computing the chromatic polynomial is completely understood.

In the expansion

P(G,x)=a1x+

2+ …
a
2x
n,
+a
nx

the coefficient

an

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 ≥ 1 and a given graph G is #P-hard, even for bipartite planar graphs.

No approximation algorithms for computing

P(G,x)

are known for any x except for the three easy points. At the integer points

k=3,4,\ldots

, 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). There is no FPRAS for computing

P(G,x)

for any x > 2, unless NP = RP holds.

References

External links

Notes and References

  1. Several chapters
  2. .
  3. .
  4. , based on a reduction in .