Problem

Source: Russian TST 2016, Day 13 P2

Tags: combinatorics



In a class, there are $n{}$ children of different heights. Denote by $A{}$ the number of ways to arrange them all in a row, numbered $1,2,\ldots,n$ from left to right, so that each person with an odd number is shorter than each of his neighbors. Let $B{}$ be the number of ways to organize $n-1$ badminton games between these children so that everyone plays at most two games with children shorter than himself and at most one game with children taller than himself (the order of the games is not important). Prove that $A = B$.