Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 8

Advanced Counting Techniques

Recommended resources

Welcome to the final lesson of our first module on Discrete Mathematics. In the previous lesson, we explored the abstract world of algebraic structures, focusing on groups and the powerful constraints imposed by Lagrange's theorem. We are now shifting from abstract properties to a very practical and crucial skill for GATE: the art and science of counting, formally known as Combinatorics.

This lesson will equip you with the fundamental tools for solving counting problems, a topic that frequently appears in GATE, often in conjunction with probability. Our goal is to master four key techniques: permutations, combinations, the inclusion-exclusion principle, and the pigeonhole principle. Your background in information technology means you've likely encountered these ideas before; our focus here will be on refining your understanding and applying these tools to solve complex problems with the efficiency required for a competitive exam.

The Fundamental Principles of Counting

Before diving into permutations and combinations, let's quickly refresh the two most fundamental principles that form the basis of all counting.

  • The Sum Rule: If a task can be done in one of ways or in one of ways, where none of the ways are the same, then there are ways to do the task. This is the "OR" rule.
    • Example: A student can choose a project from one of three lists. The lists contain 10, 15, and 22 projects, respectively, with no overlaps. The total number of choices is .
  • The Product Rule: If a procedure can be broken down into a sequence of two tasks, and there are ways to do the first task and ways to do the second task for each way of doing the first, then there are ways to do the procedure. This is the "AND" rule.
    • Example: A car license plate consists of 3 letters followed by 4 digits. The total number of possible plates is .

These simple rules are the building blocks for the more sophisticated methods we'll explore next.


Permutations and Combinations: Order Matters

The most common source of confusion in counting problems is whether the order of selection matters. This single question determines whether you are dealing with a permutation or a combination.

  • Permutation: An arrangement of objects where the order is important. (A, B, C) is different from (C, B, A). Think of arranging books on a shelf or assigning distinct roles to people.
  • Combination: A selection of objects where the order does not matter. {A, B, C} is the same as {C, B, A}. Think of forming a committee or picking a hand of cards.

Let's watch a video that breaks this down clearly with examples and derives the standard formulas.

Permutations and Combinations Tutorial

This tutorial from The Organic Chemistry Tutor provides an excellent introduction to the core difference between permutations and combinations, followed by a clear derivation of their respective formulas.

Please watch the following segments: Conceptual Difference: Watch the first four minutes, from the beginning to this point. The video uses simple letter examples to illustrate how permutations count ordered arrangements while combinations count unordered groups. Permutation Formula: Continue from here to understand the formula for permutations, P(n, r), which calculates the number of ways to arrange r objects chosen from a set of n distinct objects. Combination Formula: Finally, watch the segment from this timestamp for the combination formula, C(n, r), and its direct relationship to the permutation formula.

To summarize the formulas from the video:

  • The number of permutations of objects from a set of is:
  • The number of combinations of objects from a set of is:

Notice the key relationship: . This makes intuitive sense: for any combination of items, there are ways to permute (arrange) them. The combination formula effectively "divides out" these redundant orderings.

Applying Counting Techniques: GATE-Style Problems

Now let's see how these formulas are applied to solve typical problems, including a very important variation: permutations with repeated items.

Permutations and Combinations Tutorial

This part of the same video demonstrates how to identify whether a problem requires a permutation or a combination and introduces the formula for handling repeated elements.

Focus on these examples: Permutation Example: Watch the problem about arranging books on a shelf from this section. The keyword "arrange" signals that order matters. Combination Example: Watch the problem about forming a team of engineers from here. Since the roles on the team are not specified, the order of selection is irrelevant, making it a combination. Permutations with Repetition: Pay close attention to the section from this point, which covers how to arrange the letters in words like "ALABAMA" and "MISSISSIPPI". This is a very common GATE question pattern.

The formula for permutations with repetition is critical. If you have objects where there are identical objects of type 1, identical objects of type 2, ..., and identical objects of type , the number of distinct permutations is:


The Pigeonhole Principle

