\problemdata                                                             
        {Counting Gloves} % latex-friendly label for the prob.
        {counting, stars and bars} % The topic(s) of the problem content.  
        {from http://www.maths.lse.ac.uk/Courses/MA311/, quizzes} % Source (if known)                                          
        {S01 Final, 6} % Usage (list ones you are aware of). 
        {Tina Wang, S02} % Last revision info (author, date).   
                                                                         
                                                                         
\begin{problem}           
A drawer contains six distinguishable pairs of gloves. Six persons,
named A, B, C, D, E, and F, take a left-hand glove and a right-hand
glove (without replacement, so all gloves are gone at the end ).

\begin{problemparts}
\problempart In how many ways can this selection be done ?

\solution{ $(6!)^2$.}

\problempart In how many ways can this be done such that B has
a non-matching pair and D has a matching pair ?

\solution{ $(6!)(4\cdot4!)$.}

\problempart In how many ways can this be done if exactly four
people have a matching pair ?

\solution{ $\binom{6}{4}(6!)$.}

\problempart In how many ways can this be done such that A
and~B have matching pairs but none of C, D, E, and F have matching
pairs?  \hint For a \emph{particular} choice of left-hand gloves,
consider denoting the set of events in which C gets a matching
right-hand glove by~$M_C$ (and likewise for all the others).

\solution{ There are $6!$ ways to choose the left-hand gloves.
  Since A and B have matching pairs, we know what they get (no freedom
  there). Now, the remaining 4 must get non-matching pairs. The number
  of choices is equal to the number of derangements of 4 objects (see
  also problem 8d on the practice final), which, by the
  inclusion-exclusion formula, is equal to
  \[
  4![1-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!}]=9
  \]
  therefore, the total number of ways is $6!\cdot 9 = 6480$
\newpage
}

\end{problemparts}
\end{problem}
                                 