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

Generated with cgit - Back to sebastiano.tronto.net