1. ## last question about probability

There is a theater. 5 men drop their hats to the cloakroom. What is the probability that each will get a different hat when they leave the theatre.

Is there a solution without using any formula?
There are 5!=120 cases.
We want a 1 to 1 function but 1 mustn't couple with 1.

12345-32154 This is one of the wanted cases. I can get 24 permutations like that.
so I got 24/120 but it is wrong.

2. ## Re: last question about probability

Originally Posted by kastamonu
There is a theater. 5 men drop their hats to the cloakroom. What is the probability that each will get a different hat when they leave the theatre.

Is there a solution without using any formula?
There are 5!=120 cases.
We want a 1 to 1 function but 1 mustn't couple with 1.

12345-32154 This is one of the wanted cases. I can get 24 permutations like that.
so I got 24/120 but it is wrong.
there are as you noted $5!=120$ total permutations

all permutations where someone has picked up the correct hat need to be removed.

Let's look at how many of the invalid combos there are. We need to use the inclusion-exclusion principle

There are $5\cdot 4!$ naive ways of arranging the 5 so 1 hat is taken by it's owner. Naive because some of those also include 2 or more hats being taken by their owner.

So using the inclusion-exclusion principle we then subtract off the number of combos that have 2 hats taken by their owner, i.e. $\binom{5}{2}3!$

Continuing in this way we get

$N=\binom{5}{1} \cdot 4! - \binom{5}{2} 3! + \binom{5}{3} 2! - \binom{5}{4}1! + \binom{5}{5}0! = 76$

So there are $120-76=44$ valid combinations and thus

$p = \dfrac{44}{120} = \dfrac{11}{30}$

3. ## Re: last question about probability

Originally Posted by kastamonu
There is a theater. 5 men drop their hats to the cloakroom. What is the probability that each will get a different hat when they leave the theatre.
Is there a solution without using any formula?
There are 5!=120 cases.
We want a 1 to 1 function but 1 mustn't couple with 1.
12345-32154 This is one of the wanted cases. I can get 24 permutations like that.
so I got 24/120 but it is wrong.
Yes, if one understands the inclusion/exclusion rule. Use it to find the number of ways in which at least one man receives his own hat.
If you know the inclusion/exclusion rule count the number where one gets own hat; subtract # where two get own hat; add back where three get own; subtract where four get own; finely add back where each(all five) gets his own hat.
$\displaystyle\sum\limits_{k = 1}^5 {{{( - 1)}^{k-1}}\dbinom{5}{k} (5 - k)!}$

Subtract that from the total, $5!=120$

If you want to take a sort cut it is approx: $\dfrac{5!}{e}\approx 44.145532$ or $44$.

5. ## Re: last question about probability

Why do we add and subtract?

6. ## Re: last question about probability

Originally Posted by kastamonu
Why do we add and subtract?
https://en.wikipedia.org/wiki/Inclus...sion_principle

7. ## Re: last question about probability

Wikipedia is banned in Turkey.

8. ## Re: last question about probability

Originally Posted by kastamonu
Why do we add and subtract?
If you do indeed need to ask, then you are wasting your time even reading those questions.

10. ## Re: last question about probability

I found another solution maybe you can check it, Answer is found by permutation function.

11. ## Re: last question about probability

Ok. I understood how to derive the formula. Many Thanks.