CSC165 Discrete Structure

Discrete StructureUnit 815 min read

Combinatorics: Counting Principles, Permutations, Combinations & Advanced Techniques

Unit 8 of Discrete Structure covers fundamental counting principles (addition/multiplication), permutations/combinations, binomial theorem, and advanced combinatorial techniques with applications in probability, algorithms, and real-world problem-solving.

TAKEAWAYS:

  • Counting principles (addition/multiplication) solve problems by breaking them into simpler, disjoint cases or sequential choices.
  • Permutations () count ordered arrangements, while combinations () count unordered selections—key distinction: order matters vs. doesn’t.
  • The binomial theorem () connects combinations to polynomial expansion and probability.
  • Advanced techniques (inclusion-exclusion, generating functions) extend basic counting to overlapping cases or recursive structures.
  • Applications span cryptography, network routing, algorithm analysis (e.g., Big-O), and probability (e.g., poker hands, birthdays).
  • Exam focus: Prove formulas, solve word problems, and distinguish between permutations/combinations—common pitfall is misapplying order.

1. Fundamental Counting Principles

1.1 Addition Principle

Definition: If a task can be completed in distinct ways or in distinct ways (with no overlap), the total number of ways is .

How it works:

  • Disjoint cases: The two methods of completion are mutually exclusive.
  • Example: Counting students who passed either Math or Physics.
    • Let = students who passed Math = 30.
    • = students who passed Physics = 25.
    • = students who passed both = 5.
    • Total passing at least one subject = . (Note: This is actually inclusion-exclusion; pure addition applies only if .)

Worked Example: How many 3-digit numbers use digits {1, 2, 3, 4} with no repetition, where the first digit is either 1 or 2?

  • Case 1: First digit = 1 → remaining 2 digits from {2, 3, 4} → .
  • Case 2: First digit = 2 → remaining 2 digits from {1, 3, 4} → .
  • Total = (addition principle).

Comparison Table:

Principle Condition Formula Example
Addition Mutually exclusive cases Choosing a red or blue shirt
Multiplication Sequential independent choices Outfit: shirt × pants

1.2 Multiplication Principle

Definition: If a task can be completed in ways and a second task in ways (independent of the first), the total number of ways is .

How it works:

  • Sequential choices: Each step’s outcome depends on previous choices.
  • Example: Passwords with 2 letters followed by 2 digits.
    • Letters: 26 × 26 = 676.
    • Digits: 10 × 10 = 100.
    • Total passwords = .

Worked Example: A restaurant offers 3 starters, 4 mains, and 2 desserts. How many full meals can be ordered?

  • Starters: 3 choices.
  • Mains: 4 choices (independent of starter).
  • Desserts: 2 choices.
  • Total meals = .

Key Insight:

  • Order matters: The multiplication principle assumes a specific sequence (e.g., starter → main → dessert).
  • Pitfall: Misapplying it to overlapping cases (use addition instead).

2. Permutations

2.1 Definition and Formula

Definition: A permutation is an ordered arrangement of objects from a set of distinct objects. Notation: .

Formula:

Why it works:

  • First position: choices.
  • Second position: remaining choices (no repetition).
  • ...
  • -th position: choices.

Worked Example: How many 4-digit PINs can be formed using digits {0, 1, 2, ..., 9} with no repetition?

  • First digit: 10 choices (0–9).
  • Second digit: 9 choices (remaining digits).
  • Third digit: 8 choices.
  • Fourth digit: 7 choices.
  • Total = or .

Special Cases:

  • Permutations of all objects: .
  • Circular permutations: (fix one object to break rotational symmetry).

2.2 Applications

Application Example Formula Used
Cryptography Passwords, encryption keys
Scheduling Task sequences, exam timetables
Ranking Sports standings, leaderboards
DNA Sequencing Ordering genetic markers Permutations with repeats

Pitfall:

  • Repetition allowed? If yes, use (e.g., PINs with repeats: ).

3. Combinations

3.1 Definition and Formula

