## Teaser 2835: Jeweller’s rouge

**From The Sunday Times, 22nd January 2017** [link]

Fabulé’s latest creation consists of a set of equal-sized silver cubes. On each face of each cube there is one diagonal of identical rubies. No two cubes are the same, but had Fabulé made any more such cubes then it would have been necessary to repeat one of the designs.

How many cubes are there in the set?

[teaser2835]

## Jim Randell 8:20 am

on25 October 2019 Permalink |First I created a generic class to describe the rotations of the cube.

There are 24 rotational positions of the cube (any of the 6 faces can be selected to be the “U” face, and then any of the 4 sides can be selected to be the “F” face; 6 × 4 = 24). We can identify the rotation by the faces occupying the “U” and “F” positions.

In the code below we recorded the position and orientation of each face. Once we have determined the U, L, F rotations the remaining 21 can be calculated by combine these. But the code below uses pre-computed values for convenience.

We can then use the following short Python program to find distinct patterns of diagonals under rotation. It runs in 97ms

Run:[ @repl.it ]Solution:There are 8 cubes in the set.Here’s my “back of an envelope” sketch of the 8 distinct patterns:

LikeLike