# 1 - Combinatorics - High School Level Olympiad Problem

There are five cards labeled $1, 2, 3, 4, 5$ respectively and there are five boxes labeled $1, 2, 3, 4, 5$ respectively. A card is put into each box randomly. Find the number of ways in which exactly $2$ cards have labels matching the labels on the box.

What I did, $$C(5,2)(1/5)^2(4/5)^3 = 640/3125$$ Since $n(E)=5^5=3125, n(a)=640$.

The number of ways is 640?

• Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. Dec 16, 2017 at 10:25
• I just edited the post and showed my solution :) Dec 16, 2017 at 10:30
• There are only 5!=120 ways of putting the cards into the boxes. The correct answer is 20. Dec 16, 2017 at 10:34
• There are $C(5,2)$ ways to select two $2$ cards, which we will say go in their corresponding boxes. Then, there is only $2$ ways we can order the last $3$ such that they do not go in their corresponding boxes. This means the answer is $2 C(5,2) = 20$ Dec 16, 2017 at 10:46
• You choose 2 of them to be placed in their right boxes in $\binom 52=10$ ways and then derange (see here) the rest in $D_3=3!(1-1+1/2-1/6)=3-1=2$ ways, hence a total of $10\times 2=20$ ways. Dec 27, 2017 at 18:09