There are tennis players on a leader board, from rank (highest) to rank (lowest).
Every day, a match is held between a pair of players with adjacent ranks. When the higher rank player wins, nothing happens; otherwise, their ranks are exchanged, and we call that match an overtake by the winning player.
After days, the players find that all of them are back to their initial ranks. They then count the number of overtakes by each player.
Here is an example with players, named from highest to lowest initial rank.
Match
Winner
Loser
Rank after match
Overtake counts
The matches marked with are overtakes.
After days, all players are back to initial ranks with overtake counts .
Let be the number of possible -tuples of overtake counts after days, assuming that all players are back to initial ranks.
You are given and .
Find .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.