# Problems involving both permutations and combinations #### Everything You Need in One Place

Homework problems? Exam preparation? Trying to grasp a concept or just brushing up the basics? Our extensive help & practice library have got you covered. #### Learn and Practice With Ease

Our proven video lessons ease you through problems quickly, and you get tonnes of friendly practice on questions that trip students up on tests and finals. #### Instant and Unlimited Help

Our personalized learning platform enables you to instantly find the exact walkthrough to your specific type of question. Activate unlimited help now!

0/0
0/10
##### Examples
###### Lessons
1. From a standard deck of 52 cards, how many 5-card poker hands can be formed in each case:
1. straight flush - 5 cards in sequence, all of the same suit, e.g. 6, 7, 8, 9, 10?
2. four of a kind?
3. full house - 3 of a kind and a pair, e.g. 5, 5, 5, 8, 8?
4. flush - all 5 cards are of the same suit?
5. straight - 5 cards in sequence, but not all of the same suit, e.g. 2, 3, 4, 5, 6?
6. three of a kind?
7. two pairs?
8. one pair?
9. high card?
10. show that the sum of all 9 categories of 5-card hands (from straight flush to high card) equals the number of all 5-card hands.

## Problems involving both permutations and combinations

On this lesson, we will focus on problems for all the past topics in combinatorics (meaning all this chapter in our statistics course), with an emphasis on both combinations and permutations. and so, we will just provide a little review in the first section (so you can have the proper formulas available to you) and then we will jump directly into example problems for you to practice.

#### Permutations and commutations

Remember that permutations are the different arrangements in which items from a list can be positioned side by side, thus paying attention in the order in which they are positioned; while combinations are the ways in which items from a set can be selected, meaning the combination of a particular quantity of objects from the whole set, no matter in which order they get arranged later. So, permutations and combinations have as a main difference, that permutations pays attention to the order of the items, while combinations do not.

The formula for permutations, also called the formula to calculate the number of arrangements of r items taken from a set of n distinct items (where the order in which the items are arranged matters), is:

$\large _{n}P_{r} = \frac{n!}{(n-r)!}$

$\quad$ Where:
$\quad _{n}P_{r}$ = Permutations of $r$ items from a set of $n$ items
$\quad n$ = number of total items in a set
$\quad r$ = items being arranged

Remember that when all of the items in a set are used in the process of finding the total amount of possible arrangements (when you have the same amount of items as the amount of positions in which you will arrange them), the permutations formula simplifies and is equal to just the factorial of the number of the total items in the list.

Now, looking into combinations, the formula for combinations goes as follows:

$\large _{n}C_{r} = \frac{n!}{(n-r)! \, r!}$

$\quad$ Where:
$\quad _{n}C_{r}$ = Combinations of $r$ items from a set of $n$ distinct items
$\quad n$ = number of total distinct items in a set
$\quad r$ = items selected from the set

#### Problems on permutations and combinations:

As we mentioned in the introduction for this lesson, we will not only use permutations or combinations on the next problems, we will make use of all of the concepts and processes we have studied in our combinatorics chapter of this statistics course. Still, the next problems are designed for you to work through a variety of these topics in the same problem, instead of each problem focusing in only one kind of process. So, lets get to work!

#### Example 1

From a standard deck of 52 cards, how many 5-card poker hands can be formed in each case:

1. $\quad$ straight flush - 5 cards in sequence, all of the same suit, e.g. 6, 7, 8, 9, 10?
A straight flush is when you have 5 consecutive cards of the same suit (hearts, clubs, spades, or diamonds). In this case, the word straight in playing cards defines that the group of cards is following sequential order, and the word flush means all of these cards are from the same suit.
It is important to mention what each of the words define, because we will be looking at the straights for each suit, in order to find all of the possible straight flush hands that can be found.

With this being said, let us start by picking a suit: hearts. The lowest straight flush that can be found for a suit goes as A, 2, 3, 4 and 5.
While the highest straight flush possible goes as 10, J, Q, K A.
Therefore, the flushes that can be found from the heart suit go as follows: As you can see, there are 10 possible straight flushes form the hearts suit, therefore, there are 10 possible flushes from each of the four possible suits.

