Problem
Trevor is a drunkard who crashed his car near a cliff on a dark and lonely night. He comes out of the car, but he has lost most of his motor functions and is walking randomly. Let’s assume the cliff to be an infinite one-dimensional straight line, and Trevor takes equal steps in either direction, i.e., towards the cliff and away from it.
If he begins at a distance of 1 step from the cliff’s fall and has an equal probability of taking steps in both directions, then what is the probability that he does not fall into the cliff?
What if the probability is p (towards the cliff), and 1-p (away from the cliff)?
As a reference, you may assume Trevor’s current position to be x = 0, and the cliff to be at x = +1.
Grab a pen and paper and get to calculate Trevor’s fate!
Solution
Let’s see how the problem is stated, the initial position at x = 0, and the cliff is at x = +1. All positions left to the initial position, i.e x = .., -3, -2, -1 are all safe.
Let us begin by observing what are the possible positions after one step. He can either fall off the cliff with probability
p, or take a step further away from it (x = -1) with probability 1-p.
If he was safe after the first step, then in the next step he can reach his original position (x = 0) with probability p or can reach (x = -2) with probability 1-p. If he reaches (x = -2) now, he gets himself to a safer position! We can think of consequent steps and this can turn into a problem that quickly becomes tougher to keep track of.
Confused as to how do we proceed now?
Let’s think of the problem from a different perspective and only focus on the initial position (x = 0). He can actually fall off the cliff in the first instance only or go to some other “safer” positions, and find an unlucky path to fall from there. We can restrict our considerations to the position (x = -1), since in order to reach any other position x < -1, he will have to go through this (x = -1) definitely (unless he can teleport in space).
We are going to ignore some mathematical terminology such as random variables to keep the explanation simple. Math nerds need not take offense.
Let’s assume some variables to simplify our calculations. Here we take
P(0) as the probability of falling off the cliff from a path starting at (x = 0)
P(1) as the probability of falling off the cliff from a path starting at (x = -1)
Now, we can say that either he will fall directly from (x = 0) or he would travel to (x = 1) and then travel a path in which he eventually falls.
This results in the following equation -
Now, consider the situation at (x = -1), he can either directly go to (x = 0) (probability p), or take a long path and come back. Note that he can only fall if he first reaches his original location (x = 0).
So, when we calculate P(-1) we see that he first needs to reach (x = 0) from (x = -1) and then needs to eventually fall from (x = 0) in whichever path he takes. Therefore,
Now for the part of reaching (x = 0) from (x = -1) we may imagine a scenario similar to the previous case, just that the cliff has been replaced by (x = 0) instead of (x = +1) and hence,
Substituting this in the original equation, we can solve:
And using the formula for quadratic equations, we solve to get -
If he walks randomly with equal probability, that is p = 0.5, then with all probability, he will fall off the cliff at some point in time! If you have trouble understanding it, think how sometimes there are streaks of incidents with “bad luck”. Trevor just needs a long enough streak of bad moves to fall off the cliff.
This is based on the concepts of random walks and stochastic processes. This problem is analogous to what happens at casinos! It is not a clever strategy to bet randomly, and irrespective of the betting system, you are going to be broke if you play indefinitely long, even if the system is fair.
Since this is our first blog, we’d love to receive feedback on this article!
gg work <3
Nice one ! Would be an even better experience if equations are nicely formatted with LaTeX.