1
$\begingroup$

this is a problem I think I actually solved but I don't like my solution

the problem :

let consider 6 balls numbered from 1 through 6 and a box with 6 compartments numbered from 1 through 6.

you randomly put one ball in each compartment and each compartment must contain only one ball.

question : what's the probability that at least 4 balls are put in a compartment with the same number.

how I solved the problem : since all the outcomes are equally likely I can use the discrete uniform law

let denote the event 'at least 4 balls are put in a compartment with the same number.' as A

I just have to count #total outcomes and #A

$card(\Omega) = 6!$

A ={(1,2,3,4,5,6),(1,2,3,4,6,5),(1,2,3,5,4,6),(1,2,3,6,5,4),(1,2,4,3,5,6),(1,3,2,4,5,6),(2,1,3,4,5,6)}

=> $card(A) = 7$

so $P(A)$ = $\frac{7}{6!}$

not sure I have not forgotten any case though

I want another 'more formal' way to solve this problem.

thank you.

  • 0
    Your problem concerns the so called [Rencontres Number](https://en.wikipedia.org/wiki/Rencontres_numbers). See this wikipedia article to get all explanations, references, etc.2017-02-19

1 Answers 1

2

I would still approach directly, but do it by cases. How many where exactly four are in the correct position? exactly five? exactly six?

For exactly four, this occurs when two of the balls positions are swapped but otherwise every ball is in its correct place. There are $\binom{6}{2}=15$ ways to pick which two were swapped. Specifically these are $(2,1,3,4,5,6),(3,2,1,4,5,6),(4,2,3,1,5,6),(5,2,3,4,1,6), (6,2,3,4,5,1), (1,3,2,4,5,6),(1,4,3,2,5,6),\dots$

There is no way for exactly five to be in the right position and one in the wrong, and there is exactly one way for all six to be in the correct position.

We get then a total of $15+0+1=16$ different ways to have at least four in the correct position, not seven.

Your mistake appears to be that you only swapped adjacent balls, but never swapped balls which were not adjacent. E.g. you never swapped positions $1$ and $3$ as well as you never swapped positions $5$ and $2$ etc...