Poll
5 votes (41.66%) | |||
2 votes (16.66%) | |||
1 vote (8.33%) | |||
3 votes (25%) | |||
No votes (0%) | |||
5 votes (41.66%) | |||
3 votes (25%) | |||
1 vote (8.33%) | |||
2 votes (16.66%) | |||
2 votes (16.66%) |
12 members have voted
An airplane has 100 seats and there are 100 passengers in a line, waiting to board. Every passenger has an assigned seat. The first passenger will ignore his assigned seat and pick one at random. The other 99 passengers have the following behavior:
1. He will look for his seat and sit in it if it's empty.
2. If the assigned seat is occupied, he will pick a random empty seat.
What is the probability the last passenger to board sits in his assigned seat?
Usual rules apply, please.
Edited
May be can use simulation to do it.
The seat is either occupied or not, makes it 50%.
:-)
Quote: DRichDo the pilots stand? If the plane only has 100 seats and there are 100 passengers, someone will be standing.
Yes, the pilot has to fly the plane standing up.
Quote: rsactuaryThis was a thread a few years ago, wasn't it?
Probably. However, I'm sure nobody everybody had the pleasure of solving it.
Quote: MoscaI looked this up. I would appreciate some help understanding the solution, after it has been answered. I’m in the middle of a foggy mind day.
To be honest, I'm not sure my solution would hold up under strict mathematical scrutiny, but does pass my common sense test.
Interesting.
I wrote a quick & dirty simulation in Excel to simulate this problem and I'm getting an answer of 50%.
First I just tried the problem with 10 seats, not 100. (since I could run the sim many more times... it wouldn't take so long to run) and that gave an answer near 50% after a million or so sims. I then modified the code to simulate the problem with the full 100 seats and yet that also gives an answer of 50%.
Maybe something's wrong with my code but I've coded hundred and hundreds of simulations. So far I don't see anything wrong with my source code.
Quote: EdCollins
Interesting.
I wrote a quick & dirty simulation in Excel to simulate this problem and I'm getting an answer of 50%.
First I just tried the problem with 10 seats, not 100. (since I could run the sim many more times... it wouldn't take so long to run) and that gave an answer near 50% after a million or so sims. I then modified the code to simulate the problem with the full 100 seats and yet that also gives an answer of 50%.
Maybe something's wrong with my code but I've coded hundred and hundreds of simulations. So far I don't see anything wrong with my source code.
Quote: Wizard
I agree the answer is 50%. I always find simulations so unsatisfying from an intellectual point of view. For the beer, so I'd like to see something more mathematical.
I agree, but sadly my coding skills far exceed my mathematical abilities.
Me too!!!!Quote: DRichQuote: Wizard
I agree the answer is 50%. I always find simulations so unsatisfying from an intellectual point of view. For the beer, so I'd like to see something more mathematical.
I agree, but sadly my coding skills far exceed my mathematical abilities.
Nice puzzle - PM sent.Quote: Wizard...What is the probability the last passenger to board sits in his assigned seat?...
Quote: DRichQuote: Wizard
I agree the answer is 50%. I always find simulations so unsatisfying from an intellectual point of view. For the beer, so I'd like to see something more mathematical.
I agree, but sadly my coding skills far exceed my mathematical abilities.
There’s a pretty simple logical explanation for that answer. But I’ll refrain from posting it for now. I will say that it was quite cool to realize it the first time I worked out the solution.
Actually, the probability will remain equal to 0.5 for ANY no of passengers(>=2) !
I will post the vba code if anyone interested.
https://imge.to/i/yNjRf2
I totally agree that mathematical solutions is much better than simulation.
Anyone here can teach me the mathematical solutions of this problem ?
Or, do it backwards... start with 2 seats; 1/2. If the first passenger chooses the off-seat, add a chair; still 1/2. Continue until you hit 100.
The final remaining seat must be the one that was assigned to either passenger 1 or passenger 100. No other assigned seat can be empty at the end, because the matching passenger would have taken it when they got on the plane. So only those two seats are possible.
Every time a passenger picks a random seat, they are equally likely to pick seat 1 or seat 100. So those two seats are equally likely to be unselected all the way through.
Quote: MrGoldenSunHere is an argument why it is 0.5.
The final remaining seat must be the one that was assigned to either passenger 1 or passenger 100. No other assigned seat can be empty at the end, because the matching passenger would have taken it when they got on the plane. So only those two seats are possible.
That's good. I never realized the last seat must be #1 or #100. I'm not sure I could convince somebody else the odds are 50/50. Let me chew on this.
Quote: MrGoldenSunThe first passenger can seal the fate if he takes seat 1 or seat 100. Those are equally likely. Then if he picked anything else, it's a coin flip from now on as to which gets taken first. And once one is taken, the fate is sealed.
That's correct ! Thanks for your explanation ! The possible seat for last passenger is either seat #1 or seat #100 !
There are 3 scenarios here :-
1) if Passenger 1 pick seat #1, then Passenger 100 will definitely pick seat #100
2) if Passenger 1 pick seat #100, then Passenger 100 will definitely pick seat #1
3) if Passenger 1 pick any other seat #n, then one of the Passenger 2 to Passenger 99 will eventually pick either seat #1 or seat #100.
If that passenger pick seat #1, again passenger 100 will definitely pick seat #100, if that passenger pick seat #100, passenger 100 will definitely pick seat #1.
So the possible seat for last passenger is either seat #1 or seat #100 !
Part 1)
Initially #1 could (a) pick seat 1 or (b) seat 100 with equal probability. Seat 1 leads to everyone picking their own seats, so works. Seat 100 means it's impossible for #100 to be right. (c) Anything else #1 sits in seat M. Go to Part 2).
Part 2)
People from 2 to M-1 all pick their own seats, so now consider when #M has to choose a seat. Seat 1 is empty (since #1 is sitting in seat M), all the seats 2 to M-1 are full, all the seats M+1 to 100 are empty. There are three possibilities.
(a) #M sits in seat 1, thereafter everyone will pick their own seats, so works.
(b) #M sits in seat 100, so now impossible for #100 to be right.
(c) #M sits in seat N (M<N<100). This is recursion so repeat the process, i.e. Part 2), using N.
Part 3)
Under Part 2, if there is no outcome, N keeps increasing. Eventually there's either an outcome or N reaches 99. If N reaches 99 then there are only two seats free, 1 or 100. So either #99 picks (a) seat 1 or (b) seat 100, thus a 50:50 chance of success.
Summary
At every stage where there's an outcome it's 50:50 whether you get (a) success or (b) failure, otherwise N keeps increasing. If it gets to 99, as shown in part 3), there's an outcome. So whatever happens there will eventually be an outcome and each outcome is 50:50.
Thus the chance of success is 50%.
When I first did this years ago, I noticed the answer was 50% for 2 to 5 or so. I figured that was enough to show a pattern and felt satisfied the answer for any number of passengers greater than 1 was 50%.
Quote: charliepatrickNice puzzle, I haven't seen it before so had come up with this approach which seems to explain the 50% idea and mathematically sound.
Part 1)
Initially #1 could (a) pick seat 1 or (b) seat 100 with equal probability. Seat 1 leads to everyone picking their own seats, so works. Seat 100 means it's impossible for #100 to be right. (c) Anything else #1 sits in seat M. Go to Part 2).
Part 2)
People from 2 to M-1 all pick their own seats, so now consider when #M has to choose a seat. Seat 1 is empty (since #1 is sitting in seat M), all the seats 2 to M-1 are full, all the seats M+1 to 100 are empty. There are three possibilities.
(a) #M sits in seat 1, thereafter everyone will pick their own seats, so works.
(b) #M sits in seat 100, so now impossible for #100 to be right.
(c) #M sits in seat N (M<N<100). This is recursion so repeat the process, i.e. Part 2), using N.
Part 3)
Under Part 2, if there is no outcome, N keeps increasing. Eventually there's either an outcome or N reaches 99. If N reaches 99 then there are only two seats free, 1 or 100. So either #99 picks (a) seat 1 or (b) seat 100, thus a 50:50 chance of success.
Summary
At every stage where there's an outcome it's 50:50 whether you get (a) success or (b) failure, otherwise N keeps increasing. If it gets to 99, as shown in part 3), there's an outcome. So whatever happens there will eventually be an outcome and each outcome is 50:50.
Thus the chance of success is 50%.
Yes exactly agree. The game either effectively ends in round 1 if seat 1 or 100 are randomly picked (and if it ends, it’s 50/50 winner or loser). Otherwise it becomes an identical game of 100 - X seats.
Based on the prior replies, I agree that it's 50%.
It's a closed loop. There may be any number of displaced passengers, but once somebody sits in seat #1 or seat #100, it's game over. 50%
Bottom line, it's a logic problem, not a math problem.
But it kinda presents a new problem. And I think this IS a math problem:
On average, how many passengers are in the wrong seat?
My knee-jerk answer, based on nothing really, is 50.
Quote: DJTeddyBearBut it kinda presents a new problem. And I think this IS a math problem:
On average, how many passengers are in the wrong seat?
Just 5.18 I think.
Quote: MrGoldenSunHere is an argument why it is 0.5.
The final remaining seat must be the one that was assigned to either passenger 1 or passenger 100. No other assigned seat can be empty at the end, because the matching passenger would have taken it when they got on the plane. So only those two seats are possible.
Every time a passenger picks a random seat, they are equally likely to pick seat 1 or seat 100. So those two seats are equally likely to be unselected all the way through.
I don't think this is right and proves the result is 0.5
The empty seat at the end can be any seat. Example, passenger 1 picks seat 10. passengers 2 to 9 get their seat. Passenger 10 randomly picks seat 100. Passengers 11 to 99 get their seat. Passenger 100 gets seat 10.
Quote: charliepatrickNice puzzle, I haven't seen it before so had come up with this approach which seems to explain the 50% idea and mathematically sound.
Part 1)
Initially #1 could (a) pick seat 1 or (b) seat 100 with equal probability. Seat 1 leads to everyone picking their own seats, so works. Seat 100 means it's impossible for #100 to be right. (c) Anything else #1 sits in seat M. Go to Part 2).
Part 2)
People from 2 to M-1 all pick their own seats, so now consider when #M has to choose a seat. Seat 1 is empty (since #1 is sitting in seat M), all the seats 2 to M-1 are full, all the seats M+1 to 100 are empty. There are three possibilities.
(a) #M sits in seat 1, thereafter everyone will pick their own seats, so works.
(b) #M sits in seat 100, so now impossible for #100 to be right.
(c) #M sits in seat N (M<N<100). This is recursion so repeat the process, i.e. Part 2), using N.
Part 3)
Under Part 2, if there is no outcome, N keeps increasing. Eventually there's either an outcome or N reaches 99. If N reaches 99 then there are only two seats free, 1 or 100. So either #99 picks (a) seat 1 or (b) seat 100, thus a 50:50 chance of success.
Summary
At every stage where there's an outcome it's 50:50 whether you get (a) success or (b) failure, otherwise N keeps increasing. If it gets to 99, as shown in part 3), there's an outcome. So whatever happens there will eventually be an outcome and each outcome is 50:50.
Thus the chance of success is 50%.
This is rigorous! Not that you need me to tell you that ^_^"
Quote: tyler498I don't think this is right and proves the result is 0.5
The empty seat at the end can be any seat. Example, passenger 1 picks seat 10. passengers 2 to 9 get their seat. Passenger 10 randomly picks seat 100. Passengers 11 to 99 get their seat. Passenger 100 gets seat 10.Quote: charliepatrickNice puzzle, I haven't seen it before so had come up with this approach which seems to explain the 50% idea and mathematically sound.
Part 1)
Initially #1 could (a) pick seat 1 or (b) seat 100 with equal probability. Seat 1 leads to everyone picking their own seats, so works. Seat 100 means it's impossible for #100 to be right. (c) Anything else #1 sits in seat M. Go to Part 2).
Part 2)
People from 2 to M-1 all pick their own seats, so now consider when #M has to choose a seat. Seat 1 is empty (since #1 is sitting in seat M), all the seats 2 to M-1 are full, all the seats M+1 to 100 are empty. There are three possibilities.
(a) #M sits in seat 1, thereafter everyone will pick their own seats, so works.
(b) #M sits in seat 100, so now impossible for #100 to be right.
(c) #M sits in seat N (M<N<100). This is recursion so repeat the process, i.e. Part 2), using N.
Part 3)
Under Part 2, if there is no outcome, N keeps increasing. Eventually there's either an outcome or N reaches 99. If N reaches 99 then there are only two seats free, 1 or 100. So either #99 picks (a) seat 1 or (b) seat 100, thus a 50:50 chance of success.
Summary
At every stage where there's an outcome it's 50:50 whether you get (a) success or (b) failure, otherwise N keeps increasing. If it gets to 99, as shown in part 3), there's an outcome. So whatever happens there will eventually be an outcome and each outcome is 50:50.
Thus the chance of success is 50%.
This is rigorous! Not that you need me to tell you that ^_^"
If Passenger 10 randomly picks seat 100, then Passenger 100 will definitely picks seat 1, ^_^"
Quote: ssho88
I will post the vba code if anyone interested.
Yes please. It's more about using and getting familiar with vba than the actual question at hand.
Quote: DJTeddyBearBut it kinda presents a new problem. And I think this IS a math problem:
On average, how many passengers are in the wrong seat?
My knee-jerk answer, based on nothing really, is 50.
1/100 of the time, passenger 1 is in seat 100, so there are only 2 in the wrong seats (1 and 100 in each other's seat)
1/100 of the time, passenger 1 is in seat 99
In this case, 1/2 of the time, passenger 99 is in seat 1 (2 wrong), and 1/2 of the time, 99 is in 100 and 100 is in 1 (3 wrong), which is a mean of 5/2
1/100 of the time, passenger 1 is in seat 98
In this case, 1/3 of the time, passenger 98 is in seat 1 (2 wrong); 1/3 of the time, 98 is in 100 and 100 is in 1 (3 wrong); and 1/3 of the time, 98 is in 99, resulting in an additional expected 5/2 wrong; this is a total of 1/3 (2 + 3 + 5/2) = 17/6
Continue doing this until all 100 seats for passenger 1 has been considered; the answer is:
1/100 (0 + 2 + (2 + 1/2) + (2 + 1/2 + 1/3) + (2 + 1/2 + 1/3 + 1/4) + ... + (2 + 1/2 + 1/3 + ... + 1/99)) = about 5.1773775
Quote: ssho88Quote: tyler498I don't think this is right and proves the result is 0.5
The empty seat at the end can be any seat. Example, passenger 1 picks seat 10. passengers 2 to 9 get their seat. Passenger 10 randomly picks seat 100. Passengers 11 to 99 get their seat. Passenger 100 gets seat 10.Quote: charliepatrickNice puzzle, I haven't seen it before so had come up with this approach which seems to explain the 50% idea and mathematically sound.
Part 1)
Initially #1 could (a) pick seat 1 or (b) seat 100 with equal probability. Seat 1 leads to everyone picking their own seats, so works. Seat 100 means it's impossible for #100 to be right. (c) Anything else #1 sits in seat M. Go to Part 2).
Part 2)
People from 2 to M-1 all pick their own seats, so now consider when #M has to choose a seat. Seat 1 is empty (since #1 is sitting in seat M), all the seats 2 to M-1 are full, all the seats M+1 to 100 are empty. There are three possibilities.
(a) #M sits in seat 1, thereafter everyone will pick their own seats, so works.
(b) #M sits in seat 100, so now impossible for #100 to be right.
(c) #M sits in seat N (M<N<100). This is recursion so repeat the process, i.e. Part 2), using N.
Part 3)
Under Part 2, if there is no outcome, N keeps increasing. Eventually there's either an outcome or N reaches 99. If N reaches 99 then there are only two seats free, 1 or 100. So either #99 picks (a) seat 1 or (b) seat 100, thus a 50:50 chance of success.
Summary
At every stage where there's an outcome it's 50:50 whether you get (a) success or (b) failure, otherwise N keeps increasing. If it gets to 99, as shown in part 3), there's an outcome. So whatever happens there will eventually be an outcome and each outcome is 50:50.
Thus the chance of success is 50%.
This is rigorous! Not that you need me to tell you that ^_^"
If Passenger 10 randomly picks seat 100, then Passenger 100 will definitely picks seat 1, ^_^"
oh right, my bad ^_^" brain freeze..