Combinatorial Proofs and Bijections
Master bijective proofs, double counting, and understand Catalan numbers.
24 min read
Advanced
Introduction
The most elegant proofs in combinatorics tell counting stories instead of manipulating algebra. Bijective proofs establish equality by constructing perfect correspondences.
Learning Objectives:
- Construct bijective proofs
- Use double counting techniques
- Understand Catalan numbers
Bijective Proofs
Pascal's Identity
Prove combinatorially:
Story: Choose people from , where person #1 is special.
- Case 1: Person #1 is chosen โ choose from remaining โ
- Case 2: Person #1 not chosen โ choose from remaining โ
Total: โ
python
from scipy.special import comb
def verify_pascal_identity(n, k):
"""Verify Pascal's identity"""
lhs = int(comb(n, k, exact=True))
rhs = int(comb(n-1, k-1, exact=True)) + int(comb(n-1, k, exact=True))
return lhs, rhs, lhs == rhs
print("Pascal's Identity: C(n,k) = C(n-1,k-1) + C(n-1,k)")
print()
test_cases = [(5,2), (10,3), (20,8)]
for n, k in test_cases:
lhs, rhs, valid = verify_pascal_identity(n, k)
print(f"n={n}, k={k}: {lhs} = {rhs} {'โ' if valid else 'โ'}")Catalan Numbers
The Catalan Sequence
The -th Catalan number:
Appears in:
- Balanced parentheses strings of length
- Binary trees with nodes
- Triangulations of -gon
- Many more!
First few: 1, 1, 2, 5, 14, 42, 132, 429, ...
python
from scipy.special import comb
def catalan(n):
"""Compute nth Catalan number"""
return int(comb(2*n, n, exact=True)) // (n + 1)
print("Catalan Numbers:")
for n in range(11):
c_n = catalan(n)
print(f" C_{n} = {c_n}")Key Takeaways
- Combinatorial proof: Tell a counting story
- Bijection: 1-to-1 correspondence shows equality
- Double counting: Same set, two ways
- Catalan numbers: Ubiquitous in counting problems
Next Part: Moving from Combinatorics to Probability Theory!