[R-sig-Geo] Colouring maps so that adjacent polygons differ in colour

Karl Ove Hufthammer karl at huftis.org
Wed Apr 6 08:57:44 CEST 2011


Virgilio Gómez-Rubio wrote:

> Apparently, package gcolor provides an algorithm to colour a map:
> 
> It uses 4 colour for North Carolina, but I am not sure whether this is
> THE 4-colour algorithm:

No, it’s not a 4-colouring algorithm. Indeed, on one map I have it only
produces a 5-colouring. It’s seems to be better than the greedy algorithm, 
though, even with reordering of the vertices by degrees, which produces a
6-colouring of the same data.

It’s very slow on large maps, though.

-- 
Karl Ove Hufthammer



More information about the R-sig-Geo mailing list