Explainer: Counting Using Combinations

In this explainer, we will learn how to use combinations to solve counting problems.

Combinatorics is about counting possibilities. There are a number of key considerations when we are seeking to count the number of possible outcomes. The first is the concept of counting with or without repetition. If we are forming a 4-digit number from the digits 1–9, the question of repetition is whether or not we can use the same digit multiple times. Hence, if we allow repetition, we can choose a number like 1,111. However, if we do not allow repetition, each digit will be distinct.

The second important consideration is whether order matters or not. For example, when picking 4-digit numbers, we consider 1,234 to be different from 4,321. However, order is not always important. For example, you might want to ask how many ways you can choose two friends to go on a trip with you. It does not matter if you choose Mary then Peter or Peter then Mary, since you still end up with the same group going on the trip. This is an example of counting without repetition where order does not matter. This is what mathematicians call a combination.

Definition: Combination

A combination is a selection of π‘Ÿ items chosen without repetition from a collection of 𝑛 items in which order does not matter.

Notice that the common usage of the word combination does not always agree with the mathematical definition. For example, usually we use the phrase combination lock to talk about a lock where we choose a code in which order matters. However, mathematically, this is not considered a combination.

Using the counting principle and permutations, we have learned to deal with counting problems with or without repetition where order matters. The focus of this explainer will be counting problems without repetition where order does not matter, known as combinations.

Without RepetitionWith Repetition
Order MattersοŠοŽπ‘ƒ=𝑛!(π‘›βˆ’π‘Ÿ)!π‘›οŽ
Order Does Not MatterCombinations

We will use the next couple of examples to demonstrate how to calculate combinations.

Example 1: Counting When Order Does Not Matter

A school’s administration is choosing the colors of its new logo. The logo is made of three letters: CHS. They would like to have a different color for each letter. The options for the colors are red, green, blue, yellow, orange, and purple.

  1. How many different ways can they color their logo?
  2. The school administration decided that instead of having a different color for each letter, they would buy three colors, mix them together, and then paint the whole logo in the resulting color. How many color options do they now have for their logo?

Answer

Part 1

We are counting the number of ways in which we can order 3 different colors from a collection of six colors. Hence, we are counting without repetition where order matters, so the total number of ways in which we can do this will be given by the permutation οŠ¬οŠ©π‘ƒ=120.

Part 2

Given the decision of the school administration, we are now trying to count the number of different combinations of three colors where order does not matter since we will mix them together, so RGB will be the same as BGR. When we counted the number of ways to color a logo in part 1, we counted each of these colors differently because order mattered. The table below shows how many different ways we can count the three colors: red, green, and blue, when order matters and when it does not.

Order MattersOrder Does Not Matter
RGBGRB
RBG
BRG
BGR
GBR
GRB

This means that in our answer to part 1, we have counted everything 6 times. Hence, the number of ways in which we can color the logo in a single color made from a mix of three colors is 1206=20.

Example 2: Combinations and Permutations

A company’s security officers are ordering a new lock for the company’s front door. They are concerned about security, so they would like a lock with at least 100,000 different possible codes. They bought a lock whose code is formed of six distinct digits chosen from 0–9, believing that the order in which the digits are entered matters.

  1. How many distinct possible door codes would such a lock have?
  2. Unfortunately, when it arrived, they discovered that it was a genuine combination lockβ€”that is, one for which order does not matter. How many distinct possible combinations does the lock have?

Answer

Part 1

We need to calculate the number of ways in which we can choose 6 digits from a collection of 10 without repetition and where order matters. Hence, we can use the permutations formula οŠοŽπ‘ƒ with 𝑛=10 and π‘Ÿ=6 to find the total number as follows: οŠ§οŠ¦οŠ¬π‘ƒ=151,200.

Part 2

We have calculated the total number of codes where the order matters to be 151,200. This means that we have counted both 123,456 and 654,321 as different codes. However, if we want to consider each permutation of the same set of 6 numbers to be the same, we need to know how many times we have counted the same 6 numbers in different orders. We could therefore ask the question: for a collection of 6 distinct numbers, how many different ways can we arrange them? This is the same as the total number of permutations of 6 distinct digits, which can be calculated by evaluating 6!. This means that, for every set of six distinct digits, we have counted 6! different codes. Therefore, to find the total number of codes if order does not matter, we need to divide 151,200 by 6!. Hence, the total number of different 6-digit combinations is given by 151,2006!=151,200720=210.

