Skip to main content
OlympiadHQ

Browse · MathNet

Print

IRL_ABooklet

Ireland counting and probability

Problem

Let be an integer and let be a permutation of . For this permutation we say that is a turning point if and For example, for , the permutation has two turning points: and . For fixed , let denote the number of permutations of with exactly one turning point. Find all for which is a perfect square.
Solution
Solution 1. We claim that and that this is a perfect square only when . If there is a unique turning point, then it is either a minimum or maximum. We count the number of permutations where the turning point is a maximum, and so is double this number. As we are interested in the permutations with a single turning point, the permutation must be increasing to the left of the maximum and decreasing to its right. So a permutation with a unique maximum is fully determined by the way the remaining numbers are allocated to the left or the right of the maximum. The maximal value must be . Consider the numbers . These must each be placed either to the left of the turning point or to the right of . There are ways of allocating the numbers between left and right sides, but as a turning point must (according to our definition) be an interior point, we must exclude the 2 cases where all the numbers from 1 to are placed the same side of . This leaves ways of allocating the points between left and right sides. Doubling, it follows that there are permutations with exactly one turning point, either a minimum or a maximum. Now for , is an even number, so is a perfect square, say , if and only if a quarter of that number, namely is a perfect square. If then is a multiple of 4, so and cannot be a perfect square. Therefore, the only where is a perfect square is .

Solution 2. An alternative calculation of considers that if then there are ways to allocate the remaining numbers such that are to the left of and are to the right. The total number of cases for which is a maximum is then The binomial theorem gives The enumeration follows. Finish as in Solution 1.

Solution 3. If a permutation has only one turning point, that point has to be 1 or . There is the same number of permutations in both cases. We find a recurrence relation for : Indeed, let be a permutation on . If has 1 as unique turning point, then we can add either at the beginning or the end to get a permutation with 1 turning point. If has as unique turning point, then we can add either at immediately left or immediately right of to get a permutation with as unique turning point. If is strictly increasing, then add either at the beginning or just left of and if is strictly decreasing, then add either at the end or just right of . These are all possible permutations of with 1 turning point. To prove that is the unique number for which , we first note that , because there are only four permutations of with exactly one turning point, namely Using induction and the recurrence relation we see that for all . Writing we get for all from the recurrence relation for . If is a square for some , must be odd, hence . Since , we have , hence . When , this contradicts , and when this contradicts which holds for .
Final answer
3

Techniques

Counting two waysRecursion, bijectionInduction / smoothingEnumeration with symmetry