cayleypy.Puzzles
- class cayleypy.Puzzles[source]
Definitions of graphs describing various puzzles.
- __init__()
Methods
__init__
()globe_puzzle
(a, b)Cayley graph for Globe puzzle group, a + 1 cycle and 2b order 2 generators.
Cayley graph for S_n (n>=4), generated by rotating two rings in both directions.
megaminx
()Cayley graph for the Megaminx puzzle.
Cayley graph for a subgroup of S_24, acting on 24 titles.
pyraminx
()Cayley graph for a subgroup of S_36 acting on 36 tiles.
rubik_cube
(cube_size, metric)Cayley graph for NxNxN Rubik's cube.
starminx
()Cayley graph generated by 20 moves of Starminx puzzle.
- static globe_puzzle(a: int, b: int) CayleyGraphDef [source]
Cayley graph for Globe puzzle group, a + 1 cycle and 2b order 2 generators.
- static hungarian_rings(n: int) CayleyGraphDef [source]
Cayley graph for S_n (n>=4), generated by rotating two rings in both directions.
For each ring structure and their intersection it has four generators.
- static mini_pyramorphix() CayleyGraphDef [source]
Cayley graph for a subgroup of S_24, acting on 24 titles.
It is generated by 17 moves inspired by a simplified version of the Pyramorphix puzzle. Moves are based on overlapping 2- and 3-cycles and result in a symmetric, undirected graph. Order of the graph 24, degree 17, order of the group 288.
- static pyraminx() CayleyGraphDef [source]
Cayley graph for a subgroup of S_36 acting on 36 tiles.
It is generated by 8 elements inspired by Pyraminx puzzle. 4 elements represent rotations of the tetrahedron tips, while 4 others – rotations of its base layers.
- static rubik_cube(cube_size: int, metric: str) CayleyGraphDef [source]
Cayley graph for NxNxN Rubik’s cube.
- Parameters:
cube_size –
Size of the cube (N).
metric –
metric defining what counts as one move, one of:
”QSTM” - Quarter Slice Turn Metric.
”QTM” - Quarter Turn Metric (only supported for 2x2x2 and 3x3x3).
”HTM” - Half Turn Metric (only supported for 2x2x2 and 3x3x3).
- static starminx() CayleyGraphDef [source]
Cayley graph generated by 20 moves of Starminx puzzle.
Each move is a rotation of a corner, centered around one of the dodecahedron’s pentagonal faces (face centres never move). A single turn corresponds to a set of disjoint 3-cycles, each on one triangular sticker.