The previous examples demonstrate two important points related to combinations and permutations. Firstly, the number of permutations for a given 𝑛 and π‘Ÿ is generally much larger than the number of combinations. Secondly, to calculate the number of combinations of π‘Ÿ items from a collection of 𝑛 items, we can calculate the equivalent permutation οŠοŽπ‘ƒ and then divide by the redundancy π‘Ÿ!. The redundancy is the number of excess times we have counted the same set of π‘Ÿ items due to the fact that the permutation counted each order as distinct. Putting this together, we arrive at the definition of 𝐢.

Definition: Number of Combinations of a Given Size

The number of combinations of size π‘Ÿ taken from a collection of 𝑛 items is given by 𝐢=π‘ƒπ‘Ÿ!=𝑛!π‘Ÿ!(π‘›βˆ’π‘Ÿ)!.

The notation 𝐢 can be read as 𝑛-𝐢-π‘Ÿ or as 𝑛 choose π‘Ÿ and is also referred to as the binomial coefficient. Another extremely common notation for 𝐢 is ο€Ώπ‘›π‘Ÿο‹; however, there are also various other forms of notation commonly used such as 𝐢, 𝐢, πΆοŠοŽ•οŽ, and 𝐢(𝑛,π‘Ÿ).

Having defined 𝐢, we will now look at a number of examples in which we use combinations to solve real-world counting problems.

Example 3: Counting the Number of Matches in a Tournament

A chess tournament is to be held where every player plays each of his opponents. Given that there are 11 participants, calculate the number of games that will be played.

Answer

We would like to count the number of ways we can pair 11 players. This means that we are counting without repetition and order does not matter since player 1 versus player 2 will be the same as player 2 versus player 1. This means that we are counting the number of combinations of 2 players taken from the collection of 11 players. Hence, the total number will be given by 𝐢. Using the formula 𝐢=𝑛!π‘Ÿ!(π‘›βˆ’π‘Ÿ)!, we have 𝐢=11!2!(11βˆ’2)!.

Using the property of the factorial that 𝑛!=𝑛(π‘›βˆ’1)!, we can expand 11! as follows: 𝐢=11Γ—10Γ—9!2!Γ—9!.

Canceling the common factor of 9! from the numerator and denominator and simplifying, we have 𝐢=11Γ—102=11Γ—5=55.

Hence, the tournament will have 55 matches.

Example 4: Counting in Context

Hannah’s teacher divided the class into groups of six, and she required that each member of a group meet with every other member of the same group. How many meetings will each group have?

Answer

The challenge with an example like this is interpreting what we need to count. The first thing we need to notice is that each group has six people in it. Each person needs to meet with every other person in the group, and we need to count the total number of meetings. Therefore, we are looking at how many ways we can choose two different people from a group of six where the order of our choice does not matter. This indicates that we are talking about combinations and the total number of meetings will be given by 𝐢. Using the formula 𝐢=𝑛!π‘Ÿ!(π‘›βˆ’π‘Ÿ)!, we have 𝐢=6!2!(6βˆ’2)!.

Using the property of the factorial that 𝑛!=𝑛(π‘›βˆ’1)!, we can expand 11! as follows: 𝐢=6Γ—5Γ—4!2!Γ—4!.

Canceling the common factor of 4! from the numerator and denominator and simplifying, we have 𝐢=6Γ—52=3Γ—5=15.

Hence, each group will have 15 meetings.

In the last couple of examples, we have demonstrated how we can apply the formula for calculating permutations. However, it is also legitimate to use your calculator’s built-in combinations function to find the value of certain combinations. However, we should not only rely on this method. As we will see, there are questions where we will not be able to use a calculator, and, hence, knowing how to work with the formula is essential.

Example 5: Counting the Number of Elements of a Set Using Combinations

