Chromatic Polynomial and Its Generating Function
Chromatic Polynomial and Its Generating Function
Function
An Ran Chen
Supervised by Dr Anthony Licata
Australian National University
1
1 Introduction
The chromatic polynomial was first mentioned in Birkhoff[1] in 1912 in an attempt to prove the
four-colour theorem. Although he did not prove the theorem, the chromatic polynomial became an
object of interest and has connections with statistical mechanics and combinatorics.
This report is structured into sections: section 2 will introduce the concept of the chromatic
polynomial and section 3 will introduce generating functions. In section 4, I will investigate some
basic properties of the generating function of the chromatic polynomial. Then in section 5, I
will describe this generating function’s link with combinatorics, namely, strict order polynomials.
Section 6 is the concluding section which elaborates on the implications of this association and
highlights some problems for the future.
Observe that the chromatic polynomial for the empty graph with n vertices and no edges
(denoted On ) has the chromatic polynomial λn as we have λ colours to choose from for each vertex.
Thus, given an arbitrary graph G we can keep applying the deletion-contraction relation until we
reduce fG (λ) to a sum of fOi (λ). Thus fG (λ) is a polynomial.
2
2.2 Examples
Here are some examples of the chromatic polynomials of common graphs.
1. fOn (λ) = λn
where On is the empty graph with n vertices as there are λ choices of colours for every vertex.
2. fKn (λ) = (λ)n = (λ)(λ − 1)...(λ − n + 1)
where Kn is the complete graph with n vertices.
3. Let G be a tree of order n, then fG (λ) = λ(λ − 1)n−1 .
Proof by induction. Statement is trivially true when n = 1. Now consider the tree with a leaf
removed, by the induction hypothesis there are λ(λ − 1)n−2 colourings. Now add the leaf and
colour that new vertex. Since the only colour forbidden is that of its parent, there are λ − 1
ways of colouring it.
4. For n ≥ 3, fCn (λ) = (λ − 1)n + (−1)n (λ − 1). where Cn is the cycle of size n.
Proof by induction using the deletion-contraction relation. Base case: fC3 (λ) = (λ)(λ−1)(λ−
2) = (λ − 1)3 + (−1)3 (λ − 1). By the deletion-contraction relation, fCn (λ) = fCn −e (λ) −
fCn−1 (λ) By the induction hypothesis, = λ(λ − 1)n−1 − (λ − 1)n−1 − (−1)n−1 (λ − 1) =
(λ − 1)n + (−1)n (λ − 1)
where N (p, r) is the number of spanning subgraphs of G with p components and r edges.
Proof. This proof is from [2] section 2.2.
Proof by counting argument. Let V (G) = {V1 , V2 , ..., Vn } and let a λ-map of G be a function
which maps from V (G) to {1, 2, .., λ}. Then there are λn such maps.
For any {i1 , i2 , ..., ir } ⊂ {1, 2, .., m}, define M (qi1 qi2 ...qir ) to count the number of λ-maps that
satisfies the property that both vertices of the edge eik have the same colour for all k ∈ [1, r].
Therefore fG (λ) counts the number of λ-maps that does not satisfy the criterion for M (qi1 qi2 ...qir )
for any choice of i1 , ..., ir .
By the principle of inclusion and exclusion:
m
X X
λn =fG (λ) + M (qi ) − M (qi qj ) + ... + (−1)m−1 M (q1 q2 ...qm )
i=1 1≤i≤j≤m
m
X X
fG (λ) =λn − M (qi ) + M (qi qj ) − ... + (−1)m M (q1 q2 ...qm )
i=1 1≤i≤j≤m
3
Now for a λ-map that satisfies M (qi1 qi2 ...qir ), consider the subgraph H of G consisting of edges
{ei1 , ei2 , ..., eir }, suppose it has p connected components, p ∈ [1, n]. Note that each component is
coloured according to the λ-map so each component has the same colour. Then H is a spanning
subgraph with r edges and p components and there are λp ways of colouring the components. So:
X n
X
M (qi1 qi2 ...qir ) = N (p, r)λp
1≤i1 ≤i2 ≤...≤ir ≤m p=1
And so,
n
X n
X n
X
fG (λ) = λn − N (p, 1)λp + N (p, 2)λp − ... + (−1)m N (p, m)λp
p=1 p=1 p=1
Since we are dealing with finite sums, we can swap the summations and so we are done.
3 Generating Function
3.1 Definition
Let f be a counting function, say f : N → C, then we can ‘encode’ f by the formal power series
below:
X
f (n)xn
n≥0
4
∞
X P (x)
an xn = (2)
n=0
Q(x)
where P is a polynomial of degree at most k − 1, and
k
X
Q(x) = 1 − ck xk (3)
n=1
∞
X ∞
X
(1 − Q) an xn = R + (c1 an+k−1 + ... + ck an )xn+k
n=0 n=0
X∞
=R+ an+k xn+k
n=0
X∞
=R+ an xn
n=k
k−1
X k−1
X ∞
X
=R− a n xn + an xn + an xn
n=0 n=0 n=k
k−1
X ∞
X
= (R − an xn ) + an xn
n=0 n=0
Pk−1 n
Let P = −R + n=0 an x . Since R has degree at most k − 1, P has degree at most k − 1.
Also:
∞
X ∞
X
(1 − Q) an xn = −P + a n xn
n=0 n=0
which yields equation (2).
5
Now consider the case when f is a polynomial. For any polynomial f (n) of degree d, we have
the following relation:
d+1
d+1−i d + 1
X
(−1) f (n + i) = 0
i
i=0
Alternatively,
d
X d+1
f (n + d + 1) = − (−1)d+1−i f (x + i) (4)
i
i=0
Thus we know f (n) can be generated by a recursive relation of order d + 1 with the following
coefficients.
d+1
−c1 = (−1)1
d
d+1
−c2 = (−1)2
d−1
...
d+1
−cj = (−1)j
d − (j − 1)
...
d+1
−cd+1 = (−1)d+1
0
So
d+1
X d+1
Q(x) = 1 + (−1)j xj
d − (j − 1)
j=1
d+1
X d+1
=1+ (−x)j
d+1−j
j=1
= (1 − x)(d+1)
Theorem 3.3. Let f : N → C be a polynomial, then if f (n) has degree at most d, then
X P (x)
f (n)xn =
n≥0
(1 − x)(d+1)
6
Furthermore we know:
d
X
P (x) = −R + f (n)xn
n=0
d−1
X d−2
X d−i
X d
X
= −c1 f (n)xn+1 − c2 f (n)xn+2 − ... − ci f (n)xn+i − ... − cd f (0)xd + f (n)xn
n=0 n=0 n=0 n=0
Thus there is a way of calculating the rational function given the chromatic polynomial of a
graph.
We can also determine P (x) by expanding the LHS of the following equation using the Taylor
expansion and comparing the coefficients on both sides of the following equation:
X
P (x) = (1 − x)(d+1) f (n)xn
n≥0
where G + xy is the graph obtained by adding the edge xy to G, and G/xy is the graph obtained
by contracting the vertices x, y of G.
7
This is an interesting property which we will elaborate on later in section 5.5.
Theorem 4.3. Let Kn denote the complete graph, for n ≥ 1:
X X n!xn
fGKn (λ)xλ = (λ)n xλ =
(1 − x)n+1
λ≥0 λ≥0
Proof.
X X
(λ)n xλ = xn (λ)n xλ−n
λ≥0 λ≥0
n
d X
= xn xλ
dxn
λ≥0
n
d X 1
= xn n
dx 1−x
λ≥0
n!
= xn
(1 − x)n+1
Furthermore, ak = fG (k).
Proof. Since k is the chromatic number of G
8
4.3 Adding Vertices and Edges
The following happens to the generating function when we add a new, disjoint vertex to an existing
graph.
Theorem 4.5. Given graph G, let:
X P (x)
fG (λ)xλ =
(1 − x)d+1
λ≥0
Proof. Since G and x are the 2 components of the graph (G + x), thus:
And so:
X X
fG+x (λ)xλ = λfG (λ)xλ
λ≥0 λ≥0
X
= λxfG (λ)xλ−1
λ≥0
d X
=x fG (λ)xλ
dx
λ≥1
d X
=x fG (λ)xλ − fG (0)
dx
λ≥0
d P (x)
=x
dx (1 − x)d+1
xP 0 (x)(1 − x) + (d + 1)xP (x)
=
(1 − x)d+2
We can do a similar thing when joining a pendant edge, that is, adding a new vertex that is
connected to one existing vertex by 1 edge.
Lemma 4.6. Let G be a graph, and let G+x denote the graph of G with a disjoint vertex added, and
graph (G+edge) be the graph of G with a 1-connected vertex added. Then by the contraction-deletion
relation:
9
Theorem 4.7. Let G, P (x) G + edge be defined as per Theorem 4.5 and Lemma 4.6. Then:
X
λ d P (x) P (x)
fG+edge (λ)x = x−
dx (1 − x)d+1 (1 − x)d+1
λ≥0
5.1 Definitions
Definition 5.1. A chain, denoted Cn is a set of n elements with a strict order < i.e. if α1 , α2 , ...αn
are the elements in Cn , then α1 < α2 < ... < αn .
Definition 5.2 ([6] def ii). Let P be a poset, then a map τ : P → Cn is said to be strictly order
preserving if X < Y ⇒ τ (X) < τ (Y ).
The strict order polynomial µ(n) is defined to be the polynomial that counts the number of
order preserving maps from P to Cn .
An acyclic orientation of the graph G is a directed graph on G that contains no di-cycles. For
example, the graph on the left hand side is an acyclic orientation of the cycle graph with 5 vertices.
−−−→
The right graph is not, as switching the direction of (1, 5) causes a di-cycle.
5 5
4 1 4 1
3 2 3 2
10
It can also be shown that every distinct (acyclic orientation of G, strict ordering-preserving map
to Cλ ) also maps to a λ-colouring of G.
where fG (λ) is the chromatic polynomial of G and µD (λ) is the strict order polynomial of the acyclic
orientation D.
Sketch of proof. This follows from the bijection between colouring and order-preserving maps above.
Refer to [4] for explicit details.
Thus for the generating function we get:
Theorem 5.2 ([4], Thm 1).
X P (x)
fG (λ)xn =
(1 − x)d+1
n≤0
where P (x) is a polynomial of degree d with non-negative coefficients and the leading coefficient
ap = |A(G)| which is the number of acyclic orientations of G.
Proof. By Theorem 5.1: X X X
fG (λ)xn = µD (λ)xn
n≤0 n≤0 D∈A(G)
We know that the generating function of the µ(n) has the form R(x)/(1 + x)p+1 where R(x) is
a monic polynomial of degree p with non-negative coefficients. So we are done. 1
11
Theorem 5.3 ([10], Prop 2). For graph G, let the generating function of the chromatic polynomial
be Pp
X
n ws xs
fG (λ)x = s=1 d+1
(1 − x)
n≤0
then the coefficient wp equals the number of permutations in M (G) having p ascents for any
p≥0
5.4 Example
Let us consider the example of a path graph with four vertices, the acyclic orientations are given
below with its associated permutations. The acyclic orientation of the graph is represented by the
directed edges. The numbers on the vertices corresponds to the labelling ψ mentioned above. The
list of permutations on the right-hand side of each graph denotes the ways the acyclic orientation
can be extended to a total order.
3 4 2 4 1 4 2 4
1234
1234 1234 1243
1234 1324 1243 2134
1243 1423 2143
2 1 1 3 2 3 3 1 2413
4 2 3 2 2 1 2 1
1234
1234 1243 1234
1324 1423 1234 1324
2134 2134 3124
3 1 1 4 2143 3 4 4 3
Thus:
Now consider the generating function from the colouring perspective. Since G is a tree, we know
that chromatic polynomial is:
fG (λ) = λ(λ − 1)3
Using the expression for P (x) obtained in the proof of Theorem 3.3, we can also calculate the
generating function directly, which gives the exact result as above.
12
5.5 Proving the Eulerian Polynomial Statement ([9] I.13)
Recall that we claimed in Theorem 4.2 that:
X X An (x)
fGOn (λ)xλ = λn xλ =
(1 − x)n+1
λ≤0 λ≤0
We can prove this statement analytically by using the properties of the polynomial, but we can
also verify this combinatorially, using what we already know about strict order polynomials and
ascents, that is[5]:
n−1
X
An (x) = An,k xk
k=0
Proof. Suppose G is planar, let the chromatic number of G be k ≤ 4. Recall from Theorem 4.4
that wi = 0 for i < k. Then by Theorem 5.3 the statement follows.
This dual perspective on the generating functions of chromatic polynomial provides an interest-
ing means for understanding the intrinsic structures of these polynomials. One interesting exercise
would be to take known statements about the chromatic polynomials e.g. the deletion-contraction
relation, and prove the statements independently with acyclic orientation, to hopefully learn some-
thing about how graph expansion and contraction affect the poset’s extension to totally ordered
chains.
Additionally, since the class of empty graphs On has generating functions that give rise to the
Eulerian polynomials, another task could be to investigate other sequence of functions that can be
generated by graph classes and the interesting structures depicted.
13
7 Acknowledgement
I would like to thank my supervisor Dr Anthony Licata for his insightful advice and encouragement,
AMSI for the generous financial support, and lastly, the air conditioners at the ANU Mathematical
Sciences Institute for being cool.
References
[1] Birkhoff, G. D. 1912. A determinant formula for the number of ways of coloring a map, Ann of
Math. 35, pp. 96-115.
[2] Dong, F. M. 1975. Chromatic Polynomial and Chromaticity of Graphs World Scientific Publish-
ing Company.
[3] Guerzhoy, P. Generating Functions: Recurrence Relations, Rationality and Hadamard Product.
Retrieved from http://www.math.hawaii.edu/~pavel/gen_functions.pdf on 31/12/2015
[4] Linial, N. 1986. Graph Coloring and Monotone Functions on Posets Discrete Mathematics 58,
pp. 97-98.
14