Tutorials › Graph Theory (Undergraduate) › Common Errors in Vertex-Coloring Arguments

Vertex Coloring and Chromatic Number · Tutorial 362 of 799

Common Errors in Vertex-Coloring Arguments

Use examples and precise checks to identify invalid vertex-coloring arguments and replace them with valid bounds or certificates.

Intermediate 9 min read

What You'll Learn

  • Explain why a greedy coloring gives an upper bound, not necessarily the chromatic number.
  • Trace a first-fit coloring and verify its color classes.
  • Use clique size as a lower bound on the chromatic number.
  • Certify an exact chromatic number by matching upper and lower bounds.
  • Check connectedness, completeness, and odd-cycle exceptions before applying Brooks' theorem.
  • Distinguish a valid Brooks bound from the general maximum-degree-plus-one bound.

Three Checks for a Coloring Argument

A proper coloring is a way to assign colors so that adjacent vertices receive different colors. But a valid coloring does not automatically use the fewest possible colors, a large clique does not necessarily determine the chromatic number, and a familiar theorem cannot be applied without its hypotheses. These distinctions are especially important when an argument uses greedy coloring, clique size, or Brooks' theorem.

All graphs in this tutorial are finite and simple. A proper \(k\)-coloring of \(G=(V,E)\) assigns one of \(k\) colors to each vertex so that the endpoints of every edge have different colors. The chromatic number \(\chi(G)\) is the smallest number of colors in a proper coloring. A clique is a set of pairwise adjacent vertices, and the clique number \(\omega(G)\) is the size of a largest clique. The maximum degree \(\Delta(G)\) is the largest vertex degree.

Definition: Given an ordering of the vertices, the greedy (first-fit) coloring processes them in that order, assigning each vertex the smallest positive integer not already assigned to one of its previously colored neighbors. Its result is a proper coloring, but its number of colors can depend on the vertex order.

A correct coloring proves an upper bound: if it uses \(k\) colors, then \(\chi(G)\le k\). To prove that \(k\) is optimal, an argument also needs a lower bound of at least \(k\), or another proof that no coloring with fewer colors exists. The common checks are: verify that the proposed coloring is proper, identify what it proves, and separately justify any claimed lower bound.

Greedy Does Not Mean Optimal

Worked Example: A Greedy Coloring Uses Too Many Colors

Let \(G=(V,E)\) have \(V=\{a,b,c,d\}\) and \(E=\{ab,bc,cd\}\). This is a path on four vertices. Apply first-fit coloring in the order \(a,d,b,c\).

Vertex \(a\) has no previously colored neighbors, so it receives color 1. Vertex \(d\) also has no previously colored neighbors, so it receives color 1. Vertex \(b\) is adjacent to \(a\), which has color 1, so it receives the smallest available color, 2. Finally, \(c\) is adjacent to \(b\) of color 2 and \(d\) of color 1, so it receives color 3. The colors are therefore \(a:1,\ d:1,\ b:2,\ c:3\).

This coloring is proper: the edges \(ab,bc,cd\) have endpoint-color pairs \(1,2\), \(2,3\), and \(3,1\), respectively. It gives \(\chi(G)\le3\), not \(\chi(G)=3\). In fact, the two sets \(\{a,c\}\) and \(\{b,d\}\) form a proper 2-coloring: each listed edge has one endpoint in each set. Since \(ab\in E\), at least two colors are necessary. Thus \(\chi(G)=2\).

Check: the greedy coloring used three colors, while the explicit proper 2-coloring and the edge \(ab\) give matching upper and lower bounds of 2. The greedy output is valid but not optimal.

The example illustrates why the vertex order matters: first-fit only avoids colors already used by earlier neighbors. It makes no promise that the colors it has used will be necessary in an optimal coloring. A coloring produced by a greedy algorithm is still useful, since its color count is an upper bound; it simply cannot serve as an optimality proof by itself.

Proposition: For every finite simple graph \(G\), greedy coloring uses at most \(\Delta(G)+1\) colors.