The Pigeonhole Principle is disarmingly simple but incredibly powerful for proving that a certain situation must occur.

The Basic Principle: If you have more pigeons than pigeonholes ( pigeons, holes), then at least one pigeonhole must contain more than one pigeon.

This seems obvious, but its application can be subtle. The "pigeons" are the objects we are distributing, and the "pigeonholes" are the categories they can be placed into.

Example: In a group of 367 people, at least two people must share the same birthday.

  • Pigeons: 367 people.
  • Pigeonholes: 366 possible birthdays (including Feb 29).
  • Since there are more people than possible birthdays, at least two must share one.

The Generalized Pigeonhole Principle: If objects are placed into boxes, then there is at least one box containing at least objects.

This is the version you'll most often use in GATE.

GATE-Style Example: What is the minimum number of students required in a class to be sure that at least six will receive the same grade, if there are five possible grades (A, B, C, D, F)?

  • Let be the number of students (pigeons).
  • The grades are the categories, so (pigeonholes).
  • We want to be sure that at least one grade is shared by at least 6 students.
  • Using the generalized principle, we want .
  • So, we need .
  • If , , which isn't enough. It's possible to have exactly 5 students get each grade.
  • If we add one more student, , then . By the principle, at least one grade must be assigned to at least 6 students.
  • The minimum number of students is 25 + 1 = 26. The general formula for this type of problem is .

The Principle of Inclusion-Exclusion

The Sum Rule works only for disjoint (non-overlapping) sets. What if we want to count the elements in the union of sets that do overlap? The Principle of Inclusion-Exclusion gives us the answer by systematically adding the sizes of the sets, subtracting the sizes of their pairwise intersections, adding back the sizes of their three-way intersections, and so on.

The formula for two sets is likely familiar: .

Let's watch a video that generalizes this principle and applies it to a classic problem type.

INCLUSION-EXCLUSION PRINCIPLE - DISCRETE MATHEMATICS

This TrevTutor video provides a formal treatment of the Inclusion-Exclusion Principle, moving from the simple set formula to a more general framework and applying it to a detailed example.

Follow these parts of the video: Motivation: Start from the beginning until here to see how the principle is a generalization of the formula for the union of two or three sets. General Framework: The section from this point introduces the idea of "conditions" and complements (e.g., "divisible by 2" vs. "not divisible by 2"), which is a powerful way to frame these problems. Logic for Complements: Watch from here to understand the logic for counting elements that satisfy none of the given conditions, a very common problem variant. Worked Example: The core of the video is the detailed example from this section. It solves for the number of positive integers \le 100 not divisible by 2, 3, or 5. This is a must-watch, as this exact problem structure appears frequently in GATE. General Formula: Finally, review the general formula presented from this timestamp. The summation notation is a concise way to represent the alternating sum.

The general formula for the number of elements in none of the sets within a universe is:

This is a powerful tool for "how many numbers are NOT divisible by..." or "how many arrangements have NONE of the following properties..." types of questions.


Conclusion

This lesson has armed you with four essential counting techniques that form a significant part of Discrete Mathematics in the GATE syllabus. Mastering them is key to scoring well in this section and in probability.

Key Takeaways:

  • Permutations vs. Combinations: The decision hinges on whether order matters. Use for ordered arrangements and for unordered selections. Remember the special formula for permutations with repetitions.
  • Pigeonhole Principle: A simple but effective tool for existence proofs. If you have more items () than categories (), at least one category must have items.
  • Inclusion-Exclusion Principle: A systematic method for counting elements in overlapping sets by alternately adding and subtracting the sizes of intersections. It's perfect for problems involving unions or negations of multiple properties (e.g., divisibility).

This concludes Module 1. You have built a solid foundation in logic, sets, algebraic structures, and now, combinatorics. In our next lesson, we will begin Module 2 by entering the fascinating world of Graph Theory, starting with the fundamentals. Many of the counting principles you've learned today will prove useful as we analyze paths, cycles, and trees in graphs.