Instant Insanity Explained

Instant Insanity is the name given by Parker Brothers to their 1967 version of a puzzle which has existed since antiquity, and which has been marketed by many toy and puzzle makers under a variety of names, including: Devil's Dice (Pressman); DamBlocks (Schaper); Logi-Qubes (Schaeffer); Logi Cubes (ThinkinGames); Daffy Dots (Reiss); Those Blocks (Austin); PsykoNosis (A to Z Ideas), and many others.[1]

The puzzle consists of four cubes with faces colored with four colors (commonly red, blue, green, and white). The objective of the puzzle is to stack these cubes in a column so that each side of the stack (front, back, left, and right) shows each of the four colors. The distribution of colors on each cube is unique, and the order in which the four cubes are stacked is irrelevant as long as each side shows every color.

This problem has a graph-theoretic solution in which a graph with four vertices labeled B, G, R, W (for blue, green, red, and white) can be used to represent each cube; there is an edge between two vertices if the two colors are on the opposite sides of the cube, and a loop at a vertex if the opposite sides have the same color. Each individual cube can be placed in one of 24 positions, by placing any one of the six faces upward and then giving the cube up to three quarter-turns. Once the stack is formed, it can be rotated up to three quarter-turns without altering the orientation of any cube relative to the others. Ignoring the order in which the cubes are stacked, the total possible number of arrangements is therefore 82,944 (24 * 24 * 24 * 24 / 4). The puzzle is studied by D. E. Knuth in an article on estimating the running time of exhaustive search procedures with backtracking.

Every position of the puzzle can be solved in eight moves or less.[2]

The first known patented version of the puzzle was created by Frederick A. Schossow in 1900, and marketed as the Katzenjammer puzzle.[3] The puzzle was recreated by Franz Owen Armbruster, also known as Frank Armbruster, and independently published by Parker Brothers and Pressman, in 1967. Over 12 million puzzles were sold by Parker Brothers alone. The puzzle is similar or identical to numerous other puzzles[4] (e.g., The Great Tantalizer, circa 1940, and the most popular name prior to Instant Insanity).

One version of the puzzle is currently being marketed by Winning Moves Games USA.

Solution

Given the already colored cubes and the four distinct colors are (Red, Green, Blue, White), we will try to generate a graph which gives a clear picture of all the positions of colors in all the cubes. The resultant graph will contain four vertices one for each color and we will number each edge from one through four (one number for each cube). If an edge connects two vertices (Red and Green) and the number of the edge is three, then it means that the third cube has Red and Green faces opposite to each other.

To find a solution to this problem we need the arrangement of four faces of each of the cubes. To represent the information of two opposite faces of all the four cubes we need a directed subgraph instead of an undirected one because two directions can only represent two opposite faces, but not whether a face should be at the front or at the back.

So if we have two directed subgraphs, we can actually represent all the four faces (which matter) of all the four cubes.

We cannot randomly select any two subgraphs - so what are the criteria for selecting?

We need to choose graphs such that:

  1. the two subgraphs have no edges in common, because if there is an edge which is common that means at least one cube has the pair of opposite faces of exactly the same color, that is, if a cube has Red and Blue as its front and back faces, then the same is true for its left and right faces.
  2. a subgraph contains only one edge from each cube, because the sub graph has to account for all the cubes and one edge can completely represent a pair of opposite faces.
  3. a subgraph can contain only vertices of degree two, because a degree of two means a color can only be present at faces of two cubes. Easy way to understand is that there are eight faces to be equally divided into four colors. So, two per color.

After understanding these restrictions if we try to derive the two sub graphs, we may end up with one possible set as shown in Image 3. Each edge line style represents a cube.

The upper subgraph lets one derive the left and the right face colors of the corresponding cube. E.g.:

  1. The solid arrow from Red to Green says that the first cube will have Red in the left face and Green at the Right.
  2. The dashed arrow from Blue to Red says that the second cube will have Blue in the left face and Red at the Right.
  3. The dotted arrow from White to Blue says that the third cube will have White in the left face and Blue at the Right.
  4. The dash-dotted arrow from Green to White says that the fourth cube will have Green in the left face and White at the Right.

The lower subgraph lets one derive the front and the back face colors of the corresponding cube. E.g.:

  1. The solid arrow from White to Blue says that the first cube will have White in the front face and Blue at the Back.
  2. The dashed arrow from Green to White says that the second cube will have Green in the front face and White at the Back.
  3. The dotted arrow from Blue to Red says that the third cube will have Blue in the front face and Red at the Back.
  4. The dash-dotted arrow from Red to Green says that the fourth cube will have Red in the front face and Green at the Back.

The third image shows the derived stack of cube which is the solution to the problem.

It is important to note that:

  1. You can arbitrarily label the cubes as one such solution will render 23 more by swapping the positions of the cubes but not changing their configurations.
  2. The two directed subgraphs can represent front-to-back, and left-to-right interchangeably, i.e. one of them can represent front-to-back or left-to-right. This is because one such solution also render 3 more just by rotating. Adding the effect in 1., we generate 95 more solutions by providing only one. To put it into perspective, such four cubes can generate 243 × 3 = 41472 configurations.
  3. It is not important to take notice of the top and the bottom of the stack of cubes.[5]

Generalizations

Given n cubes, with the faces of each cube coloured with one of n colours, determining if it is possible to stack the cubes so that each colour appears exactly once on each of the 4 sides of the stack is NP-complete.[6] [7]

The cube stacking game is a two-player game version of this puzzle. Given an ordered list of cubes, the players take turns adding the next cube to the top of a growing stack of cubes. The loser is the first player to add a cube that causes one of the four sides of the stack to have a color repeated more than once. Robertson and Munro[8] proved that this game is PSPACE-complete, which illustrates the observation that NP-complete puzzles tend to lead to PSPACE-complete games.

Notes and References

  1. http://robspuzzlepage.com/pattern.htm Devil's Dice
  2. https://habrahabr.ru/post/336858/{{in lang|ru}}
  3. https://pdfpiw.uspto.gov/.piw?Docid=00646463&homeurl=http%3A%2F%2Fpatft.uspto.gov%2Fnetacgi%2Fnph-Parser%3FSect1%3DPTO1%2526Sect2%3DHITOFF%2526d%3DPALL%2526p%3D1%2526u%3D%25252Fnetahtml%25252FPTO%25252Fsrchnum.htm%2526r%3D1%2526f%3DG%2526l%3D50%2526s1%3D0646463.PN.%2526OS%3DPN%2F0646463%2526RS%3DPN%2F0646463&PageNum=&Rtype=&SectionNum=&idkey=NONE&Input=View+first+page US Patent # 646,463
  4. Web site: Rob's Puzzle Page - Pattern Puzzles . 2007-08-12 . dead . https://web.archive.org/web/20071022103557/http://home.comcast.net/~stegmann/pattern.htm . 2007-10-22 .
  5. http://faculty.etsu.edu/beelerr/insanity-supp.pdf Beeler, R.; Instant Insanity: Supplemental Material for Intro to Graph Theory; Depr. of Mathematics & Statistics, East Tennessee State University; Johnson City, Tennessee: 2017
  6. (problem GP15);
  7. .
  8. Robertson. Edward. Munro. Ian. NP-completeness, puzzles and games. Utilitas Mathematica. 1978. 13. 99–116.