Growth of the average numbers of peaks for the permutations of $n$ sticks

35 Views Asked by At

There are $n$ sticks of lengths $1$ to $n$ in a row. Upon permuting them randomly, we may calculate the average number of peaks viewed from left. A peak is a stick such that all sticks to its left are shorter than it.

For example, suppose there are $3$ sticks. The permutations and numbers of peaks are:

123 3
132 2
213 2
231 2
312 1
321 1

The total number of peaks is $3+2+2+2+1+1=11$ and there are $6$ permutations, so the average number of peaks is $11/6\approx1.83333$.

The question is: as $n\to\infty$, how does the average number of peaks grow?

I have written a program to calculate the results for small $n$'s, with output shown below:

1 1
2 1.5
3 1.83333
4 2.08333
5 2.28333
6 2.45
7 2.59286
8 2.71786
9 2.82897
10 2.92897
11 3.01988
12 3.10321
13 3.18013

It looks like that the growth is $\sqrt n$ or $\log n$, but I don't know which, do you?