---
# System prepended metadata

title: 'Lab: Even More Counting Practice (#22)'

---

# Lab: Even More Counting Practice (#22)

## Problem: Alternative

The top part is all possible combinations for a set of length n. We only want to choose k posistions from n. Thus, we want to get rid of all posistions after n-k because at that point we already have our k posisitons. 



## Problem: Poker Hands
### a. 
n=52 k=5
\\[ {52 \choose 5} = \frac{(52)_5}{5!}. = 2,598,960\\]

### b.
Choose 2 ranks simultaneously out of 13 for our two pairs. Then we want 2 of 4 suits for the first pair and 2 of 4 suits for the second pair. Finally chose 1 more rank from the remaining 11 for the last card and any 1 of 4 suits.

${13 \choose 2}*{4 \choose 2}*{4 \choose 2}*{11 \choose 1}*{4\choose 1} = 123,552$


### c.
So out of the 13 ranks we want 1 for our set of three and of the remaining 12 we want 1 for our set of two. For the first rank, of the 4 suits we want 3, and for the second rank, of the 4 suits we want 2. This gives us our full 5 card hand.

${13 \choose 1}*{4 \choose 3}*{12 \choose 1}*{4 \choose 2} = 3,744$

### d.
So out of our 13 ranks we want 1 for our pair of four and out of the remaining 12 ranks we want 1 for our last card. For our first rank we want 4 out of 4 suits. and for our last card it can be any 1 of 4 suits.

${13 \choose 1}*{4 \choose 4}*{12 \choose 1}*{4 \choose 1} = 624$
### e.
So out of 13 ranks we want 1 for our pair and 3 from  remaining 12 ranks for our non paired cards to prevent us from having any other pair or matching cards. For the first rank we want 2 of 4 options and for the last three we can have any 1 of 4 suits.

${13 \choose 1}*{4 \choose 2}*{12 \choose 3}*{4 \choose 1}*{4 \choose 1}*{4 \choose 1} = 1,098,240$

### f.
Choose the suit of the first card which can be any 1 of 4 options. So of the 13 ranks we want 5 so that they can all be the same suit.  This will set the suit for all other cards. Now just remove the number of ways a suit can contain 5 ranks that are increasing and subtract this from the possible collections of ranks. Notice this will be 10 because we can have A->5 2->6, 3->8 and so on with starting numbers 4,5,6,7,8,9, until our last set 10->A which is a total of 10 collections of ranks. 

${4 \choose 1}*({13 \choose 5}-10) = 5108$

## Problem: Deceptive

There is only one collection ranks for a straight flush (10-J-Q-K-A). This means 1 posibility for rank and now the suit can be any 1 of 4 suits. We get the following combinatorial description:

$1*{4 \choose 1} = {4 \choose 1}$
