Anna and Ben are playing with a permutation $p$ of length $2020$, initially $p_i = 2021 - i$ for $1\le i \le 2020$. Anna has power $A$, and Ben has power $B$. Players are moving in turns, with Anna moving first. In his turn player with power $P$ can choose any $P$ elements of the permutation and rearrange them in the way he/she wants. Ben wants to sort the permutation, and Anna wants to not let this happen. Determine if Ben can make sure that the permutation will be sorted (of form $p_i = i$ for $1\le i \le 2020$) in finitely many turns, if a) $A = 1000, B = 1000$ b) $A = 1000, B = 1001$ c) $A = 1000, B = 1002$ Anton Trygub
Problem
Source: IMEO 2020 Problem 4
Tags: IMEO, game, permutations
15.07.2020 21:07
15.07.2020 23:36
19.07.2020 04:15
Solved with eisirrational and goodbear. Switch (Anna, Ben) $\to$ (Alice, Bob) because wtf. For $A = 1000$, I claim Bob wins if and only if $B \geq 1002$. A larger $B$ only helps Bob, so it suffices to show Bob wins for $B = 1002$ and loses for $B = 1001$. Proof of sufficiency. After Alice's turn, Bob resets the $1000$ numbers that Alice rearranged, then swaps two inverted entries of his choice. This decreases the inversion index and displaces at most $1002$ entries. Proof of necessity. Let there be $s$ numbers that are out of place; I claim Alice can always keep $s \geq 2$. To do this, Alice picks $\max(0, 1002-s)$ entries in the right spots and disorders them, so now $s \geq 1002$. Then Bob can fix at most $1001$ of these, changing $s \geq 1$. But $s \neq 1$, so $s \geq 2$ as desired.
13.11.2021 21:10
MS_Kekas wrote: Anna and Ben are playing with a permutation $p$ of length $2020$, initially $p_i = 2021 - i$ for $1\le i \le 2020$. Anna has power $A$, and Ben has power $B$. Players are moving in turns, with Anna moving first. In his turn player with power $P$ can choose any $P$ elements of the permutation and rearrange them in the way he/she wants. Ben wants to sort the permutation, and Anna wants to not let this happen. Determine if Ben can make sure that the permutation will be sorted (of form $p_i = i$ for $1\le i \le 2020$) in finitely many turns, if a) $A = 1000, B = 1000$ b) $A = 1000, B = 1001$ c) $A = 1000, B = 1002$ Anton Trygub Cute Problem! Call an index $i$ non-fancy if $p_i\neq i$ so it is at the correct place. (a)Ana does nothing in the first move and in the second move she just reverses whatever Bob does to the original state and thus Bob cant change the numbers at all,Ana wins (b)The key claim is that at any point after Bob's move the number of non-fancy numbers are $\geq 2$.This is clearly true in the beggining,suppose these are $a,b$ at some point,then in Ana's move she will make 1000 other non-fancy numbers other than these two to get a total of 1002 non-fancy numbers,now Bob can touch atmost 1001 non-fancy numbers at a time thus one of the numbers will be left,but since we have one non-fancy numbers we definitely need another such number because it will displacce the position of some other number hence $\geq 2 $ non-fancy numbers (c)In this cases whatever Ana does Bob mends the 1000 numbers Ana displaces and he can make sure there is an index which is fancy,now in Ana's next move if she doesnt bother to alter the fancy index we got in previous move we are good to go,otherwise if she does then Bob will just change the 1000 numbers back to original and in addition get another fancy index with his next two moves increasing the number of fancy index in any case.Hence Bob will eventually win.$\square$