# Alice and Bob take turns to remove numbers from a list

Alice and Bob play the following game. In the beginning there is list of numbers

$$\{0, 1, 2,\dotsc, 1024\}.$$

Alice starts, and removes 512 numbers of her choice. Bob continues and removes 256 numbers of his choice. Alice continues and removes 128 numbers of her choice, and so on, until only 2 numbers remain. Then Alice pays Bob the difference between the two numbers.

What are the optimal strategies for Alice and for Bob, respectively?

• When finding strategies for games like this, it's often a good idea to either play a smaller game (start with numbers from 0 through 4 or 8), or work backwards (who had last play, what would they want, and how can their opponent stop that when they do their second to last play). Have you tried that? – Arthur Mar 10 at 12:02
• Pretty intuitive to think that Alice should remove numbers from both ends($0, 1024, 1, 1023, \dots$) and Bob should remove numbers from the middle (eg. $512, 513, 511, 514, \dots$) – ab123 Mar 10 at 12:03
• @ab123, to follow your intuitive strategy, Alice may as well remove her half from just one end. But Bob, I think, will do better to remove every other number instead of a consecutive stretch from the middle. – Barry Cipra Mar 10 at 12:34
• @RodrigodeAzevedo $1025 - 512 - 256 - 128 - 64 - 32 -16 - 8 - 4 - 2 - 1 = 2$ – ab123 Mar 10 at 12:43

Given a set $$X$$, let $$A(X)$$ denote the largest distance between any two points in $$X$$ and $$B(X)$$ denote the smallest distance between any two different points in $$X$$. For a two-element set, $$A(X)=B(X)$$. We start with $$A(X)=1024$$ and $$B(X)=1$$. I will show Alice can halve $$A(X)$$ at each of her turns, and Bob can double $$B(X)$$ at each of his turns. Since both players have 5 turns, this means that Alice can ensure that the result is at most 32 and Bob can ensure the result is at least 32.
Given $$X=\{x_0,\dots,x_{n/2},\dots,x_n\}$$ sorted ascending, we have $$A(X)=x_n-x_0 = (x_n - x_{n/2}) + (x_{n/2} - x_0)=A(\{x_{n/2},\dots,x_n\})+A(\{x_0,\dots,x_{n/2}\})$$. At least one of the two summands is $$\leq A(X)/2$$. Therefore, Alice removes all topmost or all bottommost elements on each of her turns, depending on the situation.
Given $$X=\{x_0,x_1,..,x_{n}\}$$, Bob removes $$x_i$$ such that $$i$$ is odd. It's easy to see that this guarantees that $$B(X)$$ is at least doubled.
A slight generalization: in your problem Alice and Bob have the same number of turns. In general, if we start with $$\{0,1,\dots,2^n\}$$ and remove almost-half of remaining elements at every turn, then the optimal payoff will be $$2^k$$ where $$k$$ is the number of turns controlled by Bob and $$n-k$$ the number of turns controlled by Alice; the players don't have to alternate.