Pick a random number (evenly distributed) between 0 and 1. Continue picking random numbers as long as they keep decreasing; stop picking when you obtain a number that is greater than the previous one you picked. What is the expected number of numbers you pick?
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
This is a non-combinatorial solution. The probability of successfully finding a run of at least length one is ∫01dx1. It's easy to argue that the probability of successfully finding a run of at least length two is ∫01(∫0x2dx1)dx2, and in general ∫01∫0xn⋯∫0x2dx1⋯dxn parameterizing this over x as pn(x)=∫0x∫0xn⋯∫0x2dx1⋯dxn we soon find that p1(x)=x,p2(x)=2x2,p3(x)=3!x3,…,pk(x)=k!xk such that the probability of encountering a run of at least length k is k!1 (by instantiating p at x=1). Let P[X=k] be the probability of encountering a run of exactly length k, then P[X=k]=pk(1)−pk+1(1)=k!1−(k+1)!1=(k+1)!k the generating function of the expected value is then just f(x)=k∑(k+1)!k2xk evaluated at x=1; this is clearly analytic around x=0 and also around x=1, so we can manipulate this series keeping in mind that the OGF of ex=∑kk!xk: f(x)=k∑(k+1)!k2xk=x−1k∑k!(k−1)2xk=x−1(k∑k2k!xk−2k∑(k−1)!xk+k∑k!xk)=x−1(k∑k(k−1)!xk−2xk∑(k−1)!xk−1+ex)=x−1(xk∑(k+1)k!xk−2xex+ex)=xx2−x+1ex where E[X]=f(1)=e
Not sure whether this is correct, but let's try.
The probability that you will get the chance of getting the nth number is (n−1)!1, as you need the previous n−1 numbers to be ordered decreasing and all (n−1)! possible orderings are equally likely. Summing over all n gives the expected number:
n=1∑∞(n−1)!1=e