Instant Insanity

Last updated
Instant Insanity puzzle in the "solved" configuration. From top to bottom, the colors on the back of the cubes are white, green, blue, and red (left side), and blue, red, green, and white (right side) Instant insanity cubes.jpg
Instant Insanity puzzle in the "solved" configuration. From top to bottom, the colors on the back of the cubes are white, green, blue, and red (left side), and blue, red, green, and white (right side)
Nets of the Instant Insanity cubes - the line style is for identifying the cubes in the solution Instant insanity nets.svg
Nets of the Instant Insanity cubes the line style is for identifying the cubes in the solution

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]

Contents

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.

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. Trial and error is a slow way to solve this problem, as there are 331,776 possible arrangements of the four cubes (6 faces, 4 turns = 24 positions of each cube, times four cubes, totalling 331,776). And the solution is symmetrical 8 ways (if you have a solution, and you flip all of the four cubes forward, you have another valid solution. You can do that move 4 times multiplied by the rotation of every cube 180 degrees around its vertical axis, which gives 8 symmetries in total), so therefore the odds are 331,776 divided by 8 equals 41,472 chance of randomly tossing the cubes into a solution. The puzzle is studied by D. E. Knuth in an article on estimating the running time of exhaustive search procedures with backtracking. [2]

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

The first known patented version of the puzzle was created by Frederick A. Schossow in 1900, and marketed as the Katzenjammer puzzle. [4] 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 [5] [6] (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

A graph of the opposite faces of the cubes, the line styles corresponding to the cubes in the image of their nets above Instant insanity graph.svg
A graph of the opposite faces of the cubes, the line styles corresponding to the cubes in the image of their nets above

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.

Mapping the edges of the two directed subgraphs to the left (L) and right (R), and front (F) and back (B) faces solves the puzzle Instant insanity solution.svg
Mapping the edges of the two directed subgraphs to the left (L) and right (R), and front (F) and back (B) faces solves the puzzle

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. [7]

Generalizations

A variant with playing card suits is easier, unless the symbols can be oriented anyhow Instant insanity suits.svg
A variant with playing card suits is easier, unless the symbols can be oriented anyhow

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. [8] [9]

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 [10] proved that this game is PSPACE-complete, which illustrates the observation that NP-complete puzzles tend to lead to PSPACE-complete games.

Related Research Articles

<span class="mw-page-title-main">Cube</span> Solid object with six equal square faces

In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets, or sides, with three meeting at each vertex. Viewed from a corner, it is a hexagon and its net is usually depicted as a cross.

<span class="mw-page-title-main">Four color theorem</span> Statement in mathematics

In mathematics, the four color theorem, or the four color map theorem, states that no more than four colors are required to color the regions of any map so that no two adjacent regions have the same color. Adjacent means that two regions share a common boundary curve segment, not merely a corner where three or more regions meet. It was the first major theorem to be proved using a computer. Initially, this proof was not accepted by all mathematicians because the computer-assisted proof was infeasible for a human to check by hand. The proof has gained wide acceptance since then, although some doubters remain.

<span class="mw-page-title-main">Graph theory</span> Area of discrete mathematics

In mathematics, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of vertices which are connected by edges. A distinction is made between undirected graphs, where edges link two vertices symmetrically, and directed graphs, where edges link two vertices asymmetrically. Graphs are one of the principal objects of study in discrete mathematics.

In combinatorics, Ramsey's theorem, in one of its graph-theoretic forms, states that one will find monochromatic cliques in any edge labelling (with colours) of a sufficiently large complete graph. To demonstrate the theorem for two colours (say, blue and red), let r and s be any two positive integers. Ramsey's theorem states that there exists a least positive integer R(r, s) for which every blue-red edge colouring of the complete graph on R(r, s) vertices contains a blue clique on r vertices or a red clique on s vertices. (Here R(r, s) signifies an integer that depends on both r and s.)

<span class="mw-page-title-main">Bipartite graph</span> Graph divided into two independent sets

In the mathematical field of graph theory, a bipartite graph is a graph whose vertices can be divided into two disjoint and independent sets and , that is, every edge connects a vertex in to one in . Vertex sets and are usually called the parts of the graph. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycles.

This is a glossary of graph theory. Graph theory is the study of graphs, systems of nodes or vertices connected in pairs by lines or edges.

<span class="mw-page-title-main">Graph coloring</span> Methodic assignment of colors to elements of a graph

In graph theory, graph coloring is a special case of graph labeling; it is an assignment of labels traditionally called "colors" to elements of a graph subject to certain constraints. In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices are of the same color; this is called a vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no two adjacent edges are of the same color, and a face coloring of a planar graph assigns a color to each face or region so that no two faces that share a boundary have the same color.

<span class="mw-page-title-main">Graph homomorphism</span> A structure-preserving correspondence between node-link graphs

In the mathematical field of graph theory, a graph homomorphism is a mapping between two graphs that respects their structure. More concretely, it is a function between the vertex sets of two graphs that maps adjacent vertices to adjacent vertices.

<span class="mw-page-title-main">Edge coloring</span> Problem of coloring a graphs edges such that meeting edges do not match

In graph theory, a proper edge coloring of a graph is an assignment of "colors" to the edges of the graph so that no two incident edges have the same color. For example, the figure to the right shows an edge coloring of a graph by the colors red, blue, and green. Edge colorings are one of several different types of graph coloring. The edge-coloring problem asks whether it is possible to color the edges of a given graph using at most k different colors, for a given value of k, or with the fewest possible colors. The minimum required number of colors for the edges of a given graph is called the chromatic index of the graph. For example, the edges of the graph in the illustration can be colored by three colors but cannot be colored by two colors, so the graph shown has chromatic index three.

<span class="mw-page-title-main">Megaminx</span> Puzzle

The Megaminx or Mégaminx is a dodecahedron-shaped puzzle similar to the Rubik's Cube. It has a total of 50 movable pieces to rearrange, compared to the 20 movable pieces of the Rubik's Cube.

<span class="mw-page-title-main">Monochromatic triangle</span>

In graph theory and theoretical computer science, the monochromatic triangle problem is an algorithmic problem on graphs, in which the goal is to partition the edges of a given graph into two triangle-free subgraphs. It is NP-complete but fixed-parameter tractable on graphs of bounded treewidth.

<span class="mw-page-title-main">Five color theorem</span>

The five color theorem is a result from graph theory that given a plane separated into regions, such as a political map of the countries of the world, the regions may be colored using no more than five colors in such a way that no two adjacent regions receive the same color.

<span class="mw-page-title-main">Moser spindle</span> Undirected unit-distance graph requiring four colors

In graph theory, a branch of mathematics, the Moser spindle is an undirected graph, named after mathematicians Leo Moser and his brother William, with seven vertices and eleven edges. It is a unit distance graph requiring four colors in any graph coloring, and its existence can be used to prove that the chromatic number of the plane is at least four.

<span class="mw-page-title-main">V-Cube 6</span> 6×6×6 Rubiks Cube

The V-Cube 6 is a 6×6×6 version of the original Rubik's Cube. The first mass-produced 6×6×6 was invented by Panagiotis Verdes and is produced by the Greek company Verdes Innovations SA. Other such puzzles have since been introduced by a number of Chinese companies, most of which have mechanisms which improve on the original. Unlike the original puzzle, it has no fixed facets: the center facets are free to move to different positions.

<span class="mw-page-title-main">Impossiball</span>

The Impossiball is a rounded icosahedral puzzle similar to the Rubik's Cube. It has a total of 20 movable pieces to rearrange, which is the same as the Rubik's Cube, but all of the Impossiball's pieces are corners, like the Pocket Cube.

<span class="mw-page-title-main">Clebsch graph</span> One of two different regular graphs with 16 vertices

In the mathematical field of graph theory, the Clebsch graph is either of two complementary graphs on 16 vertices, a 5-regular graph with 40 edges and a 10-regular graph with 80 edges. The 80-edge graph is the dimension-5 halved cube graph; it was called the Clebsch graph name by Seidel (1968) because of its relation to the configuration of 16 lines on the quartic surface discovered in 1868 by the German mathematician Alfred Clebsch. The 40-edge variant is the dimension-5 folded cube graph; it is also known as the Greenwood–Gleason graph after the work of Robert E. Greenwood and Andrew M. Gleason (1955), who used it to evaluate the Ramsey number R(3,3,3) = 17.

<span class="mw-page-title-main">Herschel graph</span> Bipartite non-Hamiltonian polyhedral graph

In graph theory, a branch of mathematics, the Herschel graph is a bipartite undirected graph with 11 vertices and 18 edges. It is a polyhedral graph, and is the smallest polyhedral graph that does not have a Hamiltonian cycle, a cycle passing through all its vertices. It is named after British astronomer Alexander Stewart Herschel, because of Herschel's studies of Hamiltonian cycles in polyhedral graphs.

<span class="mw-page-title-main">Halved cube graph</span> Graph of the vertices and edges of a demihypercube

In graph theory, the halved cube graph or half cube graph of dimension n is the graph of the demihypercube, formed by connecting pairs of vertices at distance exactly two from each other in the hypercube graph. That is, it is the half-square of the hypercube. This connectivity pattern produces two isomorphic graphs, disconnected from each other, each of which is the halved cube graph.

<span class="mw-page-title-main">Dejter graph</span>

In the mathematical field of graph theory, the Dejter graph is a 6-regular graph with 112 vertices and 336 edges. The Dejter graph is obtained by deleting a copy of the Hamming code of length 7 from the binary 7-cube.

<span class="mw-page-title-main">Gear Cube</span> 3D combination puzzle based on the Rubiks Cube

The Gear Cube is a 3-D combination puzzle designed and created by Dutch puzzle maker Oskar van Deventer based on an idea by Bram Cohen. It was initially produced by Shapeways in 2009 and known as "Caution Cube" due to the likelihood of getting one's fingers stuck between the gears while speedcubing. Later, in 2010, it was mass-produced by Meffert's as the "Gear Cube".

References

  1. Devil's Dice
  2. Knuth, D. E. (1975), "Estimating the efficiency of backtrack programs", Math. Comp., 29 (129): 132–136, doi: 10.1090/S0025-5718-1975-0373371-6
  3. https://habrahabr.ru/post/336858/(in+Russian)
  4. US Patent # 646,463
  5. Slocum; Botermans (1986), Puzzles Old & New, p. 38
  6. "Rob's Puzzle Page - Pattern Puzzles". Archived from the original on 2007-10-22. Retrieved 2007-08-12.
  7. Beeler, R.; Instant Insanity: Supplemental Material for Intro to Graph Theory; Depr. of Mathematics & Statistics, East Tennessee State University; Johnson City, Tennessee: 2017
  8. Garey, M. R.; Johnson, D. S. (1979), Computers and Intractibility: a guide to the theory of NP-completeness, W.H. Freeman, p. 258 (problem GP15);
  9. Robertson, E.; Munro, I. (1978), "NP-completeness, puzzles, and games", Util. Math., 13: 99–116.
  10. Robertson, Edward; Munro, Ian (1978). "NP-completeness, puzzles and games". Utilitas Mathematica. 13: 99–116.