Tutorials › Graph Theory (Undergraduate) › Kempe Chains and Color-Swapping

Dual Graphs and Map Coloring · Tutorial 471 of 799

Kempe Chains and Color-Swapping

Define and swap Kempe chains safely, then use planar separation to determine when two differently colored chains cannot connect specified neighbors.

Advanced 10 min read

What You'll Learn

  • Define a two-color Kempe chain in a partially colored graph
  • Prove why swapping two colors on one whole chain preserves properness
  • Track a swap through a concrete partial coloring
  • Apply Jordan curve separation to paths in a plane graph
  • Explain why chains on disjoint color pairs cannot cross a separating chain
  • Recognize the role of Kempe chains in the five-coloring argument

Two-Color Chains in a Partial Coloring

A coloring argument often begins with a graph in which some vertices have already been colored, while others remain uncolored. The useful local object is not an arbitrary path, but a whole connected component formed using just two colors. Swapping those two colors on that component can change which colors are available at nearby uncolored vertices without creating a conflict elsewhere.

Throughout, graphs are finite and simple. A plane graph is a planar graph together with a fixed embedding in the plane, so its vertices and edges are drawn without crossings. A partial coloring with color set \(C\) is a function \(\varphi:U\to C\), where \(U\subseteq V(G)\), such that any two adjacent vertices in \(U\) receive different colors. Vertices outside \(U\) are uncolored. Properness imposes no condition on an edge with an uncolored endpoint.

Definition: Fix two distinct colors \(i,j\in C\). The \((i,j)\)-subgraph is the subgraph induced by the colored vertices whose colors are \(i\) or \(j\). An \((i,j)\)-Kempe chain is a connected component of this subgraph. It may be a single vertex; it need not be a path, since a component can branch.

In a plane graph, a Kempe chain inherits the drawing of its vertices and edges. Its component is maximal: if a colored vertex of color \(i\) or \(j\) is adjacent to a vertex in the chain, it belongs to the same chain. This maximality is essential when a swap is made.

Why Swapping Preserves Properness

Theorem: Let \(\varphi\) be a proper partial coloring, and let \(K\) be one \((i,j)\)-Kempe chain. Interchange colors \(i\) and \(j\) on every vertex of \(K\), leaving all other colors and all uncolored vertices unchanged. The resulting partial coloring is proper.

Proof. Consider any edge whose two endpoints are colored after the swap. If neither endpoint is in \(K\), neither color changed, so the edge remains properly colored. If both endpoints are in \(K\), their original colors were different. Since both were in \(\{i,j\}\), they had opposite colors; interchanging \(i\) and \(j\) at both endpoints leaves them different. It remains to consider an edge with exactly one endpoint in \(K\). If the other endpoint had color \(i\) or \(j\), it would be a vertex of the \((i,j)\)-subgraph adjacent to \(K\), and hence would belong to the same connected component \(K\). Thus an endpoint outside \(K\) must have a color other than \(i,j\). The swapped endpoint still has color \(i\) or \(j\), so the edge remains proper. Edges with an uncolored endpoint impose no condition. Every edge therefore satisfies the definition of a proper partial coloring. \(\square\)

The result concerns a whole connected component, not just a convenient piece of one. Maximality ensures that an edge cannot run from the chosen chain to an outside vertex of either swapped color. A swap does not change which vertices are colored; it changes only the two color labels on \(K\).

Worked Example: Swapping One Component

Let \(G\) have \(V=\{1,2,3,4,5,6,7\}\) and \(E=\{12,23,34,56,27,57\}\). The partial coloring is \(1,3,5\) red, \(2,4,6\) blue, and \(7\) green. All vertices are colored. Check properness edge by edge: \(12,23,34,56\) join red to blue; \(27\) joins blue to green; \(57\) joins red to green. Thus every edge has differently colored endpoints.

The red-blue subgraph has two components: the path \(1-2-3-4\), and the edge \(5-6\). Choose the first component \(K=\{1,2,3,4\}\). Swapping red and blue there gives \(1,3\) blue and \(2,4\) red, while \(5\) remains red, \(6\) remains blue, and \(7\) remains green.

