I did not do ex_Lucas students can take a look at this: math thematic groupings "gift" solution to a problem . That question the way to the water.
There is a formula very important, but there are still people do not know?
There were a total of k kinds of n items, each have A . 1 , A 2 , A . 3 ... A n a different number thereof arrangement is essentially
$ \frac{k!}{a_1 ! \times a_2 ! \times a_3 ! \times ... \times a_n !} (\sum\limits_{i=1}^n a_i =k) $
To explain thing? Explain it.