A Game Of Tokens

A game of tokens is played with the following rules. In each round, the player with the most tokens gives one token to each of the other players and also places one token in the discard pile. The game ends when some player runs out of tokens. Players A, B, and C start with 100, 99, and 98 tokens, respectively. How many rounds will there be in the game?


The answer is 292.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Satyen Nabar
Mar 10, 2014

Look at a set of 3 rounds, where the players have x+1, x, and x-1 tokens. Each of the players will gain two tokens from the others and give away 3 tokens, so overall, each player will lose 1 token.

Therefore, after 97 sets of 3 rounds, or 291 rounds, the players will have 3, 2, and 1 tokens, respectively. After 1 more round, player A will give away his last 3 tokens and the game will stop. Hence round 292.

thanks

James Cho - 7 years, 2 months ago

In the first round, player A A loses three tokens while B B and C C both gain one each... well, B B and C C 's number of tokens don't really matter because it's player A A who ends up having the lowest count of tokens: A A ends up having 97 97 tokens left first, then by B B and then by C C in the succeeding rounds. At the fourth round, A A ends up having 96 96 left first and so on. Thus, it's only A A 's token stock that needs attention in this game as player A A 's would be the first to reach 0 0 tokens after n n rounds.

To find n n , we should notice that from the first round when A A has 97 97 tokens left, after every three rounds, A A loses a net of 1 1 token. Thus the number of rounds needed to end the game would be

n = 1 + 97 × 3 n = 1 + 291 n = 292 \begin{aligned} n &= 1 + 97 \times 3 \\ n &= 1 + 291 \\ n &= \boxed{292} \end{aligned}

>>> stack = [100,99,98];


>>> while (stack[0] or stack[1] or stack[2]):
...     if stack[0] > 0 and stack[1] > 0 and stack[2] > 0:
...             k = stack.index(max(stack))
...             stack[(k+1)%3] += 1
...             stack[(k+2)%3] += 1
...             stack[k] -= 3
...     else: break
...     print stack

even i did it by coding ... but actually its cheating :)

Manish Bhat - 7 years, 2 months ago
Ahmad ErRayes
Mar 23, 2014

Lets start with the terminating condition for this problem

This happens when the players have [3,2,1] then the first player will be bust out of tokens

so that's 1 turn.

before that if we have for example [5,4,3] this means that we would have 3 turns with 5 tokens on one of the players [5,4,3]->[2,5,4]->[3,2,5]->[4,3,2] this goes on for all numbers [N,N-1,N-2] it only doesn't work when N=3 because it is the terminating condition

so this means that the number of turns is ((N-3) * 3) +1

= ((100-3)*3) +1 = 292

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...