MathDB
AN INTRESTING PING PONG CONTEST

Source: Argentina MO 2023 Level 3 P6

March 22, 2024
number theory

Problem Statement

There´s a ping pong tournament with n3n\geq 3 participants that we´ll call 1,2,n1, 2, \dots n. The tournament rules are the following ones: at the start, all the players form a line, ordered from 11 to nn. Players 11 and 22 play the first match. The winner is at the beginning of the line and the loser is placed behind the last person in the line.In the next play, the two who at that moment are the first two in line face each other, the winner is first in line and the loser goes to the end of the line, just behind the last loser. And so on. After NN matches, the tournament ends.Player number 11 won a1a_1 matches, player number 22 won a2a_2, and so on till player nn, that has won ana_n matches (it is trivial that a1+a2++an=N)a_1+a_2+\dots+a_n=N).Determine how many games each player has lost, based on a1,a2,,ana_1, a_2, \dots , a_n