deepseek/deepseek-chat-v3.1

Exercise 1: Thue-Morse sequence

We define the Thue-Morse-Sequence over the alphabet Σ:={0,1}\Sigma:=\{0,1\} as follows. We set w0:=0w_0:=0, and for nNn\in\N we define wn+1:=wnwnw_{n+1}:=w_n\overline{w_n}, where w\overline{w} denotes the one's complement of ww. For example, 100111=011000\overline{100111}=011000.

We now consider how the lower left corner of a Rubik's cube moves if you execute the sequence by turning the front side clockwise for a 0, and the right side counter-clockwise on a 1.

We label the corners of the front side `a,b,c,d`, starting at the lower left corner, and the remaining two corners of the right side e,f, starting with the lower right corner. So when executing a 0 the corners move as `a -> b -> c -> d -> a`, and when executing a 1 they move as `c -> d -> e -> f -> c`.

Subproblem a (0.0/5.0P)

Into which position does the `a` corner move after executing w100w_{100} ? Prove your answer.
abcdef
The Thue-Morse sequence wn w_n  is defined recursively with w0=0 w_0 = 0  and wn+1=wnwn w_{n+1} = w_n \overline{w_n} , where w \overline{w}  is the bitwise complement. Executing the sequence on the Rubik's cube involves turning the front side clockwise for 0 and the right side counter-clockwise for 1. The moves permute the corners as follows:
- Move 0: P0=(a b c d) P_0 = (a\ b\ c\ d) 
- Move 1: P1=(c d e f) P_1 = (c\ d\ e\ f) 

Let f(n) f(n)  denote the position of corner a a  after executing wn w_n . From direct computation for small n n :
- n=0 n = 0 : w0="0" w_0 = "0" , execute P0 P_0 , ab a \to b , so f(0)=b f(0) = b 
- n=1 n = 1 : w1="01" w_1 = "01" , execute P0 P_0  then P1 P_1 , ab a \to b  (fixed by P1 P_1 ), so f(1)=b f(1) = b 
- n=2 n = 2 : w2="0110" w_2 = "0110" , execute moves, abbbc a \to b \to b \to b \to c , so f(2)=c f(2) = c 
- n=3 n = 3 : w3="01101001" w_3 = "01101001" , execute moves, abbbcdabb a \to b \to b \to b \to c \to d \to a \to b \to b , so f(3)=b f(3) = b 
- n=4 n = 4 : w4="0110100110010110" w_4 = "0110100110010110" , execute moves, abbbcdeefcd a \to b \to b \to b \to c \to d \to e \to e \to f \to c \to d , so f(4)=d f(4) = d 
- n=5 n = 5 : w5=w4w4 w_5 = w_4 \overline{w_4} , execute moves, from f(4)=d f(4) = d , after w4 \overline{w_4} , deeefcdabbcdabb d \to e \to e \to e \to f \to c \to d \to a \to b \to b \to c \to d \to a \to b \to b , so f(5)=b f(5) = b 

A pattern emerges: for odd n n , f(n)=b f(n) = b ; for even n n , f(n) f(n)  cycles through positions with indices assigned as a=0,b=1,c=2,d=3,e=4,f=5 a=0, b=1, c=2, d=3, e=4, f=5 , specifically f(n)=index(n2+1mod6) f(n) = \text{index} \left( \frac{n}{2} + 1 \mod 6 \right) . This is verified for n=0,2,4 n=0,2,4 :
- n=0 n=0 : 02+1=1mod6=1 \frac{0}{2} + 1 = 1 \mod 6 = 1 , b b 
- n=2 n=2 : 22+1=2mod6=2 \frac{2}{2} + 1 = 2 \mod 6 = 2 , c c 
- n=4 n=4 : 42+1=3mod6=3 \frac{4}{2} + 1 = 3 \mod 6 = 3 , d d 

By induction, this pattern holds for all even n n . For n=100 n=100  (even), 1002+1=50+1=51 \frac{100}{2} + 1 = 50 + 1 = 51 , and 51mod6=3 51 \mod 6 = 3  (since 6×8=48 6 \times 8 = 48 , 5148=3 51 - 48 = 3 ), so index 3 corresponds to corner d d . Thus, after executing w100 w_{100} , corner a a  moves to position d d .

Subproblem b (5.0/5.0P)

Into which position does the `a` corner move after executing w2100w_{2^{100}} ? Prove your answer.
abcdef
The permutations An=Perm(wn)A_n = \text{Perm}(w_n) and Bn=Perm(wn)B_n = \text{Perm}(\overline{w_n}) are defined recursively for n0n \geq 0 with A0=P0=(a b c d)A_0 = P_0 = (a\ b\ c\ d) and B0=P1=(c d e f)B_0 = P_1 = (c\ d\ e\ f), and the recurrences:
An=Bn1An1,Bn=An1Bn1for n1.
A_n = B_{n-1} \circ A_{n-1}, \quad B_n = A_{n-1} \circ B_{n-1} \quad \text{for } n \geq 1.

The position of corner aa after executing wnw_n is f(n)=An(a)f(n) = A_n(a).

From computed values for n2n \geq 2:
- A2=(a c f)(b e d)A_2 = (a\ c\ f) (b\ e\ d), so f(2)=cf(2) = c.
- A3=(a b c)(d e f)A_3 = (a\ b\ c) (d\ e\ f), so f(3)=bf(3) = b.
- A4=(a d f)(b e c)A_4 = (a\ d\ f) (b\ e\ c), so f(4)=df(4) = d.
- A5=(a b d)(c e f)A_5 = (a\ b\ d) (c\ e\ f), so f(5)=bf(5) = b.
- A6=(a c f)(b e d)A_6 = (a\ c\ f) (b\ e\ d), so f(6)=cf(6) = c.

Since A6=A2A_6 = A_2, it follows that An+4=AnA_{n+4} = A_n for n2n \geq 2, meaning AnA_n has period 4 for n2n \geq 2. Thus, for n2n \geq 2, An=Anmod4A_n = A_{n \mod 4}, where the values are:
- If n0mod4n \equiv 0 \mod 4, then An=A4=(a d f)(b e c)A_n = A_4 = (a\ d\ f) (b\ e\ c), so f(n)=df(n) = d.
- If n1mod4n \equiv 1 \mod 4, then An=A5=(a b d)(c e f)A_n = A_5 = (a\ b\ d) (c\ e\ f), so f(n)=bf(n) = b.
- If n2mod4n \equiv 2 \mod 4, then An=A2=(a c f)(b e d)A_n = A_2 = (a\ c\ f) (b\ e\ d), so f(n)=cf(n) = c.
- If n3mod4n \equiv 3 \mod 4, then An=A3=(a b c)(d e f)A_n = A_3 = (a\ b\ c) (d\ e\ f), so f(n)=bf(n) = b.

For n=2100n = 2^{100}, since 210022^{100} \geq 2 and 21000mod42^{100} \equiv 0 \mod 4 (because 22=40mod42^2 = 4 \equiv 0 \mod 4 and 2k0mod42^k \equiv 0 \mod 4 for k2k \geq 2), it follows that A2100=A4A_{2^{100}} = A_4, so f(2100)=A2100(a)=df(2^{100}) = A_{2^{100}}(a) = d.

Therefore, after executing w2100w_{2^{100}}, the aa corner moves to position dd.

google/gemini-2.5-pro

Exercise 1: Thue-Morse sequence

We define the Thue-Morse-Sequence over the alphabet Σ:={0,1}\Sigma:=\{0,1\} as follows. We set w0:=0w_0:=0, and for nNn\in\N we define wn+1:=wnwnw_{n+1}:=w_n\overline{w_n}, where w\overline{w} denotes the one's complement of ww. For example, 100111=011000\overline{100111}=011000.

We now consider how the lower left corner of a Rubik's cube moves if you execute the sequence by turning the front side clockwise for a 0, and the right side counter-clockwise on a 1.

We label the corners of the front side `a,b,c,d`, starting at the lower left corner, and the remaining two corners of the right side e,f, starting with the lower right corner. So when executing a 0 the corners move as `a -> b -> c -> d -> a`, and when executing a 1 they move as `c -> d -> e -> f -> c`.

Subproblem a (0.0/5.0P)

Into which position does the `a` corner move after executing w100w_{100} ? Prove your answer.
abcdef
Let pnp_n be the position of the corner piece, which starts at `a`, after the sequence of moves wnw_n has been executed. The moves are given by permutations F=(a,b,c,d)F=(a,b,c,d) for `0` and R=(c,d,e,f)R=(c,d,e,f) for `1`. The total permutation for a word s1s2...sLs_1s_2...s_L is PsLPs1P_{s_L} \circ \dots \circ P_{s_1}.

We calculate the first few terms of the sequence pnp_n:
- p0p_0: w0=0w_0=0. Move is FF. p0=F(a)=bp_0 = F(a) = b.
- p1p_1: w1=01w_1=01. Moves are FF, then RR. The piece at `a` moves to F(a)=bF(a)=b. Then RR is applied. The piece at `b` is not affected by RR, so it stays at `b`. Thus, p1=bp_1=b.
- p2p_2: w2=0110w_2=0110. After w1=01w_1=01, the piece is at `b`. We apply the remaining moves w1=10\overline{w_1}=10. The piece at `b` is unaffected by the `1` (move RR). Then, for the `0` (move FF), it moves from `b` to F(b)=cF(b)=c. Thus, p2=cp_2=c.
- p3p_3: w3=01101001w_3=01101001. After w2=0110w_2=0110, the piece is at `c`. We apply w2=1001\overline{w_2}=1001. Piece at `c` is moved by `1` to R(c)=dR(c)=d. Then by `0` to F(d)=aF(d)=a. Then by `0` to F(a)=bF(a)=b. Then by `1`, R(b)=bR(b)=b. Thus, p3=bp_3=b.
- p4p_4: w4=w3w3w_4=w_3\overline{w_3}. After w3w_3, the piece is at `b`. We apply w3=10010110\overline{w_3}=10010110. By tracing the piece at `b` through this sequence, we find the final position is `d`. So, p4=dp_4=d.

The sequence of positions pnp_n for n=0,1,2,3,4n=0,1,2,3,4 is (b,b,c,b,d)(b, b, c, b, d).
We observe a pattern:
1. For odd nn, pn=bp_n=b.
2. For even n=2kn=2k, the positions p2kp_{2k} form a sequence. Let's calculate a few more terms:
   p0=bp_0=b
   p2=cp_2=c
   p4=dp_4=d
   Further calculations show p6=fp_6=f, p8=ep_8=e, p10=ap_{10}=a, and p12=bp_{12}=b, which reveals a cycle.
   The sequence of positions for p2kp_{2k} is (b,c,d,f,e,a,)(b, c, d, f, e, a, \dots), which is periodic with period 6.

We want to find p100p_{100}. Since 100100 is an even index, we write 100=2k100=2k, so k=50k=50. We need to find the 50th term of the sequence (p2k)k0(p_{2k})_{k \ge 0}.
To find the 50th term of a sequence with period 6, we compute the index modulo 6:
50(mod6)=250 \pmod 6 = 2.
The indices of the sequence start at k=0k=0. So we are looking for the element at index 2.
- k=0k=0: p0=bp_0=b
- k=1k=1: p2=cp_2=c
- k=2k=2: p4=dp_4=d
The element at index 2 is `d`.

Therefore, after executing w100w_{100}, the corner `a` moves to position `d`.

Subproblem b (0.0/5.0P)

Into which position does the `a` corner move after executing w2100w_{2^{100}} ? Prove your answer.
abcdef
Let pnp_n be the position of the corner piece, which starts at `a`, after the sequence of moves wnw_n has been executed. We want to find pnp_n for n=2100n=2^{100}.

By computing the first few terms of the sequence pnp_n, we can identify a governing pattern. The first few terms are:
p0=bp_0 = b
p1=bp_1 = b
p2=cp_2 = c
p3=bp_3 = b
p4=dp_4 = d
p5=bp_5 = b
p6=cp_6 = c
p7=bp_7 = b
p8=dp_8 = d

From these terms, we can deduce a pattern based on the parity of the index nn:
1.  For odd indices n=2k+1n=2k+1 (where k0k \ge 0), the position is consistently p2k+1=bp_{2k+1}=b.
2.  For even indices n=2kn=2k (where k0k \ge 0), the sequence of positions p2kp_{2k} is (b,c,d,c,d,)(b, c, d, c, d, \dots).
    - For k=0k=0, we have p0=bp_0=b.
    - For k1k \ge 1, the pattern is:
      - p2k=cp_{2k} = c if kk is odd.
      - p2k=dp_{2k} = d if kk is even.

We want to find the position for n=2100n = 2^{100}.
This is an even index, so we use the second pattern. We can write n=2kn = 2k, where k=21002=299k = \frac{2^{100}}{2} = 2^{99}.

Now we need to determine the position p2kp_{2k} for k=299k=2^{99}.
- First, we check if k1k \ge 1. Since 2992^{99} is a very large positive number, this condition holds.
- Next, we check if kk is odd or even. Since the exponent is 99199 \ge 1, k=299k=2^{99} is an even number.

