The 20th Step

Miss Demeanor decides to climb up a flight of 100 stairs. She starts from the floor, and can go up either one or two steps at a time. (She flips a fair coin each time to decide which one). What is the probability that at some point she will land on the 20th step?


Image credit : https://img.freepik.com


The answer is 0.67.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Geoff Pilling
Mar 19, 2019

Clearly there is a 1 2 \frac{1}{2} probability that she will land on step 1.

And there is a 3 4 \frac{3}{4} probability that she will land on step 2, since 3 of the 4 possibilities for the first 2 coin flips {11, 21, and 22} result in her landing on the second step.

After that, for each step, n + 2 n+2 , she can get there two ways, from step n n or from step n + 1 n+1 , each with the same probability.

Therefore, if P n = P_n = the probability that at some point she will land on the n n th step, then:

  • P 1 = 1 2 P_1 = \frac{1}{2}
  • P 2 = 3 4 P_2 = \frac{3}{4}
  • P n + 2 = P n + P n + 1 2 P_{n+2} = \dfrac{P_n + P_{n+1}}{2} for n > 2 n >2

So,

P 20 = 0.67 P_{20} = \boxed{0.67}

... with a general solution for landing on the n n th step of P n = 2 3 + 1 3 × ( 1 2 ) n P_{n} = \dfrac{2}{3} + \dfrac{1}{3} \times \left( - \dfrac{1}{2} \right)^{n} .

Surprised how quickly it goes to 2 / 3 2/3 . Things would get really interesting if Miss Demeanor could also have the option (misfortune?) of taking one step down as well, say a 1 / 2 1/2 chance of taking one step up, a 1 / 4 1/4 chance of taking one step down (unless already on the floor), and a 1 / 4 1/4 chance of taking two steps up.

P.S.. Glad to see you're still up for posting problems. :)

Brian Charlesworth - 2 years, 2 months ago

Log in to reply

Yes Sir.....Even I found out the general sequence and was amazed!! And also, if you convert P n P_n into a single fraction, the numerators, interestingly follow the Jacobsthal Sequence !!!

Aaghaz Mahajan - 2 years, 2 months ago

Hahaha... Thanks! Still holding out hope that Brilliant will return to a community focused model! :)

Geoff Pilling - 2 years, 2 months ago

Log in to reply

I'm hoping that happens too, but I'm not holding my breath. :/

Brian Charlesworth - 2 years, 2 months ago

I guess when she can go up and down the problem becomes a bit more complex... I was also considering a "tetranacci like" problem where she flips a four sided die and has equal probability of going up 1-4 steps at a time... Whats P n P_n ?

Geoff Pilling - 2 years, 2 months ago

Great job, was really frustrated I couldn't find out how to get a formula without having to rely on previous terms. This was really fun to try.

Marcopolo Chan - 2 years, 2 months ago

You haven't really justified your recurrence relationship. If she lands on the nth step, the probability of landing on step (n+2) immediately is (1/2). But that's not the probability of landing on the (n+2)th step ever . This analysis skips over the multiple paths from n to n+2, and also treats the events "lands on nth step" and "lands on (n+1)st step" as disjoint, but they really aren't.
Somehow you've ended up with a recurrence relationship that is algebraically correct, but you haven't give us a justification as to why that's the case.

Richard Desper - 2 years, 2 months ago
Gabriel Chacón
Mar 27, 2019

Here are the details for obtaining the closed form for P n P_n given by @Brian Charlesworth.

We learn from @Geoff Pilling's solution that

  • P 1 = 1 2 P_1=\frac{1}{2}

  • P 2 = 3 4 P_2=\frac{3}{4}

  • P n + 2 = P n + 1 × 1 2 + P n × 1 2 P_{n+2}=P_{n+1}\times \dfrac{1}{2}+P_{n} \times \dfrac{1}{2} for n 2 n \ge 2 \quad or 2 P n + 2 P n + 1 P n = 0 \quad 2P_{n+2}-P_{n+1}-P_{n}=0

For this linear recurrence formula, let's suppose there is a solution for P n P_n of the form x n x^n . We would then have

2 x n + 2 x n + 1 x n = 0 2x^{n+2}-x^{n+1}-x^n=0 , which simplifies to 2 x 2 x 1 = 0 2x^{2}-x-1=0 , with solutions x 1 = 1 x_1=1 and x 2 = 1 2 x_2=-\dfrac{1}{2}

Being the recurrence linear, the general solution takes the form P n = a 1 n + b ( 1 2 ) n P_n=a\cdot 1^n+b \cdot \left(-\dfrac{1}{2}\right)^n .

