IMC / 2022 / Problems / Day 1, P3
IMC 2022 · Day 1 · P3
very hardLet be a prime number. A flea is staying at point 0 of the real line. At each minute, the flea has three possibilities: to stay at its position, or to move by 1 to the left or to the right. After minutes, it wants to be at 0 again. Denote by the number of its strategies to do this (for example, : it may either stay at 0 for the entire time, or go to the left and then to the right, or go to the right and then to the left). Find modulo .
(proposed by Fedor Petrov, St. Petersburg)
Solution 1 of 2 (official)
Hint: Find a recurrence for or use generating functions.
The answer is
for , for , and for .
The case is already considered, let further . For a residue modulo denote by the number of Flea strategies for which she is at position modulo after minutes. Then . The natural recurrence is , where the indices are taken modulo . The idea is that modulo we have and . Indeed, for all strategies for minutes for which not all actions are the same, we may cyclically shift the actions, and so we partition such strategies onto groups by strategies which result with the same . Remaining three strategies correspond to . Thus, if we denote , we get a system of equations , for all . It is not hard to solve this system (using the 3-periodicity, for example). For we get , and for .
Solution 2 of 2 (official)
Note that is the constant term of the Laurent polynomial (the moves to right, to left and staying are in natural correspondence with , and 1.) Thus, working with power series over we get (using the notation for the coefficient of in ) and expanding we get the answer.
How the field did
Score distribution (field cohort)
Computed on contestants with a meaningful total (field cohort); discrimination is the corrected item–total correlation.