Discretica

Counting & Combinatorics

Reference · Always free

Learn systematic counting techniques: the sum and product rules, permutations, combinations, the pigeonhole principle, and recurrence relations.

Concepts in this topic

Key formulas & identities

Key formulas and identities for Counting & Combinatorics, with each formula and what it means.
NameFormulaMeaning
Permutation FormulaP(n, r) = n! / (n - r)!Number of ways to arrange r items chosen from n distinct items (order matters)
Combination FormulaC(n, r) = n! / (r! × (n - r)!)Number of ways to choose r items from n items without regard to order
Binomial Theorem(x + y)ⁿ = ∑ₖ₌₀ⁿ C(n,k) × xⁿ⁻ᵏ × yᵏExpansion of a binomial raised to a positive integer power
Stars and BarsC(n + r - 1, r - 1)Number of ways to distribute n identical objects into r distinct bins
Pigeonhole PrincipleN objects in k boxes ⟹ at least one box has ⌈N/k⌉ objectsIf more objects than categories, some category must contain multiple objects
Inclusion-Exclusion (Three Sets)|A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|Counting the union of three sets by alternately adding and subtracting intersections
Permutations with Repetitionn! / (n₁! × n₂! × ... × nₖ!)Arrangements of n objects where nᵢ are identical of type i
Sum Rule|A ∪ B| = |A| + |B| when A ∩ B = ∅If two tasks are mutually exclusive, total ways is the sum of individual ways