Proof. Consider any vertex order and any vertex \(v\) when it is colored. At most \(\deg(v)\) neighbors of \(v\) have already been colored, so at most \(\deg(v)\) colors are forbidden by those neighbors. Since \(\deg(v)\le\Delta(G)\), at most \(\Delta(G)\) colors are forbidden. Among the \(\Delta(G)+1\) colors \(1,2,\dots,\Delta(G)+1\), at least one is therefore available, and first-fit chooses one of the available colors. This holds for every vertex in the order, so the entire coloring uses at most \(\Delta(G)+1\) colors. If \(G\) has no vertices, it uses no colors and the assertion holds with \(\Delta(G)=0\) under the convention for the empty graph. \(\square\)

This is an upper bound, not a claim that every graph needs \(\Delta(G)+1\) colors. In the path example, \(\Delta(G)=2\), so the bound is 3; the optimal coloring uses only 2.

A Clique Gives a Lower Bound, Not Necessarily the Answer

Proposition: For every finite simple graph \(G\), \(\omega(G)\le\chi(G)\).

Proof. Let \(C\) be a clique of size \(\omega(G)\). Every two distinct vertices of \(C\) are adjacent. In a proper coloring, adjacent vertices must have different colors, so the \(\omega(G)\) vertices of \(C\) must receive \(\omega(G)\) distinct colors. Hence every proper coloring of \(G\) uses at least \(\omega(G)\) colors, which gives \(\omega(G)\le\chi(G)\). \(\square\)

This inequality supplies a lower bound. It does not say that every graph has a coloring using exactly \(\omega(G)\) colors. To conclude equality, one must also give a proper coloring with \(\omega(G)\) colors, or otherwise establish the matching upper bound.

Worked Example: The Clique Number Can Be Smaller Than the Chromatic Number

Let \(G=(V,E)\) have \(V=\{1,2,3,4,5\}\) and \(E=\{12,23,34,45,51\}\), the cycle \(C_5\).

There is no clique of size 3. Indeed, the two neighbors of each vertex are not adjacent: for example, the neighbors 2 and 5 of 1 are not joined by an edge, and the same holds around the cycle. Thus no three vertices can be pairwise adjacent. Since the graph has edges, it has a clique of size 2, so \(\omega(G)=2\).

There is no proper 2-coloring. If vertex 1 has color A, then 2 must have color B, 3 must have color A, 4 must have color B, and 5 must have color A. But edge 51 joins two vertices of color A. On the other hand, the assignment \(1:\mathrm{A}, 2:\mathrm{B}, 3:\mathrm{A}, 4:\mathrm{B}, 5:\mathrm{C}\) is proper: the five edges \(12,23,34,45,51\) have endpoint-color pairs \(\mathrm{A},\mathrm{B}\), \(\mathrm{B},\mathrm{A}\), \(\mathrm{A},\mathrm{B}\), \(\mathrm{B},\mathrm{C}\), and \(\mathrm{C},\mathrm{A}\). Therefore \(\chi(G)=3\).

Check: the verified values are \(\omega(G)=2\) and \(\chi(G)=3\). The clique bound is strict here, so setting the chromatic number equal to the clique number would give the wrong answer.

A useful exactness certificate combines the two directions of information. If a graph has a proper \(k\)-coloring and contains a clique of size \(k\), then \(\chi(G)=k\): the coloring proves \(\chi(G)\le k\), and the clique proves \(\chi(G)\ge k\). Both are needed. The clique alone cannot prove an upper bound, and a coloring alone cannot prove a lower bound.

Use Brooks' Theorem Only After Checking Its Hypotheses

