1comb-lecture2-basiccounting
1comb-lecture2-basiccounting
Combinatorial counting
Question: How many distinct 5-letter words using 26 alphabets? (ex: ywizp)
n−1
The number of former functions is m and the number of latter ones is m.
n−1 n
Thus, m ⋅m=m .
n
[Proposition 3.1.2] Any n-element set X has exactly 2 subsets.
n
Thus, the total number is 2 by Proposition 3.1.1.
[Proposition 3.1.3] Let n be a positive integer.
n−1 n−1
Each n-element set has exactly 2 subsets of odd size and 2 subsets of even size.
∏
(m − i) = m(m − 1)⋯(m − n + 1).
i=0
Remark:
There are two variables.
We need to choose some variable which is good for induction.
If you ask me how.. , well you need to understand the behind idea and decide.
∏
(m − i) = m(m − 1)⋯(m − n + 1).
i=0
Consider an n-element set N and m-element set M. Let a ∈ N and choose f(a).
It remains to choose a one-to-one mapping from N∖{a} to M∖{f(a)}.
By induction, there are (m − 1)(m − 2)⋯(m − n + 1) possibilities.
So, in total, there are m(m − 1)⋯(m − n + 1) possibilities.
Permutations
(b d c a)
a b c d
Traditionally, we represent it as
(k)
n
The binomial coefficient (read n choose k) is defined by
(k)
n n(n − 1)⋯(n − k + 1) n!
= =
k(k − 1)⋯1 k!(n − k)!
(k)
n
The basic combinatorial meaning of is
(k)
X
For a set X, we define as the set of all k-element subsets of X.
[Proposition 3.3.2] Let k ∈ ℕ.
( k )
|X|
For a finite set X, the number of all k-element subsets is exactly .
(k)
X
On the other hand, from one k-element subset M ∈ ,
(k) (k) ( k )
X X |X|
Hence, n(n − 1)⋯(n − k + 1) = k! . So, = .
How many ways are there to write a non-negative integer m as a sum of r non-negative
integers as a1 + a2 + ⋯ + ar = m ?
( r−1 )
m+r−1
The answer is .
Well-known equalities :
( k ) (n − k)
n n
(1) =
(k − 1) ( k ) (k)
n−1 n−1 n
(2) + =
[Theorem 3.3.3 (Binomial thm)] Let n be a non-negative integer.
∑ (k)
n
n n k
(1 + x) = x.
k=0
∑( k )
n−1
n−1 n − 1 k
(1 + x) = x
k=0
n n−1
PF) (1 + x) = (1 + x) (1 + x)
∑( k )
n−1
n−1 k
= (1 + x) ⋅ x
k=0
∑( k ) ∑( k )
n−1 n−1
n−1 k n − 1 k+1
= x + x
k=0 k=0
∑( k ) ∑ (k − 1)
n−1 n
n−1 k n−1 k
= x + x
k=0 k=1
∑ (( k ) ( k − 1 ))
n−1
n−1 n−1 k n
=1+ + x +x
k=1
∑ (k) ∑ (k)
n−1 n
n k n n k
=1+ x +x = x.
k=1 k=0
[Theorem 3.3.3 (Binomial thm)] Let n be a non-negative integer.
∑ (k)
n
n n k
(1 + x) = x.
k=0
∑ (k)
n
n n k n−k
You can easily modify to (x + y) = xy
k=0
∑(i) (n)
n 2
n 2n
[Proposition 3.3.4] = .
i=0
PF) The firs trick is to rewrite the sum using the symmetry of binomial coefficients.
∑(i) ∑ ( i )( n − i )
n 2 n
n n n
= .
i=0 i=0
This sum expresses the number of n-element subsets of a 2n-element set.
Consider a 2n-element set X and divide into n-element disjoint subsets X1 and X2.
( k1, k2, …, km )
n
n n k1 k2 km
∑
(x1 + x2 + ⋯ + xm) = x1 x2 ⋯xm
k +⋯+k =n,k ≥0
1 m i