Skip to content
Related Articles

Related Articles

Puzzle | Random Seating
  • Difficulty Level : Hard
  • Last Updated : 21 Nov, 2017

People are waiting in line to board a 100-seat airplane. Ajay is the first person in the line. Ajay gets on the plane but he forgets his seat number, so he picks a seat at random. After that, each person who gets on the plane sits in his assigned seat if it’s available otherwise chooses an open seat at random to sit in. The flight is full and you are last in line. What is the probability that you get to sit in your assigned seat?

Solution:
The probability is 1/2.
Explanation:
There are two things to realize:
1. The probability that Ajay chooses his assigned seat is equal to the probability that he chooses your assigned seat.
2. In case, Ajay choose neither his own seat nor yours, then there are two cases:
If somebody else would choose Ajay’s seat at random, then you would get your assigned seat otherwise you would be left with the Ajay’s seat.

We can find out the probability. With every person choosing a seat at random (including Ajay), there are there possible outcomes:
1. Either Ajay chooses your assigned seat, or
2. Chooses his own seat, or
3. Chooses someone else’s seat.

The probability of choosing Ajay’s seat is always equal to probability of taking your seat. This means that the probability of you getting your seat vs. not is even. The case of a passenger choosing someone else’s seat doesn’t affect your final outcome in either way, it just passes that three possible alternatives to the next passenger.

Since the probability of someone taking your place is always equal to the probability of someone taking Ajay’s place (and this also applies to the penultimate passenger with only two seats left), the probability of you getting your assigned seat is 50% i.e 1/2.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :