# Trillion Puzzle

The Trillion Puzzle is a flat circular frame with 17 round coloured pieces in it which are arranged in the shape of a cross - one piece in the centre and four arms with four pieces each. The five centre pieces lie in a disk which can be rotated. The next two pieces of each arm of the cross lie in a ring which can also be rotated, as can the outer ring containing the other 4 pieces. There is a spring loaded plunger on one arm of the cross which allows the 9 pieces to slide along by one place. While this plunger is pushed in, it blocks the outermost ring from moving.

There is one colour of which there is only one piece, and this belongs in the centre. The 16 remaining pieces are divided equally over four colours. The normal solution has the pieces arranged in rings of the same colour, matching the ring design on the base of the puzzle.

There are different versions of the puzzle, which differ in the colours that are used. The one shown above is black, and the colour of its rings from the outside inwards are green, orange, blue, yellow, and finally red in the centre. I have one that is dark red, with ring colours blue, green, yellow, orange, and white.

It is unclear who invented the puzzle, but it may have been inspired by figure 19 in the patent (US 4,376,537) of the Nintendo Billion Barrel which is very similar.

If your browser supports JavaScript, then you can play Trillion by clicking the link below:

## The number of positions:

There are 17 pieces, which can be arranged in at most 17! = 355,687,428,096,000 ways. All these are in fact possible, but since there are four sets of four identical pieces there are only 17!/4!4 = 1,072,071,000 distinguishable positions. This is indeed just over one billion positions rather than one trillion.

If you count positions where the plunger is pushed in, then you will obviously have twice as many positions all together, namely 2,144,142,000.

Matt Galla calculated God's algorithm for this puzzle. If a move is defined as pushing in the plunger, releasing the plunger, or rotating a single ring by any amount, then the puzzle can be solved in at most 33 moves (or 22.333 on average). If you don't count plunger moves, and only count rotations of the rings, both with or without the plunger depressed, then it takes at most 21 moves (or 13.545 on average).
Plunger and Ring moves Ring moves only
Depth# positions
01
11
26
315
447
5206
6648
71,568
84,361
913,382
1041,676
11120,720
12313,857
13784,706
142,032,944
155,347,007
1613,329,641
1730,222,744
1862,271,302
19118,125,676
20202,337,468
21299,306,795
22368,462,122
23370,504,761
24303,024,321
25203,567,257
26108,043,743
2742,041,637
2811,626,138
292,296,224
30298,461
3121,721
32835
339
Total2,144,142,000
Depth# positions
01
16
247
3324
42,048
512,259
668,920
7358,189
81,700,065
97,181,267
1025,944,435
1174,992,809
12161,099,837
13244,204,938
14254,836,822
15183,161,517
1687,714,681
1725,867,985
184473,176
19430,242
2021,032
21400
Total1,072,071,000

## Notation:

I hold the puzzle like a stopwatch, with the plunger at the top. The solution below assumes this is the case, so pressing the plunger moves the vertical column of pieces downwards, and releasing it moves them upwards again. I will label the four rings of pieces with the letters A-D, thus the innermost ring containing the pieces adjacent to the centre is labelled A, the next are B and C, and the outermost ring is ring D. Note that rings B and C cannot turn independently. I will denote a clockwise quarter turn of a ring by its letter(s), so A turns the centre disk one quarter turn clockwise, BC the middle ring, and D the outer ring. Half turns are denoted by A2, BC2, and D2, and anti-clockwise quarter turns by A', BC', D'. Pushing and releasing the plunger is denoted by a P and P'.

## Solution:

Phase 1: Solve the outer ring, ring D.
I will assume the outer ring is supposed to be blue.

1. Turn the outer ring so that the top position of the outer ring has an incorrect piece, i.e. one that is not blue.
2. Find a blue piece that does not already lie in the outer ring. If you have a choice of blue pieces, choose one that lies furthest away from the centre.
3. If the blue piece does not lie in ring C, then turn it so that it lies at or below the centre. Then do P A BC P'. The piece will have moved one step further outwards. Repeat until it lies in ring C.
4. Turn ring BC to bring the blue piece onto the left arm of the cross. Then do P BC P'.
5. Repeat steps a-d until the blue ring is solved.

Phase 2: Solve ring C.
I will assume ring C is supposed to be green.

1. Turn the ring BC so that the top position in ring C is not solved (i.e. there is no green piece there).
2. Find a green piece that does not already lie in ring C.
3. Depending on the position of the green piece, do one of the following sequences:
Centre: P A BC2 P' A' P BC2 P'.
Ring B, top: P A BC2 P' A P BC2 P'.
Ring B, left: P BC' P' A P BC' P' A' P BC2 P'.
Ring B, bottom: BC2 P A P' BC2 P BC2 P' A P BC2 P'.
Ring B, right: P BC P' A P BC P' A' P BC2 P'.
Ring A, top: P BC2 P' A2 P BC2 P'.
Ring A, elsewhere: Turn A to bring the green piece to the top, and do the previous move sequence.

Phase 3: Solve ring B.
I will assume ring B is supposed to be yellow. This phase is very similar to phase 1.

1. Turn the BC ring so that the top position of ring B has an incorrect piece, i.e. one that is not yellow.
2. Find a yellow piece that does not already lie in ring B.
3. If the yellow piece lies in the centre, then do P A P'. The piece will have moved one step outwards, into ring A.
4. Turn ring A to bring the yellow piece onto the left arm of the cross. Then do P A P'.
5. Repeat steps a-d until the yellow ring is solved.

Phase 4: Solve the centre piece, and hence also ring A.

1. Find the piece that belongs in the centre.
2. If it does not lie in the centre, then turn A to bring it to the top position, and then do P A BC P' A P A BC' P.