Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With three differently colored paints, in how many ways can the faces of a rectangular box can be painted so that the color changes occur only at each corner?

I was trying to solve this by principle of inclusion and exclusion, but I am unable to enumerate the number of ways to color the rectangular box( without any restrictions) because there are some distinct faces(adjacent faces) and some are non distinct faces(opposite faces).
Please help
Edit: The colorings which differ by rotation/s are considered to be same.

share|cite|improve this question
Exactly what do you mean when you say that color changes occur only at each corner? – Brian M. Scott Dec 10 '12 at 6:26
Do you mean, at each edge? – Did Dec 10 '12 at 6:28
Opposite faces could be distinct, I think. Are mirror-symmetric colorings considered identical? – Gyu Eun Lee Dec 10 '12 at 6:29
Is there a rule that the colour must change where two walls meet? Also, I expect you can figure out the answer, the number is small. To simplify calculations, imagine that the West wall is painted red, and then multiply whatever answer you get by $3$. – André Nicolas Dec 10 '12 at 6:29
@did yes it means edges – Saurabh Dec 10 '12 at 6:30

Thought about it a bit more. There is precisely one way.

The formulation of the problem I am considering is that we have a rectangular box, three colors, say magenta, cyan, yellow, and we must color the sides of the box so that at every edge, the color of the walls adjacent to the edge is different.

In order to do this, we must have opposing sides be the same color. For suppose there are two opposing sides of different colors, say magenta and cyan. To be concrete, orient the box so that these sides are the "ceiling" and the "floor". Then consider the other four sides. Each of these is adjacent to a magenta side (the "ceiling") and a cyan side (the "floor"), so to avoid being the same color they must all be yellow. But then the sides are the same color as the other adjacent sides. So we must have opposing sides be the same color.

Now, from here, it is easy to see that any two cubes whose sides are colored like this can be rotated into the other. (Reflections don't come into account, since a cube colored like this is reflection-symmetric.) So pick any opposing pair of sides to be magenta, any other pair to be cyan, the last pair to be yellow; every choice is the same choice, so there is exactly one way to do this.

share|cite|improve this answer
Sorry that I didn't stated the question clearly. I was taking the interpretation that 2 coloring differ by rotation are same. – Saurabh Dec 10 '12 at 7:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.