All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Permutations count (Posted on 2015-10-01)
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.

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution | Comment 1 of 10
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 n-1 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^(n-1) choices of numbers to precede the n, and therefore the answer is 2^(n-1).

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 2015-10-01 16:02:09

 Search: Search body:
Forums (0)