Therefore, we have a total of 40 possible straight flushes in a deck of cards. This can be proved following the fundamental counting principle, where you multiply the possible events in each category to find the amount of different outcomes possible: 2. $\quad$ four of a kind?
On this question, four of a kind refers to having a group of 4 cards of the same rank, for example, four cards of a same rank would be the four different cards with the number 3: 3 of hearts, 3 of spades, 3 of diamonds and 3 of clubs. Another example of a set of cards belonging to the same rank could be the four kings: king of hearts, king of spades, king of diamonds or king of clubs.
So, let us find how many ways can we find a four of a kind in a 5-card hand drawn from a standard deck of cards: Notice that out of 13 ranks, in order to contain a four of a kind, each hand of 5 cards must have cards of 2 different ranks: One of the ranks will be that of the four of a kind, while the fifth card not belonging to the four of a kind has the other rank.
Thus, the first thing to calculate is the total number of permutations possible to have four cards of the same rank, while having 2 out of 13 ranks in a hand: $n$ = 13 and $r$ = 2

$\large _{13}P_{2} =\frac{13!}{(13-2)!} = \frac{13!}{11!} =$ 13 × 12 = 156

Then, once you know the amount of permutations for the two ranks that can be on a hand, we notice that the order in which the cards are collected in a hand does not matter. Therefore, if we pay attention the cards that can be part of the 1st rank (or first selected rank) you have four possible cards in each of those positions, where the order of the cards does not matter; thus, for the first selected rank we can have the next possible combinations:

$\large _{4}C_{4} =\frac{4!}{(4-4)! \, 4!} = \frac{4!}{0! \times 4!} = \frac{4!}{(1)(4!)} =$ 1

Taking into account $n$ = 4 and $r$ = 4 for this case, since you have four possible cards for four different positions.
The result in equation 4 makes sense! Because once you have selected a rank you have 4 cards, if you need them in four positions and do not care in which order (rule for combinations) then you will just have one possible combination!

For the second selected rank (from figure 3) this is not as easy, because once you select a rank, you only have ONE position. Therefore, to calculate the possible combinations you can have in there we have that $n$ = 4 and $r$ = 1, and so:

$\large _{4}C_{1} =\frac{4!}{(4-1)! \, 1!} = \frac{4!}{(3!)(1)} =$ 4

With the results coming from equations 3, 4 and 5 we can clearly see that there are three categories containing different events that one must take into account to obtain all of the possible ways a four of a kind can come up in a 5-card hand:

• The number of permutations for two out of thirteen ranks in one 5-card hand
• The possible combinations of cards in the first rank selected
• The possible combinations of cards in the second rank selected

We follow the fundamental counting principle and multiply the possibilities for each category in order to find our final result:

possible ways for 4 of a kind in a hand = $(_{13}P_{2}) (_{4}C_{4})(_{4}C_{1})$

$(_{13}P_{2}) (_{4}C_{4})(_{4}C_{1}) = (156)(1)(4) = 624$

3. $\quad$ full house - 3 of a kind and a pair, e.g. 5, 5, 5, 8, 8?
A full house means we have 3 of a kind and a pair, thus, once more we have to select two ranks out of thirteen: With this, we just follow the exact same method as before and define the three categories containing different events that one must take into account to obtain all of the possible ways a four of a kind can come up in a 5-card hand:

• The number of permutations for two out of thirteen ranks in one 5-card hand
• The possible combinations of cards in the first rank selected
• The possible combinations of cards in the second rank selected

And so we have that:

possible ways to have full house = $(_{13}P_{2}) (_{4}C_{3})(_{4}C_{2})$

The first factor in equation 7 refers to the amount of permutations possible for two ranks to be selected in the hand out of the total thirteen; this is the same permutations we calculated in part 2. Then the two other factors refer to the combinations of total four cards in a rank and the 3 possible in the first rank selected, and the two possible in the second rank selected.
Therefore, the final result is:

$\large _{13}P_{2} = \frac{13!}{(13-2)!} = \frac{13!}{11!} =$ $13 \times 12 = 156$

