12
$\begingroup$

I know how to solve a Rubik $4\times4\times4$ or $5\times5\times5$ or bigger, but I have problem with a specific algorithm: the parity error.

What's the shortest parity algorithm for $n\times n\times n$, or is there a really easy way to memorize parity?

$\endgroup$

4 Answers 4

9
$\begingroup$

Unfortunately, there's not an easy way to spot or correct parity errors, but understanding what causes them can help you memorize how to correct them, and figure out where to go.

Mechanical puzzles have something called "virtual states." These states are a part of the cube that exists, but they're either covered up or not shown on the surface of the cube. There are a countless number of virtual states, but the importantly: some virtual states, even though you cannot see them, make the difference in solvability. Parity errors most commonly (though not exclusively) result from errors in states you can't actually see.

A common example of what I mean by this is the centers on the 4x4. You can't see them - not the stationary ones that exist on a 3x3 - but they still exist. Parities emerge on the 4x4 when the invisible 3x3 centers on the 4x4 are rotated into an invalid position. You can't see them, but they're there.

As a result, they're quite literally impossible to spot until you run face-first into an unsolvable state. To correct them, you need to execute an algorithm that puts the internal hidden states into their correct locations, likely at the cost of re-scrambling a portion of the rest of the cube.

As far as algorithms go, there's nothing to do but memorize, unfortunately. Trying to understand how the algorithm does what it does will let you remember it more clearly, but at the end of the day, it's still memorization. Practicing them over and over until you have them down is, at some point, the only way.


Here are some of the shorter algorithms I've seen that fix parity errors:

  • 4x4, when one edge is flipped on top front: (Rr)2 B2 U2 (Ll) U2 (Rr)' U2 (Rr) U2 F2 (Rr) F2 (Ll)' B2 (Rr)2
  • 4x4, when two edges need to be swapped; one in front, one in back: (Uu)2 (Ll)2 U2 l2 U2 (Ll)2 (Uu)2
  • 4x4, when two edges need to be swapped; one in front, one on the left: L2 D (Ff)2 (Ll)2 F2 l2 F2 (Ll)2 (Ff)2 D' L2
  • 4x4, when two adjacent corners need to be swapped: (Uu)2 (Ll)2 U2 l2 U2 (Ll)2 (Uu)2 F' U' F U F R' F2 U F U F' U' F R
  • 4x4, when two opposite corners need to be swapped: (Uu)2 (Ll)2 U2 l2 U2 (Ll)2 (Uu)2 R U' L U2 R' U R L' U' L U2 R' U L' U

(4x4 algorithms pulled from this page.)

