This week the #puzzle is: How Many Rides Can You Reserve?
#probabilities #random
| I was recently a guest at Disney World, which has a new system called “Lightning Lane” for reserving rides in advance—for a fee, of course. |
| By purchasing “Lightning Lane Multi Pass,” you can reserve three of the many rides in a park, with each ride occurring at a different hourlong time slot. For simplicity, suppose the park you’re visiting (let’s say it’s Magic Kingdom) has 12 such time slots, from 9 a.m. to 9 p.m. So if you have the 3 p.m. time slot for a ride, then you can skip the “standby lane” and board the much shorter “Lightning Lane” at any point between 3 and 4 p.m. Assume you can complete at most one ride within each hourlong time slot. |
| Once you have completed the first ride on your Multi Pass, you can reserve a fourth ride at any time slot after your third ride. This way, you always have at most three reservations. Similarly, after you have completed your second ride, you can reserve a fifth ride at any time slot after your fourth, and so on, up until you are assigned a ride at the 8 p.m. (to 9 p.m.) time slot. That will be your final ride of the day. |
| Magic Kingdom happens to be very busy at the moment, and so each ride is randomly assigned a valid time slot when you request it. The first three rides of the day are equally likely to be in any of the 12 time slots, whereas subsequent rides are equally likely to occur in any slot after your currently latest scheduled ride. |
| On average, how many rides can you expect to “Lightning Lane” your way through today at Magic Kingdom? |
And for extra credit:
| If you’re a Disney aficionado, then you know that week’s Fiddler is in fact an oversimplification of how Lightning Lane actually works. Let’s make things a little more realistic. |
| This time around, after you complete the first ride on your Multi Pass, you can reserve a fourth ride at any time slot after your first ride (rather than after your third ride). Similarly, after you have completed your second ride, you can reserve a fifth ride at any time slot after your second, and so on, until there are no available time slots remaining. |
| As before, the first three rides of the day are equally likely to be in any of the 12 time slots, whereas subsequent rides are equally likely to occur in any remaining available slots for the day. |
| On average, how many rides can you expect to “Lightning Lane” your way through today at Magic Kingdom? |