Definition: A combination is an unordered selection of objects from a set of distinct objects. Notation: or .

Formula:

Why it works:

  • Permutations overcount by (all orderings of the same objects are identical in combinations).

Worked Example: How many ways can a committee of 3 be formed from 5 people?

  • Order doesn’t matter: {A, B, C} is the same as {B, A, C}.
  • Total = .

Comparison with Permutations:

Feature Permutations () Combinations ()
Order Matters (ABC ≠ BAC) Doesn’t matter (ABC = BAC)
Formula
Example Arranging books on a shelf Selecting a pizza toppings combo
When to use Rankings, sequences Groups, subsets

3.2 Key Properties

  1. Symmetry: .
    • Proof: Selecting items to include is equivalent to selecting items to exclude.
  2. Pascal’s Identity: .
    • Application: Used in binomial coefficients and dynamic programming.

Worked Example: Prove .

  • .
  • .
  • Conclusion: Symmetry holds.

4. Binomial Theorem

4.1 Statement

The binomial theorem expands as a sum of terms involving combinations:

Example:

4.2 Applications

  1. Probability:
    • Binomial distribution: .
  2. Algebra:
    • Simplifying expressions like .
  3. Combinatorics:
    • Counting subsets with specific properties (e.g., exactly 2 red balls in 5 draws).

Worked Example: Expand using the binomial theorem.


5. Advanced Counting Techniques

5.1 Inclusion-Exclusion Principle

Problem: Count elements in multiple sets with overlaps. Formula: For 3 sets:

Worked Example: In a class of 30 students:

  • 18 like Math,
  • 12 like Physics,
  • 10 like Chemistry,
  • 5 like both Math and Physics,
  • 4 like both Math and Chemistry,
  • 3 like both Physics and Chemistry,
  • 2 like all three. How many like at least one subject?

Generalization: For sets, the principle alternates between adding and subtracting intersections.


5.2 Generating Functions

Definition: A generating function encodes a sequence as coefficients in a power series:

Example:

  • Counting subsets: The generating function for subsets of is , where the coefficient of is .

Application: How many ways can you make $5 using coins of $1 and $2?

  • Generating function: .
  • Coefficient of : 3 ways (1+1+1+1+1, 1+1+1+2, 2+2+1).

5.3 Recursive Counting

Definition: Define a problem in terms of smaller subproblems. Example:

  • Fibonacci numbers: (counting tile arrangements).
  • Catalan numbers: (counting valid parentheses expressions).

Worked Example: Count the number of binary strings of length with no two consecutive 1s.

  • Let = valid strings of length .
  • Recurrence:
    • Ends with 0: choices.
    • Ends with 01: choices.
  • Base cases: (0, 1), (00, 01, 10).
  • Solution: (Fibonacci-like).

6. Common Pitfalls and Exam Tips

6.1 Mistakes to Avoid

  1. Confusing permutations/combinations:
    • Wrong: Using for ordered arrangements (e.g., passwords).
    • Fix: Use when order matters.
  2. Ignoring constraints:
    • Example: Counting 3-digit numbers with digits {0, 1, 2} without repetition.
      • Error: (forgets first digit can’t be 0).
      • Correct: (first digit: 1 or 2).
  3. Overlapping cases in addition:
    • Example: Counting students in Math or Physics without subtracting the intersection.
  4. Misapplying formulas:
    • Example: Using when repetition is allowed (use combinations with repetition: ).

6.2 Exam Strategies

  1. Diagram problems:
    • Draw Venn diagrams for inclusion-exclusion.
    • Use tree diagrams for counting sequences.
  2. Verify with small numbers:
    • For , check and manually.
  3. Watch for hidden constraints:
    • "No repetition," "at least one," "exactly two" — translate to mathematical conditions.
  4. Memorize key formulas:
    • Binomial theorem expansion
  5. Practice word problems:
    • Translate English to combinatorial terms (e.g., "committee" → combination, "schedule" → permutation).

