# Rubiks Cube

### From charlesreid1

## Contents

# 2x2 Pocket Cube

The 2x2 Rubiks Cube is a great introduction to the Rubik's Cube, as it provides a simple introduction to the step-by-step method of solving cubes using algorithms.

## Solving

- A basic 2x2 solution technique: Pocket Cube/Solution Method

## Mathematical Representation

See the Rubiks Cube section below for a lot more detail on mathematical representations of Rubiks Cubes.

We should write up a tuple representation of the 2x2 pocket cube, and how to represent permutations on the pocket cube.

# 3x3 Rubiks Cube

The standard Rubiks Cube size is a 3x3.

Pages on the 3x3 cube:

- Rubiks Cube/Layer Method (algorithm for solving)
- Rubiks Cube/Tuple (matheamtical representation of the cube)
- Rubiks Cube/Permutations (permutation algebra applied to the cube)
- Rubiks Cube/Numbers (counting states)
- Rubiks Cube/Patterns (group theory and algorithm patterns)

## Solving the 3x3

- A basic, layer-by-layer Rubiks Cube solution technique: Rubiks Cube/Layer Method

There are other, more advanced techniques:

- Fridrich Method (CFOP) [1] - also see Rubiks Cube/Fridrich Method
- 2x2 Method (blockbuilding)
- Blindfolded [2]
- Blildfolded (another) [3]

## Mathematical Representation of the 3x3

The representation of the Rubik's Cube for use in mathematics (or computer programs) is an important topic. To turn a particular Rubik's Cube configuration into a mathematical representation agnostic to the particulars of the cube, we can label each face with an integer 1 to 54 (from 9 squares per face and 6 total faces), and pick a particular order for each face. Then we can write a sorted cube as (1 2 3 4 5 ... 52 53 54). This also enables enumerating combinatoric properties of the cube.

See Rubiks Cube/Tuple for more on this tuple representation.

See Rubiks Cube/Permutations for more on representing permutations and uncovering their properties.

## Counting Permutations for 3x3

Counting the number of possible configurations of a Rubik's Cube requires thinking about how the puzzle works and the unique pieces that compose any Rubik's Cube puzzle. We can enumerate the state of each of the three types of pieces: corner pieces, edge pieces, and center pieces.

See Rubiks Cube/Numbers for the procedure and rundown of how we count the number of permutations of a 3x3 or 4x4 Rubik's Cube.

## Patterns and Sequences of 3x3

The symmetry properties of the Rubik's Cube lead to some interesting properties.

Notes on group theory and Rubiks Cube patterns: Rubiks Cube/Patterns

# 4x4 Rubiks Revenge

Pages on the 4x4 cube:

- Rubiks Revenge/Layer Method (algorithm for solving)
- Rubiks Revenge/Tuple (mathematical representation of the 4x4 cube)
- Rubiks Revenge/Permutations (permutation algebra applied to 4x4 cube)
- Rubiks Revenge/Numbers (counting states)
- Rubiks Revenge/Patterns (group theory and algorithm patterns)

## Solving the 4x4

For the most part, solving the 4x4 is a lot like solving the 3x3, but complicated by two initial steps that need to happen first - arranging the center 2x2 cubies of each face, then orienting the two edge pairs of cubies of each of the twelve sides of the cube to match up.

Then you can think of these double edge pairs as sticking together to form a single edge cubie, and the four center face cubies as a single fixed face cubie, and the whole thing becomes a 3x3 cube, but with 2 rows/columns instead of a single middle row/column.

However, the parity case complicates things. Whereas the 3x3 cube has a few ending scenarios with regard to the parity of the top layer and how the squares are oriented (memorizing these becomes crucial to fast solves), the 4x4 cube has some situations that are impossible on a 3x3 cube (such as two corner cubies being swapped or a cube that's entirely solved except for two inside-out cubies on one of the top edges).

See Rubiks Revenge page, in particular the Rubiks Revenge#Algorithms Cheat Sheet section, for algorithms that apply only to the 4x4 case.

## Parity on the 4x4

The 4x4 has an even number of cubies per side, which means that it has more flexibility than the 3x3 or 5x5 (or any other cube with an odd number of cubies per side) because there is no fixed center face.

This difference means the 4x4 can reach any possible cube permutations (arrangements of the cubies), unlike the 3x3 or 5x5 cubes, which can only reach half of the possible permutations (the cubes would need to be mechanically dismantled to reach the other half).

This shows up on the very first step of solving the 4x4, which requires lining up the center faces.

(Image: faces ok and oriented correctly)

(Image: faces ok but oriented incorrectly)

## Mathematical Representation of the 4x4

To represent the Rubik's Revenge as a mathematical object, we can use a 96-tuple (that is, a permutation of the integers from 1 to 96, non-repeating). We have 8 corner pieces, 24 double-edge pieces (12 left-hand double edge pieces, 12 right-hand double edge pieces), and 24 center pieces, for a total of 56 pieces. However, some of these pieces have multiple faces, and we specify the state of the cube by enumerating the faces.

See Rubiks Cube/Tuple for information about how to turn a Rubik's Cube permutation, or arrangement, using a tuple of integers.

# 5x5 Professors Cube

## Solving the 5x5

The basic algorithm for solving the 5x5 is to use the layer method, by first reducing the 5x5 to a 3x3, then solving the 3x3 with the layer method.

- Main article: Professors Cube/Layer Method

## Parity on the 5x5

If you consider the solved cube, with each face correctly oriented, a cube with even parity (the 4x4) can have two corner cubies, three cubies, or four corner cubies swapped; it can also have two neighboring edge cubies oriented inside-out. But a cube with odd parity (like the 3x3 or 5x5) can only have three or four corner cubies swapped; it is not possible to swap two corner cubies on a cube with odd parity.

The end solution for the 5x5 cube is actually simpler than the 4x4 cube, due to the odd parity. While the 4x4 cube could end up with two corner cubies swapped or two edge cubies inverted, both of which require additional algorithms to fix, those states cannot be reached on a 5x5 cube, so there are no extra algorithms to learn for the end step.

Another step where even parity creates a more complicated solution step is the very first step - when there are four center pieces that are all interchangeable, the center pieces can move anywhere - so when you are solving the 4x4 and you aren't paying close attention to the orientation of the colors of the faces, you might end up inverting red and orange, or white and yellow, which you may not uncover until you've gone several steps ahead in the algorithm - which is when you'll discover that you need to swap two face colors.

With the 5x5 cube, as with the 3x3 cube, there is a single center piece that is fixed on each face, meaning the extra cognitive burden of correctly orienting each face is already done for you.

# References

- https://www.speedsolving.com/wiki/index.php/4x4x4_Parity_Algorithms
- https://ruwix.com/twisty-puzzles/4x4x4-rubiks-cube-rubiks-revenge/parity/
- https://ruwix.com/twisty-puzzles/4x4x4-rubiks-cube-rubiks-revenge/
- http://web.mit.edu/sp.268/www/rubik.pdf
- http://web.mit.edu/sp.268/www/2010/rubikSlides.pdf
- https://math.stackexchange.com/questions/332146/efficient-method-to-determine-the-order-of-a-permutation-in-s-n

# Flags