-Up to-Home/Maths
-Site Map|-Text version

- Square 1 Puzzle

  -- Fred Curtis

[Puzzle Geometry] [What is an arrangement?] [How many arrangements are there?] [Grouping similar arrangements] [Canonical Shapes] [Program Sources] [Chronology]


"Square 1" is a combinatorial puzzle (similar to "Rubik's Cube") which appeared around 1992. You can see some pictures of Square 1 on the following pages:

You can play with the Virtual Square 1 Puzzle on this site.

This page is a collection of notes on writing a computer program to solve the Square 1 puzzle.

Puzzle Geometry

Despite admitting some very strange-looking shapes, the Square 1 is essentially two outer layers -- each like a pie made of 60° and 30° segments -- separated by a middle layer of 2 large pieces. The outer layers can be rotated around the "pie" axis, and when the outer layers are lined up correctly the middle layer can be flipped, a move which transfers some pieces between the outer layers. For example:

Table 1 - Some Square 1 moves
3D View:[square 1 config]Flip ->[square 1 config]Rotate top 90°
(as viewed from above) ->
[square 1 config]Flip[square 1 config]
Symbolic View:[square 1 config][square 1 config][square 1 config][square 1 config]

What is an arrangement?

How many ways are there to arrange the pieces of the Square 1 puzzle? That depends on when two physical arrangements of pieces in the puzzle are regarded as the same. Some observations that lump similar arrangements together are:With these simplifications, an arrangement around a fixed middle-layer piece can be described as:

How many arrangements are there?

How many of these arrangements are there? The most straightforward way to count them is to consider a "blank" version of the puzzle where all the labels/colours have been removed from the 60° and 30° pieces, list all the possible arrangements using these "blank" pieces, then for each "blank" arrangement count the number of ways it can be "coloured" by putting the labels/colours back.

Table 2 below shows all the ways that the blank pieces can be arranged in the top or bottom layer.

Table 2 - Arrangements of 60° and 30° pieces in a top/bottom layer
[Perl source code]
60° pieces
'A' in layer
30° pieces
'a' in layer
IDLayer
shape
Reflection
Symmetry
Rotation
Symmetries
Permutation
Multiplier
Permutation
Sum
606-1AAAAAAY61/61/6
525-1AAAAAaaY113
5-2AAAAaAaY11
5-3AAAaAAaY11
444-1AAAAaaaaY1135/4
= 8  3/4
4-2AAAaAaaaN11
4-3AAAaaAaaY11
4-4AAAaaaAaN11
4-5AAaAAaaaY11
4-6AAaAaAaaN11
4-7AAaAaaAaY11
4-8AAaaAAaaY21/2
4-9AAaaAaAaN11
4-10AaAaAaAaY41/4
363-1AAAaaaaaaY1128/3
= 9  1/3
3-2AAaAaaaaaN11
3-3AAaaAaaaaN11
3-4AAaaaAaaaY11
3-5AAaaaaAaaN11
3-6AAaaaaaAaN11
3-7AaAaAaaaaY11
3-8AaAaaAaaaN11
3-9AaAaaaAaaN11
3-10AaaAaaAaaY31/3
282-1AAaaaaaaaaY119/2
= 4  1/2
2-2AaAaaaaaaaY11
2-3AaaAaaaaaaY11
2-4AaaaAaaaaaY11
2-5AaaaaAaaaaY21/2

Table 3 - Permutation counts for top & bottom layers,
factoring out rotations
No. of 60° pieces
in top layer
No. of 60° pieces
in bottom layer
Product of
permutation multipliers
621/6 * 9/2 = 3/4
533 * 28/3 = 28
4435/4 * 35/4 = 1225/16 = 76 9/16
353 * 28/3 = 28
261/6 * 9/2 = 3/4
Total:2145/16 = 134 1/16

Each of the blank arrangements formed using the layers from Table 2 can be coloured in 8!·8! ways, but care has to be taken to avoid duplicates. For example, a blank shape with a layer 6-1 on top and layer 2-1 on the bottom can be coloured 8!·8! ways, but this must be divided by 6 to take into account the rotation symmetry of the top layer.

Each of the 2145/16 shapes (factoring out rotations - see Table 3) can be 'coloured' in 8!·8! = 1625702400 ways, and the middle pieces may or may not form a square (another factor of 2), so there is a total of 435891456000 arrangements (about 2^39). A web search on this number yielded one other calculation of the number of Square 1 states (by Michael C. Masonjones, dated 28 May 1996) which agrees!

Grouping similar arrangements

In writing a computer program to solve (unscramble) the puzzle, the more arrangements that can be lumped together as similar (canonical) arrangements, the better -- assuming that the time & storage space saved by dealing with fewer arrangements isn't overwhelmed by the time taken to decide whether two arrangements are the same.

To understand some ways of drastically reducing the number of arrangements to consider, it is convenient to have labels for the 60° and 30° pieces in the puzzle, and a description of what constitutes a solution for an arrangement:

Some ways of grouping arrangements for the purposes of solving the puzzle are:

Canonical Shapes

