# A question on counting and probability: Six friends hold a Christmas present swap. Each person brings a present, and puts it into a sack… [duplicate]

Question:

Six friends hold a Christmas present swap. Each person brings a present, and puts it into a sack. Once all six presents are in the sack, each participant in turn then draws out a present at random (presents are not replaced once drawn). The swap is deemed lucky if no participant draws out the present that he or she put in. What is the probability that the swap is lucky?

Where I am at so far:

Let A B C D E F be the 6 people. Let $$A_P$$ $$B_P$$ $$C_P$$ $$D_P$$ $$E_P$$ $$F_P$$ be the 6 gifts.

The set {A, B, C, D, E, F} has 6! permutations. Now each permutation gives the order in which order people choose presents from the sack. Let's call the set of all these permutations R. There are also 6! permutations of {$$A_P$$ , $$B_P$$ , $$C_P$$ , $$D_P$$ , $$E_P$$ , $$F_P$$}. Each one of these permutations give the order in which present are chosen from the sack. Let's call the set of all these permutations S.

R x S gives the set of all possible ways the 6 people choose presents. For example, ( (A, B, C, D, E, F), ($$B_P$$ , $$A_P$$ , $$D_P$$ , $$C_P$$ , $$F_P$$ , $$E_P$$) ) means A chooses first and selects $$B_P$$, B chooses second and selects $$A_P$$, C chooses thirds and selects $$D_P$$ etc.

Counting the number of unlucky swaps

Now all I can count so far are the number of possibilities where the 6 people choose their own presents. That's just $$720$$. But I know there are more but I don't know how to count them.

Counting the number of luck swaps

I was thinking if I figured out how many ways there are to rearrange the first row of the following table so that A does not appear in column A more than once, B does not appear in column B more than once, C does not appear in column C more than once etc. Then may be I could figure out how many lucky swaps there are. But again I don't know how many permutations like this exist.

$$\begin{array}{|c|} \hline \hline A& B& C& D& E& F&\\ \hline B& C& D& C& F& E&\\ \hline C& E& A& F& B& D&\\ \hline D& E& F& A& B& C&\\ \hline E& C& B& F& A& D& \hline & & &\\ \hline. & & &\\ \hline. & & &\\ \hline. \end{array}$$

## marked as duplicate by JMoravitz combinatorics StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jul 17 at 19:16

This is the classic case of derangements, and the number of such derangements here is $$!6 = 265$$. Divide that by the total number of distinguishable selections, $$6! = 720$$.