Slide and Swap on Cubic Graphs

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Slide and Swap is a tile-sliding permutation game played on cubic (3-regular) graphs, similar to the familiar 15 Puzzle and its generalization to arbitrary graphs. In Slide and Swap, you may slide any adjacent tile into the open space (just click the tile you want to slide), but the other two neighbors of the tile you slide will be swapped as well. When the hole returns to its initial vertex after a sequence of slides, the numbered tiles will have been permuted, and these permutations of the tiles form a group under composition.


As a puzzle, it can be a considerable challenge to return the tiles to their initial position once they have been scrambled. From a theoretical standpoint, it is interesting to consider which groups may be generated by these tile-sliding permutations. With one exception, the graphs included in this Demonstration all generate the full alternating group; all even permutations of the tiles can be achieved. The exception is the 4-prism, or cube graph, which generates a group isomorphic to the projective special linear PSL(2,7), the simple group of order 168. That means that if the tiles were placed randomly on the cube, there is only a 1/60 chance that the game could be solved by legal moves!

The 4-vertex graph of the tetrahedron (not included) is also "exceptional" (in that it fails to generate the full alternating group), but it is not very interesting. An unproven conjecture is that the cube and the tetrahedron are the only exceptions, and all other 3-regular graphs generate a full alternating group.


Contributed by: Jacob A. Siehler (August 2011)
Open content licensed under CC BY-NC-SA




[1] A. F. Archer, "A Modern Treatment of the 15 Puzzle," American Mathematical Monthly, 106, 1999 pp. 793–799.

[2] R. M. Wilson, "Graph Puzzles, Homotopy, and the Alternating Group," Journal of Combinatorial Theory Series B, 16, 1974 pp. 86–96.

[3] Wikipedia, "PSL (2,7)." (Aug 17, 2011),7%29.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.