Chromatic and its Generating 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 . 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 . Section 6 is the concluding section which elaborates on the implications of this association and highlights some problems for the future.

2 The Chromatic Polynomial 2.1 Defining the Polynomial

Let G be a simple graph, then the chromatic polynomial of the graph G, denoted fG(λ), is a function that given λ, counts the number of λ-colourings of G.A λ-colouring of G is a function g : V (G) → {1, 2, 3, 4.., λ} such that for any two vertices v1, v2 of G that share an edge, g(v1) 6= g(v2). Note that it is not neccessary to use all λ colours. Two colourings f and g are distinct if there exists a vertex v of G such that f(v) 6= g(v). Note that we have not yet justified why this chromatic counting function is in fact a polynomial. To prove this claim, we need to use the deletion-contraction relation: Theorem 2.1 ([2], Thm 1.3.1). Let x,y be two non-adjacent vertices of graph G, then:

fG(λ) = fG+xy(λ) + fG/xy(λ) 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. Proof. Given a colouring c of G, either c(x) = c(y) or c(x) 6= c(y). The first case correpsonds to a colouring of G/xy where we let the colour of the contracted vertex xy be c(x) = c(y). The second case corresponds to a colouring of G + xy, since x and y will have different colours in G + xy as they are connected. We can also alternatively state this relation by setting F = G + xy:

Corollary 2.2. fF (λ) = fF −xy(λ) − fF/xy(λ) Observe that the chromatic polynomial for the empty graph with n vertices and no edges n (denoted On) has the chromatic polynomial λ 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.

n 1. fOn (λ) = λ

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 with n vertices.

