# Probability Problem Involving e

I thought of the following probability problem, which seems to have an answer of 1/e, and wonder if someone has an idea as to how to prove this.

Suppose a man has a bottle of vitamin pills and wishes to take a half pill per day. He selects a pill from the bottle at random. If it is a whole pill he cuts it in half, takes a half pill, and puts the other half back in the bottle. If it is a half pill, he takes that. He continues this process until the bottle is empty. What is the expected maximum number of half pills in the bottle? If the bottle starts with n pills, and M is the expected maximum number of half pills, then M/n appears to tend to 1/e as n tends to infinity.

-
One thought is generating functions. If you define f(m,n) to be the expected maximum if you start with m whole pills and n half pills, then f(m,n)=(m/n)f(m-1,n+1)+(1-m/n)f(m,n-1), except that when m or n is zero then you have to change the right hand side. Whether that leads to anything useful I don't immediately see. –  gowers May 11 '11 at 15:14
Do you have an idea of the result if the man takes quarters of pills: If a pill is whole, he breaks it into $1/2+1/4+1/4$, eats $1/4$ and puts $1/2$ and $1/4$ back, if it is a half-pill, he eats half of it and puts $1/4$ back if it is a quarter, he eats it. What are then the expected maximum numbers for half-pills and quarter-pills? –  Roland Bacher May 11 '11 at 15:33
Hello Roland. That's a very nice generalization. I'll think about that. ---Martin –  Martin Erickson May 11 '11 at 15:49

-