rec.puzzles Archive

How many distinguishable ways are there to paint the faces of a cube using two colours, counting patterns...

combinatorics/cube.colouring New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

How many distinguishable ways are there to paint the faces of a cube
using two colours, counting patterns that differ only by a rotation of
the cube as the same?  Is there a formula for 3 colours, 4 colours,
..., n colours?
[ Editor: problem statement reconstructed from the postings. ]
Show solution
Suppose that Pj is the number of j-colour patterns.  Calculate (by
brute force) the values of P1..P6.  Then, for j > 6, Pj = C(j,1)*P1 +
C(j,2)*P2 + ... + C(j,6)*P6, where C(j,k) is the binomial coefficient
j!/(k!(j-k)!), i.e. the number of ways of choosing k out of j colours.

Suppose that the faces of the cube are labelled like a die, with 1
opposite 6, 2 opposite 5, 3 opposite 4, thus 1, 2, 3 are adjacent at
one corner of the die, and 4, 5, 6 are adjacent at the opposite
corner.  To help in counting the distinct patterns, note that if one
of the colours is on two faces, then these faces must be either
adjacent or opposite, and if one of the colours is on three faces,
then the three faces must either meet at a corner or be arranged in a
U-shape.  If two opposite faces have the same colour, then there are 8
rotations of the cube which preserve the colour of the two faces; if
two adjacent faces have the same colour, then there are 2 rotations of
the cube which preserve the colour of the two faces; if three faces at
a corner have the same colour, then there are 3 rotations of the cube
which preserve the colour of the three faces; and if three faces in a
U-shape have the same colour, then there are 2 rotations of the cube
which preserve the colour of the three faces.

P1 = 1 perforce, so let's look at P2.  The distinct patterns are,
using R for red and B for blue:

  123456
  ------
  RRRRRB
  BBBBBR
  RRRRBB
  BBBBRR
  RRBBRR
  BBRRBB
  RRRBBB
  RRBRBB

Thus, P2 = 8.  Note that when there are two faces of the same colour,
they must be either adjacent or opposite, and when there are three
faces of the same colour, they must either meet at a corner, or be
arranged in a U-shape.  To determine P3, use G for green, then:

  123456  123456  123456  123456  123456
  ------  ------  ------  ------  ------
  RRRRBG  RRRBBG  RRBRBG  RRBRGB  RBGGBR
  BBBBGR  RRRGGB  RRGRGB  RRGRBG  RBBGGR
  GGGGRB  BBBGGR  BBGBGR  BBGBRG  BGGRRB
  RRBGRR  BBBRRG  BBRBRG  BBRBGR  GRRBBG
  BBGRBB  GGGRRB  GGRGRB  GGRGBR  RRBGBG
  GGRBGG  GGGBBR  GGBGBR  GGBGRB

Thus, P3 = 29.  Note that when there are four faces of the same colour
(column 1), the other two faces must be either adjacent or opposite.
The situation is slightly more complicated when there are three faces
of the same colour.  When the three faces meet at a corner (column 2),
there is essentially only one way to colour the other three faces,
while when the three faces are in a U-shape, there are two essentially
different ways to colour the other faces, one in which the remaining
pair of opposite faces have different colours (column 3), and one in
which they have the same colour (column 4).  When there are two faces
of each colour, there is one pattern with all three colours on
opposite faces, three patterns with just one colour on opposite faces,
and one pattern with no colour on opposite faces (column 5).  Note that
in the last case, RRBGBG, if the cube is rotated so as to interchange
the two R faces, the resulting pattern is RRGBGB, which is therefore
not a distinct pattern.

I won't try to list the P4 and P5 patterns, but I think P4 = 50 and P5
= 75.  For P6, there must be one face of each colour.  There are 15
ways of pairing these up into colours on opposite faces, and for each
such pairing there are two distinct ways that the colours may be
arranged, thus P6 = 30.

If anyone thinks I have miscalculated, let me know.

-- Bill Daly <billdaly@mail.interport.net>

[ Editor: the standard (Burnside/Polya) count of colourings with at
most n colours is (n^6 + 3n^4 + 12n^3 + 8n^2)/24, which gives 1, 10,
57, 240, 800, 2226 for n = 1..6.  Subtracting the patterns that use
fewer colours, e.g. P3 = 57 - 3*8 - 3*1 = 30 and
P4 = 240 - 4*30 - 6*8 - 4*1 = 68, gives P1..P6 = 1, 8, 30, 68, 75, 30.
So P3 is 30, not 29, and P4 is 68, not 50; P2, P5 and P6 agree. ]