There can only be one

A unimodal permutation is a permutation with only one local maximum. That is, a unimodal permutation of n n elements, σ 1 , σ 2 , , σ n \sigma_1,\sigma_2,\cdots,\sigma_n , must have σ 1 < σ 2 < < σ k \sigma_1 < \sigma_2 < \cdots < \sigma_k and σ k > σ k + 1 > > σ n \sigma_k > \sigma_{k+1} > \cdots > \sigma_n for some positive integer k n k \le n .

How many unimodal permutations are there of the set { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } \{1,2,3,4,5,6,7,8,9\} ?

(Adapted from Analytic Combinatorics by Philippe Flajolet)


The answer is 256.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Sean Elliott
Jan 7, 2014

Here is the intended solution using a recurrence relation:

Begin with the case of 1 1 element. Obviously the only permutation is { 1 } \{1\} , so there is 1 1 total in this case.

Now I seek to prove that the number of unimodal permutations with n n elements is 2 n 1 2^{n-1} ; we already have the base case of n = 1 n=1 .

Assume we have proven this for n = k n=k ; then, for n = k + 1 n=k+1 , increase every element in n = k n=k by 1 1 and add 1 1 to either the beginning or the end of the new permutation. This establishes a correspondence, so that the number with n = k + 1 n=k+1 is precisely the number with n = k n=k times 2 2 .

So by induction, the value for n n elements is 2 n 1 2^{n-1} , so the answer is 2 9 1 = 256 2^{9-1}=\boxed{256} .

Sorry, there was a typo in the problem making the answer 255 255 . I fixed it now.

Sean Elliott - 7 years, 5 months ago

I ended up getting it but I got it wrong the first time around. I am pretty sure it used to say k < n k < n before it said k n k \leq n and it caused me to miss two cases. Did you edit the question? It might have just been me not reading the question properly, I do that a lot.

Cole Coupland - 7 years, 5 months ago

Log in to reply

Yes, I edited it. Sorry for that mistake!

Sean Elliott - 7 years, 5 months ago

Log in to reply

No problem. I liked the question.

Cole Coupland - 7 years, 5 months ago

Hmm. Would you consider recursion at first glance? I never thought of recursion until now, and it's not too difficult to count directly.

Nice problem!

Michael Tang - 7 years, 5 months ago

Log in to reply

I started by trying small numbers of elements and found a pattern. I think once you've found a pattern induction/recursion is a good method, although maybe it's just personal preference.

Sean Elliott - 7 years, 5 months ago
Patrick Corn
Jan 8, 2014

The number of unimodal permutations on n n elements is 2 n 1 2^{n-1} . Proof: let U n U_n be the set of unimodal permutations on { 1 , , n } \{ 1, \ldots, n \} . (Identify an element of U n U_n with the list σ 1 , , σ n \sigma_1, \ldots, \sigma_n of its images.) Then the map U n + 1 U n U_{n+1} \rightarrow U_n given by removing the largest element is surjective and two-to-one: Clearly removing the largest element preserves unimodality, and every element of U n U_n is the image of exactly two elements of U n + 1 U_{n+1} , because if we try to add n + 1 n+1 to an element of U n U_n to get an element of U n + 1 U_{n+1} , there are exactly two choices that will work: immediately before or after n n .

So U n + 1 = 2 U n |U_{n+1}| = 2|U_n| . The result follows by an easy induction. When n = 9 n = 9 we get 2 9 1 = 256 2^{9-1} = \fbox{256} .

Michael Tang
Jan 8, 2014

Consider a constructive counting approach. In any unimodal permutation of our set, the 9 9 must be the local maximum, since it is the largest number in the set. Say that the 9 9 is at position i , i, where 1 i 9. 1 \le i \le 9. Then there are i 1 i-1 elements to the left of the 9 , 9, and 9 i 9-i elements to the right of the 9. 9. We choose the elements on the left in ( 8 i 1 ) \dbinom{8}{i-1} ways, and then the elements on the right are determined. The crucial step is to note that for every choice of the elements on the left, there is exactly one way to order them (in increasing order), and similarly there is one way to order the elements on the right (in decreasing order), so when 9 9 is at position i , i, there are exactly ( 8 i 1 ) \dbinom{8}{i-1} unimodal permutations.

Thus, the total number of unimodal permutations is given by i = 1 9 ( 8 i 1 ) , \displaystyle\sum_{i=1}^9 \dbinom{8}{i-1}, or, shifting indices, i = 0 8 ( 8 i ) = 2 8 = 256 . \displaystyle\sum_{i=0}^8 \dbinom{8}{i} = 2^8 = \boxed{256}.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...