crazy guy on the airplane This is a recursion problem.
Chuck Boyer
The last guy will never get to sit on any seat except 1 or 100. This fact leads to the probabilty being 1/2. In fact this is true for any number of passengers more than one.
Aryabhatta
Thanks for the comment! :)
Chuck Boyer
"The last guy sits in 1 or 100. This leads to probability being 1/2."
Aryabhatta
Think in a simple way.
NK
"The crazy chooses a seat a random, so he could choose his own seat. That is how i interpreted it. I think you interpreted it as he chooses a seat apart from his own."
Chuck Boyer
I think I'm with chuck's solution here....
Christian Kamel
If what Aryabhata says is true, then with Chuck's interpretation the probability won't be 1/2. Will it?
Major
Aryabhata's reasoning yields a simpler way to solve my interpretation of the problem. Our interpretations are related as follows:
Chuck Boyer
I'm sorry, I left the thing running for 10 hours and it didn't reach a result, I'm sure the code is OK with no infinite loops or anything cuz I got results for up to 30 ppl.
Christian Kamel
And there is the code in c++ in case anyone wants to take a look at it...
Christian Kamel
while chin scratching for a more elegant solution I think I may have found one.
Christian Kamel
I've been flooding this thread with messages sorry about that but I realized a minor glitch in my previous calculations, the concept should be correct but the numbers should be:
Christian Kamel
Christian, I admire your perseverence! :)
Chuck Boyer
Thanks Chuck :)
Christian Kamel
Surprise Surprise
Christian Kamel
I still admire your perseverance, Christian! :)
Chuck Boyer
Christian, I think you might have overlooked something in implementing your approach. :(
Chuck Boyer
I forgot one P(5,100) permutation; the (reordered) permutations for seats 2..5 are:
Chuck Boyer
you're pretty much perseverant yourself :)
Christian Kamel
Some think I'm obsessive. ;)
Chuck Boyer
Still obsessing, but almost done... ;)
Chuck Boyer
Alrighty then.... ;)
Chuck Boyer
Proof by Induction:
Brad Corbin
Concerning the "can the crazy guy pick his own seat" debate:
Zach Wily
Good point, Zach!
Chuck Boyer
I threw together some C code to actually run the scenario millions of times and see how many times the last guy ends up in his seat. For 100 seats run 100M times, I keep getting the last guy in his seat 49.94% of the time.
Zach Wily
Thanx for the code zach.
Christian Kamel
Now that we have settled on a common interpretation:
Aryabhatta
It is simple !! when 100th person boards in ...he will either get the 100th seat empty or occupied ...so probability is 1/2 :D
Akhil Gupta
For the 1000th time this is mentioned here, having 2 possible solutions does not "automagically" make each solution's probability = 1/2 !!
Christian Kamel
I am not sure I get the .5 probablity reasoning ,,
SM
I think stating that the probability is 1/2 is not totally correct.
Krish
Please ignroe my last mesange. I realsie that it was incorrect reasoning.
Krish
Poor spelling in my last mail:
Krish
-----"For the 1000th time this is mentioned here, having 2 possible solutions does not "automagically" make each solution's probability = 1/2 !!"----
Stephen Jones
Formal proof by induction:
Brad Corbin
Hi Bard Corbin,
krish
We could find this out based on the probablities that
Dhanju
Regarding the FORMAL PROOF BY INDUCTION:
rahs
I had my class conduct trials of the scenario with 20 students and seats in a classroom. In 10 trials, the last student to enter the room got his correct seat 5 times. So I am convinced it is fairly close to 50% probability, though I can't prove it.
jones
50% doesn't seem logical to me. And at the same time it does.
80083r
wait, now... those are the odds of EVERYONE being in the correct seat.
80083r
There are two cases:
rai
Why don't people read first !!!
Reinvent the square wheel.
Crazy guy has 1/100 chance of selecting his assigned seat. All other passengers fall in line. Nth guy's chances hinge on crazy guy's chances making Nth guys chances of getting his own seat 1/100.
Randall Lynch
cow moo .i had a baby in an air plane bathroom well flying to gasweeraterania i am 11 and live in a splean. i am a boy
cow moo
cow moo. i had a nother baby on a bean bag its name is moomoo.it is a he she hehehehehe lame guy is my husband
cow moo
cow moo this husband of mine is a stuck up jerk wad he made out with moomoo my baby 23 yearold this sucks
cow moo
dolt head . pollid es anson i have a chacha gupy who i like yo hump alot he is so sexy
tttt
Fog Creek Home |