For a nonempty finite simple graph , the chromatic number is the least positive integer for which has a proper vertex graph coloring with at most colours. To establish an exact chromatic number, give a colouring using that many colours and explain why fewer cannot suffice. A colouring alone gives only an upper bound.[ref]
Mathematics for Computer Science by Eric Lehman and others. Lehman, Leighton and Meyer, Mathematics for Computer Science, Definition 11.7.1
These small graphs show why the chromatic number measures more than the presence of triangles in a graph:
- The cycle graph , also the complete graph , has chromatic number three. Every pair of vertices is adjacent, so three distinct colours are necessary and sufficient.
- The cycle graph has chromatic number two. Around the graph cycle, the assignment is proper, and a single colour would violate every edge.
- The cycle graph has chromatic number three. With two colours, alternation around the graph cycle would force the first and fifth vertices to have the same colour despite their joining edge. The assignment works. Thus a triangle-free graph can still require more than two colours.
- The complete graph has chromatic number : all vertices are pairwise adjacent, so each must have its own colour.[ref]
For a cycle graph of even length, alternating two colours closes consistently; for an odd cycle, it does not, and a third colour on the final vertex suffices. More generally, the two-colourability criterion for bipartite graphs says that exactly when is a bipartite graph, and the odd-cycle characterization of bipartite graphs identifies the obstruction as an odd cycle. A nonempty graph with no edges has chromatic number one; a bipartite graph with at least one edge has chromatic number exactly two.
In the pairwise-conflict scheduling model of graph coloring, is the least number of interchangeable slots needed. This turns a drawing into an optimization question: how many groups of compatible activities are unavoidable? Greedy coloring constructs a valid grouping quickly, but its number of colours can exceed the chromatic number.
New to topics? Read the docs here!
