A vertex coloring of a graphG is an assignment of a color to each vertex of G so that no two adjacent vertices have the same color. This is an n−coloring if only n different colors are used.
Definition (Chromatic Number)
The chromatic numberχ(G) of a graph G is the smallest number n so that G has a graph coloring.
Determining χ(G) for more complicated graphs is difficult. For 2−colorings, once you color a vertex, the is only one possible choice for its neighbors. For 3−colorings, there are two.
Lemma (Bipartite Chromatic Number)
Obviously, for any Bipartite Graph, the chromatic number is 2 (by definition!).
Lemma (Path Chromatic Number)
For any PathPn,χ(Pn)=2, since we can simply alternate.
Lemma (Cycle Chromatic Number)
For any CycleCn,χ(Cn)=2 if n is even, but 3 if n is odd.
Lemma (Complete Chromatic Number)
For Complete GraphKn,χ(Kn)=n, since every vertex is connected to each other and thus must be different colors.
We can try a greedy coloring strategy by coloring vertices one at a time and filling in the ones that do not conflict. If v has deg(v) neighbors, then it is enough to have deg(v)+1 colors to choose from.
Suppose G is not regular. Then there is some vertex v∈V where deg(v)<Δ(G). If we can color G−{v}, then we can try to greedily color v. But then
∀w∈N(v)⊆V(G−{v}),degG−{v}(w)=degG(w)−1
guaranteeing there is at least one color. We can then repeat this for every vertex.
Suppose G is k−regular. We want to find vertex v where u,w∈N(v) have the same color.
source code
If G is a complete graph, refer to Equality Special Cases. So, since G is not complete, u,v are not adjacent. We can try to color G−{v} with u,w as the same color.
If {u,w} is not a cutset, then we can recursively color the rest of the graph. If {u,w} is a cutset, then split G into two parts. We color each half inductively and change colors so that u,w match[^1].
source code
[1]:Let H1,H2 denote the halves split by u,w. You can imagine this is a graph contracted version of G.
We have two cases:
Case 1: If v is a cut vertex, we can inductively color each connected component of G−{v}. We need arrange it so then two (non-adjacent) neighbors of v are the same color. This gives the coloring for v.
Case 2: If we have 2 cut vertices, then {u,w} is our cutset. Let H1′=H1∪{u,w} and H2′=H2∪{u,w} be our two halves. We inductively find a k−coloring c1,c2 for H1′,H2′ respectively. However, we need to show that we can make u,w match colors before combining two halves, which gives our coloring.
Case 2A: Suppose we colored H1′ such that c1(u)=c1(w) by greedily coloring keeping u,w be last. If
(degH1(u)<k−1)∨(degH1(u)<k−1)
then we can ensure that there is at least one color to ensure the colors are different.
and likewise for w. But then this means we can easily find a k−coloring c2 for H2′ where c2(u)=c2(w). Then permute colors to ensure c1(u)=c2(u) and c1(w)=c2(w), allowing us to combine the halves, and giving us our coloring.
By Theorem (Planar Graphs have Bounded Minimum) we know G has δ(G)≤5. We apply greedy coloring but on low degree vertices last and proceed with induction on ∣V∣. So, if ∣V∣=1, then we are done.
Inductively, assume that if we have any planar graph on n vertices, then χ(G)≤6, then we want to show the same for G with n+1 vertices.
Pick v∈G where deg(v)≤5, which will be the last vertex to color. In particular, we color G−v then color v. Since G is planar, G−v is planar, and by the IH, we can color G−v. As v has ≤5 neighbors, then we must have some available color. Using that, we have a 6−coloring of G.
Proof: We induct on ∣V∣. If ∣V∣≤5, we are done (assign each vertex a unique color). Assume all planar graphs with k vertices have a 5−coloring, and we want to show this for a graph G with k+1 vertices. Pick v∈V where deg(v)≤5. Again, the goal is color G−v (which we can by the IH), and then add back v and color it.
Case 1: If deg(v)<5, then we have at least one color left for v, allowing us to color it.
Case 2: Suppose deg(v)=5. In this case, we cannot greedily color. We get two sub-cases:
Case 2A: If v‘s neighbors all use 4 distinct colors, then at least one color is free. Select that and we are done.
Case 2B: Suppose all of v‘s neighbors all have distinct colors.
source code
The goal is to recolor one of v‘s neighbors to free up a color for v.
Attempt 1: Suppose we tried to free up red on v1 by changing it to green. We can only do this if v1 has no green neighbors. But then to swap w∈N(v1) to red, none of N(w) can be red. We can abstract this by finding the Kempe ChainKred,green. It is the connected component containing v1 that includes only red and green vertices. We get two cases:
Case 2B.1.1: If v3∈Kred,green then can safely swap all the colors from red to green and green to red. This means v1 is green, and we can color vred.
Case 2B.1.2: If v3∈Kred,green,
source code
then we cannot swap to free up a color for v.
Attempt 2: Suppose we tried to swap blue and orange for v2 and v5 respectively. We find Kempe ChainKblue,orange. This means that
Case 2B.2.1: If v4∈Kblue,orange, then we can safely swap, and we are done.
Case 2B.2.2: Otherwise, we have
source code
But then this means that Case 2B.1.2 and Case 2B.2.2 happened at the same time. In particular, both chains must be vertex disjoint since they use different colors, and since Kred,green surround v2, the existence of Kblue,orange means that they must intersect.
But this is a contradiction as G must be planar. Therefore only a single case 2 for both attempts must be true. The inductive step holds, and we are done.