Knowing that P 1 = 1 2 P_1=\frac{1}{2} and P 2 = 3 4 P_2=\frac{3}{4} , the values for the coefficients are a = 2 3 a=\frac{2}{3} and b = 1 3 b=\frac{1}{3} .

The closed form for the probability of landing at the n n th step is therefore P n = 2 3 + 1 3 ( 1 2 ) n \boxed{P_n=\dfrac{2}{3}+\dfrac{1}{3} \cdot \left(-\dfrac{1}{2}\right)^n} , which rapidly converges to a value of 2 3 \dfrac{2}{3} .

The Jacobsthal Sequence mentioned by @Aaghaz Mahajan arises when we approach the solution through combinatorics. Let's consider all the different ways of landing on the n n th step by going up one or two steps at a time:

  • n n "one's": only one way of doing this with a probability of p 0 = 1 2 n p_0=\dfrac{1}{2^n}

  • one "two" and n 2 n-2 "ones": ( n 1 1 ) \binom{n-1}{1} ways, p 1 = 1 2 n 1 p_1=\dfrac{1}{2^{n-1}} each.

  • two "two's"and and n 4 n-4 "ones": ( n 2 2 ) \binom{n-2}{2} ways, p 2 = 1 2 n 2 p_2=\dfrac{1}{2^{n-2}} each.

\quad \vdots

  • k k "two's"and and n 2 k n-2k "ones": ( n k k ) \binom{n-k}{k} ways, p k = 1 2 n k p_k=\dfrac{1}{2^{n-k}} each.

\quad \vdots

There are two possible ways this sequence ends:

  • n 1 2 \frac{n-1}{2} "two's" and one "one" ( n n odd): ( n 1 2 1 ) \binom{\frac{n-1}{2}}{1} ways, p n 1 2 = 1 2 n 1 2 p_{\frac{n-1}{2}}=\dfrac{1}{2^{\frac{n-1}{2}}} each.

  • n 2 \frac{n}{2} "two's" and zero "ones" ( n n even): ( n 2 0 ) \binom{\frac{n}{2}}{0} ways, p n 2 = 1 2 n 2 p_{\frac{n}{2}}=\dfrac{1}{2^{\frac{n}{2}}} each.

P n P_n is the sum of all these possible cases and it can be expressed as:

P n = 1 2 n k = 0 n 2 2 k ( n k k ) P_n=\dfrac{1}{2^n} \displaystyle \sum_{k=0}^{\lfloor\frac{n}{2}\rfloor} 2^k \binom{n-k}{k}

The Jacobsthal numbers are the result of the summation for the different values of n n :

J n = k = 0 n 2 2 k ( n k k ) = 1 3 ( 2 n + 1 ( 1 ) n + 1 ) J_n=\displaystyle \sum_{k=0}^{\lfloor\frac{n}{2}\rfloor}2^k \binom{n-k}{k}=\frac{1}{3}(2^{n+1}-(-1)^{n+1})\quad ( 1 , 3 , 5 , 11 , 21 , 43 , 85 , 171 , 341 , 687 , 1,3,5,11,21,43,85,171,341,687, \ldots )

Ron Gallagher
Mar 25, 2019

While the other solutions are more elegant, this can also be done with "brute force". One way to get to the twentieth step is to take zero "two steps" and 20 "one steps". The probability of this is (20 choose 0) (.5^20). You can also take one "two step", with 19 "one steps" (with probability (19 choose 1) (.5^19)). All combinations have probability of the form (20 - k choose k)*(.5^(20-k)). You can use Excel to sum all 11 terms to get the required result.

Richard Desper
Mar 25, 2019

Let p n p_{n} be the probability of not stepping on the n n th step. Observe that, to skip the n n th step, Miss Demeanor must step on the ( n 1 ) (n-1) st step, and if she does that, there is a 50-50 chance of skipping the n n th step.
Thus, the recurrence relationship is p n = ( 1 p n 1 ) ( 1 / 2 ) = 1 p n 1 2 p_n = (1 - p_{n-1})*(1/2) = \frac{1 - p_{n-1}}{2} . p n p_n converges to 1 3 \frac{1}{3} , and it's easy to see via direct calculation that, rounded to three digits, p n = 0.333 p_n = 0.333 for n 10 n \geq 10 .
Of course the question asks for the probability of not skipping step 20, and that would be 1 p 20 1-p_{20} , i.e. 0.667 0.667 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...