You are on the 3rd/top floor of a building and you wish to ride the elevator to the 0th/ground floor. Unfortunately the elevator is dodgy. You enter the lift and the doors behind you close. The lift then proceeds to:
Move up 1 floor.
Move down 1 floor.
Shake violently and then Open the doors.
Each movement lasts 10 seconds and at each floor each possible movement occurs with equal probability. (e.g. the first operation is either the opening of the lift, or moving down 1 floor, each with probability 0.5).
Let P be the probability that the first time the doors open you are on the ground floor.
The doors end up opening first on the ground floor.
Let E be the expected amount of time taken in minutes.
If P = b a for coprime a , b , and E = d c for coprime c , d .
Find a + b + c + d .
Also see Dodgy Lift 1
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.
I've been looking myself, but haven't been able to find a general form for a lift that goes up to the n t h floor, for the probability part. I have a general form for the expected value, but I don't have a proof. Fancy helping me looking into this?
Log in to reply
Suppose we have N + 1 floors labelled 0 , 1 , 2 , . . . , N . Let p n be the probability that the doors open on the ground floor ( 0 th floor), given that the lift is currently at the n th floor, and the doors are still shut. Then we have the recurrence relation p j = 3 1 ( p j − 1 + p j + 1 ) 1 ≤ j ≤ N − 1 together with the boundary conditions p 0 = 2 1 + 2 1 p 1 p N = 2 1 p N − 1 This is an easy enough recurrence relation to solve. What is nice is that we can then use Binet's Formula to deduce that p j = F 2 N + 2 F 2 N − 2 j + 1 0 ≤ j ≤ N In particular we have P = p N = F 2 N + 2 1 which matches the results of your two questions ( 8 1 when N = 2 , and 2 1 1 when N = 3 ). I haven't worked it through yet, but I expect that we should be able to calculate E by calculating the expected first hitting time of a Markov chain.
Log in to reply
Oh nice!
I tried to do it with hitting times, but I couldn't modify to work for the a problem with multiple sinks.
I believe I got that E ( N ) = 3 4 ( N + 1 ) , which seems to hint that there should be a nice solution.
Log in to reply
@Alex Burgess – I am afraid I do not agree with your formula of 3 4 ( N + 1 ) . It works for N = 1 , 2 , 3 , but not beyond.
Let X be the number of lift operations until the door opens, and let G be the even that the door opens at the ground floor. Let T 0 be the starting floor of the lift, and define Q k , j = P [ ( X = k ) ∩ G ∣ T 0 = j ] k ≥ 1 , 0 ≤ j ≤ N Note that k ≥ 1 ∑ Q k , j = P [ G ∣ T 0 = j ] = p j 0 ≤ j ≤ N Conditional probability thoughts tell us that Q 1 , j = 2 1 δ j , 0 for 0 ≤ j ≤ N , while Q k , j = ⎩ ⎨ ⎧ 3 1 [ Q k − 1 , j + 1 + Q k − 1 , j − 1 ] 2 1 Q k − 1 , 1 2 1 Q k − 1 , N − 1 1 ≤ j ≤ N − 1 j = 0 j = N for k ≥ 2 . If we define E j = k = 1 ∑ ∞ k Q k , j 0 ≤ j ≤ N then it follows from the above that E j = 3 1 ( E j + 1 + E j − 1 ) + p j 1 ≤ j ≤ N − 1 while E 0 = 2 1 E 1 + p 0 E n = 2 1 E N − 1 + p N The general solution of the recurrence relation E j = 3 1 ( E j + 1 + E j − 1 ) + p j 1 ≤ j ≤ N − 1 is E j = 5 F 2 N + 2 3 j L 2 N − 2 j + 1 + α L 2 N − 2 j + 1 + β F 2 N − 2 j + 1 0 ≤ j ≤ N for some constants α , β (using the Fibonacci numbers and the Lucas numbers). To ensure that E N = 2 1 E N − 1 + p N we require that α = 5 F 2 n + 2 1 − 3 N To additionally ensure that E 0 = 2 1 E 1 + p 0 we require β = 5 F 2 N + 2 2 3 N L 2 N + 2 + 4 L 2 N + 1 which leads to the result E = E [ X ∣ G ∩ ( T 0 = N ) ] = p N E N = 5 F 2 N + 2 3 N L 2 N + 2 + 4 L 2 N + 1 + F 2 N + 2 which agrees with the expression 3 4 ( N + 1 ) for N = 1 , 2 , 3 , but not thereafter.
Log in to reply
@Mark Hennings – Thanks. I had only run some simulations up to N = 1 0 , but was only able to run it about 1 0 9 times, so with the p N being so small, the results seemed to vary quite a bit, so I had assumed the formula based on the first 3 following the pattern. At N = 1 0 it only differed by 0 . 0 6 which was beyond the accuracy of the program.
I was trying to convince myself that E j = 3 1 ( E j + 1 + E j − 1 ) + p j made intuitive sense yesterday, but didn't get any further.
How did you get to the general solution? I worked through the first one with p j , and whilst it wasn't particularly hard, it was rather long with the method I was using, even when using ϕ 2 a n d ϕ − 2 .
That seems than even crazier solution than F N popping up in the probabilities.
Log in to reply
@Alex Burgess – To obtain the recurrence relations, note that, for 1 ≤ j ≤ N − 1 , E j = k ≥ 1 ∑ k Q k , j = k ≥ 2 ∑ k Q k , j = k ≥ 2 ∑ 3 1 k [ Q k − 1 , j + 1 + Q k − 1 , j − 1 ] = 3 1 k ≥ 1 ∑ ( k + 1 ) [ Q k , j + 1 + Q k , j − 1 ] = 3 1 ( E j + 1 + E j − 1 ) + 3 1 k g e 1 ∑ [ Q k , j + 1 + Q k , j − 1 ] = 3 1 ( E j + 1 + E j − 1 ) + 3 1 ( p j + 1 + p j − 1 ) = 3 1 ( E j + 1 + E j − 1 ) + p j for example.
Since L n + 2 + L n − 2 = 3 L n and F n + 2 + F n − 2 = 3 F n for all n , the general solution of the recurrence relation E j = 3 1 ( E j + 1 + E j − 1 ) 1 ≤ j ≤ N − 1 is E j = α L 2 N − 2 j + 1 + β F 2 N − 2 j + 1 0 ≤ j ≤ N To solve the nonhomogenous recurrence relation, we need a "particular integral". The one I gave follows from the known formula for p j and the fact that L n + 2 − L n − 2 = 5 F n for all n .
Of course, my general solution for E j could have been expressed (perhaps more naturally) in terms of F 2 j and L 2 j , but the known form of p j led to the F 2 N − 2 j − 1 type of terms.
We can apply the same approach to obtaining the basic formula for p j . Since the p j satisfy the basic homogenous recurrence relation, we know that p j = γ L 2 N − 2 j + 1 + δ F 2 N − 2 j + 1 0 ≤ j ≤ N and the boundary conditions p N = 2 1 p N − 1 and p 0 = 2 1 + 2 1 p 1 can be used to deduce that γ = 0 and δ = F 2 N + 2 − 1 .
Let P n be the probability the door opens first on the ground floor | given that you are currently on the n t h floor.
P 3 P 2 P 1 P 0 = = = = 2 1 P 2 3 1 P 3 3 1 P 2 2 1 P 1 + + + + ( 2 1 0 ) 3 1 P 1 3 1 P 0 2 1 1 + + ( 3 1 0 ) ( 3 1 0 )
Hence,
P 2 P 1 = = 6 1 P 2 3 1 P 2 + + 3 1 P 1 6 1 P 1 + 6 1
So,
5 P 2 = 2 P 1 ,
5 P 1 = 2 P 2 + 1 .
2 5 P 2 = 1 0 P 1 = 4 P 2 + 2
Therefore,
P 2 = 2 1 2 , and P = P 3 = 2 1 1 .
The expected amount of lift operations is 3 1 6 .
Hence, E = 1 8 0 1 6 0 = 9 8 .
a + b + c + d = 1 + 2 1 + 8 + 9 = 3 9 .
Problem Loading...
Note Loading...
Set Loading...
Let T be the number of times the lift has to move before the door opens, and let G be the event that the door opens at floor 0. After an even number of moves, the lift must be at either floor 1 or floor 3. There are two ways the lift can go from floor 1 to floor 1 in two moves (1-0-1 and 1-2-1), while there is just one way of going from floor 1 to floor 3 in two moves (1-2-3) and one way of going from floor 3 to floor 1 in two moves (3-2-1) and just one way of going from floor 3 to floor 3 in two moves (3-2-3). Suppose that p n is the probability that the lift is at floor 1 after 2 n moves (and the doors are still shut), and suppose that q n is the probability that the lift is at floor 3 after 2 n moves (and the doors are still shut). Then ( p n + 1 q n + 1 ) = ( 1 8 5 9 1 6 1 6 1 ) ( p n q n ) Since this matrix has eigenvectors v ± = ( 3 ± 7 − 1 ) with associated eigenvalues λ ± = 1 8 1 ( 4 ± 7 ) and since ( q 0 p 0 ) = ( 1 0 ) we deduce that ( p n q n ) = 2 7 1 [ λ + n v + − λ − n v − ] and so, in particular p n = 2 7 3 [ λ + n − λ − n ] The doors can only open at floor 0 if the lift has moved an odd number (greater than 1 ) of times, and we note that P [ ( T = 2 n + 1 ) ∩ G ] = p n × 3 1 × 2 1 = 4 7 1 [ λ + n − λ − n ] (the lift has to be at floor 1 after 2 n moves, with the doors shut, then it must move to floor 0, and the doors must open). Thus P = P [ G ] = n = 1 ∑ ∞ P [ ( T = 2 n + 1 ) ∩ G ] = 2 1 1 and hence P [ T = 2 n + 1 ∣ G ] = 4 7 2 1 [ λ + n − λ − n ] n ≥ 1 while P [ T = m ∣ G ] = 0 for all other integers m . Thus E [ T ∣ G ] = 4 7 2 1 n = 1 ∑ ∞ ( 2 n + 1 ) [ λ + n − λ − n ] = 3 1 3 Assuming that it takes a further 1 0 seconds for the lift doors to open, we deduce that E = 6 1 ( E [ T ∣ G ] + 1 ) = 9 8 making the answer 1 + 2 1 + 8 + 9 = 3 9 .