2

Suppose that $n$ integers are chosen with replacement from the set $\{1,2,3,\cdots, N\}$. What is the probability that they form a non-decreasing sequence, that is, $a_1\leq a_2\leq \cdots \cdots \leq a_n$ where $a_i$ is the $i^{th}$ chosen number?

The answer is $\frac{{N+n-1 \choose n}}{N^n}$, but I can not see why.

  • 1
    Here, check out the following post: https://math.stackexchange.com/questions/1446797/finding-the-number-of-non-decreasing-sequences – Nikhil S Apr 03 '19 at 17:59

1 Answers1

3

This is a classic stars-and-bars argument. Consider the collection of all sequences consisting of $n$ identical * symbols and $N-1$ identical $\vert$ symbols. There is a one-to-one correspondence between such sequences and the set of non-decreasing sequences of length $n$ with symbols $\{1,2,\ldots,N\}$.

How?

Let the "current symbol" be 1. Think of * as denoting "write down the current symbol", and $\vert$ as denoting "increase the current symbol by 1".

So for instance: if $N=5$ and $n=4$, you could have the sequence $*||*|**|$. This would correspond to the sequence $1,3,4,4$.

Since these two sets are in one-to-one correspondence, they have the same size. But, it is easy to count the number of star-and-bar arrangements: out of $N+n-1$ possible locations in the sequence, you need to choose which $n$ are stars.

Nick Peterson
  • 32,430