Game with stones Alice and Bob are playing a game. There is a pile of $2014$
stones. Alice and Bob alternate taking stones from the
pile, with Alice going first. The number of stones Alice
takes must be a power of $2$ (i.e: $1; 2; 4; :::$), and the number
of stones Bob takes must be a power of $4$ (i.e: $1; 4; 16; :::$).
The person who takes the last stone wins. Show that Alice
has a winning strategy.
I saw this problem, but was unable to devise a strategy for Alice to win.  Could I get some help?
Thank you!
 A: Represent the number $2014$ in binary:
$$\color{red}{1}\color{blue}{1}\color{red}{1}\color{blue}{1}\color{red}{1}\color{blue}{0}\color{red}{1}\color{blue}{1}\color{red}{1}\color{blue}{1}\color{red}{0}$$
If the binary representation of the number of remaining stones has a $\color{blue}{1}$ in an odd spot (counting from the right, corresponding to an odd power of two), then Bob cannot win in a single move (since he can only take even powers of two).
Try to show then that every move of Bob's either maintains or creates or reduces the number of $\color{blue}{1}$'s by at most one and that regardless of game position, Alice can always leave 1 or more $\color{blue}{1}$'s at the end of her turn (or end the game).
Since Bob cannot win, Alice must be the winner.

As for an explicit strategy for Alice, if on her turn there are no $\color{red}{1}$'s and only one $\color{blue}{1}$, then end the game by taking the $\color{blue}{1}$. Else, if there are some $\color{red}{1}$'s and no $\color{blue}{1}$'s, then choose to take a power of two corresponding to a $0$, thereby creating at least one  $\color{blue}{1}$.  Else, take any even power of two.