Let 𝑋={π‘₯∢π‘₯βˆˆβ„€,10≀π‘₯≀16} and π‘Œ={{π‘Ž,𝑏}βˆΆπ‘Ž,π‘βˆˆπ‘‹,π‘Žβ‰ π‘}. Determine the number of elements in π‘Œ.

Answer

We would like to count the number of elements of π‘Œ which is formed of a set of two items taken from 𝑋. Firstly, we need to count how many elements are in 𝑋. Being careful to count both 10 and 16, and all the integers between them, we find that 𝑋 has 7 elements. Since the elements of π‘Œ are sets, {π‘Ž,𝑏}={𝑏,π‘Ž}, which means that we are counting the number of ways in which we can choose 2 different elements from 𝑋 where order does not matter. This means that we are counting the number of combinations. Hence, the total number of elements in π‘Œ will be given by 𝐢. Using the formula 𝐢=7!2!(7βˆ’2)!, or the combinations function on our calculator, we find that 𝐢=21. Hence, the number of elements in π‘Œ is 21.

Example 6: Counting the Number of Ways to Form Committees

A village has 2 committees, each containing 2 people. In how many ways can the committees be formed if the members are selected from 12 people with the condition that a person can only be chosen once?

Answer

We begin by counting the number of ways in which we can fill one of the committees. We have to choose two people from a group of twelve, where the order is unimportant. This corresponds to the combination 𝐢=66.

Since we used two people in choosing the first committee, and each person can only be chosen once, we now have 10 people left from which to choose a group of 2 people. Hence, the number of ways in which we can form the second committee is given by the combination 𝐢=45. By the counting principle, we have 66Γ—45=2,970 ways to form the two committees.

Example 7: Counting the Number of Possible Polygons

If the elements of the set {𝐴,𝐡,𝐢,𝐷} are arranged on a circle such that no two elements coincide, determine the number of polygons which can be made using these points as vertices.

Answer

A polygon must have at least three vertices. Since we have four points, then the polygons must have at most four vertices. Thus, we only need to count the number of polygons with three vertices and the number with four. Note that when forming a polygon, the order in which we choose the vertices is not important. Thus, we will be counting the number of combinations. There are οŠͺοŠͺ𝐢=1 ways to pick a polygon with four vertices, and there are οŠͺ𝐢=4 ways to pick a polygon with three vertices. Thus, in total, we can form 4+1=5 polygons.

For the final example, we will look at a problem where we need to find 𝑛 in 𝐢 when given both π‘Ÿ and the number of possible combinations.

Example 8: Word Problems Involving Combinations

At a college, there were 120 ways to select 119 students to attend a seminar. Determine the number of students at the college.

Answer

Let 𝑛 be the total number of students in the college. Since there are 120 ways to select 119 students, we have 𝐢=120. Using the definition of combinations, we have that 𝐢=𝑛!119!Γ—(π‘›βˆ’119)!.

Hence, 𝑛!119!Γ—(π‘›βˆ’119)!=120.

Multiplying both sides of the equation by 119!, we get 𝑛!(π‘›βˆ’119)!=120Γ—119!.

Expanding each side of the equation gives us 𝑛(π‘›βˆ’1)(π‘›βˆ’2)β‹―(π‘›βˆ’117)(π‘›βˆ’118)=120Γ—119Γ—β‹―Γ—2Γ—1.

Equating either the largest or smallest terms, we find that 𝑛=120. Therefore, the number of students at the college is 120.

Key Points

  1. Combinations are an unordered selection of π‘Ÿ items chosen without repetition from a collection of 𝑛. The total number of combinations of length π‘Ÿ chosen from a set of 𝑛 items is given by 𝐢=𝑛!π‘Ÿ!(π‘›βˆ’π‘Ÿ)!.
  2. To use combinations to count, we need to check that
    • we are counting without repetition,
    • order does not matter.
  3. A summary of the different ways to count and the formulas to use for each is given in the table below (we have not yet covered the way to count with repetition when order does not matter).
    Without RepetitionWith Repetition
    Order MattersοŠοŽπ‘ƒ=𝑛!(π‘›βˆ’π‘Ÿ)!π‘›οŽ
    Order Does Not Matter𝐢=𝑛!π‘Ÿ!(π‘›βˆ’π‘Ÿ)!

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.