Loading [MathJax]/jax/output/HTML-CSS/jax.js

Sunday, November 1, 2020

A Game of Hot Pumpkin, or How I Was Left Holding the Chinese Remainder

In a game of Hot Pumpkin with 61 people, the players count off clockwise upward from 1 to N, eliminating the Nth player and then then beginning again with the player to the left of the most recently eliminated. The integer value of N is mutually agreed upon prior to beginning the game.

I start and say 1, with the first eliminated player sitting 18 spots to my left. Then Ricky starts up the next round and the person 31 spots to her left is eliminated next. Zach both begins and is eliminated in the third round.

Based on the first three eliminations, what is the smallest value of N?

This game sets up as an example of the Chinese remainder theorem, which states that the system of congruences involved in this game, namely N19mod61N32mod60N1mod59, has a single unique solution in Z596061=Z215940.

For any two congruences, Na1modn1 and Na2modn2, with gcd(n1,n2)=1, we can use Euclidean algorithm to calculate the integer solution to m1n1+m2n1=1 that is asserted by B\'{e}zout's identity. From here, we note that N=a1m2n2+a2m1n1modn1n2 is a solution to both congruences.

So in particular, we see that (m1,m2)=(1,1) is a solution to 61m1+60m2=1 and hence N=19(1)60+32161mod6160=812mod3660 is a solution to the first two congruences of our game of Hot Pumpkin.

Continuing onward, we can use the extended Euclidean algorithm to find that the solution to 3660m1+59m2=1 is (m1,m2)=(29,1799). This gives the smallest possible solution to all three congruences as N=812179959+1(29)3660mod366059=86080352mod215940136232.

No comments:

Post a Comment