Graph coloring algorithm's complexity

1.2k Views Asked by At

Given a graph $G$, i have to talk about the number of ways to color this graph properly (so that no adjacent vertices have the same color). As an algorithm, i used the "Welsh-Powell" Algorithm. I have read in several references that the complexity of this algorithm for graph coloring is $O(n^2)$, but i can't find a way to prove it. Does anyone know how to show this result? Perhaps even mentioning the maximum number of colors required for this algorithm.

1

There are 1 best solutions below

8
On

The Welsh–Powell algorithm is just the greedy algorithm where the vertices are considered in order of decreasing degree. That it is $O(n^2)$ stems from the fact that it considers each edge once when assigning a colour to a vertex. The maximum number of colours it may require is one more than the maximum degree of the graph.