\problemdata      
        {counting-17} % latex-friendly label for the prob.
        {Counting} % The topic(s) of the problem content.
        {?} % Source (if known)
        {S02 PS8} % Usage (list ones you are aware of).
        {Christos Kapoutsis, S02} % Last revision info (author, date).


\begin{problem} 
{\bf Fun with Counting.}
\begin{problemparts}

\problempart
How many permutations of the word \emph{statistics} are there?
\solution{
There are 10 letters. The frequency of each letter is: $s=3,t=3,a=1,i=2,c=1$. 

By theorem 6.2, there are $\frac{(r_1+r_2+...+r_n)!}{r_{1}!r_{2}!...r_{n}!}$
permutations of the set $A$ where each element $a_i$ is repeated exactly $r_i$
times.  As a result, the number of permutations of the word \emph{statistics}
= $\frac{10!}{3!3!2!} = 50400$.
}

\problempart
A juggler plans to juggle 15 rings for his final\'e---more than any other
circus performer has ever managed.  In his bag are 9 red rings, 11 blue
rings, 13 white rings, and 15 rings striped with all three colors.  He
must select at least two of each kind of ring to be patriotic.  An example
of a patriotic choice of 15 rings would be: 2 red, 6 white, 3 blue and 4
striped.  How many different patriotic choices are there for the 15 rings?

\solution{
This is a ``stars and bars'' problem: the same as asking how many ways
there are to arrange 15 stars (the rings) and three bars such that there
are at least two stars in each of the four groups (the kinds of rings)
delimited by the bars.  Reserving eight stars for this purpose leaves 7
stars, so there are
\[
\binom{3 + 7}{3} = \binom{10}{3}.
\]
Note that the initial number of each kind of ring available to
the juggler is irrelevant as long as there are at least 9 of each.
}


\problempart
How many ways are there to distribute eight balls into six distinct
boxes with the first two boxes having collectively at most four balls
if the balls are identical?

\solution{
Let us consider placing $n$ balls into $k$ boxes so that exactly $r$
balls are placed in the first two boxes. This can be done in
\[
\binom{r+2-1}{2-1}\binom{(n-r)+(k-2)-1}{(k-2)-1}
\]
ways, since there are $\binom{r+2-1}{2-1}$ ways to
place $r$ balls into first two boxes (by stars and bars)
and $\binom{(n-r)+(k-2)-1}{(k-2)-1}$ ways to place the remaining $n-r$
balls into the other $k-2$ boxes. We can place the balls into boxes,
so that {\em at most} $r$ balls go into the first two boxes, in
\[
\sum_{i=0}^r{\binom{i+2-1}{2-1}\binom{(n-i)+(k-2)-1}{(k-2)-1}}
\]
ways. In particular for $n=8$, $k=6$ and $r=4$ we get
\[
\sum_{i=0}^4{\binom{i+2-1}{2-1}\binom{(8-i)+(6-2)-1}{(6-2)-1}} = 1056{.}
\]
}

\end{problemparts}
\end{problem}
