Proving if planarity puzzle is planar

338 Views Asked by At

An "untangle" game app I have has scrambled planar graphs to be organized by dragging the nodes around until no lines cross. When solved, the puzzle is a lot of triangles. Some nodes have only 2 or 3 lines connecting them to other nodes, other nodes can have as many as 7. The developer claims his algorithm assures that all the puzzles can be solved, but some reviewers claim that some cannot. I have found a puzzle I'd like to test because it seems to have 1 too many lines. This puzzle has 82 lines connecting 31 nodes, so it satisfies Euler's formula, but I could not solve it after an hour, and I get most of these within 7 minutes. The developer won't work to fix it because he thinks there's no problem. Is there a way us non-mathematicians can prove for sure if this, and the few others people have found, is or is not a planar graph?

1

There are 1 best solutions below

1
On

Yes, there exist algorithms to check if a graph is in fact planar, but to actually use it will require labeling each node and edge and drawing from scratch until running into an absurdity. See http://people.math.gatech.edu/~thomas/TEACH/6014/planalgo.pdf for the simple planar algorithm. (This algorithm is easier to use, but runs in quadratic time. There exists a much faster algorithm, but is much harder to understand). The algorithm is written to work on 2-connected graphs, but if in fact it is not connected or 1 connected, simply apply the algorithm to each component or block individually.

Alternatively, if you have a good eye, by Kuratowski's Theorem, a graph is planar if and only if it does not contain a subdivision of $K_5$ or $K_{3,3}$. http://people.math.gatech.edu/~thomas/TEACH/6014/planar.pdf


Having had a look at planarity.net (likely the original game the app you are playing is based on), his algorithm works fine for randomly generating planar graphs found at http://johntantalo.com/wiki/Planarity/

His algorithm draws random (non-parallel) lines and puts vertices wherever they cross. Then he takes note of which vertices are connected by a line segment to which and locates them around a circle keeping the adjacencies intact. As it originally came from a graph where there are no crossings (since at any crossing a vertex was placed), the graph has a planar drawing.

enter image description here

The number of vertices rather quickly grows as seen here: Level 9 pictured above has 66 vertices.