Counting Principles and Combinatorics
5. Advanced Counting Techniques
Learning outcomes
- I can solve counting problems involving restrictions.
- I can solve circular permutation problems.
- I can solve problems involving repeated objects.
- I can combine multiple counting strategies.
- I can justify counting methods.
Advanced Counting Techniques
Introduction to Advanced Counting Techniques
Many counting problems are more complicated than simply arranging objects or selecting members of a group. Real-world situations often include restrictions, repeated objects, circular arrangements, or several conditions that must be satisfied simultaneously.
For example:
-
How many ways can six people sit around a circular table?
-
How many different arrangements can be made from the letters in BANANA?
-
How many ways can students line up if two particular students must stand together?
-
How many committees can be formed if certain members cannot serve together?
-
How can we count arrangements without accidentally counting the same outcome more than once?
These problems require advanced counting techniques that combine permutations, combinations, the Fundamental Counting Principle, and logical reasoning.
The most important skill is not simply memorizing formulas. It is recognizing the structure of a counting problem and explaining why a particular method works.
Reviewing the Fundamental Counting Principles
Before studying more advanced techniques, it is important to understand the basic counting rules.
Multiplication Principle
When a process consists of several stages, multiply the number of choices available at each stage, provided those counts apply to every possible choice made earlier.
For example, a student has:
-
4 shirts
-
3 pairs of trousers
-
2 pairs of shoes
The total number of outfits is:
4 × 3 × 2 = 24
Addition Principle
When a choice can be made from separate, mutually exclusive categories, add the number of possibilities.
For example, a student may choose:
-
One of 5 science activities
-
Or one of 4 sports activities
If exactly one activity is selected:
5 + 4 = 9
Permutations
Permutations count arrangements where order matters.
For n distinct objects arranged in a line:
P = n!
For r objects selected and arranged from n distinct objects without repetition:
P(n, r) = n!/(n − r)!
Combinations
Combinations count selections where order does not matter.
C(n, r) = n!/[r!(n − r)!]
These principles form the foundation for more challenging counting problems.
Understanding Restrictions
A restriction is a condition that limits which arrangements or selections are allowed.
Examples include:
-
Two people must sit together.
-
Two people cannot sit together.
-
A particular person must occupy the first position.
-
A number must be even.
-
A password cannot contain repeated characters.
-
A committee must contain a specified number of members from different groups.
Restrictions change the number of available outcomes.
A useful strategy is to identify the restriction before applying any counting formula.
Worked Example: A Fixed Position
Six students must stand in a line.
Alex must stand at the beginning.
How many arrangements are possible?
Step 1: Fix Alex in the first position.
There is only one choice for that position.
Step 2: Arrange the remaining five students.
5! = 5 × 4 × 3 × 2 × 1
Final answer:
120 arrangements
Without the restriction, there would be:
6! = 720 arrangements
The restriction reduces the number of possibilities.
The Block Method: Objects That Must Stay Together
The block method is useful when two or more objects must remain adjacent.
Instead of treating the objects separately, group them into a single block.
Worked Example: Two Students Together
Six students stand in a line.
Alex and Ben must stand next to each other.
How many arrangements are possible?
Step 1: Treat Alex and Ben as one block.
The objects are now:
-
(Alex, Ben)
-
Student C
-
Student D
-
Student E
-
Student F
There are five objects to arrange.
Step 2: Arrange the five objects.
5! = 120
Step 3: Arrange Alex and Ben within their block.
They can stand as:
Alex–Ben
or:
Ben–Alex
There are 2! = 2 possibilities.
Step 4: Multiply.
120 × 2 = 240
Final answer:
240 arrangements
Worked Example: Three Students Together
Seven students stand in a line.
Three particular students must remain together.
Step 1: Treat the three students as one block.
There are now five objects:
-
One block of three students
-
Four other students
Step 2: Arrange the five objects.
5! = 120
Step 3: Arrange the three students within their block.
3! = 6
Step 4: Multiply.
120 × 6 = 720
Final answer:
720 arrangements
General Strategy
When k particular objects must remain together among n distinct objects:
-
Treat the k objects as one block.
-
Arrange the resulting n − k + 1 objects.
-
Arrange the k objects within the block.
The number of arrangements is:
(n − k + 1)! × k!
This formula applies when all objects are distinct and the k specified objects must form one consecutive block.
Complementary Counting: Objects That Must Not Stay Together
Sometimes it is easier to count the arrangements that are not allowed and subtract them from the total.
This method is called complementary counting.
Valid outcomes = Total outcomes − Invalid outcomes
Worked Example: Two Students Must Be Apart
Six students stand in a line.
Alex and Ben must not stand next to each other.
Step 1: Count all arrangements.
6! = 720
Step 2: Count arrangements where Alex and Ben are together.
Using the block method:
5! × 2! = 240
Step 3: Subtract.
720 − 240 = 480
Final answer:
480 arrangements
This method is much simpler than listing every arrangement in which the students are separated.
The Gap Method
The gap method is useful when certain objects must be separated from one another.
For example, suppose three boys and two girls must stand in a line, and the girls cannot stand next to each other.
Step 1: Arrange the three boys.
3! = 6 arrangements
Step 2: Identify the gaps.
For a particular order of boys:
_ B _ B _ B _
There are four possible gaps where girls may stand.
Step 3: Choose two different gaps.
C(4, 2) = 6
Step 4: Arrange the two girls.
2! = 2
Step 5: Multiply.
6 × 6 × 2 = 72
Final answer:
72 arrangements