n−1 3. Let G be a of order n, then fG(λ) = λ(λ − 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.

n n 4. For n ≥ 3, fCn (λ) = (λ − 1) + (−1) (λ − 1). where Cn is the cycle of size n.

Proof by induction using the deletion-contraction relation. Base case: fC3 (λ) = (λ)(λ−1)(λ− 3 3 2) = (λ − 1) + (−1) (λ − 1). By the deletion-contraction relation, fCn (λ) = fCn−e(λ) − n−1 n−1 n−1 fCn−1 (λ) By the induction hypothesis, = λ(λ − 1) − (λ − 1) − (−1) (λ − 1) = (λ − 1)n + (−1)n(λ − 1)

2.3 Expansion of the Chromatic Polynomial Using Spanning Subgraphs We can also compute the coefficients of the chromatic polynomial in terms of spanning subgraphs, that is, subgraphs that contain all vertices of the original graph. Theorem 2.3. Let G be a graph with n vertices and m edges.

n m X X r p fG(λ) = ( (−1) N(p, r))λ p=1 r=0 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 n X X m−1 λ =fG(λ) + M(qi) − M(qiqj) + ... + (−1) M(q1q2...qm) i=1 1≤i≤j≤m m n X X m fG(λ) =λ − M(qi) + M(qiqj) − ... + (−1) M(q1q2...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:

n X X p M(qi1 qi2 ...qir ) = N(p, r)λ

1≤i1≤i2≤...≤ir ≤m p=1 And so,

n n n n X p X p m X p fG(λ) = λ − N(p, 1)λ + N(p, 2)λ − ... + (−1) N(p, m)λ p=1 p=1 p=1

Since N(n, 0) = 1 and N(p, 0) = 0 for 1 ≤ p ≤ n − 1

m n X X r p fG(λ) = ( (−1) N(p, r))λ r=1 p=0 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

This is the (ordinary) generating function of the sequence {f(n)}n∈N. By considering these objects as formal power series we are not concerned with the convergence or divergence of the power series at particular values, this allows us to add and multiply these objects.

3.2 Rational Generating Function To investigate what the generating function of the chromatic polynomial might look like, we first consider the generating function of a recursive sequence.

Theorem 3.1 ([3]). Consider a sequence {an}n∈N given by the linear reccurrence relation of order k:

an+k = c1an+k−1 + c2an+k−2 + ... + ckan (1)

where c1, c2, .., ck are constant coefficients, and a0, a1, .., ak−1 are given a priori. Then the generating function of the sequence is rational, that is:

4 ∞ X P (x) a xn = (2) n Q(x) n=0 where P is a polynomial of degree at most k − 1, and

k X k Q(x) = 1 − ckx (3) n=1 Proof from [3]. We first show a lemma. k P∞ n Lemma 3.2. For a polynomial c1x + ... + ckx and a power series n=0 anx we have: ∞ ∞ k X n X n+k (c1x + .. + ckx ) anx = R + (c1an+k−1 + ... + ckan)x n=0 n=0 where R is some polynomial. Proof of lemma. Expanding the LHS of the equation and manipulating the power series we get (details on [3] pg.2):

k−2 k−3 X n+1 X n+2 k−1 R = c1 anx + c2 anx + ... + ck−1a0x n=0 n=0

Now, by the lemma and equation (1) we get:

∞ ∞ X n X n+k (1 − Q) anx = R + (c1an+k−1 + ... + ckan)x n=0 n=0 ∞ X n+k = R + an+kx n=0 ∞ X n = R + anx n=k k−1 k−1 ∞ X n X n X n = R − anx + anx + anx n=0 n=0 n=k k−1 ∞ X n X n = (R − anx ) + anx n=0 n=0 Pk−1 n Let P = −R + n=0 anx . Since R has degree at most k − 1, P has degree at most k − 1. Also:

∞ ∞ X n X n (1 − Q) anx = −P + anx 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 X d + 1 (−1)d+1−i 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 −c = (−1)1 1 d d + 1 −c = (−1)2 2 d − 1 ...  d + 1  −c = (−1)j j d − (j − 1) ... d + 1 −c = (−1)d+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)

Thus by Theorem 3.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 = (1 − x)(d+1) n≥0 where P (x) ∈ C[x] and deg (P ) ≤ d.

6 Furthermore we know:

d X P (x) = −R + f(n)xn n=0 d−1 d−2 d−i d X n+1 X n+2 X n+i d X n = −c1 f(n)x − c2 f(n)x − ... − ci f(n)x − ... − cdf(0)x + f(n)x 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

4 Generating Function of the Chromatic Polynomial

From the results above we know that given a graph G and its chromatic polynomial fG(λ), we can write:

X P (x) f (λ)xλ = (5) G (1 − x)d+1 λ≥0 where d is the number of vertices in G and P (x) ∈ C[x] and deg(P ) ≤ d. Now we investigate what these rational functions look like and how graph operations modify the generating functions.

4.1 Deletion-Contraction Relation The deletion-contraction relation can be carried over to the generating functions. Theorem 4.1. Let x,y be two non-adjacent vertices of graph G, then:

X λ X λ X λ X λ fG(λ)x = (fG+xy(λ) + fG/xy(λ))x = fG+xy(λ)x + fG/xy(λ)x λ≥0 λ≥0 λ≥0 λ≥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.

4.2 Some Observations

Theorem 4.2. Let On denote the empty graph, for n ≥ 1

X λ X n λ An(x) fG (λ)x = λ x = On (1 − x)n+1 λ≥0 λ≥0

where An(x) is the Eulerian polynomial.

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:

n X λ X λ n!x fG (λ)x = (λ)nx = Kn (1 − x)n+1 λ≥0 λ≥0 Proof.

X λ n X λ−n (λ)nx = x (λ)nx λ≥0 λ≥0   dn X = xn xλ dxn   λ≥0   dn X 1 = xn dxn  1 − x λ≥0 n! = xn (1 − x)n+1

Theorem 4.4. Let k be the chromatic number of G, then

d d−1 k P (x) = adx + ad−1x + ... + akx

where P(x) is as defined in (5), d is the number of vertices in G and ak 6= 0.

Furthermore, ak = fG(k). Proof. Since k is the chromatic number of G

fG(0) = fG(1) = ... = fG(k − 1) = 0, fG(k) 6= 0 Let d d−1 i P (x) = adx + ad−1x + ... + aix

where ai 6= 0 Expanding the generating function as a power series around 0.

P (x) a xd + a xd−1 + ... + a xi = d d−1 i (1 − x)d+1 (1 − x)d+1 d d−1 i = (adx + ad−1x + ... + aix )(1 + ...... ) i = aix + .....

Equating both sides of (5) gives the desired results.

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) f (λ)xλ = G (1 − x)d+1 λ≥0 Let G + x be the graph obtained by joining a new, disjoint vertex x to G, then:

X xP 0(x)(1 − x) + (d + 1)xP (x) f (λ)xλ = G+x (1 − x)d+2 λ≥0 Proof. Since G and x are the 2 components of the graph (G + x), thus:

fG+x(λ) = λfG(λ)

And so:

X λ X λ fG+x(λ)x = λfG(λ)x λ≥0 λ≥0 X λ−1 = λxfG(λ)x λ≥0   d X = x f (λ)xλ dx  G  λ≥1   d X = x f (λ)xλ − f (0) dx  G G  λ≥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:

f(G+edge)(λ) = fG+x(λ) − fG(λ)

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) f (λ)xλ = x − G+edge dx (1 − x)d+1 (1 − x)d+1 λ≥0

where d is the number of vertices in G. Proof. Combining Lemma 4.6 and Theorem 4.5 gives us the result.

5 Acyclic Orientations and Strict Order Polynomials

To better investigate the coefficients of the generating function of the chromatic polynomial, we relate it in terms of acyclic orientations and its strict order polynomials, which we will now define.

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 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 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

