View Single Post
  #3  
Old 04-10-2007, 07:09 PM
f97tosc f97tosc is offline
Senior Member
 
Join Date: Oct 2006
Posts: 120
Default Re: April 2007 IBM Ponder This Challenge

We can reformulate the problem to the question "what is the probability that the frog will not eventually land on 0, assuming it starts from minus infinity?".

Given that the frog is in n, denote the probability that it will eventually reach 0 as P(n).

Then generally

P(n)=0.5P(n-1)+0.5P(n+2)

or equivalently

P(n+3)-2P(n+1)+P(n)=0

This is a difference equation with the characteristic equation

r^3-2r+1=0

This has the solutions (guess the first root, factor it out, and solve for the
others)

r1=1
r2=-1/2 + sqrt(5)/2
r3=-1/2 - sqrt(5)/2

Now P(n)=C1*r1^n + C2*r2^n + C3*r3^n

Where C1, C2, and C3 are constants.

We can determine the constants from edge conditions. However, the edge conditions are different for n>0 and n<0, and so we will consider them separately, starting with n>0.

For n>0, C3 has to be zero, since r3 is negative and has the largest absolute value; otherwise we would evetually get negative probabilities.

Similarly, since |r2|<1, but r1=1 and P(inf)=0, we must have that C1=0. Finally, the edge condition P(0)=1 gives us C2=1.

Hence, for n>0, P(n)= (-1/2+sqrt(5)/2)^n, and specifically, P(1)=-1/2+sqrt(5)/2


Now for n<=1, we have the same characteristic equation, but different edge conditions, and different constants as follows:

P(n)=D1*r1^n + D2*r2^n + D3*r3^n

r1,r2, and r3 are the same as for the n>0 case. Since |r2|<1, the second term would make the probability >1 for sufficiently low n,and so D2=0.

This time we have the edge conditions P(0)=1, and P(1)= -1/2+sqrt(5)/2, which we determined in the n>1 case.

Putting these together we have

P(0)=D1 +D3 =1
P(10= D1 + (-1/2 -sqrt(5)/2)*D3 = -1/2 + sqrt(5)/2.

This is two linear equations for two unknowns, which can be solved for
D1 = 2 sqrt(5)/(3+sqrt(5))

As stated in the beginning, we seek

1-P(-infty)=

=1-D1

=1- 2 sqrt(5)/(3+sqrt(5))

=(7-3sqrt(5))/2 ~= 0.146
Reply With Quote