Combinatorics
Introduction
Combinatorics is the mathematics of counting. How many ways can we arrange a set of objects? How many subsets does a set have? How many ways can we distribute items among recipients? These questions arise constantly in probability, computer science, and discrete mathematics.
The challenge in combinatorics is not the arithmetic—the challenge is setting up the problem correctly. The same verbal description can have vastly different answers depending on whether order matters, whether repetition is allowed, and how we define "different" arrangements.
Fundamental Counting Principles
The Multiplication Principle
If a procedure can be broken into stages, where stage has outcomes, stage has outcomes, and so on, then the total number of outcomes is:
The Addition Principle
If a task can be done in one of several mutually exclusive ways, with ways for method , ways for method , etc., then the total number of ways is:
Permutations
A permutation is an ordered arrangement. Order matters: ABC and BAC are different permutations.
Permutations of n Distinct Objects
The number of ways to arrange distinct objects in a row is:
By convention, !. For example, ! ways to arrange books on a shelf.
Permutations of r Objects from n
The number of ways to choose and arrange objects from distinct objects (without replacement) is:
Combinations
A combination is an unordered selection. Order does not matter: choosing is the same as choosing .
Choosing r from n
The number of ways to choose objects from distinct objects (without replacement, order irrelevant) is the binomial coefficient:
The formula comes from dividing the permutation count by to account for the ways of arranging each selection.
Properties of Binomial Coefficients
Symmetry: Choosing items is equivalent to choosing items to exclude.
Pascal's Identity: This recursion builds Pascal's Triangle.
Row Sum: This counts all subsets of an element set.
The Binomial Theorem
The binomial theorem expands powers of a binomial:
Each term counts the number of ways to choose factors of from the factors of
Permutations with Repetition
When arranging objects where some are identical, divide by the factorial of each group's size. For objects with of type 1, of type 2, etc.:
Stars and Bars
The stars and bars method counts the number of ways to distribute identical objects into distinct bins.
The number of ways to distribute identical items into distinct bins (allowing empty bins) is:
The idea: represent the distribution as a sequence of stars (items) and bars (dividers). We choose positions for the bars among the total positions.
Summary Table
Ordered, no repetition (permutation):
Ordered, with repetition:
Unordered, no repetition (combination):
Unordered, with repetition (multiset):
Connection to Other Concepts
Combinatorics is essential for probability. The probability of an event is often computed as (favorable outcomes) / (total outcomes), both of which require counting.
The binomial coefficient appears in the binomial distribution, where it counts the number of ways to get exactly successes in trials.
In algorithm analysis, combinatorics determines the number of inputs, iterations, or operations. The complexity of many algorithms depends on combinatorial quantities.
Summary
Combinatorics provides systematic methods for counting arrangements and selections. The key distinction is between permutations (order matters) and combinations (order doesn't matter), and between sampling with or without repetition.
The binomial coefficient counts combinations and appears in the binomial theorem for expanding The multiplication and addition principles are the foundation for more complex counting arguments.
The challenge in combinatorics is recognizing which counting principle applies to a given problem. Practice and careful analysis of what "different" means in each context are essential.