2
$\begingroup$

I used the principle of inclusion-exclusion for solving this. I want to know if my solution is correct. The answer for the problem will be given by:

$Total\;into\;functions - Functions\; with\; 1 \;incorrect\; match + Functions \;with\; 2\; incorrect\; matches - Functions \;with \;3 \;incorrect\;matches + Functions \;with \;4\; incorrect\; matches$

Answer $= \binom{6}{4}4! - \binom{4}{1}5*4*3 + \binom{4}{2}4*3 - \binom{4}{3}3 + \binom{4}{4}$
Answer $ = 360 - 240 + 72 - 12 + 1 = 181$

  • 1
    For what it's worth, you're counting [derrangements](https://en.wikipedia.org/wiki/Derangement)2017-01-14
  • 0
    Yes but in that problem both sets have the same cardinalities, right?2017-01-14
  • 0
    Ah, right, and I don't see a quick way to get from one answer to the other2017-01-14

0 Answers 0