There are 20 buns with jam and 20 buns with treacle arranged in a row in random order. Alice and Bob take in turn a bun from any end of the row. Alice starts, and wants to finally obtain 10 buns of each type; Bob tries to prevent this. Is it true for any order of the buns that Alice can win no matter what are the actions of Bob?
Alexandr Gribalko
Yes, it is true.
Color the $40$ buns in black and white so that no adjacent buns have the same color.
Since when Alice takes turn, there are even number of buns, the color of the buns at the $2$ ends are different, and since when Bob takes turn, there are odd number of buns, the color of the buns at the $2$ ends are the same, which is different from the color of the last taken bun.
$\therefore$ Alice can always choose which color of bun to take in each round, and Bob can only take a bun of the other color in that round.
WLOG suppose that the number of jam buns in black is not less than that in white.
Let Alice always take a black bun in each round, and Bob can only take a white bun.
Let $f_i:=$ (the number of jam buns taken by Alice) $+$ (the number of untaken jam buns in white) after Alice and Bob finish the $i$-th turn.
By assumption of black and white buns, $f_0\leq10\leq f_{20}$.
Also, in the $i$-th round:
Case 1: Alice takes a jam bun, Bob takes a treacle bun: $f_i=f_{i-1}+1$.
Case 2: Alice takes a treacle bun, Bob takes a jam bun: $f_i=f_{i-1}-1$.
Case 3: Alice and Bob take the same type of buns: $f_i=f_{i-1}$.
We have $|f_i-f_{i-1}|\leq1$.
$\Rightarrow\exists0\leq m\leq20$ s.t. $f_m=10$.
Alice strategy:
Let Alice take a black bun in the first $m$ rounds, and take a white bun in the remaining $20-m$ rounds, and Alice will take exactly $f_m=10$ jam buns, so she will also take exactly $10$ treacle buns.