![]() |
VOOZH | about |
In graph theory, vertex colouring is a way of labelling each vertex such that no two adjacent vertices have the same colour. We need to find out the minimum number of colours required to satisfy this condition, as it is not desirable to use a large variety of colours or labels. To achieve this, we use an algorithm called the Welsh–Powell algorithm, which helps minimise the number of colours required. This algorithm is also used to estimate the chromatic number of a graph. It is an iterative greedy approach.
Chromatic number: A graph G that requires K distinct colours for its proper colouring, and no fewer, is called a K-chromatic graph, and the number K is called the chromatic number of graph G.
Welsh–Powell Algorithm consists of the following steps:
By starting with the highest-degree vertex, we ensure that the vertex with the highest number of potential conflicts is dealt with as early as possible.
👁 Image| Vertex | Degree |
|---|---|
| A | 2 |
| B | 2 |
| C | 1 |
| D | 4 |
| E | 2 |
| F | 2 |
| G | 3 |
| H | 5 |
| I | 3 |
| J | 3 |
| K | 5 |
First, order the list in descending order of degrees. Incase of tie, we can randomly choose any ways to break it. So, the new order will be : H, K, D, G, I, J, A, B, E, F, C Now, Following Welsh Powell Graph colouring Algorithm, H - color Red K - don’t color Red, as it connects to H D - color Red G - don’t color Red, as it connects to H I - don’t color Red, as it connects to H J - don’t color Red, as it connects to H A - don’t color Red, as it connects to H B - don’t color Red, as it connects to D E - colour Red F - don’t color Red, as it connects to E C - don’t color Red, as it connects to D After this, the graph will look like the one below.
👁 ImageIgnoring the vertices already coloured, we are left with : K, G, I, J, A, B, F, C We can repeat the process with the second colour Green K - color green G - don’t color green, as it connects with K I - color green J - don’t color green, as it connects with I A - color green B - don’t color green, as it connects with A F - color green C - color green
👁 ImageAgain, ignoring the coloured vertices, we are left with G, J, B Let’s color it with Blue. G - color blue J - color blue B - color blue
👁 ImageThe final figure is shown below. Now, we can see that using Welsh Powell’s algorithm we can color the vertices with only 3 types of colors(
chromatic number of this graph is 3
) which is the optimal solution, since this graph contains at least one triangle.