5.2 Bijection Between Colouring and Order-perserving Maps [7] Consider a λ-colouring of a graph G, that is, a colour map c : V (G) → [1, 2, ..., n]. Construct a di-graph as follows: given connected vertices x, y of G, if c(x) > c(y), then orient the edge from y to x. This gives us an acyclic orientation of the graph G; as otherwise we can find a list of vertices v1, v2, ...vj such that c(v1) > c(v2) > ... > c(vj) > c(v1). This orientation can also be intepreted as a strict order P on V (G) by taking the transitive closure of the directed edges where the directed edges represent order relations. The colouring map c also gives a strict order-preserving map from P to the chain Cλ by simply letting the colours be the elements of the chain.

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.

Let A(G) denote all the set of acyclic orientations on G, then: Theorem 5.1 ([4]). X fG(λ) = µD(λ) (6) D∈A(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) f (λ)xn = G (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 n X X n fG(λ)x = µD(λ)x 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

5.3 Relation to Permutations and Ascents From known properties of the strict order polynomials 2, Tomescu proved the following theorem in [10]. First we define the set of M(G) and the notion of permutation ascent. For a graph G, M(G) can be constructed as follows. For each acyclic orientation D, construct a labelling ψ : V (G) → {1, 2, 3, 4...n} such that if xy−→ is an edge in D then ψ(x) < ψ(y). Now for each D, we can deduce all of the ways this poset can be extended into a totally ordered set of size n. For each totally ordered set, we can find functions h :[n] → [n] such that h(1) < h(2) < .... < h(n), then h can also be seen as an element of the symmetric group Sn as it is also a permutation on n elements. We define M(G) as the set (with multiplicity) of all such permutations derived from extensions over all acyclic orientations of G. We classify i as a permutation ascent when h(i) < h(i + 1) for 0 < i ≤ n − 1 and by definition h(1) is a permutation ascent. For example, 1234 has 4 ascents and 1324 has 3 ascents. We can now state the theorem. 1A detailed discussion of the strict order polynomial is beyond the scope of this report. For explanation on the strict order polynomial consult [9] [8] 2See [9] [8]

11 Theorem 5.3 ([10], Prop 2). For graph G, let the generating function of the chromatic polynomial be Pp s X wsx f (λ)xn = s=1 G (1 − x)d+1 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 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:

M(G) = {1234(8), 1243(4)1324(3), 1423(2), 2134(3), 2143(2), 2413, 3124} Then we can calculate the number of ascents contained in each permutation. Counting mul- tiplicities, in M(G), there are 8 permuntations with 4 ascents, 14 permuntations with 3 ascents and 2 permuntations with 2 ascents. So by Theorem 5.3, the generating function of the chromatic polynomial is:

X X 8x4 + 14x3 + 2x2 µ (λ)xn = D (1 − x)5 n≤0 D∈A(G) Now consider the generating function from the colouring perspective. Since G is a tree, we know that chromatic polynomial is: 3 fG(λ) = λ(λ − 1) 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 n λ An(x) fG (λ)x = λ x = On (1 − x)n+1 λ≤0 λ≤0

where An(x) is the Eulerian polynomial.

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 k An(x) = An,kx k=0

Where An,k counts the number of permutations in Sn with k ascents. Since On has no edges, it only has one possible acyclic orientation. So, we can arbitrarily label the vertices in On and map the vertices into a chain of order n any way we want, thus M(On) = Sn, which yields the desired coefficients.

6 Implications and Future Problems

Being able to intepret the generating function of the chromatic polynomial in terms of orientations and order-preserving maps provides a useful method of translating statements on colouring in terms of the acyclic-orientations of graphs. For examples, by restating the four-colour theorem using Theorem 5.3, we find an alternative way of checking the non-planarity of graphs. Theorem 6.1. Given graph G, if the set M(G) contains no permutations with i ascents for 1 ≤ i ≤ 4, then G is not planar.

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. and Monotone Functions on Posets Discrete 58, pp. 97-98.

[5] OEIS. Eulerian Polynomials Retrieved from http://oeis.org/wiki/Eulerian_polynomials [6] Stanley R. P. 1970, A Chromatic-Like Polynomial for Ordered Sets Proc. 2nd Chapel Hill Conf. on Combinatorial Mathematics and its Applications pp. 421-427. [7] Stanley, R. P. 2006 Acyclic orientation of graphs Discrete Mathematics 306, pp. 905-909.

[8] Stanley, R. P. 2002. Enumerative Combinatorics Cambridge Univeristy Press. [9] Stanley R. P. 1997. Ordered structures and partitions. Mem. Am. Math Soc. 119 . [10] Tomescu, I. 1987. Graphical Eulerian Numbers and Chromatic Generating Functions. Discrete Mathematics 66, pp. 315 - 318.

14