Now check every edge after the swap. Edge \(12\) is blue-red; \(23\) is red-blue; \(34\) is blue-red; \(56\) is still red-blue; \(27\) is red-green; and \(57\) is red-green. All six edges still have different colors at their endpoints. In particular, the separate component \(\{5,6\}\) was not swapped, even though it uses the same pair of colors.

Check: The original red-blue component containing 1 had four vertices and three edges, namely \(12,23,34\). After the swap those same three edges still alternate between the two colors, and the two edges incident with 7 still meet a green vertex. This verifies properness directly as well as by the theorem.

Worked Example: A Swap Makes a Color Available

Let \(G\) have \(V=\{v,a,b,c,d\}\) and \(E=\{va,vb,ac,cd\}\). Let \(v\) be uncolored, and color \(a,d\) red, \(b\) blue, and \(c\) green. The colored edges \(ac\) and \(cd\) join green to red, and \(vb\) has an uncolored endpoint, so the partial coloring is proper. The colored neighbors of \(v\) are \(a\), red, and \(b\), blue.

Consider the red-green subgraph. Its vertices are \(a,c,d\), and its edges are \(ac,cd\), so it is one Kempe chain \(a-c-d\). Swap red and green on this entire chain: \(a,d\) become green and \(c\) becomes red. Vertex \(b\) remains blue. The only colored edge among \(ac,cd\) still joins different colors, and the edge \(vb\) still has an uncolored endpoint.

Now the colored neighbors of \(v\) use blue and green, but not red. If \(v\) is assigned red, its edge to \(a\) joins red to green and its edge to \(b\) joins red to blue. Thus the extension is proper. The purpose of a Kempe swap is often to free a color at a vertex, not merely to produce a different coloring.

Check: Before the swap, the colors at \(a,c,d\) along the chain were red, green, red; after the swap they are green, red, green. Each of \(ac\) and \(cd\) has unequal endpoint colors, as required.

Planar Separation Between Chains

In a plane graph, a chain can do more than permit a swap: together with two edges to a common vertex, it can form a closed curve. The Jordan curve theorem says that a simple closed curve in the plane has two complementary regions, an inside and an outside, and any continuous path between these regions must meet the curve. We use this standard topological result here; its proof is beyond this graph-theory tutorial.

Planar separation principle: Suppose \(v\) has distinct neighbors \(p,q\), and a simple path \(P\) in \(G-v\) joins \(p\) to \(q\). Then \(P\), together with the edges \(pv\) and \(vq\), forms a simple closed curve in the plane embedding. If two other neighbors \(r,s\) of \(v\) lie in the two different sectors between the edges \(vp,vq\) in the cyclic order around \(v\), any \(r\)-\(s\) path in the embedded graph must meet that closed curve.

Here the sectors are the two sides determined locally at \(v\) by the two incident edges. The separation statement follows by applying the Jordan curve theorem to the closed curve: near \(v\), the edges toward \(r\) and \(s\) enter opposite sides. A path from \(r\) to \(s\) must therefore cross the curve. In a plane graph, edges cannot cross, so such a path must meet a vertex or edge of the curve. In particular, a path whose vertices use colors disjoint from the colors on \(P\), and which does not use \(v\), cannot meet the curve: it cannot share a vertex with \(P\), and it cannot use either edge \(pv\) or \(vq\) without passing through \(v\).

Worked Example: A Chain Separates Two Other Neighbors

Take a wheel with \(V=\{v,a,b,c,d,e\}\) and edges \(\{va,vb,vc,vd,ve,ab,bc,cd,de,ea\}\). Embed \(a,b,c,d,e\) in that cyclic order around \(v\), with the five rim edges forming the outside cycle. Add vertices \(x,y\) and edges \(ax,xy,yc\), drawn as a path outside the rim in the exterior face. The resulting graph has \(V=\{v,a,b,c,d,e,x,y\}\) and \(E=\{va,vb,vc,vd,ve,ab,bc,cd,de,ea,ax,xy,yc\}\). This specifies a plane graph without relying on a picture.

