Reaching a destination with random steps: is the time $2^x - 1$?

122 Views Asked by At

A game involves a character that begins at a starting position, and wants to reach an end goal $x$ steps away. It takes the character 1 minute to move 1 step towards the goal. If the character is at the starting point, the character will always go 1 step (and take 1 minute). However, at any point beyond that first step, there is a 50% chance that he will take another step (a success, taking 1 more minute) and a 50% chance that he will warp back (a failure) to the starting point (taking no time at all). What is the person's expected time to reach the end point?

Now, I know the answer is $2^x - 1$ minutes. That is, if the character begins 1 step away from the finish, he will always take just 1 minute, if the character begins 2 steps away, the expected time is 3 minutes, and so on.

I am interested in its derivation. The idea is that you have an infinite series, with each individual entry containing the probability of having exactly $1, 2, 3, 4, \dotsc$ failures so on. For instance lets say that $x = 3$ steps away. The probability of 0 warps (failures) is $0.5^2$, and the probability of 1 failure is $.5^3$ (as the first step at the beginning is always successful).

The generalized expected value looks like this infinite series $$x(1/2)^{x - 1} + (x+1)\binom{n}{r}(1/2)^x + (x+2)*\binom{p}{q}(1/2)^{x+1} + \dotsb$$ where $x$ is the number of minutes it takes to reach the end point, and it is multiplied by the probability of taking that many minutes. (I don't know what $n, r, p, q$ are, though they are related to $x$.)

That series supposedly sums to $(^x-1$, but how do you get there? How do you demonstrate that $x(1/2)^{x - 1} + (x+1)\binom{n}{r}(1/2)^x + (x+2)*\binom{p}{q}(1/2)^{x+1} + \dotsb = 2^x - 1$?