Boundary value problem- Random Walker

potatocake
Messages
6
Reaction score
1
Homework Statement
A walker performs a random walk on the grid points from 0 to N. Each time he tosses a fair coin, he moves one step forward if it is a head otherwise he moves one step backward. The random walk stops when the walker is at either 0 or N. What is the probability that the walker ends up at 0 given that he begins at i?
Relevant Equations
let the probability of the walker at i point to be P_i , P_0 = 1, P_N =0
I want to solve this using difference equation. So I set up the general equation to be
Pi = 0.5 Pi+1 + 0.5 i-1

I changed it to euler's form pi = z
0.5z2-z+0.5 = 0
z = 1
since z is a repeated real root
I set up general formula
Pn = A(1)n+B(1)n
then
P0 = A = 1
PN = A+BN = 0 -> A= -BN

This gives a general formula
Pn = 1- 1/N *n

However, I have no idea how I can show the probability that the walker ends up at 0 given that he begins at i. would it still be 1?
 
Physics news on Phys.org
You've calculated P_n as the probability that the walker reaches 0 given that he is at position n, even if you didn't acutally define it that way. So you're done.
 
potatocake said:
let the probability of the walker at i point to be P_i , P_0 = 1, P_N =0
You can't define the probability of being at a particular point this way. There will be a probability of being at a particular point given having been at some other specified point some specified number of steps earlier.
Indeed, having set P0 to 1 the probability of being anywhere else must be zero.
Since the problem specifies starting at 1, you can define Pk(n) as the probability of being at n after k steps. Then P0(1)=1, etc.

But a more convenient approach is turn it around and let Pn be the probability of terminating at 0 given that we start at n. That avoids having to specify the number of steps. I think you'll find the algebra largely the same as you wrote.
potatocake said:
since z is a repeated real root
I set up general formula
Pn = A(1)n+B(1)n
I think you left out a factor n on one term.
potatocake said:
This gives a general formula
Pn = 1- 1/N *n
I assume you mean 1-n/N, but that does not give a probability distribution since it does not sum to 1.
 
I assume you mean 1-n/N, but that does not give a probability distribution since it does not sum to 1.

Does that mean my general formula is wrong?

But a more convenient approach is turn it around and let Pn be the probability of terminating at 0 given that we start at n. That avoids having to specify the number of steps. I think you'll find the algebra largely the same as you wrote

Does that mean I have to get
Pn(0) ?
 
potatocake said:
Does that mean my general formula is wrong?
The entire method is wrong, as I indicated:
haruspex said:
You can't define the probability of being at a particular point this way. There will be a probability of being at a particular point given having been at some other specified point some specified number of steps earlier.
That said, I suspect you landed on the right answer by sheer luck. This is why @pasmith thought you had got there.
potatocake said:
Does that mean I have to get
Pn(0) ?
No, I may have confused you by completely redefining P. To avoid confusion I'll reword it:
haruspex said:
a more convenient approach is to turn it around and let Qn be the probability of terminating at 0 given that we start at n.
With this definition, what is the relationship between Qn-1, Qn and Qn+1?
 
Last edited:
haruspex said:
With this definition, what is the relationship between Qn-1, Qn and Qn+1?
I suppose it will form
Qn = 0.5Qn+1+0.5Qn-1 ...?

then will the probability of terminating at 0 given that we start from 0 is
Q0 = 1
and probability of terminating at 0 given that we start from N is
QN = 0.5QN+1 + 0.5QN-1??

Then how would I solve the differential equation? Through iterations? or using Euler's form?
If QN does not give me a constant value, I don't have boundary conditions.
 
potatocake said:
I suppose it will form
Qn = 0.5Qn+1+0.5Qn-1 ...?

then will the probability of terminating at 0 given that we start from 0 is
Q0 = 1
and probability of terminating at 0 given that we start from N is
QN = 0.5QN+1 + 0.5QN-1??

Then how would I solve the differential equation? Through iterations? or using Euler's form?
If QN does not give me a constant value, I don't have boundary conditions.

Q_N is constant: it's zero. That's one of your boundary conditions, the other being Q_0 = 1. You solved this recurrence relation correctly in your original post; your error was to describe P_n as "probability of being at n" rather than "probabilty of reaching 0 given being at n".
 
  • Like
Likes potatocake
Back
Top