Leave \(v\) uncolored. Give \(a,x,y,c\) colors \(1,3,1,3\), respectively, and give \(b,d,e\) colors \(2,4,5\), respectively. Check the colored edges: the rim edges \(ab,bc,cd,de,ea\) have endpoint colors \(1,2\), \(2,3\), \(3,4\), \(4,5\), and \(5,1\). The added path edges \(ax,xy,yc\) have colors \(1,3\), \(3,1\), and \(1,3\). All these pairs are different, so the coloring of the colored vertices is proper.

The \(1\)-\(3\) subgraph contains the path \(a-x-y-c\). Choose this path \(P\). The edges \(av\) and \(vc\) complete a simple closed curve. In the cyclic order \(a,b,c,d,e\), the neighbors \(b\) and \(d\) lie in different sectors between \(a\) and \(c\). The curve therefore separates them. A \(2\)-\(4\) path from \(b\) to \(d\) would be disjoint from \(P\), since its vertices have colors 2 or 4, and would avoid \(v\), which is uncolored. Planar separation rules out such a path.

One can also verify the absence directly in this specified graph. The only vertices of colors 2 and 4 are \(b\) and \(d\), and \(bd\notin E\). All other neighbors of \(b\) or \(d\) have colors outside \(\{2,4\}\) or are uncolored. Hence they belong to separate \(2\)-\(4\) components. The planar argument explains why this obstruction is structural, not an accident of the edge list.

Check: The separating curve uses the path edges \(ax,xy,yc\) and the two spokes \(av,vc\). It contains neither \(b\) nor \(d\), and the two spokes from \(v\) toward \(b,d\) leave through opposite sectors. The \(2\)-\(4\) components cannot cross that curve in a plane embedding.

Why This Matters in Coloring Arguments

The low-degree vertex method for coloring a planar graph begins by removing a vertex, coloring the remaining graph, and then attempting to color the removed vertex. When its neighbors have already used several colors, swapping a Kempe chain may make one of those colors available. A planar separation argument can sometimes guarantee that one of two desired swaps is possible: if one pair of alternating neighbors is connected by a chain, the corresponding closed curve blocks a connecting chain for the other pair.

This is the mechanism behind the five-color argument developed next in the course. The point here is the local logic: first identify the two-color components, then check whether a swap frees a color; if a competing chain is relevant, use the fixed embedding and cyclic order of edges to test whether planar separation forbids it. The separation argument does not say that every pair of differently colored chains is disconnected. It applies when a particular chain and two incident edges actually form a separating curve.

Common Pitfall: Swapping Only Part of a Chain

Suppose an edge \(pq\) has \(p\) red and \(q\) blue. If one swaps red and blue at \(p\) but not at \(q\), the edge becomes blue-blue, so the coloring is no longer proper. The correction is to swap the entire connected component of the red-blue subgraph containing \(p\). If \(q\) is adjacent to \(p\) and has one of the two colors, then \(q\) belongs to that same component and is swapped too. If \(q\) is outside the component, maximality guarantees that it has neither swapped color, so the edge remains proper.

A second error is to treat every Kempe chain as a simple path. A connected two-color component can branch; a simple path is selected from it only when a separation argument needs one. Also, planar separation depends on the embedding and the cyclic order at the relevant vertex. The same abstract graph with a different embedding can have different sectors and different separation conclusions.

Check Your Understanding

Answer using the definitions and arguments above. For planar questions, specify the relevant embedding or cyclic order.

  1. In a partial coloring, what is the precise difference between the \((i,j)\)-subgraph and an \((i,j)\)-Kempe chain?
  2. Why can a chain have a branch, and why does the color-swap theorem still apply in that case?
  3. Give an edge-level argument for why a swap on only part of a Kempe chain can fail.
  4. What conditions make a path together with two edges incident to \(v\) into a simple closed curve?
  5. In the planar example, why can a \(2\)-\(4\) path from \(b\) to \(d\) neither meet the \(1\)-\(3\) path nor pass through \(v\)?