Reply
Tue 11 Dec, 2007 10:06 pm
So I'm applying for a job (I just graduated college) and I was told that if I wanted an interview I'd have to solve this problem (below). I really want an interview with this company, but I cannot solve this problem without your (?) help.
You are attending a fancy party. Upon arriving, each of the N partygoers (yourself included) puts his or her coat on the coatrack. After the party is over, the first person to leave is in a rush and grabs a coat at random from the coatrack. As the rest of the partygoers leave, they try to grab their own coat, but if their coat has already been taken, they take someone else's coat at random from the rack. You are the last person to leave the party. What is the probability that you will go home with your own coat?
Thanks in advance,
KS
Depends how much grain alcohol was mixed into the punch.
100% where N=1. Wouldn't be much of a party, but as N increases, the probablity seems to decrease.
Actually, it's exactly 1/2 for N greater than 1.
Also, if you are the Mth person (M>1) out of N people, the probabliity that you get your coat is (N-M+1)/(N-M+2). The probability for the first person is 1/N.
If you are last, I say you have 0 chance of getting your coat.
Its pretty simple deduction - not statistics if you think it through - which is what the employers are testing for.
At least one person makes a mistake - it shunts the problem on. If and only if you are last - simple proof by induction will tell you you won't get you coat.
For n = 2 people at party its obivious. For n = 3 you will see what happens, the pool of right choices decreases until a wrong choice is made - which must, repeat must cascade - so there is no way you can get your coat.
Do you need the workings - or now you have the right answer can you determine why? Its a 15 second problem really.
Don't you need to know how many people were at the party?
Apologies I want to double check I didn't stuff this one up in the reading. The result may depend on when the peron whose coat was mistakenly taken arrives for his coat. If he is second last you likely have a 50-50 chance. If he arrives at the head of the queue it shunts the problem for later. However if the first to leaves takes your coat probability becomes 100% you won't get it - so you have to game play this one out - erk!
More thought needed!
Amigo wrote:Don't you need to know how many people were at the party?
No, you don't. The answer is 1/2 for the last person.
Apologies I want to double check I didn't stuff this one up in the reading. The result may depend on when the peron whose coat was mistakenly taken arrives for his coat.
If the person whose coat was mistakenly taken by the first person is the second last person to leave you have a 50-50 chance. But if the person whose coat was taken is the second to arrive the problem magnifies - especially if he takes the 3rd and they take the fourth etc...
However if the first to leaves takes your coat probability becomes 100% you won't get it - so you have to game play this one out with collapsing polynomials - erk!
More thought needed!
there are n people at the party. One leaves and takes a coat, so there's an (n-1)/n chance that it wasn't yours. the next guy leaves, and there's an ((n-1)/n)*((n-2)/n-1) chance that your coat hasn't been taken yet. This becomes a telescoping multiplication of odds that simplifies to 1/n
Vengoropatubus wrote:there are n people at the party. One leaves and takes a coat, so there's an (n-1)/n chance that it wasn't yours. the next guy leaves, and there's an ((n-1)/n)*((n-2)/n-1) chance that your coat hasn't been taken yet. This becomes a telescoping multiplication of odds that simplifies to 1/n
There is a 1/n chance that the first person picks his own coat. In that case, everybody gets his own coat. Therefore, everybody has at least a 1/n chance of getting his own coat. If the last person's chances are 1/n, then there is no way the last person gets his own coat if the first person chooses incorrectly. Clearly, that can't be true.
Note that the random selections end as soon as someone picks the first person's coat. Your telescoping multiplication also ends then.
But the rules state the first person gets it wrong - and anyone that can get it right does,
Ugly. Here are the outcome per these rules for group sizes 1 -> 6 people
S(1) = 100% (problem collapses)
S(2) = 0%
S(3) = 1/3
S(4) = 2/6 = 1/3
S(5) = 7/14 = 1/2
S(6) = 14/28 = 1/2
Fun, fun, fun!
No, the rules state that the first person grabs a coat at random.
S(1) = 1
S(N) = 1/2 for N > 1
Here are the possibilities for N=4:
1 2 3 4 P
----------
1 2 3 4 1/4 = 6/24
2 1 3 4 1/4 * 1/3 = 2/24
2 3 1 4 1/4 * 1/3 * 1/2 = 1/24
2 3 4 1 1/4 * 1/3 * 1/2 = 1/24
2 4 3 1 1/4 * 1/3 = 2/24
3 2 1 4 1/4 * 1/2 = 3/24
3 2 4 1 1/4 * 1/2 = 3/24
4 2 3 1 1/4 = 6/24
Person 4 gets coat 4 with probability (6+2+1+3)/24 = 1/2.
You're right - I didn't read it carefully enough and was trying to answer an even harder one
markr wrote:Vengoropatubus wrote:there are n people at the party. One leaves and takes a coat, so there's an (n-1)/n chance that it wasn't yours. the next guy leaves, and there's an ((n-1)/n)*((n-2)/n-1) chance that your coat hasn't been taken yet. This becomes a telescoping multiplication of odds that simplifies to 1/n
There is a 1/n chance that the first person picks his own coat. In that case, everybody gets his own coat. Therefore, everybody has at least a 1/n chance of getting his own coat. If the last person's chances are 1/n, then there is no way the last person gets his own coat if the first person chooses incorrectly. Clearly, that can't be true.
Note that the random selections end as soon as someone picks the first person's coat. Your telescoping multiplication also ends then.
you're wrong, because everyone else tries to grab their coat randomly as well, regardless of whether or not the first person grabbed the right coat or not.
You are attending a fancy party. Upon arriving, each of the N partygoers (yourself included) puts his or her coat on the coatrack. After the party is over, the first person to leave is in a rush and grabs a coat at random from the coatrack. As the rest of the partygoers leave, they try to grab their own coat, but if their coat has already been taken, they take someone else's coat at random from the rack. You are the last person to leave the party. What is the probability that you will go home with your own coat?
I'm correct. If their coats are available, they take them. Read the problem.
Doesn't that interpretation open up a whole new can of worms? How hard people will try to find their own coat? It doesn't say that they will grab their own coat, only that they will try. You assumed that they will always succeed, I assumed that their attempt will merely be a random grab.
And the correct answer is....
If I am working for you, when would I find time to attend a fancy party.
KSiebert hasn't been here in a while so I think you guys are talking to yourselves. Wonder if he got the job.
Vengoropatubus wrote:markr wrote:Vengoropatubus wrote:there are n people at the party. One leaves and takes a coat, so there's an (n-1)/n chance that it wasn't yours. the next guy leaves, and there's an ((n-1)/n)*((n-2)/n-1) chance that your coat hasn't been taken yet. This becomes a telescoping multiplication of odds that simplifies to 1/n
There is a 1/n chance that the first person picks his own coat. In that case, everybody gets his own coat. Therefore, everybody has at least a 1/n chance of getting his own coat. If the last person's chances are 1/n, then there is no way the last person gets his own coat if the first person chooses incorrectly. Clearly, that can't be true.
Note that the random selections end as soon as someone picks the first person's coat. Your telescoping multiplication also ends then.
you're wrong, because everyone else tries to grab their coat randomly as well, regardless of whether or not the first person grabbed the right coat or not.
Great question! The answer is 1/2 by this logic: If the first person gets his coat, the probability that I get mine is 100%. If he gets mine, the probability that I get mine is 0%. If he gets someone else's, we move into a similar loop. If he gets the original guy's coat, my probability is one. If he gets mine, the probability is zero. If neither, repeat. In each case, the ones and zeros average to 50%. Nice job on that answer.