Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So, to try to answer your questions:

If you have a map in which you want to colour the regions, you can convert to a graph by putting a capital city in each region, then putting a road between two capitals of countries that share a border. Colouring the capital cities vertices) so that any joined by roads (edges) get different colours is exactly the same problem.

The graph-colouring problem is more general now, but every planar graph is equivalent to a map and vice-versa ... there is a one-to-one correspondence between these problems.

Now we move to the NP-Completeness of the 3-colouring of general graphs. That shows that this sort of thing is hard for the reasons I gave in the grandparent post.

"But" I hear you say "That's for general graphs, and not for planar graphs!"

Yes, but there is a way to convert a graph-colouring problem on a non-planar graph into an equivalent graph-colouring problem on a planar graph, so we neither gain nor lose much by consider just planar graphs.

So 3-colouring planar graphs is NP-Complete.

Then you get into my comments about making bad choices and having to backtrack, and spooky action at a distance.

Hope that helps.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: