Rearrange the digits in ⟨125034⟩ to meet the rules below.
⟨5th 4th 3rd 2nd 1st 0th⟩
✅Match
5th|4th|3rd|0th → 5
4th → a, 1st → b, |a-b|=1
⟨⋯ Perm(2,4,5) ⋯⟩
⟨ ⁵ᵗʰa ²ⁿᵈb ⁰ᵗʰc ⟩, (abc)₁₀ ≤ 341
5th → a, 0th → b, a+b=3+5n
⛔Avoid
⟨⋯ a ⋯ 1 ⋯⟩, a = 0|2|4
#125034_v2.1
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│1st│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
Step 1 │ │ 1 │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
Step 2 │ 3 │ 1 │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
Step 3 │ 3 │ 1 │ │ │ 2 │ │
├───┼───┼───┼───┼───┼───┤
Step 4 │ 3 │ 1 │ │ 4 │ 2 │ │
├───┼───┼───┼───┼───┼───┤
Step 5 │ 3 │ 1 │ 5 │ 4 │ 2 │ │
├───┼───┼───┼───┼───┼───┤
Step 6 │ 3 │ 1 │ 5 │ 4 │ 2 │ 0 │
└───┴───┴───┴───┴───┴───┘
Proof of 2023-10-25 WR
══════════════════════
Notation: if nth -> a, then we write [nth] = a.
(1) We first consider where to place 1. By ⛔「⟨⋯ a ⋯ 1 ⋯⟩, a = 0|2|4」 and ✅【⟨⋯ Perm(2,4,5) ⋯⟩】, we see that 1 is at the left of 0,2,4,5. Hence, 1=[4th] or [5th].
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│1st│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ │ │ ▬ │ ▬ │ ▬ │ ▬ │
└───┴───┴───┴───┴───┴───┘
If 1=[5th], then by ✅【5th → a, 0th → b, a+b=3+5n】, we have [0th]=2:
┌───┬───┬───┬───┬───┬───┐
│ 5▲│4th│3rd│2nd│1st│ 0▲│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ 1 │ │ │ * │ * │ 2 │
└───┴───┴───┴───┴───┴───┘
where by ✅【⟨⋯ Perm(2,4,5) ⋯⟩】, the * indicate the positions of 4,5. But then ✅【5th|4th|3rd|0th → 5】 would never be matched, which is a contradiction.
Therefore, it follows from (1) that 1=[4th], and {0,2,4,5}= {[3th],[2nd],[1st],[0th]}. Accordingly, we have [5th]=3 as well.
┌───┬───┬───┬───┬───┬───┐
│ 5■│ 4■│3rd│2nd│1st│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
Step 1 │ │ 1 │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
Step 2 │ 3 │ 1 │ │ │ │ │
└───┴───┴───┴───┴───┴───┘
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ 2 │ 5 │ 0 │ │ 4 │
└───┴───┴───┴───┴───┴───┘
------------------------------
Now, in view of ✅【4th → a, 1st → b, |a-b|=1】, we have [1st]=0 or 2. It cannot be 0, for otherwise there are no 3 consecutive grids available for matching ✅【⟨⋯ Perm(2,4,5) ⋯⟩】:
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│ 1▲│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ 3 │ 1 │ │ │ 0 │ │
└───┴───┴───┴───┴───┴───┘
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ 2 │ 5 │ │ │ 4 │
└───┴───┴───┴───┴───┴───┘
Therefore, [1st]=2.
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│ 1■│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ 3 │ 1 │ │ │ │ │
├───┼───┼───┼───┼───┼───┤
Step 3 │ 3 │ 1 │ │ │ 2 │ │
└───┴───┴───┴───┴───┴───┘
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ │ 5 │ 0 │ │ 4 │
└───┴───┴───┴───┴───┴───┘
------------------------------
Next, by ✅【5th|4th|3rd|0th → 5】, we have 5=[3th] or [0th]. No matter which holds, by ✅【⟨⋯ Perm(2,4,5) ⋯⟩】 we have [2nd]=4.
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│ 2■│1st│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ 3 │ 1 │ │ │ 2 │ │
├───┼───┼───┼───┼───┼───┤
Step 4 │ 3 │ 1 │ │ 4 │ 2 │ │
└───┴───┴───┴───┴───┴───┘
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ │ 5 │ 0 │ │ │
└───┴───┴───┴───┴───┴───┘
Finally, in view of ✅【⟨ ⁵ᵗʰa ²ⁿᵈb ⁰ᵗʰc ⟩, (abc)₁₀ ≤ 341】, 5 cannot be placed at 0th. As a result, we have
┌───┬───┬───┬───┬───┬───┐
│5th│4th│ 3■│2nd│1st│ 0■│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ 3 │ 1 │ │ 4 │ 2 │ │
├───┼───┼───┼───┼───┼───┤
│ 3 │ 1 │ 5 │ 4 │ 2 │ │
├───┼───┼───┼───┼───┼───┤
Step 6 │ 3 │ 1 │ 5 │ 4 │ 2 │ 0 │
└───┴───┴───┴───┴───┴───┘
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │
└───┴───┴───┴───┴───┴───┘
Q.E.D.
#125034_v2.1