wAIT IGNORE MY OTHER POST I FOUND THE SOLUTION ONLINE
HAVE FUN MAKING SENSE OF THIS:
(a) Suppose there are 5 students and the starting amounts are: (0, 0, 0, 1, 2). As the game progresses, the amounts of money become: (1,1,1,1,−1) then (0,0,0,0,3) and finally (1, 1, 1, 1, −1) at which point the game ends.
(b) Consider a game with n players that starts with the initial distribution of one player having n − 2 dollars and all the rest having n − 3. After the first turn, the first player will have −1 dollars, thus n − 2 + (n − 3)(n − 1) = n2 − 3n + 1 is not sufficient.
We observe that the only way for a person to end up with negative money is if they were the giver and gave away more money than they had. Suppose instead that the sum of all the money is n2 − 3n + 2. By the pigeonhole principle, at every stage of the game, we must either have at least one student with at least n − 1 dollars or at least two students with exactly n − 2 dollars. In the first case, since the giver is giving one dollar to at most n − 1 people, they will not end the turn with a negative amount of money. Similarly, if there are at least two students with n − 2 dollars, then they will each give one dollar to at most n − 2 students and will not end the turn with a negative amount of money. Thus kn = n2 − 3n + 2.
(c) We observe that it is clearly necessary for m1 +m2 +m3 +m4 +m5 to be a multiple of 5 in order for the students to all have the same amount of money, so we will assume that this is the case. Let m be the average amount of money. We see that if a student ever has exactly m dollars, they will have m dollars for the remainder of the game, since either everyone will have m dollars or there will be someone with more money and someone with less money.
We first consider the following scenarios:
• m1 =m2 =m3 =m4
• m1 =m2 =m3
• m1 =m2 < n3 < n4 = n5 dollars respectively, with n3 = n2 + 1. Since the total amount of money is divisible by 5 we get that n4 = n5 = n2 +2p+2 for some non- negative integer p. If p > 0 then the dollar amounts after the next turn is (n2 +2, n2 + 2, n2+1, n2+2p, n2+2p) and then (n2+2, n2+2, n2+3, n2+2(p−1)+4, n2+2(p−1)+4) which is the same as (q2, q2, q2 +1, q2 +2(p−1)+2, q2 +2(p−1)+2). Thus, eventually we will get to a point where the players have (m−1,m−1,m,m+1,m+1) dollars respectively, and this game will not end with all players having the same amount of money.
• m1 =m2 < k, in which case we will be in the first scenario and the game will end with all players having the same amount of money.
We now seek to reduce all cases to one of the above scenarios. Let us assume WOLOG that m2 −m1 ≤ m5 −m4. This means that on the first m2 −m1 turns, player 5 will have given m2 − m1 dollars to player 1. So after this point the respective dollar amount for the players will be m2, m2, m3, m4, m′5, where m′5 = m5 − m2 + m1.
If m′5 − m4 ≥ 2(m3 − m2) then after the next m3 = m2 turns, the first three players will have the same amount of money so the game ends with all players having the same amount of money.
If k = m′5 − m4 is even then after the next k/2 moves players 4 and 5 will both have m4 dollars and the first two players will have (m1 + m2 + m5 − m4)/2 dollars. This will end with all players having the same amount of money if and only if min(m4 − m3 , m3 − (m1 +m2 +m5 −m4)/2 is even. Note that k is even if and only if m1 +m2 +m4 +m5 is even.
If k is odd, then player 5 will give money to players 1 and 2 until they have only 1 dollar less than player 4. Then player 4 and 5 will take turns giving money to players 1 and 2 until players 1 and 2 have the same amount of money as player 3, or one of players 4 and 5 has the same amount of money as player 3. If player 1 and 2 have the same amount as player 3, the game will end with all players having the same amount of money. This occurs when m5 +m4 −2m3 > 2m3 −m2 −m1. If either 4 or 5 has the same amount has 3, the game will not end with all the players having the same amount of money. Thus, we see the game will end with all players having the same amount of money when m2 − m1 ≤ m5 − m4 and one of the following 3 conditions hold
• m5 − m4 ≥ 2m3 − m2 − m1
• m1 +m2 +m4 +m5 and min(m4 −m3,m3 −(m1 +m2 +m5 −m4)/2) are both even
• m1+m2+m4+m5 is odd and m5+m4−2m3 >2m3−m2−m1
or when m2 − m1 > m5 − m4 and one of the following 3 conditions hold
• m2 − m1 ≥ m5 + m4 − 2m3
• m1 +m2 +m4 +m5 and min(m3 −m2,(m1 −m2 +m4 +m5)/2−m3) are both even
• m1+m2+m4+m5 is odd and 2m3−m2−m1 >m5+m4−2m1.
I have no idea what this is even, but I hope this helps. I wish you luck on whatever the heck you’re doing in maths.
I also dearly hope we never have to do this.
Anyway just copy-and-pasting this gave me the worst headache so I’m just gonna go