6.3 Sample Exam Questions

  1. Direct Application:

    • Question: How many 5-letter words can be formed from {A, B, C, D, E} with no repetition?
    • Answer: .
  2. Combination Problem:

    • Question: A pizza shop offers 8 toppings. How many 3-topping pizzas can be made?
    • Answer: .
  3. Inclusion-Exclusion:

    • Question: In a group of 40 people, 25 like tea, 20 like coffee, and 10 like both. How many like neither?
    • Answer: .
  4. Binomial Expansion:

    • Question: Find the coefficient of in .
    • Answer: .
  5. Advanced Technique:

    • Question: Count the number of ways to distribute 10 identical candies to 3 children where each gets at least 1.
    • Answer: (stars and bars).

7. Summary Table

Topic Formula/Concept When to Use Example
Addition Principle Disjoint cases Choosing A or B
Multiplication Principle Sequential independent choices Outfit combinations
Permutations Ordered arrangements Passwords, rankings
Combinations Unordered selections Committees, subsets
Binomial Theorem Polynomial expansion, probability expansion
Inclusion-Exclusion Overlapping sets Students in multiple clubs
Generating Functions Counting with constraints Coin change problems

8. Further Reading and Practice

  1. Books:
    • Discrete Mathematics and Its Applications by Kenneth Rosen (Chapters 6–7).
    • Concrete Mathematics by Graham, Knuth, Patashnik (for advanced techniques).
  2. Online Resources:
  3. Practice Problems:
    • Solve all end-of-chapter problems from Rosen (Sections 6.1–6.5).
    • TU/PU past papers (focus on word problems).
    • NEB questions on permutations/combinations in probability units.

9. Exam Tip

What Examiners Look For:

  1. Correct formula application: Always justify why or is used.
  2. Step-by-step reasoning: Break problems into subparts (e.g., "Case 1: first digit is 1; Case 2: first digit is 2").
  3. Units and constraints: Clearly state assumptions (e.g., "no repetition," "order matters").
  4. Verification: For small , compute manually to verify your formula.
  5. Diagrams: Use Venn diagrams for inclusion-exclusion or tree diagrams for counting paths.

Common Exam Patterns:

  • Part (a): Direct application (e.g., "Calculate ").
  • Part (b): Word problem (e.g., "How many ways can a team captain and 3 members be chosen from 10 people?").
  • Part (c): Proof or derivation (e.g., "Prove ").

Time Management:

  • Spend ~3 minutes per subpart.
  • If stuck, move on and return later (combinatorics problems often have multiple approaches).

10. Quick Reference Cheat Sheet

### FORMULAS
1. Permutations: P(n, r) = n! / (n-r)!
2. Combinations: C(n, r) = n! / (r!(n-r)!)
3. Binomial Coefficient: C(n, k) = "n choose k"
4. Inclusion-Exclusion: |A ∪ B| = |A| + |B| - |A ∩ B|
5. Generating Function: G(x) = Σ aₙ xⁿ

### WHEN TO USE
- **Permutations**: Order matters (passwords, rankings).
- **Combinations**: Order doesn’t matter (committees, subsets).
- **Addition**: "OR" with no overlap.
- **Multiplication**: "AND" with independent choices.
- **Inclusion-Exclusion**: Overlapping sets.

11. Final Worked Problem (Synthesis)

Question: A club has 10 members. It wants to form a 4-person committee with:

  1. A president and vice-president (order matters for these roles).
  2. Two additional members (order doesn’t matter).
  3. No member can hold more than one role. How many ways can this be done?

Solution:

  1. Choose president and vice-president:
    • Ordered selection → .
  2. Choose 2 additional members from remaining 8:
    • Unordered selection → .
  3. Total ways:
    • Multiply choices (independent steps) → .

Alternative Approach:

  • Total ordered arrangements for 4 distinct roles: .
  • But the last two roles are identical (no order), so divide by : .

Answer: .

Based on the TU BSc CSIT syllabus for Discrete Structure (CSC165), unit 8.

Discussion

Loading…