diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-09-06 22:27:20 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-09-06 22:27:20 +0200 |
| commit | 00fd6a40601cd5a859127c618f4888fad76467c4 (patch) | |
| tree | 040fc1de0f9cfe2a9e33b4279e24cb95c81c5a58 /src | |
| parent | 3427e79d572df0ece1fb4256fab5148da96ca25b (diff) | |
| download | sebastiano.tronto.net-00fd6a40601cd5a859127c618f4888fad76467c4.tar.gz sebastiano.tronto.net-00fd6a40601cd5a859127c618f4888fad76467c4.zip | |
Added fmc slice theory stuff
Diffstat (limited to 'src')
| -rw-r--r-- | src/speedcubing/slice-theory/slice-theory.md | 315 |
1 files changed, 315 insertions, 0 deletions
diff --git a/src/speedcubing/slice-theory/slice-theory.md b/src/speedcubing/slice-theory/slice-theory.md new file mode 100644 index 0000000..784f5d7 --- /dev/null +++ b/src/speedcubing/slice-theory/slice-theory.md | |||
| @@ -0,0 +1,315 @@ | |||
| 1 | # Optimizing solutions: n-slice insertions | ||
| 2 | |||
| 3 | ## tl;dr | ||
| 4 | |||
| 5 | You can insert 3 slices in one of the following ways: | ||
| 6 | |||
| 7 | * `E (I) E (I or D) E2` | ||
| 8 | * `E (I) E2 (I) E` | ||
| 9 | * `E (D) E2 (D) E` | ||
| 10 | |||
| 11 | Where `(I)` denotes a "neutral" sequence like `R2 R2` or `R2 F2 L2` | ||
| 12 | and `(D)` denotes a "diagonal swap" sequence like `R2 F2 R2`. The list | ||
| 13 | above is complete up to inverses and mirrors. | ||
| 14 | |||
| 15 | ## Setting | ||
| 16 | |||
| 17 | The problem is this: say you have a DR finish on U/D that contains some | ||
| 18 | "sliceable" sequences, such as `U D'`, `U2 D`, `U D` or similar. To be | ||
| 19 | more precise, a sliceable sequence is a sequence of moves that would | ||
| 20 | cancel out on a 2x3x3 cube. | ||
| 21 | |||
| 22 | *(I will not address the problem of having a DR finish minus slice | ||
| 23 | and inserting E-moves to solve the slice, because it can be reduced | ||
| 24 | to the "solved slice" case by solving the slice sub-optimally with | ||
| 25 | any insertion.)* | ||
| 26 | |||
| 27 | Sliceable sequences can often be simplified also in a 3x3x3 cube. One | ||
| 28 | way to do this is to insert E-layer moves at different points of the | ||
| 29 | solution in such a way that the effect on the E-layer cancels out. It | ||
| 30 | has been known since the early days of DR (2019) how to insert two moves | ||
| 31 | that cancel out (`E` and `E'`, or `E2` and `E2`) without affecting the | ||
| 32 | E-layer edges even without looking at a cube. *(I believe the first person | ||
| 33 | to come up with a way to do this was Wen, but correct me if I am wrong.)* | ||
| 34 | |||
| 35 | I will call insertions of multiple E-layer moves n-slice insertions. | ||
| 36 | I will start this post with some necessary preliminaries, and then I'll | ||
| 37 | recall how to find 2-slice insertions without looking at the cube. Then | ||
| 38 | I will move explain how to do 3-slice insertions in a similar way, and I | ||
| 39 | will prove that there is no other way to do 3-slice insertions. Finally, | ||
| 40 | I'll leave here some considerations I have made for more complex cases, | ||
| 41 | hoping that this will help us develop a general theory to perform any | ||
| 42 | kind of n-slice insertion quickly and without looking at a cube. | ||
| 43 | |||
| 44 | ## Preliminaries: floppy and "minidisc" sequences | ||
| 45 | |||
| 46 | To insert slices, we have to understand how sequences of DR moves affect | ||
| 47 | the edges of the E-layer. For this purpose, we can ignore any `U*` or | ||
| 48 | `D*` move, hence we have to study move sequences in the floppy cube | ||
| 49 | subgroup <R2, L2, F2, B2>. | ||
| 50 | |||
| 51 | There are two kinds of sequences that are particularly important: those | ||
| 52 | that, up to `y` rotations, do not affect the E-layer (we'll call these | ||
| 53 | sequences *I-sequences*, where I stands for "Identity") and those that, | ||
| 54 | up to `y` rotations, perform a single diagonal swaps (*D-sequences*). | ||
| 55 | |||
| 56 | Some examples of I-sequences: | ||
| 57 | |||
| 58 | * `R2 F2 F2 R2` (all moves "cancel out") | ||
| 59 | * `R2 F2 L2` (equivalent to y', E-edges stay in the same relative position) | ||
| 60 | * `R2 F2 R2 L2 B2 L2` (two D-sequences in a row always give an I-sequence) | ||
| 61 | |||
| 62 | Some examples of D-sequences: | ||
| 63 | |||
| 64 | * `F2 B2` | ||
| 65 | * `R2 F2 R2` | ||
| 66 | |||
| 67 | Considering only the effect of a floppy sequence on the E-layer | ||
| 68 | edges up to y rotations, there are only 6 possible types of sequences. | ||
| 69 | They are equivalent to the possible permutations of a 2x2x1 cube | ||
| 70 | (or "minidisc" cube, name that I have just made up) that keep one | ||
| 71 | corner (say BL) fixed: | ||
| 72 | |||
| 73 | * `(no moves)` I-sequences | ||
| 74 | * `R2` | ||
| 75 | * `R2 F2` | ||
| 76 | * `R2 F2 R2` D-sequences | ||
| 77 | * `F2 R2` | ||
| 78 | * `F2` | ||
| 79 | |||
| 80 | This fact will come into play later on. | ||
| 81 | |||
| 82 | ## 2-slice insertions | ||
| 83 | |||
| 84 | As I said at the beginning, it has been known for a while how to | ||
| 85 | do 2-slice insertions (`E E'` or `E2 E2`) without affecting the E-layer | ||
| 86 | edges. The trick is the following: | ||
| 87 | |||
| 88 | * For `E E'` insertions, insert either `E` or `E'` wherever you want | ||
| 89 | (usually in a "sliceable" place, i.e. right before/after a `U* D*` | ||
| 90 | pair of moves) and insert the other slice (either `E'` or `E`) in a | ||
| 91 | spot such that the moves between the two insertions form an I-sequence. | ||
| 92 | * For `E2 E2` insertions, insert the first `E2` wherever you want, and | ||
| 93 | the second `E2` in a spot such that the moves between the two | ||
| 94 | insertions form either an I-sequence or a D-sequence. | ||
| 95 | |||
| 96 | There is no other way of inserting two slices so that they cancel out. | ||
| 97 | |||
| 98 | ### Examples | ||
| 99 | |||
| 100 | For our first example, say you have a DR finish like this: | ||
| 101 | |||
| 102 | ``` | ||
| 103 | Setup: R2 D R2 D' U' R2 U R2 U' B2 L2 | ||
| 104 | |||
| 105 | Solution: | ||
| 106 | L2 B2 U //Blocks + OBL | ||
| 107 | R2 U' R2 U D R2 D' R2 //J+J perm | ||
| 108 | ``` | ||
| 109 | |||
| 110 | Ideally, you would like to "slice away" the `U D` in the second step. | ||
| 111 | You can insert there either an `E` or an `E'`, in either case one you save | ||
| 112 | one move. Where can you insert the second slice move? We can see that the | ||
| 113 | three moves before `U D` are an I-sequence, and placing an `E'` before | ||
| 114 | them would cancel out the `U` ending the first step. Here only an `E'` | ||
| 115 | can be inserted, so we'll have to use `E` in the other spot. So we have: | ||
| 116 | |||
| 117 | ``` | ||
| 118 | L2 B2 U [2] | ||
| 119 | R2 U' R2 U D [1] R2 D' R2 | ||
| 120 | [1] = E | ||
| 121 | [2] = E' | ||
| 122 | ``` | ||
| 123 | |||
| 124 | Giving a final solution: `L2 B2 D B2 U' B2 U2 R2 D' R2`. | ||
| 125 | One move saved! | ||
| 126 | |||
| 127 | *(I like to number my insertions in the order I found them, hence the | ||
| 128 | [2] before the [1] in this case.)* | ||
| 129 | |||
| 130 | For our second example, take the double edge swap `(UF DF) (UL DR)`: | ||
| 131 | |||
| 132 | ``` | ||
| 133 | R2 F2 R2 U2 F2 R2 F2 U2 | ||
| 134 | ``` | ||
| 135 | |||
| 136 | You can turn the two `U2` moves into `Uw2` and you get an equivalent alg. | ||
| 137 | This is equivalent to the following two-slice insertion: | ||
| 138 | |||
| 139 | ``` | ||
| 140 | R2 F2 R2 U2 [1] F2 R2 F2 [2] U2 | ||
| 141 | [1] = [2] = E2 | ||
| 142 | ``` | ||
| 143 | |||
| 144 | Notice that the two slices are separated by a D-sequence. | ||
| 145 | |||
| 146 | Less intuitively, you can also change some of the other moves to | ||
| 147 | their wide counterpart: | ||
| 148 | |||
| 149 | ``` | ||
| 150 | R2 [1] F2 R2 U2 F2 [2] R2 F2 U2 | ||
| 151 | [1] = [2] = M2 | ||
| 152 | ``` | ||
| 153 | |||
| 154 | or | ||
| 155 | |||
| 156 | ``` | ||
| 157 | R2 F2 [1] R2 U2 F2 R2 [2] F2 U2 | ||
| 158 | [1] = [2] = S2 | ||
| 159 | ``` | ||
| 160 | |||
| 161 | This trick is useful for maximizing cancellations with edge insertions, | ||
| 162 | without memorizing many variations of the same alg. | ||
| 163 | |||
| 164 | ## 3-slice insertions | ||
| 165 | |||
| 166 | Up to inverses and mirrors, there are only two possible types of 3-slice | ||
| 167 | insertions: `E E E2` and `E E2 E`. Both consist of two `E` moves (or two | ||
| 168 | `E'` moves) and one `E2` move. | ||
| 169 | |||
| 170 | To understand how to find spots to insert them, we are going to think | ||
| 171 | about them as if we are inserting two `E` moves in the same direction, | ||
| 172 | and then fixing the slice by inserting an `E2`. This works for both | ||
| 173 | types of 3-slice insertions. | ||
| 174 | |||
| 175 | The first question we want to ask is then: where can we insert two | ||
| 176 | `E` moves so that the result can be fixed by a single `E2` insertion? | ||
| 177 | An `E2` insertion necessarily performs a double swap of edges, so our | ||
| 178 | two `E` insertion must leave such a case. (We are ignoring centers, | ||
| 179 | because we already now they will be solved at the end of our process if | ||
| 180 | we insert two `E` moves in the same direction and one `E2` move.) | ||
| 181 | |||
| 182 | The answer is: the moves between the two `E` moves must form an | ||
| 183 | I-sequence. Indeed, since an I-sequence does not affect the relative | ||
| 184 | position of E-layer edges, two `E` moves separated by an I-sequence | ||
| 185 | have the same effect as an `E2` move, that is a double edge swap (up to | ||
| 186 | `y` rotations). | ||
| 187 | |||
| 188 | This already tells us something useful: in those cases where we | ||
| 189 | would like to insert two slices `E E'`, but we find an admissible | ||
| 190 | spot for the second slice that would cancel more if we inserted the | ||
| 191 | inverse move, we can the inverse move and hope to find a suitable | ||
| 192 | spot to "correct" the insertions with an `E2`. We'll see in a minute | ||
| 193 | where we can insert the `E2`, now let's prove that this is the only | ||
| 194 | way to perform 3-slice insertions. | ||
| 195 | |||
| 196 | We can check that this is the only admissible way to insert the two | ||
| 197 | `E` moves by going through all other "minidisc sequences" listed in | ||
| 198 | the previous section, and checking that E (minidisc sequence) `E` | ||
| 199 | does not yield, up to a `y` rotation, a double edge swap. | ||
| 200 | |||
| 201 | Up to a `y` rotation: | ||
| 202 | |||
| 203 | * `E R2 E` is a single edge swap (`y2 F2` solves the slice) | ||
| 204 | * `E R2 F2 E` is a 3-cycle (`y2 [E, F2]` solves the slice) | ||
| 205 | * `E R2 F2 R2 E` is a single edge swap (`y2 [R2: B2]` solves the slice) | ||
| 206 | * `E F2 R2 E` is a 3-cycle (`y2 [E', L2]` solves the slice) | ||
| 207 | * `E F2 E` is a single edge swap (`y2 L2` solves the slice) | ||
| 208 | |||
| 209 | So, where can we insert the final `E2`? This is easy: the moves between | ||
| 210 | the `E2` and any of the two `E` moves must be either an I-sequence | ||
| 211 | or a D-sequence. This can be proved with the same reasoning we used a | ||
| 212 | few paragraphs above when we said that two `E` moves separated by an | ||
| 213 | I-sequence have the same effect as an `E2`, combined with the knowledge | ||
| 214 | on 2-slice insertions of type `E2 E2`. | ||
| 215 | |||
| 216 | This gives us 4 possible "patterns" for 3-slice insertions, up to | ||
| 217 | inverses and mirrors: | ||
| 218 | |||
| 219 | * `E (I) E (I) E2` | ||
| 220 | * `E (I) E (D) E2` | ||
| 221 | * `E (I) E2 (I) E` | ||
| 222 | * `E (D) E2 (D) E` | ||
| 223 | |||
| 224 | Where (I) and (D) denote I- and D-sequences, respectively. | ||
| 225 | |||
| 226 | ### Examples | ||
| 227 | |||
| 228 | Let's take this example: | ||
| 229 | |||
| 230 | ``` | ||
| 231 | Setup: L2 F2 L2 D' L2 D R2 D B2 U' | ||
| 232 | Solution: | ||
| 233 | U B2 U' B2 D' F2 U //HTR | ||
| 234 | U D' B2 L2 B2 U' D // Finish, one move cancel | ||
| 235 | ``` | ||
| 236 | |||
| 237 | *(The second step could be replace by `U' D F2 R2 F2 U D'` for one less | ||
| 238 | move, and then you could use a 2-slice insertion, but please let me use | ||
| 239 | this artificial example for now.)* | ||
| 240 | |||
| 241 | The DR finish is then: `U B2 U' B2 D' F2 U2 D' B2 L2 B2 U' D` | ||
| 242 | |||
| 243 | We would like to slice away the `U2 D'` and the `U' D` at the end, but | ||
| 244 | they are separated by a D-sequence, and an `E2 E2` insertion would not | ||
| 245 | work here. But fear not, for we can use 3-slice insertions: | ||
| 246 | |||
| 247 | ``` | ||
| 248 | U B2 U' [3] B2 D' F2 U2 D' [2] B2 L2 B2 [1] U' D | ||
| 249 | [1] = E | ||
| 250 | [2] = E2 | ||
| 251 | [3] = E | ||
| 252 | ``` | ||
| 253 | |||
| 254 | In this case rather than inserting the two `E` moves first and then adjust | ||
| 255 | with an `E2` it makes more sense to insert and `E` and an `E2` and then fix | ||
| 256 | with another `E`, for maximum cancellation. This is reflected in the order | ||
| 257 | I wrote the insertions. | ||
| 258 | |||
| 259 | I would like to add more examples here, but I have yet to use 3-slice | ||
| 260 | insertions in an actual FMC attempt. | ||
| 261 | |||
| 262 | ## General n-slice insertions | ||
| 263 | |||
| 264 | I have not been able to devise a general method for n-slice insertions, | ||
| 265 | but I have some ideas on how to work in this direction. This section | ||
| 266 | contains only speculations, if you are only interested in learning | ||
| 267 | new techniques that you can apply to your solves you do not have | ||
| 268 | to read it. | ||
| 269 | |||
| 270 | First of all, it could be worth considering only what we can call | ||
| 271 | *fundamental* slice sequences, i.e. those having no contiguous | ||
| 272 | sub-sequence that keeps centers solved. For example `E E E2` is | ||
| 273 | fundamental, but `E2 E' E E2` is not (the `E' E` subsequence keeps | ||
| 274 | centers solved) and neither is `E E' E E2 E` (both the `E E'` at the | ||
| 275 | beginning and the `E' E` starting on move 2, as well as the ending | ||
| 276 | `E E2 E`, are sub-sequences that do not affect centers). | ||
| 277 | |||
| 278 | The idea behind this is that we can perform a non-fundamental | ||
| 279 | slice insertion in two or more passes, by inserting the shorter | ||
| 280 | subsequences first. Unfortunately, this is not as simple: for example, | ||
| 281 | the non-fundamental sequence `E E' E E'` could be such that the first | ||
| 282 | `E E'` pair leaves a 3-cycle that is subsequently fixed by the other | ||
| 283 | `E E'` pair. Nevertheless, decomposing a sequence into fundamental | ||
| 284 | subsequences can have its use. | ||
| 285 | |||
| 286 | Classifying all fundamental sequences is actually very easy: up to | ||
| 287 | inverses and mirrors, this is the full list: | ||
| 288 | |||
| 289 | * `E E'` | ||
| 290 | * `E2 E2` | ||
| 291 | * `E E2 E` | ||
| 292 | * `E E E2` | ||
| 293 | * `E E E E` | ||
| 294 | * `E2 E E2 E'` | ||
| 295 | |||
| 296 | The fact that there are no fundamental sequences longer than 4 moves | ||
| 297 | is a consequence of the following theorem (warning: Math ahead, | ||
| 298 | caution advised): | ||
| 299 | |||
| 300 | **Theorem**. Let n and k be positive integers. If a sequence of k | ||
| 301 | elements of Z/nZ has sum 0 and it has no non-trivial (contiguous) | ||
| 302 | subsequence with sum 0, then k <= n. | ||
| 303 | |||
| 304 | *Clarification: non-trivial means that it contains at least one element | ||
| 305 | and it is not the whole sequence.* | ||
| 306 | |||
| 307 | **Proof** (thanks to Chiara for the nice proof). the Theorem can be | ||
| 308 | re-stated as follows: any sequence of n elements of Z/nZ has a | ||
| 309 | subsequence whose sum is 0. To prove this equivalent statement, | ||
| 310 | let, for l=1 to k, s_l = a_1 + ... + a_l. If s_i=0 for any i, we | ||
| 311 | are done. Otherwise by the pigeonhole principle there must be s_i | ||
| 312 | and s_j with s_i = s_j and, say, i < j. But then the subsequence | ||
| 313 | a_(i+1), ..., a_j has sum s_j - s_i = 0. This proves the claim. | ||
| 314 | |||
| 315 | More work needs to be done here. | ||
