\problemdata     
{S01-PS7-4}           
{basic counting}              
{} 		
{S01-PS7}
{S01 Karger}



\begin{problem}

 Solve the following counting problems. Give your answers in terms of factorials and binomial coefficients and then evaluate them.
\begin{problemparts}

\problempart A bug starts at position $(0, 0)$ and wants to reach
position $(4, 6)$ in 10 steps.  Each step is either north, south,
east, or west; that is, each step either increments or decrements one
coordinate.  How many different paths can the bug choose from?

\solution{
\[
\binom{10}{4}=210
\]
}

\problempart How many five-card poker hands contain no diamonds?

\solution{
 
\[
\binom{39}{5}=575757
\]
}



\problempart A flush in poker is a hand with all cards from the same
suit.  How many flushes are there?

\solution{ 
There are $4$ suits to choose from, and $\binom{13}{5}$ ways to choose 5 cards in the \emph{same} suit. Thus the answer is\[
4\binom{13}{5}=5148
\]
}

\problempart A straight in poker is a hand with 5 consecutive card
values (no wraparound, and suite don't matter).  How many straights
are there?

\solution{
        
So a straight looks like this: A,2,3,\fbox{4,5,6,7,8},9,10,J,Q,F,A. Assuming that an Ace can end a straight, there are 10 ways to choose the \emph{lowest} value (which was 4 in the example). There are 4 ways to choose the suit for each card, which means that there are $4^5$ ways
to choose the suits once you have chosen the lowest value.  Therefore, there are $10 \cdot 4^5=10,240$ such hands.} 

\problempart How many straight flushes are there?

\solution{
        
Like in the previous part, there are 10 ways to choose the lowest value. There are $4$ ways
to choose the suit.  Therefore, there are $10 \cdot 4=40$ such hands.} 

\end{problemparts}
\end{problem}
