TITLE: $n$ bugs moving in a line
QUESTION [8 upvotes]: I have a line of $n$ bugs, where no $2$ bugs have the same size. They all move in the same direction. If a bigger bug is behind a smaller bug, it will eat the smaller bug. What is the expectation of the number of bugs left after a long enough time?

I am not sure how to approach this. From $n=1, 2, 3, 4$ I guess the answer might be $$ 2- \frac{1}{n!} $$ but I am not sure if this is correct and how to derive this.
For example, when $n=3$, if my bugs are $a,b,c$, where $a>b>c$, assuming they are moving from left to right, then I have the following $6$ situations.

$a,b,c$ — 1 left
$a,c,b$ — 1 left
$b,c,a$ — 2 left
$b,a,c$ — 2 left 
$c,a,b$ — 2 left
$c,b,a$ — 3 left

then the expectation is 1*2/6+ 2*3/6 + 3*1/6 = 11/6 = 2-1/3!

REPLY [4 votes]: Here's another way to see that the answer is the Harmonic number $H_n=1+{1\over2}+{1\over3}+\cdots+{1\over n}$.
Construct the lineup of bugs starting with the biggest and ending with the smallest by wedging each bug somewhere into the existing lineup.  Each new bug survives if and only if it enters at the back of the line. So the $k$th bug survives with probability $1/k$, there being $k$ positions to place it.   (Note, the total number of lineups is $1\times2\times3\times\cdots\times n=n!$.)