Fog Creek Software
Discussion Board




Crazy guy on an airplane

Ok, let's start with the obvious, and I'll keep it simple, because it's late in the day, and it never hurts to take things slowly and simply.  Frankly, I'm writing this as I think my way through the possibilities...

1% of the time, Crazy guy randomly picks the seat on his ticket.  The 100th person sits correctly at least 1% of the time, as we have no displacements in this scenario (or rather, he displaces himself).  This eliminates any suspicion that this is one of those "aha!" type questions where poor #100 is terminally seatless.

The remaining 99% of the time, crazy guy chooses some other person's seat.  The seat chosen (1% per seat) directly correlates to some specific person on the line for the plane.

IE :  1% ... person #2's seat is taken ,
        1% ... person #3's seat is taken,
        etc...
        1% ... person #100 is left without his original seat

Now, each person prior to #100 that is displaced effectively becomes a crazy person, correct?  They're choosing a random seat (which may happen to be the seat for passenger #100, our point of concern, or they may fill the seat of the original crazed persona, ending the issue of further persona displacement).

Ok, now that I have it in more or less plane (ha-ha) english, I'll hit the high and low points.

For any given person displaced in the line, they have equal chances of
1) ending the crazy cycle by sitting in crazy person's seat
or
2) sitting in #100's seat
or
3) displacing a specific passenger .

Looks like 50% to me.  Odds of ending the cycle equal the odds of forcing #100 to find a new seat for any given crazy person sequence.

Stephen Hoffman
Thursday, July 25, 2002

There's a 1% chance that crazy man sits in his own seat and everybody sits in their own seat.

There's a 99% chance that crazy man displaces somebody.  That's followed by a 98/99 chance that passenger two continues the madness and a 97/98 chance that passenger three keeps it going and so on...

So the odds that the madness is still going by the time it gets to me is:

99/100 * 98/99 * 97/98 * 96/97 * ... * 1/2

Which is equal to 99!/100! = 1/100 = 1%

Another way to look at it is that there is only one crazy man from my perspective.  That's the guy sitting in my seat.  I don't care about any other bizarre seating arrangement.  It could have been all pre-arranged as far as I'm concerned.  There's still a 1/100 chance that a crazy person picks my seat.

William Frantz
Friday, July 26, 2002

"So the odds that the madness is still going by the time it gets to me is:

99/100 * 98/99 * 97/98 * 96/97 * ... * 1/2

Which is equal to 99!/100! = 1/100 = 1%

Another way to look at it is that there is only one crazy man from my perspective. That's the guy sitting in my seat. I don't care about any other bizarre seating arrangement. It could have been all pre-arranged as far as I'm concerned. There's still a 1/100 chance that a crazy person picks my seat. "  -William Frantz

The chance that the 99th person is displaced and randomly selects a seat prior to the 100th person getting on the plane is 50%, not 1%.

Let's take a minimalist view.

In the case of two passengers/two seats, #1 is crazy, selecting his own seat 1/2, and selecting #2's seat 1/2... 50% chance of you standing.

In the case of three passengers / three seats:

#1 sits in his own seat 1/3
#1 sits in #2's seat,  1/3  (creating a two-person crazy situation... 1/2 that you are displaced)
#1 sits in #3's seat and displaces him. 1/3

Odds of #3 displaced =
(1/3 * 1/2)
+ 1/3
= 50%.

Expanding to four four passengers / four seats:

#1 sits in his own seat 1/4
#1 sits in #2's seat,  1/4  (creating a three-person crazy situation... (1/3 * 1/2) + 1/3  that you are displaced)
#1 sits in #2's seat,  1/4  (creating a two-person crazy situation... 1/2 that you are displaced)
#1 sits in #3's seat and displaces him. 1/4

Odds of #4 displaced =
(1/4 * ((1/3 * 1/2) + 1/3))
+ (1/4 * 1/2)
+ (1/4)
= 50%

It looks like, for any given set of passengers x, with seats y,
the odds of the last passenger getting displaced are :
1/(y - x + 1)

Stephen Hoffman
Friday, July 26, 2002

Let P(n) = probability of nth guy getting his own seat.
for n>2, P(n) = 1/n (1 + Sum(2 to n-1, P(i))

so, P(n+1) = 1/(n+1) (1 + Sum(2 to n, P(i))

but, P(n+1) = n/(n+1)P(n) + 1/(n+1)P(n)

therefore P(n+1) = P(n)

and since P(2) = 1/2

so do all the cases above 2.

Sorry that's kind of terse, I needed summation notation.

Paul

Paul Johnston
Wednesday, July 31, 2002

A little more justification for:
P(n) = 1/n(1 + Sum(2 to n-1, P(i))

From Stephen's message:
P(3) = 1/3 + 1/3*1/2
-or- P(3) = 1/3 (1 + P(2))

P(4) = 1/4 + 1/4*1/2 + 1/4(1/3 + 1/3*1/2)
-or- P(4) = 1/4 (1 + P(2) + P(3))

and so on generalizes to:

P(n) = 1/n (1 + Sum (i = 2 to n) of P(i) )

Got that?

Paul Johnston
Wednesday, July 31, 2002

The probability of the 100th person getting the 100th seat is=

P= P(1st guy selects 1st seat)*P(100th Guy gets the 100th seat/1st guy selects 1st seat) + P(1st guy does not select the 1st seat)*P(100th Guy gets the 100th seat/1st guy guy does not select 1st seat)

Therefore, it is:

P= (1/100)(1) + (99/100)(98/99*98/99*97/98*96/97*...)
=(1/100) + (99/100)(98/99)(1/99)
=(1/100) + (99*98/(100*99*99))
=(1/100) + (98/100*99)
=0.0199

Please comment!

Thank you!

Chichi
Sunday, September 01, 2002

*  Recent Topics

*  Fog Creek Home