Graph Coloring

Study Sheet

Graph Coloring

Chromatic number, greedy coloring, the chromatic polynomial, and edge coloring

Vertex Coloring and Chromatic Number

Concept
Proper coloring and chromatic number

A proper kk-coloring of G=(V,E)G=(V,E) assigns one of kk colors to each vertex so that every edge joins two DIFFERENT colors. GG is kk-colorable if a proper kk-coloring exists, and the chromatic number χ(G)\chi(G) is the smallest such kk. If GG contains a clique (a set of pairwise adjacent vertices) of size ω\omega, then χ(G)≥ω\chi(G) \ge \omega: every pair inside a clique needs a different color, so a clique of size ω\omega alone forces at least ω\omega colors.

Coloring is the right language whenever some pairs of objects conflict and must be kept apart: exam slots for courses with common students, radio frequencies for nearby towers, registers for variables alive at the same time. Topic 7's bipartite graphs are exactly the graphs with χ(G)≤2\chi(G) \le 2, and the odd-cycle theorem there is really the first chromatic-number computation in this course, stated in the language of two colors. The clique bound χ(G)≥ω(G)\chi(G) \ge \omega(G) is cheap to check — exhibit any mutually adjacent set — but it runs only ONE direction: a graph can need far more colors than its largest clique supplies, which is exactly the misconception below. Pinning χ(G)\chi(G) down exactly, rather than merely bounding it, is in general a hard computational problem; the rest of this topic builds the tools — greedy orderings, Brooks' theorem, the chromatic polynomial — that make it tractable for the graphs that matter.

Example
Coloring KnK_n

Every pair of vertices in KnK_n is adjacent, so every vertex needs a color of its own: χ(Kn)=n\chi(K_n) = n. The clique bound gives χ(Kn)≥ω(Kn)=n\chi(K_n) \ge \omega(K_n) = n immediately, since the WHOLE vertex set is itself a clique; and nn colors obviously suffice (one color per vertex), so the bound is tight, with equality.

Example
The 55-cycle needs three colors, not two
12345
C5C_5 properly 33-colored; two colors are never enough.

C5C_5 (vertices 1,…,51,\ldots,5 in a ring) is an odd cycle, hence not bipartite (Topic 7), so χ(C5)≥3\chi(C_5) \ge 3: no proper 22-coloring exists. Three DO suffice: color 1,31,3 with color AA, 2,42,4 with color BB, and 55 with color CC. The edges 12,23,34,45,5112,23,34,45,51 then get (A,B),(B,A),(A,B),(B,C),(C,A)(A,B),(B,A),(A,B),(B,C),(C,A) — every pair different. So χ(C5)=3\chi(C_5) = 3 exactly, one more than its clique number ω(C5)=2\omega(C_5) = 2 (it has no triangle at all).

Example
A genuine problem: coloring the Petersen graph
o0o1o2o3o4i0i1i2i3i4
A proper 33-coloring of the Petersen graph.

Does the Petersen graph (Topic 1) need more than 33 colors? It contains 55-cycles — the outer rim o0-o1-o2-o3-o4-o0o_0\text{-}o_1\text{-}o_2\text{-}o_3\text{-}o_4\text{-}o_0 is one — so by the odd-cycle theorem it is not bipartite and χ≥3\chi \ge 3. A 33-coloring is easy to exhibit: give the outer rim the pattern A,B,A,B,CA,B,A,B,C (so o0,o2↦Ao_0,o_2\mapsto A, o1,o3↦Bo_1,o_3\mapsto B, o4↦Co_4\mapsto C) and the inner star the pattern B,A,C,C,BB,A,C,C,B (so i0↦Bi_0\mapsto B, i1↦Ai_1\mapsto A, i2,i3↦Ci_2,i_3\mapsto C, i4↦Bi_4\mapsto B). Checking all 1515 edges — the 55 rim edges, the 55 spokes ojijo_ji_j, and the 55 inner "pentagram" edges ijij+2i_ji_{j+2} — confirms every single one joins two different colors. So χ(Petersen)=3\chi(\text{Petersen}) = 3.

Side note
Where it goes wrong