Theorem (Brooks' theorem): If \(G\) is a connected finite simple graph that is neither a complete graph nor an odd cycle, then \(\chi(G)\le\Delta(G)\). The complete-graph and odd-cycle cases are exceptions to this bound. The theorem is a standard result proved in the earlier material on Brooks' theorem.

Connectedness, completeness, and being an odd cycle are not optional details. First check that the graph is connected. Then check whether it is complete or an odd cycle. Only if it passes all these checks does the stated \(\Delta(G)\) bound apply. For a disconnected graph, apply the theorem to its connected components that meet the hypotheses; do not silently treat the whole graph as connected. The general bound \(\chi(G)\le\Delta(G)+1\) remains available without Brooks' theorem.

Worked Example: Why Brooks' Bound Fails for a Complete Graph

Let \(G=K_4\), with \(V=\{1,2,3,4\}\) and \(E=\{12,13,14,23,24,34\}\). Every pair of distinct vertices is adjacent, so each vertex has degree 3 and \(\Delta(G)=3\). Since all four vertices form a clique, a proper coloring needs four distinct colors; assigning one different color to each vertex shows that four suffice. Hence \(\chi(G)=4\).

A tempting but invalid argument is: “Brooks' theorem gives \(\chi(G)\le\Delta(G)=3\).” The calculation \(\Delta(G)=3\) is correct, but the theorem does not apply: \(K_4\) is complete. In fact, the conclusion \(\chi(G)\le3\) contradicts the clique lower bound \(\chi(G)\ge4\). The valid general maximum-degree bound gives \(\chi(G)\le\Delta(G)+1=4\), which agrees with the four-coloring and the clique lower bound.

Check: substituting the computed values gives \(\chi(K_4)=4=\Delta(K_4)+1\), not \(\chi(K_4)\le\Delta(K_4)\). The failed step was applying Brooks' theorem to an excluded graph.

Odd cycles are the other exception. For example, in \(C_5\) the maximum degree is 2 but the chromatic number is 3, as the preceding example computed. Thus the proposed Brooks conclusion \(\chi(C_5)\le2\) is false. The example is not a counterexample to Brooks' theorem: \(C_5\) is an odd cycle, which the theorem excludes.

For a graph with several components, a safe argument handles each component explicitly. If a component is complete or an odd cycle, use its actual coloring or another applicable result rather than Brooks' theorem on that component. If a component is connected and neither complete nor an odd cycle, Brooks' theorem gives the stated bound for that component. In particular, never infer that the theorem applies to a disconnected graph merely because some of its components satisfy the hypotheses.

A Practical Audit for Coloring Claims

When checking a proof about \(\chi(G)\), separate the claim into the bound it needs and the evidence offered for that bound.

  • “This coloring proves \(\chi(G)=k\).” Verify every edge has differently colored endpoints. That establishes only \(\chi(G)\le k\); find a lower bound of \(k\) as well.
  • “The clique number is \(k\), so the chromatic number is \(k\).” Clique size proves \(\chi(G)\ge k\). Equality still needs a proper \(k\)-coloring.
  • “Brooks' theorem gives \(\chi(G)\le\Delta(G)\).” Check connectedness and verify that the graph is neither complete nor an odd cycle before using the theorem.
  • “The maximum-degree bound is \(\Delta(G)\).” The general bound is \(\Delta(G)+1\). The stronger \(\Delta(G)\) conclusion requires an applicable result, such as Brooks' theorem, or a separate argument.

The central habit is to distinguish what each piece of evidence actually establishes. A proper coloring supplies an upper bound; a clique supplies a lower bound; and a theorem supplies a bound only when its assumptions hold. An exact chromatic number is justified when the bounds meet, not merely when one plausible-looking calculation is available.

Check Your Understanding

For each claim, identify what is established and what additional check or argument is needed.

  1. A greedy coloring of a graph uses four colors. What does this prove about \(\chi(G)\), and what does it not prove?
  2. A graph contains a clique of size 5 and has a proper 5-coloring. Prove that its chromatic number is 5.
  3. In the graph with \(V=\{a,b,c,d\}\) and \(E=\{ab,bc,cd\}\), why does a three-color greedy output not prove \(\chi(G)=3\)? Give a two-coloring.
  4. For \(K_5\), calculate \(\Delta(G)\) and \(\chi(G)\). Explain why Brooks' theorem does not give \(\chi(G)\le\Delta(G)\).
  5. State the checks required before using Brooks' theorem on a graph, and explain why an odd cycle with maximum degree 2 is an exception.