Unit 6 Coloring
Unit 6 Coloring
Unit 6 Coloring
LECTURE 16 – COLORING
1. Vertex colorings
Definition 1.1. A (proper) vertex coloring of a graph is an assignment of colors to its
vertices such that the colors of any two adjacent vertices are distinct.
Without loss of generality, we can assume that our graphs are simple.
Definition 1.2. A graph is called k-colorable if its vertices can be properly colored using
≤ k colors. A 2-colorable graph is called bipartite.
Example 1.3. The cube is the only Platonic solid whose skeleton is bipartite.
Example 1.4. Petersen’s graph is 3-colorable but not 2-colorable.
Theorem 1.5 (K. Appel and W. Haken, 1976). Every planar graph is 4-colorable.
This result, first conjectured in 1852, was the first important theorem whose proof relied,
in an essential way, on the use of computers.
The proof of the four color theorem requires the use of computers in an essential way. We
will prove a much weaker result.
Theorem 1.6 (The five-color theorem). Any planar graph G satisfies χ(G) ≤ 5.
We will give two different proofs.
Proof 1. We first show that any planar graph has a vertex of degree ≤ 5. If |V | < 3, this
is trivally true, so assume |V | ≥ 3. Suppose there is no vertex of degree < 5. Then every
vertex has degree ≥ 6. Therefore, 2|E| ≥ 6|V | so |E| ≥ 3|V |. On the other hand, since
|V | ≥ 3, we have |E| ≤ 3|V | − 6, a contradiction.
We now proceed by induction on |V |. If |V | < 5, then this is trivial. Suppose |V | > 5.
Let v be a vertex of degree ≤ 5. If deg(v) ≤ 4, then by the induction hypothesis, G − v has
a coloring with 5 colors and we can color v using a color not used by its neigbors. Therefore,
assume deg(v) = 5. Let t, u, x, z, y denote the vertices in clockwise cyclic order incident to
v. By the induction hypothesis, there is a 5-coloring c of G − v. If any of the 5 colors is not
used by a neighbor of v, then we can color v using that color. Therefore, assume that all 5
neighbors have different colors. Consider x, y and let
Vx,y := {u ∈ V (G − v) : c(u) ∈ {c(x), c(y)}}
denote the vertices that have the same color as either x or y. Now, we have two cases:
′
(1) There is no path in G − v only using vertices in Vx,y from x to y. Let Vx,y denote
the vertices that can be reached by a path from x only using vertics in Vx,y . Clearly,
′ ′ ′
x ∈ Vx,y and y ∈/ Vx,y . Interchange the colors of all vertices in Vx,y to get another
coloring of G − v in which x and y have the same color. Since only 4 colors are now
used by the neighbors of v, we can color v using the fifth color.
1
2 MATH 180 - GRAPH THEORY LECTURE 16 – COLORING
1. Vertex colorings
Definition 1.1. A (proper) vertex coloring of a graph is an assignment of colors to its
vertices such that the colors of any two adjacent vertices are distinct.
Without loss of generality, we can assume that our graphs are simple.
Definition 1.2. A graph is called k-colorable if its vertices can be properly colored using
≤ k colors. A 2-colorable graph is called bipartite.
Example 1.3. The cube is the only Platonic solid whose skeleton is bipartite.
Example 1.4. Petersen’s graph is 3-colorable but not 2-colorable.
Definition 1.5. The chromatic number χ(G) of a graph G is the smallest k for which G is
k-colorable.
Example 1.6. (1) If G is a bipartite graph with at least one edge, χ(G) = 2.
(2) For a complete graph, we have χ(Kn ) = n.
(3) If G is an n-cycle graph, n even, then χ(G) = 2.
(4) If G is an n-cycle graph, n ≥ 3 odd, then χ(G) = 3.
No efficient algorithm for computing χ(G) is known.
Definition 1.7. Let G = (V, E) be a (simple) graph. A clique in G is a subset of V in which
any two vertices are adjacent.
The clique number ω(G) of G is the largest size of a clique in G.
Proposition 1.8.
χ(G) ≥ ω(G).
Example 1.9. In general, χ(G) ̸= ω(G). For example,
(1) for an odd cycle with ≥ 5 vertices, ω(G) = 2 but χ(G) = 3;
(2) for the graph below, ω(G) = 3 but χ(G) = 4.
Example 1.12. For an odd cycle, the last proposition implies that χ(G) ≥ 3.
Proposition 1.13.
χ(G) ≤ max deg(v) + 1.
v∈V
Proof. Color vertices one by one, any way we please. There will always be an allowable
choice of color. □
Example 1.14. For an odd cycle, the last proposition gives χ(G) ≤ 3.
2. Chromatic polynomial
Definition 2.1. The chromatic polynomial of a graph G is a function pG : Z≥0 → Z defined
by
pG (k) = number of proper vertex colorings of G in k colors.
This terminology will be justified later on. The chromatic polynomial determines the
chromatic number:
χ(G) = (smallest k such that pG (k) ̸= 0).
Proof. Induction on the number of edges in G. Base: if G has no edges, then pG (k) = k n .
Induction step: use the deletion-contraction formula. □
Proposition 1.7. The chromatic polynomial pG (k) is monic, of degree n = |V |.
Proof. We need to show that pG (k) ∼ k n as k → ∞. Note that pGk(k) n is the probability that
a random assignment of colors to vertices yields a proper coloring. For k large, almost all
colorings are proper.
Alternatively, we can use induction on the number of edges. Suppose |E| = 0. Then,
G consists of n isolated vertices, so pG (k) = k n , which is monic of degree n. Suppose the
statement is true for all graphs with ≤ m − 1 edges, and suppose G is a graph with m
edges. Let e be an edge. Both G − e and G/e have ≤ m − 1 edges, so pG−e (k) = k n +
(lower degree terms) and pG/e (k) = k n−1 + (lower degree terms). Using deletion-contraction,
pG (k) = k n + (lower degree terms). □
2. Acyclic orientations
Definition 2.1. An acyclic orientation of a graph G is a directed graph obtained by orienting
the edges of G without creating an oriented cycle. Let ao(G) denote the number of such
orientations.
Example 2.2. All edge orientations of a tree G = (V, E) are acyclic, so ao(G) = 2|E| .
Example 2.3. Let G be an n-cycle. Then all edge orientations except for two are acyclic.
Therefore ao(G) = 2n − 2.
Example 2.4. The acyclic orientations of the complete graph Kn are in bijection with the
permutations in Sn :
(1) If w1 · · · wn ∈ Sn , orient the edge between wi and wj from wi to wj if i < j to get an
acyclic orientation.
(2) Given an acyclic orientation, we can recover the permutation as follows. There is a
unique vertex v such that all edges are oriented into v: if not, then every vertex has
an outgoing edge. Start at a vertex and keep walking along the outgoing edges to
get a cycle. Let wn := v, remove wn and proceed recursively.
Therefore, ao(G) = n!.
Theorem 2.5 (R. P. Stanley, 1973).
ao(G) = (−1)|V | · pG (−1).
Although it does not make sense to set k = −1 in the original definition of pG (k), we can
plug k = −1 into the polynomial pG (k) and miraculously we still get something combinato-
rially meaningful. Such a result is called a combinatorial reciprocity theorem.
Lemma 2.6 (Deletion-contraction formula for acyclic orientations). For an edge e ∈ E, we
have ao(G) = ao(G − e) + ao(G/e).
Proof. Let u and v be the endpoints of e. Any acyclic orientation of G − e extends to either
one or two acyclic orientations of G, depending on whether u and v are connected by an
oriented path (going in either direction) or not. There cannot be oriented paths going in
MATH 180 - GRAPH THEORY LECTURE 18 – DELETION-CONTRACTION 3
both directions because this would have yielded an oriented cycle in G−e. Therefore
acyclic orientations of G − e
n o
ao(G) = ao(G − e) + #
with no paths u ⇝ v or v ⇝ u
= ao(G − e) + ao(G/e).
□
Example 2.7. Let G be a 4-cycle. Then pG (k) = k(k − 1)(k 2 − 3k + 3), so
(−1)4 pG (−1) = (−1)(−2) · 7 = 14,
matching ao(G) = 24 − 2 = 14.
Exercise 2.8. Verify Stanley’s theorem when G is a tree and a complete graph Kn .
Proof of Stanley’s theorem. The deletion-contraction formula
pG (k) = pG−e (k) − pG/e (k)
implies
(−1)n pG (k) = (−1)n pG−e (k) + (−1)n−1 pG/e (k).
Thus the polynomials (−1)n pG (k), and consequently the numbers (−1)n pG (−1), satisfy the
same recurrence as the numbers ao(G). It remains to check the base case of the induction: an
edgeless graph G on n vertices. In this case, pG (k) = k n and ao(G) = 1, so (−1)n pG (−1) =
1 = ao(G), as desired. □