Tuesday 5 May 2009

Welsh-Powell algorithm

We are going to use this algorithm to colour the map instead of brute-force.


Step 1: Make a list of all the vertices, by decreasing degree.
Step 2: Choose a new color, called "current" colour, and colour the first uncoloured vertex.
Step 3: Using the current colour, colour all uncoloured vertices that are not linked with any already current coloured vertex.
Step 4: If all the vertices are not coloured, go to step 2.

No comments:

Post a Comment