Fog Creek Software
Discussion Board




Painted Cube

Your cube question has an incorrect solution.

First of all, the solution says that you for each face you have 6 choices, then 5, then 4, etc.  However, you are allowed to repeat a color.  This gives 6**6 = 46,656 possible choices.

Now, the point of the puzzle is to remove some of those choices that would be equivalent if the cube were rotated.

I'm not sure about the logic behind 24 orientations, but 46,656/24 = 1,944 cubes.

My own answer was less, but I don't know if it's closer:
Cubes with N colors
N=1, only one cube for each color.
      6 single color cubes
N=2, 6 choose 2 = 6!/4!2! = 15
        15 with 5 faces 1 color, 1 face another color.
        15 with 4 faces 1 color, 2 faces another color, 2 faces adjacent.
        15 with 4 faces 1 color, 2 faces another color, 2 faces opposite.
        15  with 3 faces 1 color, 3 faces another color, same colors share a corner (3 edges)
        15  with 3 faces 1 color, 3 faces another color, same colors share two edges
N=3. 6 choose 3 = 6!/3!3! = 20
      20 with 3 colors, 2 faces each, each color sharing one edge
      20 with 3 colors, 2 faces each, each color on opposite sides
      3*20 with 3 colors, 2 faces each, 2 colors sharing one edge, one color opposite (this is tripled because each color gets a chance to be opposite)
      6*20 with 3 colors, 1/2/3 faces, the 2-face color is opposite (six ways to choose which of the three colors has 1, 2, or 3 faces)
      6*20 with 3 colors, 1/2/3 faces, the 2-face color is adjacent, 3-face color shares a corner (3 edges)
      6*20 with 3 colors, 1/2/3 faces, the 2-face color is adjacent, 3-face color shares 2 edges

N=4, 6 choose 4 = 6 choose 2 = 15

      4*15 with 4 colors, 1/1/1/3, 3 face color shares a corner (4 ways to choose which color has 3 faces)
      3*4*15 with 4 colors, 1/1/1/3, 3 face color shares 2  edges (4 color choices as above, and for each there are 3 distinct arrangements of single color faces)
  2*6*15 with 4 colors, 1/1/2/2, 2 face colors share edges, 2 unique colors touch (6 ways to choose colors) (2 face colors could share such that one-face colors are touching or not touching, hence doubled)
  6*15 with 4 colors, 1/1/2/2, 2 face colors opposite (6 ways to choose colors)
   
N=5, 6 choose 5 = 6

    2*4*5*6 with 5 colors, 1/1/1/1/2, 2 face color either opposite or adjacent, 5 ways to choose which color is the 2 face color, 4 distinct orderings of one face colors ? brain melt

N=6, all different colors
    Only one way, baby!

Grand total: 1292

Considering I probably forgot some possible configurations, I would imagine a more elegant approach would be nice to increase confidence of completion.

Good puzzle.

Ben Berck
Tuesday, July 15, 2003

Ben

I agree that the original question didn't say that you couldn't repeat colours. However I think you've missed some of the orientations. For example, in the case where all faces are different colours, there are several ways to paint the cube that cannot be rotated on to each other.  (30, if the original answer is to be believed). For example, The face coloured '2' can be either next to the face coloured '1' or it can be opposite it. These can't possibly be rotated onto each other.

David Clayworth
Tuesday, July 15, 2003

I guess there is a simpler solution for the original puzzle (still considering all colors to be different). Let us look at any combination so that we always face the side painted with the same color (say, red). In this case we have 5 sides left, therefore there is 5! = 120 ways to paint other 5 sides.
Now the uniqueness comes into play. Still holding the cube facing the selected (red) side, just rotating it around the axis, perpendicular to this selected side, we can put it in 4 different orientations, obviously repeating each other. THerefore we have to consider only one out of orientations, and the number of solutions is 5!/4 = 120/4=30

Mike Faynberg
Sunday, August 24, 2003

*  Recent Topics

*  Fog Creek Home