Highlight to reveal (possibly incorrect) solution:
Program 1.
Program 2.
Spreadsheet. ![]()
I actually solved this 3 different ways. The first time around I also got 3 different results. So I kept going until the results lined up.
The spreadsheet is the more mathy. I’m looking at the expected numbers directly. What can we expect if 3 rides are already booked, and after having done the 1st ride, I’m looking to book 1 more?
- If the last booked ride is in the 12th hour (E(12)), 0 more rides are expected.
- If the last booked ride is in the 11th hour (E(11), 1 more ride + E(12) are expected. This is 1.
- If the last booked ride is in the 10th hour (E(10)), 1 more ride + either E(11) or E(12) are expected. E(11) and E(12) are equally likely, as they consist in the next ride chose being in either the 11th or 12th hour. So E(10) = 1 + (E(11) + E(12))/2 = 1 + (1 + 0)/2 = 1 + 1/2 = 1 1/2.
- If the last booked ride is in the 9th hour (E(9)), by a similar logic, 1 + (E(10) + E(11) + E(12))/3 rides are expected. This is 1 5/6.
- This goes on until E(3).
To calculate the expected number of rides in total, I also need the probabilities for each situation. Given I have booked 3 rides, how many ways can I do this, ending up with the latest being in the nth hour?
- If the last booked ride is in the 12th hour, the other 2 rides are chosen randomly among the first 11, 11 choose 2 = 11*10/2 = 55 = P(12)/sum. (Sum: the sum of all these ways.)
- If the last booked ride is in the 11th hour, the other 2 rides are chosen randomly among the first 10, 10 choose 2 = 10*9/2 = 45 = P(11)/sum.
- All the way until…
- If the last booked ride is in the 3rd hour, the other 2 rides are chosen randomly 😉 among the first 2, 2 choose 2 = 2*1/2 = 1 = P(3)/sum.
- Adding up all these ways, there are sum = 220 in all.
Now I just take each product, E(n) * P(n), calculate the sum, and hey presto! The result is 1.2699. Oh, and then I have to add the 3 rides already booked, so the result is actually 4.2699.
My first program does a Monte Carlo. My second program goes through all the options, calculating the numbers of rides and averaging out. These 2 programs confirm the result.
And for extra credit:
For this one I define E(a, b) as the expected number of rides added, given that at time a (in the ath hour) there are b booked rides after this time.
- E(12, 0) = 0 – I am at the 12th hour, of course there are no rides left after this one, of course I can’t add any rides.
- E(11, 0) = 1 + E(12, 0) = 1 – I am at the 11th hour, the 12th slot is empty, I can therefore add that ride and progress to the 12th hour.
- E(11, 1) = 0 + E(12, 0) = 0 – I am at the 11th hour, the 12th slot is already booked, I can add no rides and simply progress to the 12th hour.
- E(10, 0) = 1 + (E(11, 0) + E(12, 0))/2 = 1 + (1 + 0)/2 = 1 + 1/2 = 1 1/2 – I am at the 10th hour, the 2 slots after this one are empty, either the 11th or 12th will be booked, with equal probability, and I can move forward to that slot.
- E(10 , 1) = 1 + E(11, 1) = 1 + 0 = 1 – I am at the 10th hour, 1 of the 2 next slots is already booked, so now the empty is also booked, I can move forward to the 11th hour.
- E(10, 2) = E(11, 1) = 0 – I am at the 10th hour, both slots after this one are already booked, I simply move 1 hour forward.
- E(9, 0) = 1 + (E(10, 0) + E(11, 0) + E(12, 0))/3 = 1 + (1 1/2 + 1 + 0)/3 = 1 + (5/2)/3 = 1 + 5/6 = 1 5/6 – I am at the 9th hour, the next 3 slots are open, with equal probability one of them is chosen, and I move forward to that hour. (These calculations, where b = 0 are duplicates of calculations from the fiddler, E(9).)
- E(9, 1) = 1 + (E(10, 1) + E(10, 1) + E(11, 1))/3 = 1 + (1 + 1 + 0)/3 = 1 + 2/3 = 1 2/3 – With equal probability (*) the last 3 slots are b__, _b_ or __b. (b for booked.) After booking one of them, the situation is, with equal probability (*) bb_, b_b or _bb. 2 of these represent E(10, 1), and 1 of these represent E(11, 1).
- E(9, 2) = 1 + E(10 , 2) = 1 + 0 = 1 – There’s an empty slot in front of me, I fill it and move on to the next hour.
- E(8, 0) = 25/12 = 2 1/12.
- E(8, 1) = 1 + (E(9, 1) * 3 + E(10, 1) * 2 + E(11, 1))/6 = 1 + (1 2/3 * 3 + 1 * 2 + 0)/6 = 1 + 7/6 = 2 1/6 – The new states are bb__, b_b_, b__b, _bb_, _b_b and __bb.
- E(8, 2) = 1 + (E(9, 2) * 3 + E(10, 2))/4 = 1 + (1 * 3 + 0)/4 = 1 3/4 – The new states are bbb_, bb_b, b_bb and _bbb.
- E(7, 0) = 2 17/60
- E(7, 1) = 1 + (E(8, 1) * 4 + E(9, 1) * 3 + E(10, 1) * 2 + E(11, 1))/10 = 1 + (2 1/6 * 4 + 1 2/3 * 3 + 1 * 2 + 0)/10 = 1 + 1 17/30 = 2 17/30 – The new states are bb___, b_b__, b__b_, b___b, _bb__, _b_b_, _b__b, __bb_, __b_b and ___bb. (I smell a formula. Let c = 12-a. This represents the number of slots left. Part of the sum is going from E(a, 1) to E(a+1, 1) * (c-1) + E(a+2, 1) * (c-2) + … + E(a+(c-1), 1) * 1. And dividing by the sum of the integers from 1 to c-1, also called the triangle number.)
- E(7, 2) = 1 + (E(8, 2) * 6 + E(9, 2) * 3 + E(10, 2))/10 = 1 + (1 3/4 * 6 + 1 * 3 + 0)/10 = 1 + 1.35 = 2.35. (Again, there’s structure. Let d = 12-a-1. The sum goes from E(a, 2) to E(a+1, 2) * tri(d-1) + E(a+2, 2) * tri(d-2) + … + E(a+(d-1), 2) * tri(1). And then dividing by the sum of the triangle numbers.)
- I continue this exercise in the spreadsheet.
(*) I assume.
The next step, after having calculated all of these, going all the way to E(1, 2), is again to compute the expected number, P*E. This gives, that the expected number of rides added, after the first 3 rides already added and the first of these at a, is 3.8096. Adding the 3 first rides, we get 6.8096.
My 2 programs confirms this.