With the symmetries described above, the number of shapes considered can be reduced to the 65 listed in Table 4, ignoring the state of the middle layer. Each of these shapes can be labelled in 8!·8! ways by replacing each 'A' with a Ti or Bi, and each 'a' with a ti or bi. This number can be reduced applying the Sym1 rotation of pieces and assuming the first occurrence of a Ti is T0, and the first occurrence of Bi is B0.

Table 4 - Canonical Shapes
(Ignoring state of middle-layer)
Shape
ID
Top
Layer
Top
Rotsym
Bottom
Layer
Bottom
Rotsym
Sym2Sym3Sym4Symmetry
Group Size
Unique TtBb
Templates
1AAAAAA6AAaaaaaaaa1NYN32?
2AAAAAA6AaAaaaaaaa1NYN32?
3AAAAAA6AaaAaaaaaa1NYN32?
4AAAAAA6AaaaAaaaaa1NYN32?
5AAAAAA6AaaaaAaaaa2NYN32?
6AAAAAaa1AAAaaaaaa1NYN32?
7AAAAAaa1AAaAaaaaa1NNN16?
8AAAAAaa1AAaaAaaaa1NNN16?
9AAAAAaa1AAaaaAaaa1NYN32?
10AAAAAaa1AaAaAaaaa1NYN32?
11AAAAAaa1AaAaaAaaa1NNN16?
12AAAAAaa1AaaAaaAaa3NYN32?
13AAAAaAa1AAAaaaaaa1NYN32?
14AAAAaAa1AAaAaaaaa1NNN16?
15AAAAaAa1AAaaAaaaa1NNN16?
16AAAAaAa1AAaaaAaaa1NYN32?
17AAAAaAa1AaAaAaaaa1NYN32?
18AAAAaAa1AaAaaAaaa1NNN16?
19AAAAaAa1AaaAaaAaa3NYN32?
20AAAaAAa1AAAaaaaaa1NYN32?
21AAAaAAa1AAaAaaaaa1NNN16?
22AAAaAAa1AAaaAaaaa1NNN16?
23AAAaAAa1AAaaaAaaa1NYN32?
24AAAaAAa1AaAaAaaaa1NYN32?
25AAAaAAa1AaAaaAaaa1NNN16?
26AAAaAAa1AaaAaaAaa3NYN32?
27AAAAaaaa1AAAAaaaa1YYY64?
28AAAAaaaa1AAAaAaaa1NNN16?
29AAAAaaaa1AAAaaAaa1NYN32?
30AAAAaaaa1AAaAAaaa1NYN32?
31AAAAaaaa1AAaAaAaa1NNN16?
32AAAAaaaa1AAaAaaAa1NYN32?
33AAAAaaaa1AAaaAAaa2NYN32?
34AAAAaaaa1AaAaAaAa4NYN32?
35AAAaAaaa1AAAaAaaa1YNN32?
36AAAaAaaa1AAAaaAaa1NNN16?
37AAAaAaaa1AAAaaaAa1NNY32?
38AAAaAaaa1AAaAAaaa1NNN16?
39AAAaAaaa1AAaAaAaa1NNN16?
40AAAaAaaa1AAaAaaAa1NNN16?
41AAAaAaaa1AAaaAAaa2NNN16?
42AAAaAaaa1AAaaAaAa1NNN16?
43AAAaAaaa1AaAaAaAa4NNN16?
44AAAaaAaa1AAAaaAaa1YYY64?
45AAAaaAaa1AAaAAaaa1NYN32?
46AAAaaAaa1AAaAaAaa1NNN16?
47AAAaaAaa1AAaAaaAa1NYN32?
48AAAaaAaa1AAaaAAaa2NYN32?
49AAAaaAaa1AaAaAaAa4NYN32?
50AAaAAaaa1AAaAAaaa1YYY64?
51AAaAAaaa1AAaAaAaa1NNN16?
52AAaAAaaa1AAaAaaAa1NYN32?
53AAaAAaaa1AAaaAAaa2NYN32?
54AAaAAaaa1AaAaAaAa4NYN32?
55AAaAaAaa1AAaAaAaa1YNN32?
56AAaAaAaa1AAaAaaAa1NNN16?
57AAaAaAaa1AAaaAAaa2NNN16?
58AAaAaAaa1AAaaAaAa1NNY32?
59AAaAaAaa1AaAaAaAa4NNN16?
60AAaAaaAa1AAaAaaAa1YYY64?
61AAaAaaAa1AAaaAAaa2NYN32?
62AAaAaaAa1AaAaAaAa4NYN32?
63AAaaAAaa2AAaaAAaa2YYY64?
64AAaaAAaa2AaAaAaAa4NYN32?
65AaAaAaAa4AaAaAaAa4YYY64?
Total of reciprocals of symmetry group sizes:2.65625 

Program Sources

Selected CGI script sources for the Virtual Square 1 Puzzle on this site:

Miscellaneous source:

Chronology


-This page
last changed:
31 Jan 2005
[Validate HTML]
-Donate free
food & land
 
-
|Feedback by email
or Web form