Fixing 5x5 parities are a little easier:

  • 5x5, when you have two or four edges to swap remaining, and swapping them is not nominally possible: (Rr U2)5
  • 5x5, when one edge has both its wings flipped upside down: (Rr)2 B2 U2 Ll U2 (Rr)' U2 Rr U2 F2 Rr F2 (Ll)' B2 (Rr)2
  • 5x5, when two wings on opposite sides of the cube need to be swapped: [(Ll)' U2]2 F2 (Ll)' F2 Rr U2 (Rr)' U2 (Ll)2

(5x5 algorithms pulled from this page.)


On higher order cubes, solve from the inside out, and use parity algorithms as you go. For example, on the 7x7, pair the inner edge wings with their edges, then the outer edge wings with their edges. If you run into a parity case on the inner edges, it'll be easier to spot and less destructive to correct if you go inside-out than outside-in. The same algorithms will work, though.

$\endgroup$
3
  • $\begingroup$ Which one of these can be used like this algorithm: imgur.com/a/Pv1r5 $\endgroup$
    – MCCCS
    Aug 10, 2016 at 8:06
  • 2
    $\begingroup$ @MCCCS Try the middle 5x5 algorithm: (Rr)2 B2 U2 Ll U2 (Rr)' U2 Rr U2 F2 Rr F2 (Ll)' B2 (Rr)2 (the link has an execution sequence for speedsolving as well) $\endgroup$
    – user20
    Aug 10, 2016 at 8:07
  • 1
    $\begingroup$ I do not agree with your bold statement (typographically). A parity is a problem only if it affects the outer cubes. The parities of the outer cubes and the inner cubes are linked, so you might also have a parity problem on the inner invisible cubes but it doesn't matter because they are invisible. The usual parity problem with the 4x4x4 is when 2 edges are reversed while the corners are not. To fix that you just need a 1/4 turn on a middle layer. After that you can fix the cube with even-parity moves like commutators. $\endgroup$
    – Florian F
    May 11, 2021 at 13:15
3
+100
$\begingroup$

The heavily-upvoted answer by user20 is actually wrong. We do not need to memorize a single thing to be able to solve all the parity problems on any arbitrary n×n×n Rubik's cube. This post is a general solution for Rubik's cube type of permutation puzzles. Its paragraph on parity is brief, because it was written for people who understand basic group theory. The basic group theoretic fact you need is that every finite permutation is equivalent to some sequence of swaps, and the parity (even or odd) of the number of swaps in any such equivalent sequence is actually fixed by the permutation, so we can define the parity of the permutation as the parity of any such sequence.

As described in the linked post, it is very easy to find 3-cycle commutators for any $n×n×n$ Rubik's cube. But each 3-cycle is equivalent to 2 swaps, and so you can only solve even permutations using 3-cycles. Also, each piece has a type in the sense that it can be moved only to positions of same type. The 4×4×4 cube has 4 types (centres, 2 types of edges, corners). The 5×5×5 cube has (ignoring the fixed-centres) 6 types (side-centres, corner-centres, 3 types of edges, corners). Thus you can use 3-cycles to permute pieces of each type in any even permutation. This means that there may be a parity issue with each type.

Some types do not have any visible parity, such as the centre pieces (since you cannot tell if centres of the same colour are swapped), and so commutators suffice to solve those types. Some types have their parities correlated. This is why the linked post says that the 5×5×5 Rubik's cube has 2 parities (1 for corners and middle-edges, 1 for the side-edges). For example, the parity of the corners is always equal to the parity of the middle-edges, which you can prove by noting that each move (i.e. quarter face-turn/slice-turn that does not move the fixed-centres) either does a 4-cycle on both types or does nothing to both types. Similarly, the parity of one type of side-edges is equal to the parity of the other type of side-edges.

So how do we solve the parities without any memorization? Simple. You can solve the parities first by counting each parity (which is equal to the parity of the number of even cycles) and fixing them all before solving the rest of the cube using 3-cycle commutators. For instance, for the 5×5×5 cube you can count the parity of the corners and fix an odd parity by a single quarter face-turn, which would automatically fix the parity of the middle-edges too. Similarly, you can count the parity of one type of side-edges and fix an odd parity by a single quarter slice-turn, which would automatically fix the parity of the other type of side-edges too.

I am sure you would agree with me that 1 move is nothing to memorize. Now of course fixing parities right at the beginning and then using commutators all the way may not yield a very efficient algorithm. This is to be expected; after all a generic technique that works for many permutation puzzles (not just the cube) would tend to be less efficient than a specialized solution for a single puzzle.

But we can use the same ideas to get a relatively efficient solution for the n×n×n cube:

  1. Solve all the centres on the L and R face.
  2. Put the centres of the other faces into 1×(n−2) strips.
  3. Align those strips perpendicular to the left-right axis. (*)
  4. Use the freedom to rotate the L-R slices (i.e. between L and R) to put together at least 8 edge groups (each having (n−2) pieces). (After finishing each of those groups, shunt it off to the L or R faces to make space for putting together the next group.)
  5. Now count the edge parities relative to the middle-edges (i.e. consider their desired positions to be where they must be to align with the middle-edges) and fix them all using the L-R slices. (We aim to reduce to a 3×3×3 cube so we can ignore the corner parity and middle-edge parity.) There are only floor(n/2)−1 such (shared) parities, and so we need at most that many quarter slice-turns to fix them all!
  6. Put together 2 more edge groups on the D face using only U2 and sequences of the form X U2 X' for some L-R slice X. These preserve (*) and the parities, and the method is completely intuitive.
  7. Use commutators to put together the 2 remaining edge groups and solve all the centre strips.
  8. We now have essentially a 3×3×3 cube, which you can solve layer by layer intuitively and then fix the final (shared) parity using at most a single quarter turn of the last layer before finishing using commutators.
$\endgroup$
0
$\begingroup$

If you think about how a 5x5 works, and then think about how the fifth layer is hidden, you can discover why the OLL parity exists. Armed with that knowledge I tackle the OLL parity using no extra algs. Using the same tactic I got around the PLL parity, but I recommend just learning the alg for that, just get the two incorrect edges opposite each other (You can use a U-Perm to do this) and do this 6 turn long alg: MR2 U2 MR2 u2 MR2 MU2 and then fix the PLL. I challenge you to figure it out! Note: You only need 1 Algorithm for the OLL parity which you might know, it's the one you use to pair outer edges to inner edges on a 5x5. I'm sure there are other ones but I use r U2 r U2 F2 r F2 l' U2 l U2 r2. Good luck!

$\endgroup$
1
  • 1
    $\begingroup$ Welcome to Puzzling! Thanks for your answer. Here are a couple of things to think about when answering questions: 1) Remember that not everyone may have your level of knowledge of the subject matter, so try not to use too many acronyms or abbreviations. 2) The purpose of posting an answer is to provide a solution to the problem, so don't put challenges in your question. If you want to challenge someone, post your challenge as a question instead (if it fits the posting guidelines). $\endgroup$ Aug 16, 2016 at 2:13
0
$\begingroup$

If you are interested in the shortest OLL parity algorithm(that preserves last layer, though if you do wide moves it doesn't), here it is:

r' U2 l F2 l' F2 r2 U2 r U2 r' U2 F2 r2 F2

And decomposed:

r' [U2:[l,F2] r2] [r,U2] [F2:r2]

And this alg does not preserve the last layer, but can be modified to do parity and OLL together

Rw' U2 Rw U2 Rw U2 Rw2 F2 Rw' U2 Rw' U2 F2 Rw2 F2

And decomposed:

[Rw',U2] [Rw U2 Rw:Rw F2] U2 [F2:Rw2]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.