$\large _{4}C_{3} = \frac{4!}{(4-3)! \, 3!} = \frac{4!}{1!\times3!} =$$\; 4$

$\large _{4}C_{2} = \frac{4!}{(4-2)! \, 2!} = \frac{4!}{2!\times2!} = \frac{4\times3\times2\times1}{4} =$$\; 6$

possible ways to have full house = $(_{13}P_{2}) (_{4}C_{3})(_{4}C_{2})$

$(_{13}P_{2}) (_{4}C_{3})(_{4}C_{2}) = (156)(4)(6) = 3,744$

So there are 3,744 ways in which we can obtain a full house hand!

4. $\quad$ flush - all 5 cards are of the same suit?
Remember the word flush means all of the cards are from the same suit. Notice that the order of the cards dont matter, we will have five cards out of 13 possible if they all belong to one same suit, therefore we we have the following:

• For each suit, the total amount of possible flushes are: $_{13}C_{5}$
• There are 4 suits, therefore the total amount of flushes in the card deck is: $_{13}C_{5} \times 4$
• The flushes we are talking about here are NOT straight flushes (calculated in part 1). Therefore we need to subtract those from the total amount of flushes in a deck to obtain the total number of pure flushes in the card deck.

With all of this being said, the total amount of pure flushes in the card deck is:

pure flushes $= (_{13}C_{5})(4) - 40 = (\frac{13!}{(13-5)! \, 5!})(4) - 40 = (\frac{13!}{(8!)(5!)} ) (4) - 40$

pure flushes $=(\frac{13\times12\times11\times10\times9}{5\times4\times3\times2\times1} )(4) - 40 = (13 \times 12 \times 11 \times 3) - 40 = 5,108$

#### Example 2

There are a total of 50 numbers in a combination lock, which unlocks with a three number sequence.
a) $\quad$ How many possible combinations (sequences) are there for this lock?

Notice that in this problem, we are asked to compute what people would usually call the combination for the lock, or how many combinations can the lock have; still, this problem is not talking about combinations as they are defined mathematically, this problem is asking to calculate the different permutations for the lock!

Why? Well, in order to find the lock combination you KNOW that this combination needs to have its contained numbers in a particular order or it wont open the lock, and since order matters, this means this is in reality a permutation of three numbers from the total set of 50 possible numbers.
Having said this, let us calculate all the possible PERMUTATIONS that a 50-number combination lock can have when is opened by a three number sequence.
We have that $n$ = 50 and $r$ = 3. Therefore:

$\large _{50}P_{3} = \frac{50!}{(50-3)!} = \frac{50!}{47!} =$ $50 \times 49 \times 48 = 117,600$

And so, there are a total of 117,600 different ways that could serve as the lock code to be opened.

b) $\quad$ Now, a master thief says that he only needs to know the 3 numbers out of the total 50 that are required to unlock the lock, no need to know how they arranged, if he finds out which three are used, he could open this lock. How many possible combinations of three numbers are possible to be the password of this lock?

Remember, in this case we are looking for combinations, and so, we just need to find out the three numbers that are in there, but not how they are arranged. And so, we use the combinations formula having $n$ = 50 and $r$ = 3.

$\large _{50}C_{3} = \frac{50!}{(50-3) \, 3!} = \frac{50!}{(47!)(3!)} = \frac{50\times49\times48}{3\times2\times1} =$ $\, 50 \, \times \, 49\, \times \, 8 = 19,600$

c) $\quad$ Do you think this thief could open the lock once he has found out the three numbers that are necessary, even if he doesnt know in which order they should go?

Yes, this could be easily done right? If you think about it, once the thief knows the exact three numbers required he is left with three numbers to be ordered in three positions, which means that the total possible arrangements of these three numbers, as learnt in our lesson on the factorial notation, is just equal to 3! = 6. And so, it sounds very simple to think the thief could just try and check for all the 6 ways individually until one of those opens.

The difficult part is to identify WHICH THREE-NUMBER COMBINATION TO USE OUT OF 19,600! (all possible combinations found in part b). Therefore, if he is bragging that he can open a lock when he knows already which three to use, then he doesnt really know how to open a lock (GOOD!).
***

We hope these examples were useful to you. See you in the next lesson!