Greedy coloring 2026-10-14
For a finite simple graph, choose an order of its vertices and process them one at a time. Give each vertex the smallest positive colour label not already used by its coloured neighbours, and keep all earlier assignments. This is greedy coloring: each step makes a locally available choice. The resulting graph coloring is proper because, for each edge, its later endpoint avoids the colour of its earlier endpoint.[ref]
https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/1ccaf180bcd244fddd32e60789fa922f_h9wxtqoa1jY.pdf. Leighton, MIT Graph Theory and Coloring, transcript pages 12–13
If the maximum degree of a graph is , a vertex has at most previously coloured neighbours, forbidding at most that many distinct colours. At least one label among remains available. Consequently every order givesThis is an upper bound, not a promise that greedy coloring attains the chromatic number.[ref]
Consider the path graph with edges . In the order , greedy coloring assigns the colours respectively. In the order , it assigns colours in processing order: vertices both get colour , then vertex gets colour , and finally vertex sees colours and at its two neighbours and must take colour . Written in vertex order , this second colouring is .
The path graph has chromatic number two: the first assignment achieves two colours, and any edge rules out one. Its maximum degree of a graph is two, so three colours in the second assignment still satisfy the bound. The extra colour comes entirely from the processing order. The crown graph gives a larger family where a poor order can make greedy coloring use arbitrarily many colours although the chromatic number remains two.
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 3 17F c Solution Created 2026-09-24 Updated 2026-10-14
The first assertion is false. The complete graph has , but : color each of its three perfect matchings with its own color. It is connected and has more than two vertices.
The second assertion is false. Take the crown graph with bipartition and , joining to exactly when . Its chromatic number is two. In the ordering , the greedy coloring algorithm assigns color to both : both see all previously used colors, but they are not adjacent to each other. It therefore uses five colors, exceeding . Taking more pairs makes the ratio arbitrarily large.
