加法原理(the sum rule):If S and T are 不相交的(disjoint) finite sets, then
∣S∪T∣=∣S∣+∣T∣
1.2. 乘法原理 The Product Rule
乘法原理(the product rule):If S and T are finite sets, then
∣S×T∣=∣S∣×∣T∣
Here S×T denotes the Cartesian product of sets S and T.
1.3. 容斥原理 The Inclusion-Exclusion principle
容斥原理(the inclusion-exclusion principle = subtraction rule):If S and T are finite sets, then
∣S∪T∣=∣S∣+∣T∣−∣S∩T∣
1.4. 树形图 Tree Diagrams
一种用树形图(tree diagram) 来计数的思想:To use trees in counting, we use a branch to represent each possible choice. We represent the possible outcomes by the leaves.
Chapter 6.1 - Example 9
How many bit strings of length four do not have two consecutive 1s?
Solution
There are 8 bit strings of length four without two consecutive 1s.
2. 鸽笼原理 The Pigeonhole Principle
鸽笼原理(the pigeonhole principle)
If k is a positive integer and k+1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects.
广义鸽笼原理(the generalized pigeonhole principle)
If n objects are placed into k boxes, then there is at least one box containing at least ⌈n/k⌉ objects.
Chapter 6.2 - Example 6
Every sequence of n2+1 distinct integers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing.
r-permutation with repetition:The number of r-permutations of a set of n objects with repetition allowed is
nr
n-permutation with limited repetition:The number of different permutations of n objects, where there are n1 indistinguishable objects of type1, …, and nk indistinguishable objects of type k, is
n1!n2!⋯nk!n!
r-circle permutation:The number of r-circle permutations of a set of n objects is
rP(n,r)
r-combination with repetition:The number of r-combination from a set with n elements when repetition of elements is allowed is
(rn+r−1)
这个就是隔板法大家懂的都懂。
3.3. Distributing Objects into Boxes
Distinguishable objects and distinguishable boxes:The number of ways to distribute n distinguishable objects into k distinguishable boxes so that ni objects are place into box i, i=1,2,⋯,k, equals
n1!n2!⋯nk!n!
Distinguishable objects and indistinguishable boxes:The number of ways to distribute n distinguishable objects into k indistinguishable boxes is
Indistinguishable objects and distinguishable boxes:The number of ways to distribute n indistinguishable objects into k distinguishable boxes is
(k−1n−1)
还是使用隔板法。
Indistinguishable objects and indistinguishable boxes:The number of ways to distribute n indistinguishable objects into k indistinguishable boxes is
3.4. 组合恒等式 Combinatorial Indentities
Theorem 1: 二项式定理(the binomial theorem)
Let x and y be variables, and let n be a nonegative integer. Then
(x+y)n=j=0∑n(jn)xn−jyj
可以得到以下推论:
k=0∑n(kn)=2n
k=0∑n(−1)k(kn)=0
Theorem 2: 帕斯卡恒等式(PASCAL's identity)
Let n and k be positive integers with k≤n. Then
(kn+1)=(k−1n)+(kn)
Theorem 3: 范德蒙德恒等式(Vandermonde's indentity) ★
Let m,n and r be nonnegative integer with r not exceeding either m or n. Then
(rm+n)=k=0∑r(r−km)(kn)
可以得到以下推论:
(n2n)=k=0∑n(kn)2
Theorem 4
Let n and r be nonnegative integer with r≤n. Then
(r+1n+1)=j=r∑n(rj)
4. 组合证明 Combinatorial Proofs
A 数两次的证明方法(double counting proof) uses counting arguments to prove that both sides of an identity count the same objects, but in different ways.
A 基于双射的证明方法(bijective proof) shows that there is a bijection between the sets of objects counted by the two sides of the identity.
利用组合方法证明:C(n,r)=C(n,n−r)
5. 递推关系 Recurrence Relations
5.1. 递推关系 Recurrence Relations
Definition: Recurrence Relations
A 递推关系(recurrence relation) for the sequence {an} is an equation that expresses an in terms of one or more orf the previous terms of the sequence, namely, a0,a1,…,an−1 or all integers n with n≥n0, where n0 is a nonnegative integer.
an=f(a0,a1,a2,…,an−1),n≥n0
满足同一组递推关系的数列可能有很多,我们用初始条件(initial conditon) 区分他们。
5.2. 线性递推 Linear Recurrence Relations
Definition: Linear Homogeneous Recurrence Relation of Degree k with Constant Coefficients
It refers to a recurrence relation in the form
an=c1an−1+c2an−2+⋯+ckan−k
where c1,c2,…,ck are real numbers, and ck=0.
线性(linear):linear combination of previous terms
常系数(constant coefficient):the coefficients of ais are constants
阶(degree)k:an 可以看做一个之和前k 项有关的函数。 an is a function of the previous k terms of the sequence
齐次(homogeneous):等式右边没有非零的常数项。If we put all the ais on the left side of the equation and everything else on the right side, then the right side is 0. Otherwise 非齐次(nonhomogeneous)
Some Examples
我们可以从常系数 k 阶线性齐次递推的递推式中得到他的特征方程(characteristic equation):
rk−c1rk−1−c2rk−2−⋯−ck=0
和特征根(characteristic root):
r1,r2,…,rk
5.2.1. 解常系数线性齐次递推 Solve Linear Homogeneous Recurrence Relation With Constant Coefficients