The gap method is especially useful for arranging people, letters, or objects that must not appear consecutively.
Circular Permutations
In a linear arrangement, positions are fixed from left to right.
In a circular arrangement, there is no natural starting position.
For example, consider four people sitting around a round table.
Rotating everyone one seat clockwise does not change who sits beside whom.
Therefore, rotations are usually considered the same arrangement.
Formula for Circular Permutations
For n distinct objects arranged around a circle, when rotations are considered equivalent but reflections are different:
P = (n − 1)!
Why Does the Formula Work?
In a straight line, n distinct objects can be arranged in:
n! ways
However, each circular arrangement can be represented by n different linear sequences, depending on which object is listed first.
Therefore:
n!/n = (n − 1)!
An alternative explanation is to fix one person in a reference position and arrange the remaining n − 1 people.
Worked Example: Seating Six People Around a Table
Six people sit around a circular table.
How many different seating arrangements are possible?
Step 1: Identify n.
n = 6
Step 2: Apply the circular permutation formula.
P = (6 − 1)!
P = 5!
Final answer:
120 arrangements
Circular Arrangements Versus Linear Arrangements
|
Number of people |
Linear arrangements |
Circular arrangements |
|---|---|---|
|
3 |
6 |
2 |
|
4 |
24 |
6 |
|
5 |
120 |
24 |
|
6 |
720 |
120 |
|
7 |
5,040 |
720 |
Circular arrangements have fewer distinct outcomes because rotations are treated as equivalent.
Circular Arrangements with Restrictions
Circular permutation problems may include conditions such as two people sitting together or opposite one another.
Worked Example: Two People Must Sit Together
Six people sit around a circular table.
Alex and Ben must sit next to each other.
Step 1: Treat Alex and Ben as one block.
There are now five objects around the circle:
-
The Alex–Ben block
-
Four other people
Step 2: Arrange the five objects circularly.
(5 − 1)! = 4! = 24
Step 3: Arrange Alex and Ben within their block.
2! = 2
Step 4: Multiply.
24 × 2 = 48
Final answer:
48 arrangements
Worked Example: Two People Must Not Sit Together
Six people sit around a circular table.
Alex and Ben must not sit next to each other.
Step 1: Count all circular arrangements.
5! = 120
Step 2: Count arrangements where they sit together.
4! × 2! = 48
Step 3: Subtract.
120 − 48 = 72
Final answer:
72 arrangements
Important Note About Reflections
For ordinary round-table seating, clockwise and counterclockwise arrangements are usually considered different unless one can be obtained from the other by rotation.
However, for necklaces or bracelets that can be turned over, mirror-image arrangements may also be considered equivalent.
These problems require additional care because the simple formula (n − 1)! may no longer apply.
Circular Arrangements with Opposite Positions
Some circular problems involve people sitting directly opposite one another.
This requires an even number of equally spaced seats.
Worked Example: Two People Must Sit Opposite
Six people sit around a circular table.
Alex and Ben must sit opposite each other.
Step 1: Fix Alex's position.
Fixing Alex removes rotational duplicates.
Step 2: Place Ben opposite Alex.
There is exactly one available opposite seat.
Step 3: Arrange the remaining four people.
4! = 24
Final answer:
24 arrangements
The fixed-position method is especially useful when circular arrangements contain positional restrictions.
Permutations Involving Repeated Objects
Some arrangements contain objects that are identical.
For example, the word LEVEL contains five letters:
L, E, V, E, L
However:
-
L appears twice.
-
E appears twice.
-
V appears once.
If all letters were different, there would be:
5! = 120 arrangements
But swapping identical letters does not create a new arrangement.
To correct for repeated objects, divide by the factorials of their repetition counts.
Formula for Repeated Objects
If n objects contain groups of identical objects with repetition counts a, b, c, ...:
P = n!/(a!b!c!...)
The repetition counts must add to n.
Worked Example: Arranging BANANA
The word BANANA contains six letters.
-
A appears three times.
-
N appears twice.
-
B appears once.
Step 1: Count the total letters.
n = 6
Step 2: Identify repetitions.
A: 3
N: 2
Step 3: Apply the formula.
P = 6!/(3! × 2!)
Step 4: Calculate.
P = 720/(6 × 2)
P = 720/12
Final answer:
60 distinct arrangements
Worked Example: Arranging MISSISSIPPI
The word MISSISSIPPI contains 11 letters.
The repetition counts are:
-
M: 1
-
I: 4
-
S: 4
-
P: 2
The number of distinct arrangements is:
P = 11!/(4! × 4! × 2!)
P = 39,916,800/(24 × 24 × 2)
P = 39,916,800/1,152
Final answer:
34,650 distinct arrangements
This example demonstrates why the repeated-object formula is much more efficient than listing outcomes.
Repeated Objects with Restrictions
Repeated-object problems become more challenging when certain letters must appear together or apart.
Worked Example: All Vowels Together
How many distinct arrangements of the word BANANA have all three A's together?
Step 1: Treat AAA as one block.
The objects are now:
-
AAA
-
B
-
N
-
N
There are four objects, with N repeated twice.
Step 2: Apply the repeated-object formula.
P = 4!/2!
P = 24/2
Final answer:
12 distinct arrangements
Because all three A's are identical, rearranging them within the block does not create additional outcomes.
Worked Example: Two Identical Letters Must Not Be Together
Consider the word LEVEL.
How many arrangements have the two Ls separated?
Step 1: Count all arrangements.
P = 5!/(2! × 2!)
P = 30
Step 2: Count arrangements where the Ls are together.
Treat LL as one block.
The objects become:
-
LL
-
E
-
E
-
V
There are four objects, with E repeated twice.
P = 4!/2!
P = 12
Step 3: Subtract.
30 − 12 = 18
Final answer:
18 arrangements
Combining Permutations and Combinations
Some problems require selecting objects first and then arranging them.
This combines combinations with permutations.
Worked Example: Selecting and Arranging Students
A class contains 10 students.
Four students are selected to give presentations.
How many different presentation schedules are possible?
Method A: Direct Permutation
P(10, 4) = 10 × 9 × 8 × 7
P(10, 4) = 5,040
Method B: Combination Followed by Permutation
First select four students:
C(10, 4) = 210
Then arrange those four students:
4! = 24
Multiply:
210 × 24 = 5,040
Both methods give the same result.
This illustrates the relationship:
P(n, r) = C(n, r) × r!
Counting Problems with Multiple Cases
Some restrictions require dividing a problem into separate cases.
Worked Example: Forming a Committee
A school has:
-
5 boys
-
4 girls
A committee of 3 students must contain at least one girl.
How many committees are possible?
Method A: Count Separate Cases
Case 1: One girl and two boys
C(4, 1) × C(5, 2)
= 4 × 10
= 40
Case 2: Two girls and one boy
C(4, 2) × C(5, 1)
= 6 × 5
= 30
Case 3: Three girls
C(4, 3) = 4
Add the cases:
40 + 30 + 4 = 74
Final answer: 74 committees
Method B: Complementary Counting
Count all committees:
C(9, 3) = 84
Subtract committees containing only boys:
C(5, 3) = 10
84 − 10 = 74
Both methods give the same answer.
Why Are Both Methods Valid?
The first method divides the valid outcomes into mutually exclusive cases.
The second method counts all possible outcomes and removes the invalid ones.
Choosing the simpler method can save considerable time.
The Inclusion–Exclusion Principle
Sometimes counting categories overlap.
If we simply add their sizes, outcomes belonging to both categories are counted twice.
The Inclusion–Exclusion Principle corrects this problem.
For two sets A and B:
|A ∪ B| = |A| + |B| − |A ∩ B|
where:
-
|A| is the number of outcomes in A.
-
|B| is the number of outcomes in B.
-
|A ∩ B| is the number of outcomes in both.
-
|A ∪ B| is the number of outcomes in either or both.
Worked Example: Students Studying Languages
In a class:
-
18 students study French.
-
15 students study Spanish.
-
7 students study both languages.
How many students study at least one of these languages?
18 + 15 − 7 = 26
Final answer:
26 students
The overlap must be subtracted once because it was counted in both original groups.
Advanced Digit Arrangement Problems
Digit problems often combine permutations with restrictions.
Worked Example: Four-Digit Even Numbers
How many four-digit even numbers can be formed using the digits 0–9 without repetition?
An even number must end in:
0, 2, 4, 6, or 8
However, the first digit cannot be zero.
We divide the problem into two cases.
Case 1: The Last Digit Is Zero
Last digit: 1 choice
First digit: 9 choices
Second digit: 8 choices
Third digit: 7 choices
Total:
1 × 9 × 8 × 7 = 504
Case 2: The Last Digit Is 2, 4, 6, or 8
Last digit: 4 choices
First digit: 8 choices (nonzero and different from the last digit)
Second digit: 8 choices
Third digit: 7 choices
Total:
4 × 8 × 8 × 7 = 1,792
Combine the Cases
504 + 1,792 = 2,296
Final answer:
2,296 four-digit even numbers
This problem demonstrates why it is important to identify restrictions before multiplying.
Counting Arrangements with Identical Groups
Some problems involve selecting or arranging groups rather than individual objects.
Worked Example: Distributing Identical Objects
A teacher has five identical pencils to distribute among three students.
Each student may receive zero or more pencils.
How many different distributions are possible?
This is a combinations with repetition problem.
The formula is:
C(n + r − 1, r)
where:
-
n is the number of recipients or categories.
-
r is the number of identical objects.
Here:
n = 3
r = 5
C(3 + 5 − 1, 5)
= C(7, 5)
= 21
Final answer:
21 distributions
This method is often called stars and bars.

