Lesson 41 of 46 · Data analysis
Counting: permutations, combinations and Venn diagrams
Count arrangements and selections with the multiplication principle, decide when order matters, handle restrictions, and count overlapping groups.
About 22 minutes
In this lesson
- Use the multiplication principle to count outcomes of a process done in stages.
- Decide whether order matters, and use permutations or combinations accordingly.
- Handle restrictions such as fixed positions or items that must stay together.
- Count overlapping groups with a Venn diagram and inclusion–exclusion.
The idea
The multiplication principle
Almost every counting question reduces to one idea. If a task is done in stages, with ways to do the first stage and, for each of those, ways to do the second, then the whole task can be done in ways. The rule extends to any number of stages.
A café offers 4 sandwiches, 3 drinks and 2 desserts. A meal of one of each can be chosen in ways. Draw one slot per stage, write the number of choices in each slot, and multiply.
Use addition instead when the cases are alternatives that cannot happen together: if a meal is either a sandwich (4 options) or a salad (3 options), there are choices. "And" between stages multiplies; "or" between separate cases adds.
Factorials and arranging everything
The number of ways to arrange different objects in a row is
because there are choices for the first place, for the second, and so on. By definition . Factorials grow fast: , , .
Permutations: order matters
When you choose objects from and the order matters (first, second and third prize; a president and a treasurer; a code), the count is
Choosing a gold, silver and bronze winner from 10 runners: ways. In practice you rarely need the formula: fill the slots and multiply.
Combinations: order does not matter
When you choose a group, where swapping members gives the same group (a committee, a hand of cards, a set of toppings), each group of has been counted times by the slot method. Divide that out:
Choosing 3 runners to advance from 10: groups. Two facts save time: , because choosing who is in is the same as choosing who is out, and , .
The test for order: swap two of the chosen items. If the outcome is different (different roles, positions or sequence), order matters. If it is the same, it does not.
Restrictions
- Fill restricted places first. If a code must start with a vowel, count the first slot's choices before the others.
- Items that must stay together: glue them into one block, arrange the block with the other items, then multiply by the number of orders inside the block.
- Items that must stay apart: count all arrangements and subtract those where they are together.
- "At least one": count everything and subtract the outcomes with none.
- Identical items: arranging objects where are identical to each other and are identical to each other gives arrangements, since swapping identical items changes nothing.
Groups that overlap: Venn diagrams
When people or objects can belong to two groups at once, adding the two group sizes counts the overlap twice. Correct for it once:
Here means "the number in". Everyone not in either group is . Drawing two overlapping circles and filling in the overlap first, then "A only" and "B only", then "neither", turns most of these questions into subtraction.
| Region | How to get it |
|---|---|
| both | given, or |
| A only | |
| B only | |
| neither |
Checking an answer
Counting answers are hard to check by recomputing the same way, so look for a second route: count the complement, or try a smaller version you can list by hand. With 4 people choosing 2, there are pairs, and you can write all six down.
Worked examples
Example 1: A code with a restricted first place
A code is made of 3 different letters chosen from A, B, C, D, E and F, and the first letter must be a vowel. How many codes are possible?
Order matters (ABC and BAC are different codes), so fill slots.
Fill the restricted slot first: the vowels available are A and E, so the first place has 2 choices.
The second place can be any of the 5 letters not yet used, and the third any of the remaining 4.
Multiply: .
Answer
There are 40 codes. Starting with and then trying to adjust is where errors creep in; filling the restricted place first avoids it. (Check: by symmetry, a third of all 120 codes start with one of the 2 vowels out of 6 letters, and .)
Example 2: A committee drawn from two groups
A committee of 3 teachers and 2 parents is to be chosen from 7 teachers and 5 parents. How many different committees are possible?
Order does not matter inside a committee, so use combinations.
Teachers: ways.
Parents: ways.
The two choices are made together (teachers and parents), so multiply: .
Answer
350 committees. The tempting counts every group of 5 from all 12 people, including groups with the wrong mix of teachers and parents.
Example 3: Two items that must stay together
Five different books are placed in a row on a shelf. In how many arrangements are two particular books, a dictionary and an atlas, next to each other? In how many are they apart?
Glue the dictionary and atlas into one block. Now there are 4 items to arrange: the block and the other 3 books, in ways.
Inside the block the two books can be in either order: ways.
Together: arrangements.
All arrangements: . Apart: .
Answer
48 arrangements with the two books together and 72 with them apart. Forgetting the factor of 2 for the order inside the block gives 24, the usual wrong answer.
Example 4: Counting with two overlapping groups
Of 60 students, 34 study French, 25 study Spanish and 9 study both. How many study neither language, and how many study French only?
Students in at least one language: . The 9 are subtracted once because they were counted in both groups.
Neither: .
French only: . As a check, Spanish only is , and .
Answer
10 students study neither language and 25 study French only. Adding without removing the overlap would give just 1 student studying neither.
Common traps
Using permutations for a group
Committees, teams, hands and sets do not care about order. If you filled slots for a group, you counted each group times; divide by . Ask: does swapping two members change anything?
Adding when you should multiply
Choices made one after another, or together, multiply. Addition is only for separate cases that cannot both happen. "3 teachers and 2 parents" multiplies the two counts.
Forgetting arrangements inside a block
When items must stay together, the block itself can be ordered in several ways. Multiply by the number of internal orders, for two items, for three.
Counting the overlap twice
Group sizes in a Venn question include the overlap. Add the groups, subtract the overlap once, and only then subtract from the total to get "neither".
Check yourself
Answer each question before you open its answer.
Question 1: Three different posts
Data Analysis: counting methods
A club has 9 members. A president, a secretary and a treasurer are to be chosen from the members, and no member may hold more than one post. In how many different ways can the three posts be filled?
- A.27
- B.84
- C.504
- D.729
- E.3,024
Show the answer
Answer: C. 504
Working
There are 9 choices for president, then 8 for secretary from the remaining members, then 7 for treasurer: . Equivalently, each of the groups of three can be assigned to the three posts in ways, and .
Why the other options are wrong
- A. This multiplies the 9 members by the 3 posts. The choices for the posts must be multiplied together, and they shrink as members are used up.
- B. This is , the number of groups of three. The posts are different, so the order in which people are assigned matters.
- D. This is , which lets one member hold two or three posts.
- E. This multiplies four factors, , as if there were four posts.
What carries over
Distinct roles make order matter: fill the slots and multiply.
Question 2: Choosing in or choosing out
Quantitative Comparison
A coach is choosing players from a squad of 8.
| Quantity A | Quantity B |
|---|---|
| The number of different groups of 3 players that can be chosen | The number of different groups of 5 players that can be chosen |
- A.Quantity A is greater.
- B.Quantity B is greater.
- C.The two quantities are equal.
- D.The relationship cannot be determined from the information given.
Show the answer
Answer: C. The two quantities are equal.
Working
Every group of 3 chosen leaves a group of 5 behind, and the other way round, so the counts match: . Directly, and .
Why the other options are wrong
- A. This assumes smaller groups are more numerous; for 8 players, groups of 3 and of 5 come in matching pairs.
- B. This assumes more players chosen means more possible groups. Choosing 5 to play is the same as choosing the 3 who sit out.
- D. The squad size and both group sizes are fixed, so both counts are definite numbers.
What carries over
Choosing from gives as many groups as choosing the left out.
Question 3: Both, from neither
Data Analysis: counting methods
In a survey of 120 households, 52 own a dog, 48 own a cat and 27 own neither a dog nor a cat. How many of the households own both a dog and a cat?
- A.7
- B.27
- C.45
- D.93
- E.100
Show the answer
Answer: A. 7
Working
Households owning at least one pet: . By inclusion–exclusion, , so both . Check: dog only 45, cat only 41, both 7, neither 27, and .
Why the other options are wrong
- B. 27 is the number of households that own neither pet, given in the question, not the number that own both.
- C. 45 is the number that own a dog but no cat (), one step past the question.
- D. 93 is the number of households that own at least one of the two pets, .
- E. counts the households owning both pets twice; it is not a number of households.
What carries over
Get the union from the total and "neither", then let inclusion–exclusion give the overlap.
Key points
Stages done together multiply; separate alternatives add.
If swapping two chosen items changes the outcome, order matters: fill slots. If not, divide by .
Fill restricted places first; glue items that must stay together and multiply by their internal orders.
; "neither" is the total minus the union.
All questions here are original and written for UniExamer; none comes from the test maker.
Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.