1
$\begingroup$

A game consists of two players and one pile with n beans. In each move, a player can take P^k beans.( P is a prime number and k is an integer. P and k are not fixed. ) The winner is the player who does the last move.

Determine which player has a winning strategy based on n.

I tried using the binary table and the xor function often explained in the standard game where you can take any amount of beans in each move but I can't quite figure out how to apply that solution properly here.

This question came up during my discrete math class during the Game Theory presentation and we are to search for the answer. I would appreciate some help.

$\endgroup$
2
  • $\begingroup$ Are $p$ and $k$ fixed or not? Is $n$ the sum of the piles or are there $n$ beans in each pile? $\endgroup$
    – Favst
    Nov 9 '20 at 1:08
  • $\begingroup$ Sorry for the confusion. I edited the question@Favst $\endgroup$
    – Dojou
    Nov 9 '20 at 1:11
4
$\begingroup$

Hint. Try working up from $n=1$. That's a winning position for the first player, who can take $2^0 = 1$ . What about $n=2,3,4,5,6,\ldots$? ($6$ is the first interesting case.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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