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

Home > Numbers
Permutations count (Posted on 2015-10-01) Difficulty: 3 of 5
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.

See The Solution Submitted by Ady TZIDON    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Simpler solution | Comment 3 of 10 |
Any permutation of 1..n has some number of local maxima of at least one.  Adding the (n+1) term anywhere in the list cannot reduce the number of maxima.

If there is one local maximum there are exactly two places that keep the number at one: directly before or directly after the previous maximum.

Therefore the number of permutations with a single local maximum doubles with each additional number.

When n=1, there is one local maximum (2^0)
So the formula is 2^(n-1)

  Posted by Jer on 2015-10-02 07:28:14
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information