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 N≡19mod61N≡32mod60N≡1mod59, has a single unique solution in Z59⋅60⋅61=Z215940.
For any two congruences, N≡a1modn1 and N≡a2modn2, 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+a2m1n1modn1⋅n2 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+32⋅1⋅61mod61⋅60=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=812⋅1799⋅59+1⋅(−29)⋅3660mod3660⋅59=86080352mod215940≡136232.
No comments:
Post a Comment