Rearrange the digits in ⟨125034⟩ to meet the rules below.
⟨5th 4th 3rd 2nd 1st 0th⟩
✅Match
5th|3rd|1st → 3
⟨⋯ ? ⋯ 3 ⋯ (?+2)⟩ (?≠3,1)
5th → a, 4th → b, a+b=2
⛔Avoid
{p4, p2, p1} = ? + {0,1,2}
⟨ ²ⁿᵈa ⁰ᵗʰb ⟩, max⟦a,b⟧ = 5
#125034_v2.8
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│1st│0th│▒
╞═══╪═══╪═══╪═══╪═══╪═══╡▒
Step 1 │ │ │ 5 │ │ │ │▒
├───┼───┼───┼───┼───┼───┤▒
Step 2 │ │ │ 5 │ │ 3 │ │▒
├───┼───┼───┼───┼───┼───┤▒
Step 3 │ │ │ 5 │ │ 3 │ 4 │▒
├───┼───┼───┼───┼───┼───┤▒
Step 4 │ │ │ 5 │ 1 │ 3 │ 4 │▒
├───┼───┼───┼───┼───┼───┤▒
Step 5 │ 2 │ │ 5 │ 1 │ 3 │ 4 │▒
├───┼───┼───┼───┼───┼───┤▒
Step 6 │ 2 │ 0 │ 5 │ 1 │ 3 │ 4 │▒
└───┴───┴───┴───┴───┴───┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Proof of 2025-01-21 WR
══════════════════════
Notation: if nth -> a, then we write [nth] = a.
Observe that ✅「5th → a, 4th → b, a+b=2」 implies
(1) {[5th], [4th]} = {0,2}.
On the other hand, to avoid ⛔「⟨ ²ⁿᵈa ⁰ᵗʰb ⟩, max⟦a,b⟧ = 5」, we need
(2) 5 = [5th] | [4th] | [3rd].
Combining this with (1), we get
┌───┬───┬───┬───┬───┬───┐
│5th│4th│ 3■│2nd│1st│0th│▒
╞═══╪═══╪═══╪═══╪═══╪═══╡▒
Step 1 │ │ │ 5 │ │ │ │▒
└───┴───┴───┴───┴───┴───┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │ 2 │ │ 0 │ 3 │ 4 │
└───┴───┴───┴───┴───┴───┘
Then, to match ✅「5th|3rd|1st → 3」, we have 3 = [5th] | [1st]. In view of (1), we have 3 = [1st] actually:
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│ 1■│0th│▒
╞═══╪═══╪═══╪═══╪═══╪═══╡▒
Step 2 │ │ │ 5 │ │ 3 │ │▒
└───┴───┴───┴───┴───┴───┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │ 2 │ │ 0 │ │ 4 │
└───┴───┴───┴───┴───┴───┘
Now, by (1) we have
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│1st│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ ▬ │ ▬ │ 5 │ │ 3 │ │
└───┴───┴───┴───┴───┴───┘
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │ │ │ │ │ 4 │
└───┴───┴───┴───┴───┴───┘
where "▬" are occupied by 0,2. Let us consider the value of [0th]. By ✅「⟨⋯ ? ⋯ 3 ⋯ (?+2)⟩ (?≠3,1)」, it is at least 2. Therefore, it is 4. Accordingly, we get [2nd] = 1 as well:
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│ 2■│1st│ 0■│▒
╞═══╪═══╪═══╪═══╪═══╪═══╡▒
│ │ │ 5 │ │ 3 │ │▒
├───┼───┼───┼───┼───┼───┤▒
Step 3 │ │ │ 5 │ │ 3 │ 4 │▒
├───┼───┼───┼───┼───┼───┤▒
Step 4 │ │ │ 5 │ 1 │ 3 │ 4 │▒
└───┴───┴───┴───┴───┴───┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ 2 │ │ 0 │ │ │
└───┴───┴───┴───┴───┴───┘
Finally, to avoid ⛔「{p4, p2, p1} = ? + {0,1,2}」, we finish by
┌───┬───┬───┬───┬───┬───┐
│ 5■│ 4■│3rd│2nd│1st│0th│▒
╞═══╪═══╪═══╪═══╪═══╪═══╡▒
│ │ │ 5 │ 1 │ 3 │ 4 │▒
├───┼───┼───┼───┼───┼───┤▒
Step 5 │ 2 │ │ 5 │ 1 │ 3 │ 4 │▒
├───┼───┼───┼───┼───┼───┤▒
Step 6 │ 2 │ 0 │ 5 │ 1 │ 3 │ 4 │▒
└───┴───┴───┴───┴───┴───┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ │ │ │ │ │ │
└───┴───┴───┴───┴───┴───┘
Q.E.D.
#125034_v2.8