### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,115)
- misc (2)
- project euler (2)
- puzzle (29)
- site news (43)
- tantalizer (29)
- teaser (3)

### Site Stats

- 166,357 hits

Programming Enigma Puzzles

5 December 2011

Posted by on **From New Scientist #2818, 25th June 2011** [link]

My artistic nephew is making a lamp which involves using the largest possible number of regular tetrahedra – solid bodies with four faces, each an equilateral triangle – whose faces will be painted with various colours. These will float in a fluid that is agitated and then lit from beneath by a bright light to produce a sparkling effect.

Some of the tetrahedra will have all faces the same colour, some will have faces of two different colours, others three and others four, but no two tetrahedra will be identical. Having done his sums, he finds that he will have exactly the same number of tetrahedra with four different colours as have three.

How many colours will he use? And how many tetrahedra?

[enigma1652]

Advertisements

%d bloggers like this:

Here’s a constructive approach (which is the type of solution I like) that generates all the possibilities for coloured tetrahedra and reduces it by the ones that are equivalent by rotation.

The following Python code runs in 88ms.

Solution:There are 9 colours, and 621 tetrahedra.And here’s an analytical approach (with a trivial amount of programming).