[Math] Combinatorics question involving permutations

combinatoricspermutations

6 people each leave one bag each in a cloakroom.

(i)how many ways can their bags be returned to them?
(ii)How many ways can their bags be returned to them so that none of then get their own bags back
(iii)How many ways can their bags be returned to them so that exactly one of them gets their own bag back?

I got (i) the answer is 6!, but I'm having trouble with the other two parts any help would be appreciated.

*changed 7 to 6

Best Answer

$(i)$ Your answer is correct.

$(ii)$ This involves a derangement: an arrangement with no object in its proper place.

Denoting a derangement of $n$ objects as $D_n$, applying inclusion-exclusion,

and without bothering to further simplify the formula,

$D_6 = 6! -$ at least one gets right bag + at least two get right bag - ....

$= 6! - \dbinom61\cdot5! + \dbinom62\cdot4! -\dbinom63\cdot3! + ...... + \dbinom66\cdot0!$

$(iii)$

This is what is called a partial derangement, here simply $\binom61\cdot D_5$

PS

A simple formula for $D_n$ is to compute $\dfrac{n!}{e}$ and round to nearest integer.