# Cmetrick

This puzzle consists of a frame containing a 3×3 array of coloured balls. The balls are identical, and have 6 colours, arranged like the 6 sides of a cube. If you rotate any ball to the left or right, all three balls in the same row are rotated in the same way. If you rotate a ball up or down, then the balls in the same column rotate with it. The aim is of course to get all the balls in the same orientation, so that they show the same colour on the front and sides.

The Cmetrick Mini is just the same as the ordinary Cmetrick, except that it is a 2×2 square, so only has 4 balls. It is of course easier to solve, but also easier to handle because it is easier to keep the balls aligned enough to do the moves.

This puzzle is related to the Rolling Cubes Puzzle in that it has a 3×3 array containing cubes which are reoriented. Mechanically it is somewhat related to the Rubik's Clock, as the nine parts are connected with an internal set of cogs. With regards to difficulty this puzzle is more like the Rubik's Clock than the Rolling Cubes Puzzle.

CMetrick was invented and patented by Dror Rom, 8 January 2004, WO 2004/002587.

If your browser supports JavaScript, then you can play the Cmetrick or Cmetrick Mini by clicking the links below:

## The number of positions:

There are 9 cubes, each with 24 possible orientations, so this gives an upper bound of 249 positions. These are not all possible however because of parity restrictions. If you move the second and third columns so that the top row balls all have the same orientation parity, and similar the second and third rows to equalise the left column's parities, then the four balls in the bottom right corner will automatically have the same parity as the rest. This therefore means that the real number of positions is 249/24 = 165,112,971,264.
Note that there are in fact 24 solutions, so if we consider identical any positions that differ only by recolouring then there are really only 248/24 = 6,879,707,136 positions.

The parity restrictions can be worked out by using linear algebra the same way as the Lights Out puzzles, as explained on the Lights Out Maths page. Suppose we ignore the ball orientations, and only keep track of the orientation parities. There are then only six ways that the parities change by a move - changing all the parities in a column or a row. These six ways are not independent, since the sum of all six have no effect, but any five of them are. This means that there are exactly 25 ways to affect the parities, instead of the 29 which you would have if there were no restrictions. This is where the factor 24 comes from in the previous paragraph.
There is another way to look at the same thing. Consider four balls in a 2×2 square. Any move on the Cmetrick will change the parity of zero or two of these balls. The number of balls with odd parity in this square will therefore always remain even. From this it is easy to see that once the balls on the middle row and column of the Cmetrick are known, the parities of the corner balls can be determined. Again, this is the factor 24 above.

The Cmetrick Mini has 4 cubes, each with 24 possible orientations, so this gives an upper bound of 244 positions. On this puzzle there is only one parity restriction, so the number of positions is 244/2 = 165,888. Again there are in fact 24 solutions, so if we consider identical any positions that differ only by recolouring then there are really only 243/2 = 6,912 positions.

Stefan Pochmann has calculated the number of positions at each depth of the Cmetrick, and his results are shown below left. It shows that in the worst case only 15 quarter turns are needed to solve the puzzle (12.254 on average). Below right are my results for the Cmetrick Mini, showing you need at most 9 quarter turns to solve it (6.4748 on average) or 8 moves (6.0569 on average) if a half turns counts as one move.

DistancePositions
01
112
290
3720
45,457
538,232
6255,447
71,630,488
89,719,949
952,814,538
10252,618,820
11979,389,786
122,533,329,804
132,661,460,602
14387,681,754
15761,436
Total     6,879,707,136
Half turn metric Quarterturnmetric 0 1 2 3 4 5 6 1 4 2 16 12 72 1 60 256 8 216 688 44 543 1376 80 828 1344 165 416 576 12 192

## Notation:

A ball can be rolled in four directions, Up, Down, Left, and Right. Quarter turns in these directions will be denoted by the letters U, D, L and R respectively.

## Solution:

Phase 1: Solve the edge balls, forming a cross.
The centre ball will be considered already solved. In this phase, the balls adjacent to the centre will be solved.

1. Consider the ball below the centre. In the next few steps this ball will be rolled until it matches the orientation of the centre ball.
2. Look at the front colour of the centre ball, and see where that colour is on the below centre ball.
3. Depending on where that colour is, do one of the following:
Right side: L
Left side: R
Up side: D R U L
Down side: U R D L
Rear face: R R
This should match up the front colours.
4. Look at the sides of the below centre ball, and compare it to the sides of the centre ball.
5. Depending on which way the ball needs to be moved to match the centre, do one of the following:
Clockwise: U L D
Half turn: U L L D
Anti-clockwise: U R D
The two balls should now match exactly.
6. Rotate the whole puzzle a quarter turn so that you now have a different side nearest to you.
7. Repeat steps a-f three more times, so that all the balls adjacent to the centre match, forming a cross.

Phase 2: Solve the corner balls.

1. Consider the ball at the bottom right corner. In the next few steps this ball will be rolled until it matches the orientation of the centre ball.
2. Look at the front colour of the centre ball, and see where that colour is on the bottom right corner ball.
3. Depending on where that colour is, do one of the following:
Right side: L U R D
Left side: R U L D
Up side: D R U L
Down side: U R D L
Rear face: R R U L L D
This should match up the front colours.
4. If the sides of the bottom right corner ball do not match the sides of the centre, then it needs a half turn which can be done by L D R R U L. The ball should have now been solved.
5. Rotate the whole puzzle a quarter turn so that you now have a different side nearest to you.
6. Repeat steps a-e three more times, so that all the corner balls match the centre, and so the puzzle should be solved.

You can now optionally reorient all the balls by turning all rows or all columns in the same way.