4

I have to answer this problem to land a job interview!!

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?

KS
• Topic Stats
• Top Replies
Type: Discussion • Score: 4 • Views: 6,647 • Replies: 34

Slappy Doo Hoo

0
Tue 11 Dec, 2007 10:09 pm
Depends how much grain alcohol was mixed into the punch.
0 Replies

roger

1
Tue 11 Dec, 2007 11:17 pm
100% where N=1. Wouldn't be much of a party, but as N increases, the probablity seems to decrease.
0 Replies

markr

2
Wed 12 Dec, 2007 01:35 am
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.
g day

1
Mon 17 Dec, 2007 07:11 pm
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.
0 Replies

Amigo

1
Mon 17 Dec, 2007 07:17 pm
Don't you need to know how many people were at the party?
0 Replies

g day

0
Mon 17 Dec, 2007 10:05 pm
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!
0 Replies

markr

1
Mon 17 Dec, 2007 10:08 pm
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.
0 Replies

g day

1
Mon 17 Dec, 2007 10:15 pm
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!
Vengoropatubus

0
Mon 17 Dec, 2007 10:22 pm
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
0 Replies

markr

2
Mon 17 Dec, 2007 11:57 pm
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.
0 Replies

g day

0
Tue 18 Dec, 2007 12:05 am
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!
0 Replies

markr

3
Tue 18 Dec, 2007 12:18 am
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.
0 Replies

g day

1
Tue 18 Dec, 2007 04:15 am
You're right - I didn't read it carefully enough and was trying to answer an even harder one
0 Replies

Vengoropatubus

0
Tue 18 Dec, 2007 04:17 pm
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.
0 Replies

markr

1
Wed 19 Dec, 2007 02:10 am
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.
0 Replies

Vengoropatubus

1
Wed 19 Dec, 2007 02:59 pm
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.
0 Replies

0
Wed 19 Dec, 2007 05:04 pm

If I am working for you, when would I find time to attend a fancy party.
0 Replies

Mame

1
Wed 19 Dec, 2007 05:25 pm
KSiebert hasn't been here in a while so I think you guys are talking to yourselves. Wonder if he got the job.
0 Replies

engineer

1
Sat 22 Dec, 2007 10:08 pm
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.
0 Replies

Related Topics

Evolution 101 - Discussion by gungasnake
Typing Equations on a PC - Discussion by Brandon9000
The Future of Artificial Intelligence - Discussion by Brandon9000
The well known Mind vs Brain. - Discussion by crayon851
Scientists Offer Proof of 'Dark Matter' - Discussion by oralloy
Blue Saturn - Discussion by oralloy
Bald Eagle-DDT Myth Still Flying High - Discussion by gungasnake
DDT: A Weapon of Mass Survival - Discussion by gungasnake

1. Forums
2. » I have to answer this problem to land a job interview!!