Lesson 1
combinatorial ∼∼ discrete & finite
- solution combinatorial object
- constraint combinatorial structure
Enumeration: How many solutions satisfying the constraints
- Existence: Does there exist a solution
- Extremal: How large/small a solution can be to preserve/avoid structure
- Ramsey: when a solution is sufficiently large, some structures must emerge
- Optimization: find the optimal solution
Construction: construct a solution
Enumeration(Counting)
- How many ways are there:
- n! to rank n people
- 12n to assign m zodiac signs to n people
- (nm) to choose m people out of n people
- (n−1m−1) to partition n people into m groups
- ? to distribute m yuan to n people
- ? to partition m yuan to n parts
- How many ways are there:
Name | Description | Notation | Number | Repetition | Ordered | ||
---|---|---|---|---|---|---|---|
Tuple | n-tuples of [m] | [m]n | mn | Y | Y | ||
Nultiset | k-multiset of n-set | - | (n+k−1k) | Y | N | ||
Subset | k-uniform of n-set, $\ | S\ | =n$ | - | (nk) | N | N |
Partition | k-partition of n-set | - | {nk} | N | N |
- The product rule: |S×T|=|S|⋅|T|
- The bijection rule: if there exists a bijection between finite sets S and T, then |S|=|T|.
- Tuples
- [m]={1,2,⋯,m}
- [m]n=[m]×[m]×⋯×[m]
- # of tuples: |[m]n|=mn
- Functions
- f:[n]→[m]
- # of functions: mn
Proof: f:[n]→[m]⇔vf∈[m]n
- Subsets
- Power set: 2[n]=S|S⊆[n]
- |2[n]|=2n
- Proof: S⊆[n]↔{0,1}n
- Subsets of fixed size
- # of k-uniform: (nk)=n!k!(n−k)!
- (n)k=n(n−1)⋯(n−k+1) is n lower factorial of k
- Binomial coefficients
- (nk)=(nn−k)
- ∑nk=0(nk)=2n
- (1+x)n=∑nk=0(nk)xk
Proof: (1+x)n=(1+x)(1+x)⋯(1+x), # of xk is (nk)
- S={x1,x2,⋯,xn}, # of odd subsets = # of even subsets
proof: let x=−1
- Compositions of an integer
- k-composition of n: k-tuple that x1+x2+⋯+xn=n, xi∈{1,2,⋯xn}
- # of k-composition: (n−1k−1)
- weak k-composition of n: xi can be 0, aka (x1+1)+(x2+1)+⋯+(xn+1)=n+k
- # of weak k-composition: (n+k−1k−1)
- Multisets
- Combinations with repetitions can be formally defined as multisets.
- ((nk))=(n+k−1k)
- Multinomial coefficients
- (nm1,m2,⋯,mk)=n!m1!m2!⋯mk!, ∑imi=n
- (nm,n−m)=(nm)
- (x1,x2,⋯,xk)n=∑m1+m2+⋯+mk=n(nm1,m2,⋯,mk)xm11⋯xmkk
- Partitions of a set
- partition of S: P=S1,S2,⋯,Sk, Si≠∅, Si∩Sj if i≠j, ⋃Si=S
- if |P|=k, then P is a k-partition of S
- # of k-partitions of a n-set is {nk}
- Stirling number of the second kind
- The twelvfold way
n balls | m bins | unrestricted | ≤1 for all bin | ≥1 for all bin |
---|---|---|---|---|
distinct | distinct | mn | (m)n=n!(mn) | m!{nm} |
identical | distinct | ((mn)) | (mn) | (m−1n−1) |
distinct | identical | ∑mk=1{nk} | 1 | {nm} |
identical | identical | − | − | − |
v1.5.2