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

 One-peak sets (Posted on 2018-10-30)
Take a set of n distinct numbers.
How many permutations of this set with exactly one local maximum
are there?

Provide a proof of the formula you've derived.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 not sure I understand | Comment 2 of 4 |
Could "maximum" and "permutation" be specified in the context?

Is the problem:
There is a list of unique numbers and you permute the list and that a "local maximum" means that the maximum has adjacent smaller numbers on _both_ sides, then I think I understand: 1,2,3 has no max, while 1,3,2 does. Then one must keep the max from either end, so there are
n! - 2 x (n-1)! such lists. No?

Ah, now I see! The above is wrong, just as 5 3 1 2 4 has no local maximum, yet 5 1 3 2 4 does. Once the maximum of the n numbers is constrained to an end, one must ask if another number becomes the (only) local maximum, and on and on.

Edited on October 30, 2018, 1:48 pm
 Posted by Steven Lord on 2018-10-30 09:39:12

 Search: Search body:
Forums (0)