Find the number of permutations of (1,2,3...n) possessing the following feature:
The number n is the only local maximum e.g. 123465, 123564, 654321,
as opposed to 651432, 261354.
All the numbers appearing in the permutation before n must be in ascending sequence and all those appearing after must be in descending sequence. So the only identifying feature of a permutation that counts here is the identity of which integers come before n, which in turn determines which come after.
Any number from 1 to n1 may or may not appear before the n. Those that do not appear before the n appear after it, and in both cases the order is specified: there is only one order that's valid.
There are 2^(n1) choices of numbers to precede the n, and therefore the answer is 2^(n1).
In the examples:
123465: this is the only valid permutation with 1,2,3 and 4 as the ones to precede the 6.
123564: this is the only valid permutation with 1,2,3 and 5 as the ones to precede the 6.
654321: this is the only valid permutation with none of the integers preceding the 6.

Posted by Charlie
on 20151001 16:02:09 