Assuming χ(G)=ω(G)\chi(G) = \omega(G) because the clique bound is so often tight. The 55-cycle above is the standard counterexample: ω(C5)=2\omega(C_5) = 2 (no three vertices are pairwise adjacent — it has no triangle at all) yet χ(C5)=3\chi(C_5) = 3. Odd cycles longer than a triangle are exactly this: triangle-free, so the clique bound only promises χ≥2\chi \ge 2, while the parity argument for odd cycles forces χ≥3\chi \ge 3. The gap between ω(G)\omega(G) and χ(G)\chi(G) can be made arbitrarily large for cleverly built graphs (Mycielski's construction, beyond this course) — a clique is a LOWER bound, never the whole story.

Try it
Try it: the chromatic number of a wheel

Let W6W_6 be a hub vertex joined to every vertex of a 66-cycle rim (a wheel on 77 vertices, 1212 edges in all). Find χ(W6)\chi(W_6).

Show the answer

The rim C6C_6 is an even cycle, hence bipartite, so it can be properly 22-colored, alternating A,BA,B around the ring. The hub is adjacent to EVERY rim vertex, so it needs a color different from both AA and BB already in use — a third color, CC. Three colors suffice (rim in A,BA,B, hub in CC), and the hub together with any two ADJACENT rim vertices forms a triangle, a clique of size 33 forcing χ(W6)≥3\chi(W_6)\ge 3 by the clique bound. So χ(W6)=3\chi(W_6) = \mathbf{3}.

Greedy Coloring and Brooks' Theorem

Concept
Greedy coloring and Brooks' theorem

Fix an order v1,…,vnv_1,\ldots,v_n of VV. The greedy coloring assigns viv_i the SMALLEST color not already used by an earlier neighbor of viv_i. Since viv_i has at most Δ(G)\Delta(G) neighbors, at most Δ(G)\Delta(G) colors are ever forbidden, so one of the first Δ(G)+1\Delta(G)+1 colors is always free:

χ(G)≤Δ(G)+1.\chi(G) \le \Delta(G) + 1.

Brooks' theorem sharpens this for connected GG: χ(G)≤Δ(G)\chi(G) \le \Delta(G), UNLESS GG is a complete graph or an odd cycle, in which case χ(G)=Δ(G)+1\chi(G) = \Delta(G)+1.

The Δ+1\Delta+1 bound costs nothing to prove (the full argument is in Why It Works) and holds for every graph and every vertex order, which is exactly why it is usually far from the truth. Brooks' theorem is the surprising half: it says this trivial, order-independent bound is almost NEVER the best you can do — χ(G)\chi(G) only climbs all the way to Δ+1\Delta+1 for the two families where it is forced by Section 1's clique bound. KnK_n needs n=Δ+1n=\Delta+1 colors because the whole graph is one clique; an odd cycle needs 3=Δ+13=\Delta+1 colors (Δ=2\Delta=2) because the odd-cycle theorem rules out 22. Every other connected graph, however large Δ\Delta is, can be colored with only Δ\Delta colors — a genuinely hard theorem to prove, though easy to use.

Example
Greedy realizes the trivial bound on K4K_4
1234
K4K_4: all 44 colors are forced, matching Δ+1\Delta+1.

Order the vertices of K4K_4 any way, say 1,2,3,41,2,3,4. Vertex 11 has no colored neighbors yet, so it gets color 11. Vertex 22 is adjacent to 11 (color 11 used), so it needs color 22. Vertex 33 is adjacent to 1,21,2 (colors 1,21,2 used), so it needs color 33. Vertex 44 is adjacent to 1,2,31,2,3 (colors 1,2,31,2,3 used), so it needs color 44. No order could do better here, since K4K_4 is one of Brooks' two exceptions: Δ(K4)=3\Delta(K_4)=3 but χ(K4)=4=Δ+1\chi(K_4) = 4 = \Delta+1, as Section 1 already established directly.

Example
A tight nontrivial case: the Petersen graph

The Petersen graph (pictured in the previous section) has Δ=3\Delta=3, and it is neither complete nor an odd cycle, so Brooks' theorem guarantees χ≤3\chi \le 3 — already a real improvement over the trivial bound Δ+1=4\Delta+1=4. The 33-coloring exhibited there shows this sharper bound is achieved with equality: χ(Petersen)=3=Δ(Petersen)\chi(\text{Petersen}) = 3 = \Delta(\text{Petersen}), exactly as Brooks promises for a graph outside the two exceptional families.

Example
A genuine problem: does Brooks' theorem pin down the triangular prism?
abcdef
The triangular prism, properly 33-colored.

Let the triangular prism have two triangles abcabc and defdef joined by the matching ad,be,cfad, be, cf (99 edges on 66 vertices, every vertex of degree 33, so Δ=3\Delta=3). It is not complete (K6K_6 would need (62)=15\binom{6}{2}=15 edges, not 99) and not an odd cycle, so Brooks' theorem gives χ≤3\chi \le 3. It also contains the triangle abcabc, so the clique bound gives χ≥3\chi \ge 3. Together, χ=3\chi = 3 exactly: color a,fa,f with AA, b,db,d with BB, and c,ec,e with CC. Checking all 99 edges — ab,bc,ca,de,ef,fd,ad,be,cfab,bc,ca,de,ef,fd,ad,be,cf — gives the color pairs (A,B),(B,C),(C,A),(B,C),(C,A),(A,B),(A,B),(B,C),(C,A)(A,B),(B,C),(C,A),(B,C),(C,A),(A,B),(A,B),(B,C),(C,A), every one two different colors.

Side note
Where it goes wrong

Believing the bound χ(G)≤Δ(G)+1\chi(G) \le \Delta(G)+1 IS the value of χ(G)\chi(G), or that any vertex order realizes it. Take the bipartite "crown" graph on {a1,a2,a3,b1,b2,b3}\{a_1,a_2,a_3,b_1,b_2,b_3\} with aia_i adjacent to bjb_j whenever i≠ji \ne j (66 edges, Δ=2\Delta=2); being bipartite, χ=2\chi=2. Greedily coloring in the INTERLEAVED order a1,b1,a2,b2,a3,b3a_1,b_1,a_2,b_2,a_3,b_3: a1↦1a_1\mapsto1; b1b_1 (no colored neighbor yet) ↦1\mapsto1 too; a2a_2 is adjacent to b1b_1 (color 11) ↦2\mapsto2; b2b_2 is adjacent to a1a_1 (color 11) ↦2\mapsto2; a3a_3 is adjacent to BOTH b1,b2b_1,b_2 (colors 1,21,2) ↦3\mapsto3; likewise b3↦3b_3\mapsto3. This order burns 3=Δ+13=\Delta+1 colors on a graph that only ever needs 22 — the trivial bound is reached only because the order was chosen badly, not because 33 colors were actually necessary.

Try it
Try it: when Brooks' bound is not tight

What does Brooks' theorem say about χ(K4,4)\chi(K_{4,4}) (complete bipartite, both parts of size 44, so Δ=4\Delta=4), and is that bound tight?

Show the answer

K4,4K_{4,4} is neither a complete graph (it has no edges within a part) nor an odd cycle, so Brooks' theorem guarantees χ(K4,4)≤Δ=4\chi(K_{4,4}) \le \Delta = 4. But K4,4K_{4,4} is bipartite (Topic 7), so in fact χ(K4,4)=2\chi(K_{4,4}) = 2 — far below the Brooks bound. Unlike the Petersen graph and the prism above, where Brooks' bound was exact, here it is not tight at all: χ(K4,4)=2\chi(K_{4,4}) = \mathbf{2}, not 44.

The Chromatic Polynomial

Concept
The chromatic polynomial and deletion-contraction

The chromatic polynomial P(G,k)P(G,k) counts the proper colorings of GG using (up to) kk available colors. For any edge e=uve=uv,

P(G,k)=P(G−e,k)−P(G/e,k),P(G,k) = P(G-e,k) - P(G/e,k),

where G−eG-e deletes ee and G/eG/e deletes ee and merges u,vu,v into one vertex. The empty graph on nn vertices has P=knP = k^n. For every graph, P(G,k)P(G,k) is genuinely a polynomial in kk (Why It Works), and χ(G)\chi(G) is the smallest POSITIVE integer kk with P(G,k)>0P(G,k) > 0.

The recurrence comes from splitting the colorings of G−eG-e into two disjoint piles: those where uu and vv already differ, which are exactly the proper colorings of GG (the edge ee costs nothing extra to add back), and those where uu and vv agree, which are exactly the colorings of the merged graph G/eG/e. So P(G−e,k)=P(G,k)+P(G/e,k)P(G-e,k) = P(G,k) + P(G/e,k), which rearranges into the boxed formula. Evaluating one polynomial at every integer kk answers every kk-coloring question for GG at once, including the hardest one: P(G,k)=0P(G,k)=0 for k<χ(G)k<\chi(G) and P(G,k)>0P(G,k)>0 from k=χ(G)k=\chi(G) onward, so the chromatic number is simply the polynomial's smallest positive root among the integers.

Example
A triangle with a pendant: the "paw" graph
1234
The paw graph, properly 33-colored.

Let the paw be a triangle 1,2,31,2,3 with a fourth vertex 44 attached only to 11. Any proper coloring of the triangle extends to 44 in exactly k−1k-1 ways (44 only has to avoid the single color used at 11), so P(paw,k)=P(K3,k)⋅(k−1)P(\text{paw},k) = P(K_3,k)\cdot(k-1). Since P(K3,k)=k(k−1)(k−2)P(K_3,k) = k(k-1)(k-2) (color the first vertex kk ways, the second k−1k-1 ways avoiding it, the third k−2k-2 ways avoiding both), P(paw,k)=k(k−1)(k−2)(k−1)=k(k−1)2(k−2)P(\text{paw},k) = k(k-1)(k-2)(k-1) = k(k-1)^2(k-2). At k=3k=3: 3⋅4⋅1=123\cdot4\cdot1 = 12. At k=2k=2 the factor (k−2)(k-2) vanishes, giving P=0P=0 — confirming χ(paw)≥3\chi(\text{paw}) \ge 3, exactly what the triangle alone already demanded.

Example
The 55-cycle, revisited through its polynomial
12345
C5C_5 properly 33-colored; two colors are never enough.

Every cycle obeys P(Cn,k)=(k−1)n+(−1)n(k−1)P(C_n,k) = (k-1)^n + (-1)^n(k-1) (derived from the same recurrence in Why It Works). For the 55-cycle from Section 1, n=5n=5 is odd, so P(C5,k)=(k−1)5−(k−1)P(C_5,k) = (k-1)^5 - (k-1). At k=2k=2: 15−1=01^5 - 1 = 0 — NO proper 22-coloring exists, confirming χ(C5)≥3\chi(C_5)\ge3 exactly as the odd-cycle theorem forced. At k=3k=3: 25−2=302^5 - 2 = 30, a positive count, confirming 33 colors do suffice. The polynomial turns positive exactly at k=χ(C5)=3k = \chi(C_5) = 3.

Example
A genuine problem: the diamond, by deletion-contraction and by direct count
1234
The diamond: K4K_4 minus one edge, 55 edges on 44 vertices.

Let the "diamond" be K4K_4 minus the edge {3,4}\{3,4\}: vertices 1,2,3,41,2,3,4 with edges 12,13,14,23,2412,13,14,23,24. Deleting edge 1212 leaves 13,14,23,2413,14,23,24, which is the 44-cycle 1-3-2-4-11\text{-}3\text{-}2\text{-}4\text{-}1, so P(G−12,k)=(k−1)4+(k−1)P(G-12,k) = (k-1)^4+(k-1). Contracting edge 1212 merges 1,21,2 into one vertex adjacent to both 33 and 44 (the duplicated edges 13/2313/23 and 14/2414/24 each collapse to one), leaving a 33-vertex path, so P(G/12,k)=k(k−1)2P(G/12,k) = k(k-1)^2. By deletion-contraction,

P(diamond,k)=(k−1)4+(k−1)−k(k−1)2=k(k−1)(k−2)2.P(\text{diamond},k) = (k-1)^4+(k-1) - k(k-1)^2 = k(k-1)(k-2)^2.

Cross-check by counting directly: color 11 in kk ways, 22 in k−1k-1 ways (adjacent to 11), then 33 and 44 EACH avoid only 1,21,2 (they are not adjacent to each other) in k−2k-2 ways apiece, giving k(k−1)(k−2)(k−2)=k(k−1)(k−2)2k(k-1)(k-2)(k-2) = k(k-1)(k-2)^2 — the same polynomial. At k=3k=3: 3⋅2⋅1=63\cdot2\cdot1=6; at k=2k=2: the factor (k−2)2(k-2)^2 vanishes, so χ(diamond)=3\chi(\text{diamond})=3, matching the triangle 1,2,31,2,3 (or 1,2,41,2,4) already inside it.

Side note
Where it goes wrong

Getting the deletion-contraction sign backwards: writing P(G,k)=P(G−e,k)+P(G/e,k)P(G,k) = P(G-e,k) + P(G/e,k) with a PLUS. The colorings of G−eG-e split into those where ee's endpoints already differ (the colorings of GG itself) and those where they agree (the colorings of G/eG/e), so it is P(G−e,k)P(G-e,k) that equals the SUM — meaning P(G,k)P(G,k) itself is the difference, a MINUS. Using a plus for C5C_5 would claim P(C5,2)=15+1=2P(C_5,2) = 1^5+1 = 2, falsely suggesting a 22-coloring exists, when Section 1 already proved C5C_5 has none.

Try it
Try it: evaluate a tree's chromatic polynomial

A tree on nn vertices (Topic 4) is built one edge at a time with no cycles ever closing, so coloring it means coloring a first vertex in kk ways and then each further vertex avoiding only its one already-placed neighbor, in k−1k-1 ways: P(T,k)=k(k−1)n−1P(T,k) = k(k-1)^{n-1}. Use this for the path P4P_4 on 44 vertices, and evaluate at k=2k=2.

Show the answer

Here n=4n=4, so P(P4,k)=k(k−1)3P(P_4,k) = k(k-1)^3. At k=2k=2: 2⋅13=22\cdot1^3 = \mathbf{2} — matching the only two 22-colorings possible, the alternating patterns 1,2,1,21,2,1,2 and 2,1,2,12,1,2,1.

Edge Coloring

Concept
Edge coloring and the chromatic index

A proper edge coloring assigns colors to the edges of GG so that any two edges sharing a vertex get DIFFERENT colors. The chromatic index χ′(G)\chi'(G) is the fewest colors this takes. The deg⁡(v)\deg(v) edges at any vertex vv all share that vertex, so they alone need deg⁡(v)\deg(v) different colors: χ′(G)≥Δ(G)\chi'(G) \ge \Delta(G) always. Vizing's theorem: Δ(G)≤χ′(G)≤Δ(G)+1\Delta(G) \le \chi'(G) \le \Delta(G)+1 for every simple graph — GG is Class 1 if χ′(G)=Δ(G)\chi'(G)=\Delta(G), Class 2 if χ′(G)=Δ(G)+1\chi'(G)=\Delta(G)+1.

Edge coloring is secretly vertex coloring one level removed: the LINE GRAPH L(G)L(G) has one vertex per edge of GG, with two line-graph vertices adjacent exactly when the two original edges share an endpoint, and χ′(G)=χ(L(G))\chi'(G) = \chi(L(G)) by construction. What makes edge coloring special is how narrow Vizing's theorem is: unlike Brooks' theorem, where χ(G)\chi(G) can sit well below Δ\Delta for all sorts of graphs, χ′(G)\chi'(G) is ALWAYS within one color of the trivial bound Δ(G)\Delta(G) — no graph is ever a worse surprise than that. König's edge-coloring theorem settles the bipartite case outright: every bipartite graph is Class 1, χ′(G)=Δ(G)\chi'(G)=\Delta(G) exactly, provable by the same alternating-path machinery as Hall's theorem and the vertex-cover König's theorem (Topic 7, a different theorem sharing only the name). Deciding Class 1 versus Class 2 for a general graph, though, is itself a hard computational problem — Vizing's theorem is cheap to state and expensive to settle.

Example
Edge-coloring K4K_4 with Δ\Delta colors
1122331234
K4K_4 edge-colored by 33 perfect matchings; edge labels are colors.

K4K_4 has Δ=3\Delta=3 (every vertex meets 33 edges), so χ′(K4)≥3\chi'(K_4)\ge3 by the trivial bound. Three colors suffice: split the 66 edges into the 33 perfect matchings {12,34}\{12,34\}, {13,24}\{13,24\}, {14,23}\{14,23\}, one color per matching. Any two edges of the SAME matching share no vertex by definition, so no two same-colored edges ever meet — a proper 33-edge-coloring. So χ′(K4)=3=Δ(K4)\chi'(K_4) = 3 = \Delta(K_4): K4K_4 is Class 11.

Example
A genuine problem: edge-coloring K5K_5

Label the vertices of K5K_5 as 0,1,2,3,40,1,2,3,4 and color edge {i,j}\{i,j\} with (i+j) mod 5(i+j) \bmod 5. Two edges sharing vertex ii are {i,j}\{i,j\} and {i,l}\{i,l\} with j≠lj \ne l; their colors agree only if j≡l(mod5)j \equiv l \pmod 5, impossible for distinct j,l∈{0,…,4}j,l \in \{0,\ldots,4\} — a genuine proper edge coloring, and it visibly uses all 55 colors (the edges at vertex 00 alone, {0,1},{0,2},{0,3},{0,4}\{0,1\},\{0,2\},\{0,3\},\{0,4\}, already get the 44 different colors 1,2,3,41,2,3,4). Since Δ(K5)=4\Delta(K_5)=4, this shows χ′(K5)≤5=Δ+1\chi'(K_5)\le5=\Delta+1. And 55 is actually necessary: with only 44 colors, each color class is a matching on 55 vertices, which can cover at most 22 disjoint edges (an odd number of vertices always leaves one unmatched), so 44 colors could cover at most 4⋅2=84\cdot2=8 of the (52)=10\binom{5}{2}=10 edges — too few. So χ′(K5)=5=Δ+1\chi'(K_5) = 5 = \Delta+1: K5K_5 is Class 22.

Example
A genuine problem: edge-coloring the Petersen graph

Does the 33-regular Petersen graph (Topic 1) have χ′=3=Δ\chi'=3=\Delta, like K4K_4 above? A proper 33-edge-coloring of a 33-regular graph must split its edges into 33 PERFECT matchings, one per color, since each color class has to saturate every vertex using exactly one of its 33 incident edges. The Petersen graph has exactly 66 perfect matchings in total (a short exhaustive check); examining all (63)=20\binom{6}{3}=20 ways to pick three of them shows none are pairwise disjoint with union covering all 1515 edges. So no partition into 33 perfect matchings exists, and 33 colors are not enough: χ′(Petersen)=4=Δ+1\chi'(\text{Petersen}) = 4 = \Delta+1. The Petersen graph is the smallest snark — a connected, bridgeless, 33-regular, Class 22 graph.

Side note
Where it goes wrong

Assuming χ′(G)=Δ(G)\chi'(G) = \Delta(G) always, since Vizing's window is so narrow that Class 22 feels rare. The odd cycle C5C_5 is a simple, concrete counterexample: Δ(C5)=2\Delta(C_5)=2, yet no 22-edge-coloring works — going around its 55 edges, the colors must alternate 1,2,1,2,…1,2,1,2,\ldots, but after an ODD number of edges the coloring returns to its start already wearing the wrong color, exactly the odd-cycle argument for vertex coloring in Section 1. A third color is unavoidable: χ′(C5)=3=Δ+1\chi'(C_5) = 3 = \Delta+1. Odd cycles are Class 22 for the same parity reason they need 33 vertex colors, not 22.

Try it
Try it: edge-coloring a bipartite graph

By König's edge-coloring theorem, every bipartite graph is Class 11. Use this to find χ′(K3,3)\chi'(K_{3,3}), and exhibit an explicit edge coloring achieving it.

Show the answer

K3,3K_{3,3} has Δ=3\Delta=3 (every vertex meets all 33 vertices on the other side), so König's theorem gives χ′(K3,3)=Δ=3\chi'(K_{3,3}) = \Delta = \mathbf{3} directly. Explicitly: label the parts a0,a1,a2a_0,a_1,a_2 and b0,b1,b2b_0,b_1,b_2 and color edge {ai,bj}\{a_i,b_j\} with (i+j) mod 3(i+j)\bmod3; two edges sharing aia_i get colors (i+j) mod 3(i+j)\bmod3 for different jj, always different, and likewise for two edges sharing a bjb_j — a proper 33-edge-coloring using exactly Δ=3\Delta=3 colors.

The Five and Four Color Theorems

Concept
The Five and Four Color Theorems

Every planar graph satisfies χ(G)≤5\chi(G) \le 5 (the Five Color Theorem, proved in full below) and, in fact, χ(G)≤4\chi(G) \le 4 (the Four Color Theorem). The bound of 44 is tight — some planar graphs genuinely need all 44 — but NO planar graph, however large or intricate, ever needs a 55th.

Both theorems lean on the same planar edge bound (Topic 8): a planar graph on n≥3n\ge3 vertices has at most 3n−63n-6 edges, so its average degree is under 66, guaranteeing SOME vertex of degree at most 55 somewhere in the graph. That one fact drives an induction — remove a low-degree vertex, recolor the smaller graph, add the vertex back — and the Five Color Theorem's proof completes this induction cleanly using a trick called a Kempe chain. The Four Color Theorem is the same statement with 55 sharpened to 44, first proved in 1976 by Appel and Haken with a computer check of roughly 1,9001{,}900 unavoidable configurations; no proof short enough for a single chapter is known even today, so this course states it without proving it — the honest thing to do, and a sharper version of the same lesson as Vizing's theorem: some true statements are far cheaper to believe than to settle. Either way, restricting to planar graphs caps χ(G)\chi(G) at a small constant no matter how many vertices the graph has — a genuinely topological fact, since χ(G)\chi(G) for graphs in general is unbounded (χ(Kn)=n\chi(K_n)=n, from Section 1).

Example
A planar graph that truly needs 44
123h
K4K_4 redrawn as a wheel: still planar, and it needs all 44 colors.

Draw K4K_4 as a wheel: a hub hh at the center joined to a triangle 1,2,31,2,3 on the rim (66 edges, no crossings — this redrawing shows K4K_4 is planar). The whole graph is a clique of size 44, so the clique bound (Section 1) forces χ≥4\chi \ge 4, and 44 colors obviously suffice, one per vertex. This planar graph needs every one of the 44 colors the Four Color Theorem allows — unlike the bound of 55, the bound of 44 cannot be lowered to cover every planar graph.

Example
A genuine problem: a planar graph needing only 33
nsewfk
The octahedron, properly 33-colored by antipodal pairs.

The octahedron — 66 vertices in 33 antipodal pairs {n,s},{e,w},{f,k}\{n,s\},\{e,w\},\{f,k\}, each vertex adjacent to all 44 vertices that are not its own antipode, 1212 edges in all — is planar (it is one of the five Platonic solids). Color each antipodal pair alike: n,s↦An,s\mapsto A; e,w↦Be,w\mapsto B; f,k↦Cf,k\mapsto C. The only non-edges are the three antipodal pairs themselves, so every edge joins two DIFFERENT pairs, hence different colors — a proper 33-coloring. And χ≥3\chi\ge3 since n,e,fn,e,f are pairwise adjacent (none is another's antipode), a triangle. So χ(octahedron)=3\chi(\text{octahedron}) = 3, even though its degree Δ=4\Delta=4 is larger than the wheel's above.

Example
A planar graph needing only 22
123456
C6C_6: a planar graph needing only 22 colors.

At the other extreme, the hexagon C6C_6 is planar (just draw it as a plain hexagon) and, being an EVEN cycle, is bipartite (Topic 7), so χ(C6)=2\chi(C_6)=2 exactly: alternate colors A,B,A,B,A,BA,B,A,B,A,B around the ring. Across these three examples χ\chi takes the values 22, 33, and 44 for planar graphs of similar size; the Four Color Theorem guarantees it can never reach 55, for ANY planar graph at all.

Side note
Where it goes wrong

Forgetting that the Four Color Theorem needs the hypothesis "planar." K5K_5 has χ(K5)=5\chi(K_5)=5 (Section 1), already more than 44 — no contradiction, because K5K_5 is NOT planar: it has (52)=10\binom{5}{2}=10 edges, exceeding the planar bound 3n−6=3⋅5−6=93n-6 = 3\cdot5-6 = 9 for n=5n=5 vertices. Drop the planarity hypothesis and 44 colors fail for arbitrarily large graphs (K100K_{100} needs all 100100); the theorem is a genuinely TOPOLOGICAL fact about crossing-free drawings, never a universal cap on χ(G)\chi(G).

Try it
Try it: a high-degree vertex and the Five Color Theorem

A planar graph has one vertex of degree 1111. Does the Five Color Theorem still guarantee the WHOLE graph is 55-colorable?

Show the answer

Yes. The planar edge bound only guarantees that SOME vertex has degree at most 55 (the average degree is under 66) — not that EVERY vertex does. A single vertex of degree 1111 is no obstruction: the inductive proof below finds a DIFFERENT, low-degree vertex elsewhere to remove first, colors the rest of the graph, and only deals with the degree-1111 vertex after everything around it is already settled. **Yes** — the theorem applies to every planar graph, regardless of how high any one vertex's degree happens to be.

Why It Works

Fix any order v1,…,vnv_1,\ldots,v_n and run the greedy algorithm with the colors 1,2,…,Δ(G)+11,2,\ldots,\Delta(G)+1 available. When vertex viv_i is reached, only its NEIGHBORS can have forbidden its color so far, and viv_i has at most Δ(G)\Delta(G) neighbors in total (colored or not) — so at most Δ(G)\Delta(G) of the Δ(G)+1\Delta(G)+1 available colors are ever forbidden at the moment viv_i is colored. At least one color therefore remains free, and greedy assigns it. Since this holds at every step for every vertex, greedy completes a proper coloring using only the colors 1,…,Δ(G)+11,\ldots,\Delta(G)+1, regardless of the order chosen. A completed proper coloring with Δ(G)+1\Delta(G)+1 colors exists, so χ(G)≤Δ(G)+1\chi(G) \le \Delta(G)+1.

Claim: P(Cn,k)=(k−1)n+(−1)n(k−1)P(C_n,k) = (k-1)^n + (-1)^n(k-1) for all n≥3n\ge3. Deleting one edge of CnC_n leaves the path PnP_n, and contracting that same edge merges its two endpoints into one vertex, turning the rest of the cycle into Cn−1C_{n-1}; deletion-contraction gives

P(Cn,k)=P(Pn,k)−P(Cn−1,k)=k(k−1)n−1−P(Cn−1,k).P(C_n,k) = P(P_n,k) - P(C_{n-1},k) = k(k-1)^{n-1} - P(C_{n-1},k).

Base case n=3n=3: K3K_3 is colored by choosing 33 pairwise-different colors in order, P(C3,k)=k(k−1)(k−2)P(C_3,k)=k(k-1)(k-2), which equals (k−1)3+(−1)3(k−1)=(k−1)[(k−1)2−1]=(k−1)(k−2)k(k-1)^3+(-1)^3(k-1) = (k-1)\big[(k-1)^2-1\big] = (k-1)(k-2)k, matching the claim. Inductive step: assume P(Cn−1,k)=(k−1)n−1+(−1)n−1(k−1)P(C_{n-1},k) = (k-1)^{n-1}+(-1)^{n-1}(k-1). Substituting,

P(Cn,k)=k(k−1)n−1−(k−1)n−1−(−1)n−1(k−1)=(k−1)n+(−1)n(k−1),P(C_n,k) = k(k-1)^{n-1} - (k-1)^{n-1} - (-1)^{n-1}(k-1) = (k-1)^n + (-1)^n(k-1),

using k(k−1)n−1−(k−1)n−1=(k−1)nk(k-1)^{n-1}-(k-1)^{n-1} = (k-1)^n and −(−1)n−1=(−1)n-(-1)^{n-1} = (-1)^n. This matches the claim for nn, completing the induction.

By induction on n=∣V(G)∣n = |V(G)| for planar GG. If n≤5n\le5, give every vertex its own color. For the inductive step, assume every planar graph with fewer than nn vertices is 55-colorable, and let GG be planar with n≥6n\ge6 vertices. By the planar edge bound (Topic 8), ∣E(G)∣≤3n−6|E(G)| \le 3n-6, so ∑vdeg⁡(v)=2∣E(G)∣≤6n−12<6n\sum_v \deg(v) = 2|E(G)| \le 6n-12 < 6n, which forces some vertex vv to have deg⁡(v)≤5\deg(v)\le5. Let G′=G−vG' = G - v, planar with n−1n-1 vertices; by induction G′G' has a proper 55-coloring. If deg⁡(v)≤4\deg(v)\le4, or deg⁡(v)=5\deg(v)=5 but its neighbors use at most 44 distinct colors among them, some color is free for vv and coloring it finishes the job. The remaining case is deg⁡(v)=5\deg(v)=5 with neighbors v1,…,v5v_1,\ldots,v_5, in their natural cyclic order around vv in the planar drawing, colored 1,2,3,4,51,2,3,4,5 respectively — all five colors used. Let H1,3H_{1,3} be the subgraph of G′G' induced by the vertices colored 11 or 33. If v1v_1 and v3v_3 lie in different connected components of H1,3H_{1,3}, swap colors 1↔31\leftrightarrow3 throughout v1v_1's component; this keeps the coloring of G′G' proper (swapping two colors inside one connected component of a two-color subgraph never creates a same-colored edge, inside the component or crossing its boundary), and now none of vv's neighbors is colored 11, so vv can take color 11. Otherwise v1v_1 and v3v_3 lie in the SAME component of H1,3H_{1,3}, joined by a path alternating colors 1,31,3; together with the two edges vv1vv_1 and vv3vv_3, this path forms a cycle through vv. Since v2v_2 sits between v1v_1 and v3v_3 in the cyclic order around vv while v4v_4 sits on the other side (between v3v_3 and v5v_5 and v1v_1), the planar drawing forces this cycle to separate v2v_2 from v4v_4: any path between them must cross the cycle, and it can only cross through a vertex colored 11 or 33. So no path from v2v_2 to v4v_4 can alternate purely between colors 22 and 44, meaning v2v_2 and v4v_4 lie in different components of H2,4H_{2,4} (the subgraph induced by colors 2,42,4). Swap colors 2↔42\leftrightarrow4 throughout v2v_2's component; this again keeps G′G' properly colored, and now none of vv's neighbors is colored 22, so vv can take color 22. Either way GG receives a proper 55-coloring, completing the induction.