Archive

Archive for the ‘Puzzles’ Category

Instant Insanity puzzle

October 6, 2008 Sriram 1 comment

I came across this puzzle called Instant Insanity when I was going through Graph Theory book by Narsingh Deo this week end. This is the first time I’m reading this book and I’m finding it pretty interesing! For people who want the puzzle straight and short, here it is: There are 4 cubes whose faces are painted using one of 4 colors – R, B, G, W (red, blue, green, white) with each face having only one color. The goal is to place the cubes in a column such that no color gets repeated on any side of the column. If you try to solve it without a bit of graph theory, you can go insane ! (that’s why the name I guess) :) The interesting graph theoretic solution can be found here and there are a lot of web pages explaining that. So what I wanted to write here then ? Oh, yes ! , about the trial and error method. At max, how many real arrangements one has to go through in order to find out a solution or the existence of a solution for this ? There are again many web pages giving directly the answer as 41,472 arrangements, but I guess not many pages offer any explanation on that ! I thought I can put it down here. All you need is a bit of combinatorics and a bit of visualization to understand. Here we go…!

Each cube has 24 arrangements. [Four 90 degree rotations, keeping the top and bottom faces unchanged for each of the six faces]. Also the 4 cubes can be permuted in 4P4 = factorial(4) ways. So the total number of arrangements possible is factorial(4) X pow(24,4). But the order of the cubes doesn’t affect the solution. Also the stack of the cubes as a whole ( a cuboid ) has 8 arrangements corresponding to 1 solution. [Four 90 degree rotations keeping top and bottom faces of the cuboid unchanged and four similar rotations after swapping the top and bottom faces by inverting the cuboid]. Thus, the number of arrangements gets reduced to (factorial(4) X power(24,4)) divided by (factorial(4) X 8 ) = 41,472.