Problems involving both permutations and combinations

All in One Place

Everything you need for JC, LC, and college level maths and science classes.

Learn with Ease

We’ve mastered the national curriculum so that you can revise with confidence.

Instant Help

24/7 access to the best tips, walkthroughs, and practice exercises available.

0/0
?
Intros
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.
Free to Join!
StudyPug is a learning help platform covering math and science from grade 4 all the way to second year university. Our video tutorials, unlimited practice problems, and step-by-step explanations provide you or your child with all the help you need to master concepts. On top of that, it's fun - with achievements, customizable avatars, and awards to keep you motivated.
  • Easily See Your Progress

    We track the progress you've made on a topic so you know what you've done. From the course view you can easily see what topics have what and the progress you've made on them. Fill the rings to completely master that section or mouse over the icon to see more details.
  • Make Use of Our Learning Aids

    Last Viewed
    Practice Accuracy
    Suggested Tasks

    Get quick access to the topic you're currently learning.

    See how well your practice sessions are going over time.

    Stay on track with our daily recommendations.

  • Earn Achievements as You Learn

    Make the most of your time as you use StudyPug to help you achieve your goals. Earn fun little badges the more you watch, practice, and use our service.
  • Create and Customize Your Avatar

    Play with our fun little avatar builder to create and customize your own avatar on StudyPug. Choose your face, eye colour, hair colour and style, and background. Unlock more options the more you use StudyPug.
Topic Notes
?

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:

nPr=n!(n−r)!\large _{n}P_{r} = \frac{n!}{(n-r)!}
Equation 1: Formula for permutations

\quad Where:
nPr\quad _{n}P_{r} = Permutations of rr items from a set of nn items
n\quad n = number of total items in a set
r\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:

nCr=n!(n−r)! r!\large _{n}C_{r} = \frac{n!}{(n-r)! \, r!}
Equation 2: Formula for combinations

\quad Where:
nCr\quad _{n}C_{r} = Combinations of rr items from a set of nn distinct items
n\quad n = number of total distinct items in a set
r\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:

Problems involving both permutations and combinations
Figure 1: 10 heart straight flushes

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:

Problems involving both permutations and combinations
Figure 2: Fundamental counting principle to find possible straight flushes in a card deck


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:

Problems involving both permutations and combinations
Figure 3: 5-card hand with a four of a kind

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: nn = 13 and rr = 2

13P2=13!(13−2)!=13!11!= \large _{13}P_{2} =\frac{13!}{(13-2)!} = \frac{13!}{11!} = 13 × 12 = 156
Equation 3: Number of permutations for two out of thirteen ranks in one hand

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:

4C4=4!(4−4)! 4!=4!0!×4!=4!(1)(4!)= \large _{4}C_{4} =\frac{4!}{(4-4)! \, 4!} = \frac{4!}{0! \times 4!} = \frac{4!}{(1)(4!)} = 1
Equation 4: Possible combinations in the first rank selected

Taking into account nn = 4 and rr = 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 nn = 4 and rr = 1, and so:

4C1=4!(4−1)! 1!=4!(3!)(1)= \large _{4}C_{1} =\frac{4!}{(4-1)! \, 1!} = \frac{4!}{(3!)(1)} = 4
Equation 5: Possible combinations in the second rank selected

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 = (13P2)(4C4)(4C1) (_{13}P_{2}) (_{4}C_{4})(_{4}C_{1})

(13P2)(4C4)(4C1)=(156)(1)(4)=624 (_{13}P_{2}) (_{4}C_{4})(_{4}C_{1}) = (156)(1)(4) = 624
Equation 6: Possible ways a four of a kind can come up in a 5-card hand


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:

Problems involving both permutations and combinations
Figure 4: 5-card hand with a full house

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 = (13P2)(4C3)(4C2) (_{13}P_{2}) (_{4}C_{3})(_{4}C_{2})
Equation 7: Possible ways to have a full house in a 5-card hand (part 1)

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:

13P2=13!(13−2)!=13!11!= \large _{13}P_{2} = \frac{13!}{(13-2)!} = \frac{13!}{11!} = 13×12=15613 \times 12 = 156

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

4C2=4!(4−2)! 2!=4!2!×2!=4×3×2×14= \large _{4}C_{2} = \frac{4!}{(4-2)! \, 2!} = \frac{4!}{2!\times2!} = \frac{4\times3\times2\times1}{4} =  6\; 6

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

(13P2)(4C3)(4C2)=(156)(4)(6)=3,744 (_{13}P_{2}) (_{4}C_{3})(_{4}C_{2}) = (156)(4)(6) = 3,744
Equation 8: Possible ways to have a full house in a 5-card hand (part 1)

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: 13C5_{13}C_{5}
  • There are 4 suits, therefore the total amount of flushes in the card deck is: 13C5×4_{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 =(13C5)(4)−40=(13!(13−5)! 5!)(4)−40=(13!(8!)(5!))(4)−40 = (_{13}C_{5})(4) - 40 = (\frac{13!}{(13-5)! \, 5!})(4) - 40 = (\frac{13!}{(8!)(5!)} ) (4) - 40


pure flushes =(13×12×11×10×95×4×3×2×1)(4)−40=(13×12×11×3)−40=5,108 =(\frac{13\times12\times11\times10\times9}{5\times4\times3\times2\times1} )(4) - 40 = (13 \times 12 \times 11 \times 3) - 40 = 5,108
Equation 9: Total amount of pure flushes in the card deck


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 nn = 50 and rr = 3. Therefore:

50P3=50!(50−3)!=50!47!= \large _{50}P_{3} = \frac{50!}{(50-3)!} = \frac{50!}{47!} = 50×49×48=117,60050 \times 49 \times 48 = 117,600
Equation 10: Total permutations possible to open a 50-number combination lock

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 nn = 50 and rr = 3.

50C3=50!(50−3) 3!=50!(47!)(3!)=50×49×483×2×1= \large _{50}C_{3} = \frac{50!}{(50-3) \, 3!} = \frac{50!}{(47!)(3!)} = \frac{50\times49\times48}{3\times2\times1} =  50 × 49 × 8=19,600\, 50 \, \times \, 49\, \times \, 8 = 19,600
Equation 11: Total amount of 3-number combinations


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!