The five stars represent the pencils, while the two bars divide them among the three students.
There are seven positions containing five stars and two bars.
Choosing the positions of the bars gives:
C(7, 2) = 21
Justifying Counting Methods
In advanced counting problems, obtaining the correct numerical answer is only part of the task.
A complete mathematical solution should explain why the method counts every valid outcome exactly once.
A strong justification includes the following ideas.
Identify What Is Being Counted
Clearly define the objects, arrangements, or selections.
For example:
"We are counting distinct arrangements of six students in a line."
Explain Why Order Matters or Does Not Matter
This determines whether permutations or combinations are appropriate.
For example:
"Order matters because changing the students' positions creates a different arrangement."
Explain the Restrictions
Describe how the restrictions affect the available choices.
For example:
"Because Alex and Ben must stand together, they are treated as one block."
Explain the Counting Operation
State why multiplication, addition, or subtraction is used.
For example:
"The arrangements of the blocks are multiplied by the arrangements within the block because each block arrangement can be paired with either internal order."
Check for Double-Counting
Make sure the same outcome is not counted more than once.
This is especially important when:
-
Objects are identical.
-
Circular rotations are equivalent.
-
Different cases overlap.
-
Multiple restrictions apply.
Comparing Advanced Counting Strategies
|
Situation |
Recommended strategy |
|---|---|
|
Objects must remain together |
Block method |
|
Objects must not remain together |
Complementary counting or gap method |
|
Circular seating |
Fix one position |
|
Identical objects |
Divide by repeated factorials |
|
Selection followed by ordering |
Combinations × permutations |
|
Several separate cases |
Addition Principle |
|
Overlapping cases |
Inclusion–Exclusion |
|
At least one required |
Complementary counting |
|
Identical objects distributed into categories |
Stars and bars |
|
Multiple digit restrictions |
Divide into cases |
The best method depends on the structure of the problem.
Real-World Applications
Scheduling
Schools and businesses use counting methods to calculate possible schedules.
Restrictions may include:
-
Certain activities must occur consecutively.
-
Some activities cannot overlap.
-
Particular events must occur first or last.
-
Certain tasks must follow others.
Seating Arrangements
Event organizers may need to arrange guests while satisfying conditions such as:
-
Family members sitting together.
-
Guests being separated.
-
Particular guests sitting opposite one another.
-
Assigned seats at circular tables.
Passwords and Security
Password systems use counting principles to estimate the number of possible codes.
Restrictions may include:
-
At least one number.
-
At least one uppercase letter.
-
No repeated characters.
-
A minimum password length.
Computer Science
Advanced counting methods are used in:
-
Algorithm design.
-
Data organization.
-
Search problems.
-
Network analysis.
-
Cryptography.
-
Resource allocation.
Genetics and Biology
Counting methods help scientists investigate possible genetic combinations, experimental arrangements, and distributions of biological characteristics.
Common Mistakes
Using n! for circular arrangements
When rotations are equivalent, use (n − 1)! rather than n!.
Forgetting internal arrangements in the block method
Objects within a block may still be arranged in several ways.
Treating identical objects as distinct
Repeated objects must be accounted for to avoid overcounting.
Using complementary counting incorrectly
The invalid outcomes being subtracted must correspond exactly to the restriction.
Adding overlapping cases without correction
Use Inclusion–Exclusion when cases overlap.
Confusing selections with arrangements
Use combinations when order does not matter and permutations when order matters.
Ignoring zero restrictions in digit problems
A multi-digit number cannot begin with zero, although a code may.
Assuming every circular arrangement has the same rules
Some circular problems treat reflections as equivalent, while others do not.
Failing to justify the method
A correct answer should explain why the chosen method counts the intended outcomes.
Counting the same outcome more than once
Double-counting is a major source of error in advanced counting problems.
Key Terms
-
Advanced Counting Techniques: Mathematical methods used to count arrangements and selections involving restrictions or complicated conditions.
-
Restriction: A condition that limits which outcomes are allowed.
-
Fundamental Counting Principle: A rule for multiplying the number of choices across stages.
-
Addition Principle: A rule for adding the numbers of outcomes from mutually exclusive cases.
-
Permutation: An arrangement in which order matters.
-
Combination: A selection in which order does not matter.
-
Factorial: The product of all positive integers up to a given positive integer.
-
Circular Permutation: An arrangement of objects around a circle.
-
Rotational Equivalence: The condition that arrangements differing only by rotation are considered identical.
-
Reflection: A reversal of orientation that may or may not create a distinct circular arrangement.
-
Block Method: A strategy that treats objects required to remain together as a single unit.
-
Gap Method: A strategy that places objects into available gaps to prevent adjacency.
-
Complementary Counting: A method that subtracts invalid outcomes from the total.
-
Repeated Objects: Objects that are identical and cannot be distinguished from one another.
-
Multiset: A collection in which identical elements may occur more than once.
-
Inclusion–Exclusion Principle: A method for counting overlapping sets without double-counting.
-
Mutually Exclusive Cases: Cases that cannot occur simultaneously.
-
Stars and Bars: A method for counting distributions of identical objects among distinct categories.
-
Double-Counting: Counting the same outcome more than once.
-
Justification: A mathematical explanation showing why a counting method is valid.
-
Combinatorics: The branch of mathematics concerned with counting arrangements and selections.
-
Sample Space: The set of all possible outcomes in an experiment or counting situation.
Key Takeaways
-
Advanced counting problems often require several counting principles to be combined.
-
Restrictions must be identified before selecting a counting method.
-
The block method is useful when objects must remain together.
-
Complementary counting is useful when it is easier to count invalid outcomes than valid ones.
-
The gap method helps count arrangements where particular objects must remain separated.
-
Circular permutations usually use (n − 1)! when rotations are considered equivalent.
-
Circular arrangements involving fixed or opposite positions may require additional reasoning.
-
Repeated objects reduce the number of distinct arrangements.
-
The repeated-object permutation formula divides by the factorials of identical-object counts.
-
Selection followed by arrangement can be counted using combinations multiplied by permutations.
-
Complex restrictions may require dividing problems into mutually exclusive cases.
-
Inclusion–Exclusion prevents double-counting when cases overlap.
-
Stars and bars counts distributions of identical objects among distinct categories.
-
Advanced counting methods are useful in scheduling, seating, passwords, computer science, and scientific research.
-
A complete solution should justify why every valid outcome is counted exactly once.
Check Your Understanding
Recall and Understanding
-
Explain the difference between a linear permutation and a circular permutation.
-
Why is the formula for circular permutations usually (n − 1)!?
-
Describe the block method and explain when it is useful.
-
What is complementary counting?
-
Explain why repeated objects require a modified permutation formula.
Application
-
Seven people sit around a circular table. How many distinct seating arrangements are possible?
-
How many distinct arrangements can be made using the letters in the word LEVEL?
-
Six students stand in a line. How many arrangements are possible if two particular students must stand together?
-
Eight students must give presentations. How many schedules are possible if one particular student must present first?
-
How many different committees of 3 students can be formed from a group of 10 students if one particular student must be included?
Analysis and Challenge
-
Seven students stand in a line. How many arrangements are possible if two particular students must not stand next to each other?
-
Eight people sit around a circular table. How many arrangements are possible if two particular people must sit together?
-
How many distinct arrangements can be made using the letters in MISSISSIPPI?
-
How many four-digit even numbers can be formed using digits 0–9 without repetition?
-
A class contains 6 boys and 5 girls. A committee of 4 students must contain at least 2 girls. Calculate the number of possible committees and justify your method.
Final Summary
Advanced counting techniques extend the Fundamental Counting Principle, permutations, and combinations to situations involving restrictions, circular arrangements, repeated objects, and overlapping conditions.
By using methods such as grouping, complementary counting, gap counting, Inclusion–Exclusion, and stars and bars, complicated counting problems can be solved systematically.
The most important part of advanced counting is understanding the structure of the problem and choosing a method that counts every valid outcome exactly once.
These techniques provide a foundation for probability, statistics, combinatorics, computer science, optimization, and many practical problems involving arrangements and selections.