Aabzaari and Basharat play a game, alternating turns with Aabzaari going first.

At the start of the game, there are 20 cookies on a red plate and 14 cookies on a blue plate. A legal move consists in

  • eating two cookies taken from the blue plate, or
  • eating two cookies taken from the red plate, or
  • moving one cookie from the red plate to the blue plate

(but moving cookies from the blue plate to the red plate is not allowed). The last player to make a legal move wins the game.

Which player can guarantee that he wins no matter what strategy the opponent chooses?

  • 5
    $\begingroup$ They both lose, eating 16 or 18 cookies in one sitting probably isn't healthy... $\endgroup$
    – aslum
    Commented Feb 22, 2016 at 18:10

3 Answers 3


It seems to me that

Aabzaari always wins, regardless of the moves performed. There are cookies for 17 turns so Aabzaari gets to eat the last two. The third move doesn't consume any cookies and always allows a paired move, so it doesn't affect the parity of the turns.

  • 1
    $\begingroup$ yeah, you're right. Even if Aabzaari actually wanted to let Basharat win it simply isn't possible $\endgroup$
    – Ivo
    Commented Feb 22, 2016 at 15:11
  • $\begingroup$ This is better than Ivo's answer since this is saying that Aabzaari cannot avoid winning. $\endgroup$
    – justhalf
    Commented Jan 22 at 7:06

Aabzaari always can win


Note that, if the third move never was performed you have 17 times that two cookies are removed. Aabzaari has all odd-numbered turn so the 17th turn is Aabzaari's. Now all he has to do is take 2 cookies from either plate unless when Basharat performs the third move, then he also does it. This makes sure that both plates have multiples of two cookies on them all the time and that the game ends after Aabzaari takes the last two cookies.


Info 1:

If an $a,b$ combination loses Aabzari the game then $a+2,b; a,b+2$ and $a+1,b-1$ win, because starting from one of the latter three, Aabzaari can leave Basharat an $a,b$ game.

Info 2:

If $a-2,b ; a,b-2$ and $a-1,b+1$ all lose, $a,b$ wins. If at least one wins, it loses. The reason is, $a,b$ can turn into one of the three with Basharat as the player one.


We can find out that if $a,b$ wins, then $a-1, b+1$ loses and $a+1, b+1$ wins. Also $a,b-2$ loses, $a+2,b-2$ wins and $a+1,b-1$ loses. $0,(20+14)$ wins, because Aabzaari can make the first and last of the 17 moves until the end. Since $a,b$ wins, $a+1,b-1$ loses, $a+2,b-2$ wins and so on, $(0+20),(34-20)$ wins.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.