Introduction
Colouring a graph means giving each vertex a colour so that adjacent vertices get different colours. Colours stand for resources and edges for conflicts: exam slots for courses that share students, frequencies for nearby transmitters, machine registers for variables that are live at the same time (register allocation in a compiler, see Liveness Analysis). The minimum number of colours needed is the chromatic number. Computing it is NP-hard in general, so the development concentrates on exact values for structured graphs, on bounds, and on counting colourings.
Prerequisites
- Graph Theory Fundamentals: special graphs, bipartite graphs, planar graphs, degrees. Graphs are simple and undirected; a graph with a loop cannot be properly coloured.
Core concepts
Proper colouring and chromatic number
A proper -colouring of is a function with for every edge . is -colourable if one exists. The chromatic number is the least such .
Each colour class is an independent set, so a -colouring partitions into at most independent sets, one for each colour actually used.
Chromatic numbers of standard graphs
| Graph | |
|---|---|
| Graph with no edges () | 1 |
| Any bipartite graph with at least one edge (trees, even cycles, , ) | 2 |
| Cycle | 2 if even, 3 if odd |
| Complete graph | |
| Wheel (hub + ) | 3 if even, 4 if odd |
| Petersen graph | 3 |
| Any planar graph | at most 4 |
Characterisation of : if and only if is bipartite, if and only if has no odd cycle. There is no comparable simple test for ; deciding 3-colourability is NP-complete.

Bounds
Let be the size of a largest clique (complete subgraph), the size of a largest independent set and the maximum degree.
- Lower bounds. A clique of size needs colours. Each colour class has at most vertices, so .
- Upper bound by greedy colouring. Colour vertices in any order, giving each the smallest colour not used by its already-coloured neighbours. A vertex has at most neighbours, so at most colours are used.
- Brooks' theorem. If is connected and is neither a complete graph nor an odd cycle, then . The two exceptions are exactly where is needed.
- can be much larger than : there are triangle-free graphs () with arbitrarily large chromatic number (Mycielski's construction; the Grotzsch graph has , ).
- Greedy depends on the order. On a bipartite graph a bad order can force many colours. For the "crown" graph ( minus a perfect matching, ) with vertices taken in the order , greedy uses colours although .
Planar graphs
- Four colour theorem (Appel and Haken, 1976): every planar graph satisfies . The proof is computer-assisted.
- The five colour theorem has a short proof using the fact that a planar graph has a vertex of degree at most 5.
- The bound 4 is tight ( is planar). Colouring the regions of a map so that neighbouring regions differ is the same as colouring the vertices of its dual graph, which is planar.
The chromatic polynomial
is the number of proper colourings of using colours from a set of colours (colourings that differ only by which colour goes where count as different). Then is the least positive integer with .
| Graph | |
|---|---|
| isolated vertices | |
| Any tree on vertices | |
| Cycle | |
| Disjoint union |
Deletion-contraction: for any edge ,
where deletes and merges its endpoints (removing duplicate edges). The colourings of split into those that give the ends of different colours (the colourings of ) and those that give them the same colour (the colourings of ).
Properties: is a polynomial in of degree , with leading coefficient 1; the coefficient of is ; the constant term is 0.
Edge colouring
A proper edge colouring gives adjacent edges (sharing an endpoint) different colours; each colour class is a matching. The chromatic index is the least number of colours.
- always.
- Vizing's theorem: or for every simple graph.
- Konig's edge-colouring theorem: for bipartite graphs, .
- ; for , if is even and if is odd. (Round-robin tournaments: with even, rounds suffice.)
- for even and 3 for odd . The Petersen graph has although .
See Matching in Graphs for matchings.
Worked examples
Example 1: chromatic number by bounds
= with one chord added (vertices 1 to 5 in a cycle, chord ). It contains the triangle 1, 2, 3, so . A 3-colouring: . Hence .
Example 2: chromatic polynomials
- . With 3 colours: colourings.
- . With 3 colours: . With 2 colours: .
- A path on 4 vertices (a tree): . With 3 colours: .
- with 3 colours: ; with 2 colours: , confirming .
Example 3: deletion-contraction on
Delete an edge of : a path with colourings. Contract it: (the triangle ), with . So
which equals on expanding.
Example 4: exam scheduling
Five courses; pairs sharing a student: AB, AC, BC, CD, DE, EA. The conflict graph contains the triangle A, B, C, so at least 3 slots. Slots: A = 1, B = 2, C = 3, D = 1, E = 2. Check: CD (3, 1), DE (1, 2), EA (2, 1) are all different. Minimum: 3 slots.
Important properties and observations
- the length of a longest path (a greedy argument along a DFS tree).
- .
- Removing a vertex lowers by at most 1. Adding an edge raises it by at most 1.
- A graph with edges has (every two colour classes must be joined by an edge in an optimal colouring).
- Counting colourings with "exactly colours used" is different from , which counts colourings from available colours.
GATE examination perspective
- Chromatic number of a given graph. Find a clique for the lower bound, then exhibit a colouring that matches it. Check odd cycles for .
- Special families. , , , , trees, planar graphs. Watch which wheel convention is used (hub + here).
- Chromatic polynomial evaluation. Trees, cycles and complete graphs by formula; others by deletion-contraction.
- Bounds statements. ; Brooks; .
- Trap: is not true in general (: , ).
- Trap: the four colour theorem is about planar graphs only; needs 5 colours.
Summary
Sources
- K. H. Rosen, Discrete Mathematics and Its Applications, 7th ed., McGraw-Hill, 2012: Section 10.8 (Graph Coloring).
- D. B. West, Introduction to Graph Theory, 2nd ed., Prentice Hall, 2001: Sections 5.1 (Vertex Colorings and Upper Bounds), 5.3 (Enumerative Aspects) and 7.1 (Line Graphs and Edge-coloring).