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]
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 gives
This is an upper bound, not a promise that greedy coloring attains the chromatic number.[ref]
Figure 1.
Two orders for greedy coloring of the same path graph
. The edges are in both drawings. Each dot shows its assigned colour number, with the vertex label above and its processing step below. The order uses two colours; the order uses three. Details.
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.

Articles by others on the same topic (NaN)

Greedy coloring is a graph coloring algorithm used to assign colors to the vertices of a graph such that no two adjacent vertices share the same color. The goal of graph coloring is to minimize the number of colors used, and greedy coloring serves as a heuristic method for this purpose. ### Basic Procedure The greedy coloring algorithm typically follows these steps: 1. **Order the Vertices**: Start by ordering the vertices of the graph.