in reply to Graph labeling problem

This sounds like the map colouring problem to me. I don't know if there are modules already written to handle this challenge.

PS In planar geometry this can be solved with four colours, but if you're dealing with a torus, you need to go up to seven colours. Math is cool. :)

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^2: Graph labeling problem
by LanX (Saint) on Feb 19, 2022 at 19:56 UTC
    > This sounds like the map colouring problem to me.

    Good idea, but the OP seems to talk about complete graphs where every pair of vertices is connected.

    For bigger N this is way beyond the planar graphs needed for the map coloring problem.

    But following the links given leads to Edge coloring, which seems to be fit the problem's description.

    and the Example section states:

      • A complete graph Kn with n vertices is edge-colorable with n − 1 colors when n is an even number; ...
      • However, when n is odd, n colors are needed: ...

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Thnx! I did not know about that