Planarity
   HOME

TheInfoList



OR:

Planarity is a 2005 puzzle computer game by John Tantalo, based on a concept by Mary Radcliffe at
Western Michigan University Western Michigan University (Western Michigan, Western or WMU) is a Public university, public research university in Kalamazoo, Michigan, United States. It was initially established as Western State Normal School in 1903 by Governor Aaron T. B ...
. The name comes from the concept of
planar graph In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
s in graph theory; these are graphs that can be embedded in the
Euclidean plane In mathematics, a Euclidean plane is a Euclidean space of Two-dimensional space, dimension two, denoted \textbf^2 or \mathbb^2. It is a geometric space in which two real numbers are required to determine the position (geometry), position of eac ...
so that no edges intersect. By
Fáry's theorem In the mathematical field of graph theory, Fáry's theorem states that any simple graph, simple, planar graph can be Graph drawing, drawn without crossings so that its edges are straight line segments. That is, the ability to draw graph edges as ...
, if a graph is planar, it can be drawn without crossings so that all of its edges are straight line segments. In the planarity game, the player is presented with a circular layout of a
planar graph In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
, with all the vertices placed on a single circle and with many crossings. The goal for the player is to eliminate all of the crossings and construct a straight-line
embedding In mathematics, an embedding (or imbedding) is one instance of some mathematical structure contained within another instance, such as a group (mathematics), group that is a subgroup. When some object X is said to be embedded in another object Y ...
of the graph by moving the vertices one by one into better positions.


History and versions

The game was written in
Flash Flash, flashes, or FLASH may refer to: Arts, entertainment, and media Fictional aliases * The Flash, several DC Comics superheroes with super speed: ** Flash (Jay Garrick) ** Barry Allen ** Wally West, the first Kid Flash and third adult Flash ...
by John Tantalo at
Case Western Reserve University Case Western Reserve University (CWRU) is a Private university, private research university in Cleveland, Ohio, United States. It was established in 1967 by a merger between Western Reserve University and the Case Institute of Technology. Case ...
in 2005. Online popularity and the local notoriety he gained placed Tantalo as one of Cleveland's most interesting people for 2006. It in turn has inspired the creation of a
GTK+ GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary s ...
version by Xiph.org's
Chris Montgomery Christopher "Monty" Montgomery (born June 6, 1972) is an American programmer and engineer. He is the original creator of the Ogg Free Software container format and the Vorbis audio codec and others, and the founder of Xiph.Org Foundation, The X ...
, which possesses additional level generation algorithms and the ability to manipulate multiple nodes at once.


Puzzle generation algorithm

The definition of the planarity puzzle does not depend on how the planar graphs in the puzzle are generated, but the original implementation uses the following algorithm: # Generate a set of random lines in a plane such that no two lines are parallel and no three lines meet in a single point. # Calculate the intersections of every line pair. # Create a graph with a vertex for each intersection and an edge for each line segment connecting two intersections (the
arrangement In music, an arrangement is a musical adaptation of an existing composition. Differences from the original composition may include reharmonization, melodic paraphrasing, orchestration, or formal development. Arranging differs from orchestr ...
of the lines). If a graph is generated from L lines, then the graph will have exactly \tbinom = \tfrac vertices (each line has L-1 vertices, and each vertex is shared with one other line) and L(L-2) edges (each line contains L-2 edges). The first level of Planarity is built with L=4 lines, so it has L(L-1)/2=6 vertices and L(L-2)=8 edges. Each level after is generated by one more line than the last. If a level was generated with L lines, then the next level has L more vertices and 2L-1 more edges. The best known algorithms from computational geometry for constructing the graphs of line arrangements solve the problem in O(L^2) time, linear in the size of the graph to be constructed, but they are somewhat complex. Alternatively and more simply, it is possible to index each crossing point by the pair of lines that cross at that point, sort the crossings along each line by their x-coordinates, and use this sorted ordering to generate the edges of the planar graph, in near-optimal O(L^2\log L) time. Once the vertices and edges of the graph have been generated, they may be placed evenly around a circle using a
random permutation A random permutation is a sequence where any order of its items is equally likely at random, that is, it is a permutation-valued random variable of a set of objects. The use of random permutations is common in games of chance and in randomized alg ...
.


Related theoretical research

The problem of determining whether a graph is planar can be solved in
linear time In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations ...
, and any such graph is guaranteed to have a straight-line embedding by
Fáry's theorem In the mathematical field of graph theory, Fáry's theorem states that any simple graph, simple, planar graph can be Graph drawing, drawn without crossings so that its edges are straight line segments. That is, the ability to draw graph edges as ...
, that can also be found from the planar embedding in linear time. Therefore, any puzzle could be solved in linear time by a computer. However, these puzzles are not as straightforward for human players to solve. In the field of computational geometry, the process of moving a subset of the vertices in a graph embedding to eliminate edge crossings has been studied by Pach and Tardos (2002), and others, inspired by the planarity puzzle. The results of these researchers shows that (in theory, assuming that the field of play is the infinite plane rather than a bounded rectangle) it is always possible to solve the puzzle while leaving n^\epsilon of the n input vertices fixed in place at their original positions, for a constant \epsilon that has not been determined precisely but lies between 1/4 and slightly less than 1/2. When the planar graph to be untangled is a
cycle graph In graph theory, a cycle graph or circular graph is a graph that consists of a single cycle, or in other words, some number of vertices (at least 3, if the graph is simple) connected in a closed chain. The cycle graph with vertices is called ...
, a larger number of vertices may be fixed in place. However, determining the largest number of vertices that may be left in place for a particular input puzzle (or equivalently, the smallest number of moves needed to solve the puzzle) is
NP-complete In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''. Somewhat more precisely, a problem is NP-complete when: # It is a decision problem, meaning that for any ...
. has shown that the randomized circular layout used for the initial state of Planarity is nearly the worst possible in terms of its number of crossings: regardless of what planar graph is to be tangled, the
expected value In probability theory, the expected value (also called expectation, expectancy, expectation operator, mathematical expectation, mean, expectation value, or first Moment (mathematics), moment) is a generalization of the weighted average. Informa ...
of the number of crossings for this layout is within a factor of three of the largest number of crossings among all layouts. In 2014, mathematician
David Eppstein David Arthur Eppstein (born 1963) is an American computer scientist and mathematician. He is a distinguished professor of computer science at the University of California, Irvine. He is known for his work in computational geometry, graph algor ...
published a paper providing an effective algorithm for solving planar graphs generated by the original Planarity game, based on the specifics of the puzzle generation algorithm.


References

{{reflist


External links


Planarity.net
— the original Flash game
NetLogo System
— Included as sample program (game) in NetLogo system
Planarity
— Version using SVG and th
d3
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
library
Multitouch Planarity
— Multiplayer- and multitouch-enabled version written in Python using libavg. Puzzle video games Mathematical games Planar graphs