How many ways are there to color a square prism with two colors

combinatoricsdiscrete mathematics

How many ways are there to color a square prism with two colors (black and white) such that repetition is allowed and all faces can be the same color keeping in mind orientation?

I counted out the cases and got 18 but I wanted to know if there is an easier way to answer this.

Thanks!

Best Answer

A square prism (not a cube) has $8$ rotational symmetries:

  • identity leaves $2^6$ colourings fixed
  • two $90^\circ$ rotations about the unique axis leave $2^3$ colourings fixed each
  • $180^\circ$ rotation about unique axis leaves $2^4$ colourings fixed
  • two $180^\circ$ rotations about axes perpendicular to the side faces leave $2^4$ colourings fixed each
  • two $180^\circ$ rotations about axes parallel to diagonals of the square top and bottom leave $2^3$ colourings fixed each

Thus, by Burnside's lemma, the number of colourings is $$\frac{2^6+2×2^3+2^4+2×2^4+2×2^3}8=18$$