Permutations and Combinations
Factorial
For a positive integer , the factorial is:
By convention, .
Factorials count the number of ways to arrange distinct objects in a sequence. The first position has choices, the second has , and so on.
Example: Arranging Books
Six distinct books can be arranged on a shelf in ways.
Permutations
A permutation is an ordered arrangement of objects.
Permutations of Objects Taken at a Time
The number of ways to arrange objects selected from distinct objects:
Intuition: We have choices for the first position, for the second, down to for the th position.
Special case: arrangements of all objects.
Example: Committee Officers
From 10 people, select a president, vice-president, and treasurer. The order matters: select 3 and assign them to distinct roles.
Combinations
A combination is an unordered selection of objects.
Combinations of Objects Taken at a Time
The number of ways to select objects from distinct objects (order does not matter):
Why divide by ? Each unordered selection corresponds to ordered arrangements. The permutations overcount by exactly this factor.
Example: Selecting Books
How many ways to select 3 books from a set of 6?
Compare with permutations: . Each unordered set appears as permutations.
Example: Committee Members
From 10 people, select 3 committee members (no roles assigned):
Key Properties of Binomial Coefficients
Symmetry
Intuition: Selecting objects to include is equivalent to selecting objects to exclude.
Pascal’s Identity
Intuition: Any selection of from objects either includes a specific object (leaving ways) or excludes it (leaving ways).
Sum
This counts all subsets of an -element set. Each element can be either in or out: independent binary choices.
Balls and Bins
The techniques extend to distributing objects into containers.
Distinct Balls into Distinct Bins
distinct balls into distinct bins: ways. Each ball independently chooses a bin.
Identical Balls into Distinct Bins
identical balls into distinct bins, no restrictions: equivalent to placing dividers among positions.
Intuition: Imagine placing all balls in a row with dividers. The balls before the first divider go to bin 1, between first and second dividers to bin 2, and so on.
Example: Server Distribution
13 servers into 3 datacentres with capacities 6, 4, and 3. This counts arrangements where we partition the 13 labelled servers into groups of those sizes:
Alternatively: (multinomial coefficient).
Permutations with Repetition
When some objects are identical, the number of distinct arrangements is:
where is the number of objects of type .
Example: DNA Sequences
How many distinct sequences can be formed from 3 A’s, 2 C’s, 1 G, and 1 T?
Example: Bit Strings
Distinct bit strings from three 0’s and two 1’s:
These are: 00111, 01011, 01101, 01110, 10011, 10101, 10110, 11001, 11010, 11100.
Hypergeometric Formula
When sampling without replacement, we use hypergeometric counts.
Select items from a population of containing “special” items. The number of ways to get exactly special items:
Choose special items from the available, and ordinary items from the non-special.
Summary Table
| Problem | Formula |
|---|---|
| Arrange all objects | |
| Arrange from | |
| Choose from | |
| Arrange with repetitions | |
| identical into bins |