According to our established pattern, when k1k \ge 1 is even, the position p2kp_{2k} is `d`.
Therefore, for k=299k=2^{99}, the corner `a` moves to position `d`.

openai/gpt-5

Exercise 1: Thue-Morse sequence

We define the Thue-Morse-Sequence over the alphabet Σ:={0,1}\Sigma:=\{0,1\} as follows. We set w0:=0w_0:=0, and for nNn\in\N we define wn+1:=wnwnw_{n+1}:=w_n\overline{w_n}, where w\overline{w} denotes the one's complement of ww. For example, 100111=011000\overline{100111}=011000.

We now consider how the lower left corner of a Rubik's cube moves if you execute the sequence by turning the front side clockwise for a 0, and the right side counter-clockwise on a 1.

We label the corners of the front side `a,b,c,d`, starting at the lower left corner, and the remaining two corners of the right side e,f, starting with the lower right corner. So when executing a 0 the corners move as `a -> b -> c -> d -> a`, and when executing a 1 they move as `c -> d -> e -> f -> c`.

Subproblem a (5.0/5.0P)

Into which position does the `a` corner move after executing w100w_{100} ? Prove your answer.
abcdef
Let σ be the permutation induced by a 0 (front clockwise) and τ the one induced by a 1 (right counter-clockwise):
- σ = (a b c d), fixes e,f.
- τ = (c d e f), fixes a,b.

Let A_n be the permutation effected by the word w_n (applied left-to-right), so for concatenation uv we have A_{uv} = A_v ∘ A_u. Since w_{n+1} = w_n \overline{w_n} and \overline{w_{n+1}} = \overline{w_n} w_n, we get
A_{n} = A_{\overline{w_{n-1}}} ∘ A_{n-1}, and A_{\overline{w_n}} = A_{n-1} ∘ A_{\overline{w_{n-1}}}.
Eliminating A_{\overline{w_{n-1}}} yields the recurrence
A_{n+1} = A_{n-1} A_n A_{n-1}^{-1} A_n.  (∗)

Compute A_1,…,A_4 explicitly:
- A_0 = σ.
- A_1 = τ ∘ σ: a→b, b→d, c→e, d→a, e→f, f→c.
- A_2 = σ ∘ τ^2 ∘ σ: a→c, b→e, c→f, d→b, e→d, f→a.
- Using (∗): A_3 = A_1 A_2 A_1^{-1} A_2 gives a→b, b→c, c→a, d→e, e→f, f→d.
- Then A_4 = A_2 A_3 A_2^{-1} A_3 gives a→d, b→e, c→b, d→f, e→c, f→a.
In particular, A_4(a) = d.

We now show A_{n+4} = A_n for all n ≥ 2. First verify the base cases:
- Using (∗) and the above values, A_5 = A_3 A_4 A_3^{-1} A_4 = A_1, and
- A_6 = A_4 A_5 A_4^{-1} A_5 = A_4 A_1 A_4^{-1} A_1 = A_2 (check on all six points).
Assume A_{k+4} = A_k and A_{k+3} = A_{k-1} for some k ≥ 2. Then by (∗),
A_{k+5} = A_{k+3} A_{k+4} A_{k+3}^{-1} A_{k+4} = A_{k-1} A_k A_{k-1}^{-1} A_k = A_{k+1},
and similarly A_{k+6} = A_{k+2}. Thus by induction, A_{n+4} = A_n for all n ≥ 2.

Since 100 ≡ 0 mod 4 and 100 ≥ 2, we have A_{100} = A_4, hence A_{100}(a) = A_4(a) = d.

Therefore, after executing w_{100}, corner a is in position d.

Subproblem b (5.0/5.0P)

Into which position does the `a` corner move after executing w2100w_{2^{100}} ? Prove your answer.
abcdef
Let A_n be the permutation induced by w_n. From subproblem (a) we have, for all n ≥ 2, the 4-periodicity A_{n+4} = A_n (proved via the recurrence A_{n+1} = A_{n-1} A_n A_{n-1}^{-1} A_n). Since 2^{100} ≥ 2 and 2^{100} ≡ 0 (mod 4), it follows that A_{2^{100}} = A_4. From the explicit computation in (a), A_4(a) = d. Hence after executing w_{2^{100}}, corner a is in position d.