组合数学【学习笔记(二)】

Combinatorial Mathematics
(TsinghuaX: 60240013x)

Linear Homogeneous Recurrence Relation

Fibonacci Rabbits

Fibonacci number
Fibonacci prime

这里写图片描述
F 1 2 + F 2 2 + ⋯ + F n 2 = F n F n − 1 F_1^2+F_2^2+\dots+F_n^2=F_nF_{n-1} F12+F22++Fn2=FnFn1
Area of the rectangle = Sum of multiple quadrates

Expressions of Fibonacci Numbers

F n = 1 5 ( ( 1 + 5 2 ) n − ( 1 − 5 2 ) n ) F_n=\frac {1}{\sqrt{5}}((\frac {1+\sqrt{5}}{2})^n-(\frac {1-\sqrt{5}}{2})^n) Fn=5 1((21+5 )n(215 )n)

Linear Homogeneous Recurrence Relation

Def If sequence { a n } \{a_n\} {an} satisifies:
a n + C 1 a n − 1 + C 2 a n − 2 + ⋯ + C k a n − k = 0 a_n+C_1a_{n-1}+C_2a_{n-2}+\dots+C_ka_{n-k}=0 an+C1an1+C2an2++Ckank=0 a 0 = d 0 , a 0 = d 1 , … , a k − 1 = d k − 1 a_0=d_0, a_0=d_1,\dots, a_{k-1}=d_{k-1} a0=d0,a0=d1,,ak1=dk1 C 1 , C 2 , … , C k C_1, C_2, \dots, C_k C1,C2,,Ck and d 0 , d 1 , … , d k − 1 d_0, d_1, \dots, d_{k-1} d0,d1,,dk1 are constants, C k ≠ 0 C_k≠0 Ck=0, so this expression is called a k t h k^{th} kth-order linear homogeneous recurrence relation of { a n } \{a_n\} {an}.
Fibonacci Recurrence
Characteristic Polynomial
C ( x ) = x k + C 1 x k − 1 + ⋯ + C k − 1 x + C k C(x)=x^k+C_1x^{k-1}+\dots+C_{k-1}x+C_k C(x)=xk+C1xk1++Ck1x+CkCharacteristic polynomial has k k k

  1. distinct real roots
  2. Characteristic polynomial C ( x ) C(x) C(x) has multiple roots
  3. Characteristic polynomial C ( x ) C(x) C(x) has conjugate complex roots
    Summary
    这里写图片描述

Applications

  • There’s a point P P P on the plane. It’s the cross of n n n fields D 1 , D 2 , … D n D_1, D_2, \dots D_n D1,D2,Dn. Color these n n n fields with k k k colors. We require the color of two adjacent areas to be different.
    Calculate the number of arrangements.

Let a n a_n an be the number of arrangement to color these areas. There are 2 situations:

  1. D 1 D_1 D1 and D n − 1 D_{n-1} Dn1 have the same color
    D n D_n Dn has k − 1 k-1 k1 choices, which is all colors except the one used by D 1 D_1 D1 and D n − 1 D_{n-1} Dn1;
    the arrangements for D n − 2 D_{n-2} Dn2 to D 1 D_1 D1 are one-to-one correspondent to the arrangements for n − 2 n-2 n2 areas.
    ( k − 1 ) a n − 2 (k-1)a_{n-2} (k1)an2
  2. D 1 D_1 D1 and D n − 1 D_{n-1} Dn1 have different colors.
    D n D_n Dn has k − 2 k-2 k2 choices; the arrangements from D 1 D_1 D1 to D n − 1 D_{n-1} Dn1 are one-to-one correspondent to the arrangements for n − 1 n-1 n1 areas.
    ( k − 2 ) a n − 1 (k-2)a_{n-1} (k2)an1 这里写图片描述

∴ a n = ( k − 2 ) a n − 1 + ( k − 1 ) a n − 2 , a 2 = k ( k − 1 ) , a 3 = k ( k − 1 ) ( k − 2 ) . \therefore a_n=(k-2)a_{n-1}+(k-1)a_{n-2}, a_2=k(k-1), a_3=k(k-1)(k-2). an=(k2)an1+(k1)an2,a2=k(k1),a3=k(k1)(k2).
a 1 = 0 , a 0 = k a_1=0, a_0=k a1=0,a0=k
x 2 − ( k − 2 ) x − ( k − 1 ) = 0 x^2-(k-2)x-(k-1)=0 x2(k2)x(k1)=0
x 1 = k − 1 , x 2 = − 1. x_1=k-1, x_2=-1. x1=k1,x2=1.
a n = A ( k − 1 ) n + B ( − 1 ) n a_n=A(k-1)^n+B(-1)^n an=A(k1)n+B(1)n
{ A + B = k , ( k − 1 ) A − B = 0. { A = 1 , B = k − 1. \begin{equation} \left\{ \begin{array}{lr} A+B=k, \\ (k-1)A-B=0. \end{array} \right. \end{equation}\begin{equation} \left\{ \begin{array}{lr} A=1, \\ B=k-1. \end{array} \right. \end{equation} {A+B=k,(k1)AB=0.{A=1,B=k1.
∴ a n = ( k − 1 ) n + ( k − 1 ) ( − 1 ) n , n ≥ 2. \therefore a_n=(k-1)^n+(k-1)(-1)^n, n \geq 2. an=(k1)n+(k1)(1)n,n2.
a 1 = k . a_1=k. a1=k.

Magical Sequences

Catalan Numbers

  • One stack (of infinite size) has the “push” sequence: 1 , 2 , 3 , . . . n 1, 2, 3, ... n 1,2,3,...n. How many ways can the numbers be popped out?

Partition the n n n sequences into two sub-sequences.
f ( n ) = f ( k − 1 ) ∗ f ( n − k ) f(n)=f(k-1)*f(n-k) f(n)=f(k1)f(nk)

  • Binary Tree
    How many different shapes can a binary tree with n nodes have?

The root will obviously contain one node.
Assume T ( i , j ) T(i, j) T(i,j) stands the left subtree of the root containing I I I nodes, and right subtree with j j j nodes.
Not counting the root, there are n − 1 n-1 n1 nodes that could be structured as:

C ( n ) = C ( 0 ) ∗ C ( n − 1 ) + C ( 1 ) ∗ C ( n − 2 ) + ⋯ + C ( n − 2 ) ∗ C ( 1 ) + C ( n − 1 ) ∗ C ( 0 ) C(n) = C(0)*C(n-1) + C(1)*C(n-2) + \dots + C(n-2)*C(1) + C(n-1)*C(0) C(n)=C(0)C(n1)+C(1)C(n2)++C(n2)C(1)+C(n1)C(0)
C ( n ) = ∑ i = 0 n − 1 C i C n − i − 1 C(n)=\sum _{i=0}^{n-1}C_iC_{n-i-1} C(n)=i=0n1CiCni1

Actually,
C ( n ) = C ( 2 n , n ) ) − C ( 2 n − 1 ) = 1 n + 1 ( 2 n n ) = ( 2 n ) ! ( n + 1 ) ! n ! = ∏ k = 2 n n + k k C_(n)=C(2n, n))-C(2n-1) =\frac 1{n+1}\binom {2n}{n}=\frac {(2n)!}{(n+1)!n!}=\prod ^n_{k=2}\frac{n+k}k C(n)=C(2n,n))C(2n1)=n+11(n2n)=(n+1)!n!(2n)!=k=2nkn+kProof using generating functions,
这里写图片描述
这里写图片描述

Dyck Language
Hands across the table

Exponential Generating Functions

Binomial Theorem
( 1 + x ) n = ∑ k = 0 ∞ C ( n , k ) x k = ∑ k = 0 ∞ C ( n , k ) k ! k ! x k = ∑ k = 0 ∞ P ( n , k ) x k k ! (1+x)^n=\sum ^\infty_{k=0}C(n, k)x^k=\sum ^\infty_{k=0}\frac {C(n, k)k!}{k!}x^k=\sum^\infty_{k=0}P(n,k)\frac {x^k}{k!} (1+x)n=k=0C(n,k)xk=k=0k!C(n,k)k!xk=k=0P(n,k)k!xk

  • 3 a 1 , 2 a 2 , 3 a 3 3a_1, 2a_2, 3a_3 3a1,2a2,3a3
    How many combinations of length 4 4 4?
    Key: 70 70 70
    Hint: 4 ! ( 4 3 ! + 3 2 ! 2 ! + 3 2 ! ) = 70 4!(\frac{4}{3!}+\frac3{2!2!}+\frac3{2!})=70 4!(3!4+2!2!3+2!3)=70

For a seq KaTeX parse error: Unexpected character: '' at position 19: …, a_, a_2 \dots̲, construct:
G e ( x ) = a 0 + a 1 1 ! x + a 2 2 ! x 2 + a 3 3 ! x 3 + ⋯ + a k k ! x k + … G_e(x)=a_0+\frac{a_1}{1!}x+\frac{a_2}{2!}x^2+\frac{a_3}{3!}x^3+\dots+\frac{a_k}{k!}x^k+\dots Ge(x)=a0+1!a1x+2!a2x2+3!a3x3++k!akxk+ G ( x ) G(x) G(x) is known as the exponential generating function of a 0 , a 1 , a 2 , … a_0, a_1, a_2,\dots a0,a1,a2,

  • Using the digits 1, 2, 3 and 4, construct a five digit number where 1 doesn’t appear more than 2 times, but has to appear at least once; 2 can’t appear more than once; 3 can appear up to 3 times but can also not appear in the number; 4 can only appear an even number of times. How many numbers can satisfy these conditions?

Hint:
An r r r digit number that satisfies the condition is a r a_r ar; the exponential generating function for the seq a 0 , a 1 , … , a 10 a_0, a_1, \dots, a_{10} a0,a1,,a10 is:
这里写图片描述

There are 215 215 215 5-digit numbers that satisfy the conditions.

  • With digits 1 , 3 , 5 , 7 , 9 1, 3, 5, 7, 9 1,3,5,7,9, how many n-digit numbers are there, where 3 3 3 and 7 7 7 appear an even number of times, and 1 , 5 , 9 1, 5, 9 1,5,9 don’t have any conditions.

    Hint:
    Assume an r-digit number that satisfies the conditions is a r a_r ar. Then, the exponential generating function of the seq of a 1 , a 2 , . . . , a 3 a_1, a_2, ..., a_3 a1,a2,...,a3 is:

这里写图片描述

Derangements

之前浅显的学习笔记
A derangement is a permutation of the elements of a set such that none of the elements appear in their original position.

Suppose the derangement of n elements in a sequence 1 , 2 , … n 1, 2, \dots n 1,2,n is D n D_n Dn, for every i t h i^{th} ith number, it has to switch with the other n − 1 n-1 n1 numbers, followed by a derangement of the other n − 2 n-2 n2 elements. We will have a total of ( n − 1 ) D n − 2 (n-1)D_{n-2} (n1)Dn2 number of derangements.
For the other part, not considering the number i i i, there is a derangement of the other n − 1 n-1 n1 elements to be done, followed by switching i i i with the other numbers yielding a total of ( n − 1 ) D n − 1 (n-1)D_{n-1} (n1)Dn1 number of derangements.
D ( n ) = ( n − 1 ) ( D n − 1 + D n − 2 ) , D 0 = 0 , D 2 = 1 D(n)=(n-1)(D_{n-1}+D_{n-2}), D_0 = 0, D_2 = 1 D(n)=(n1)(Dn1+Dn2),D0=0,D2=1
∴ D n = 1 \therefore D_n = 1 Dn=1
D ( n ) = ( n − 1 ) ( D n − 1 + D n − 2 ) , n ≥ 3 D(n)=(n-1)(D_{n-1}+D_{n-2}), n \geq 3 D(n)=(n1)(Dn1+Dn2),n3
这里写图片描述
这里写图片描述

Stirling Numbers

Stirling numbers of the first kind

n n n people group dancing, divided into m disjoint circular groups.
s ( n , 0 ) = 0 , s ( 1 , 1 ) = 1 s(n, 0)=0, s(1, 1)=1 s(n,0)=0,s(1,1)=1
s ( n + 1 , m ) = s ( n , m − 1 ) + n ∗ s ( n , m ) s(n+1, m)=s(n, m-1)+n*s(n, m) s(n+1,m)=s(n,m1)+ns(n,m)

  • The n + 1 s t n+1^{st} n+1st person can dance alone, and the others form m − 1 m-1 m1 groups.
  • The n + 1 s t n+1^{st} n+1st person joins a group, and will have n n n choices for groups, while the other n n n people have s ( n , m ) s(n, m) s(n,m) ways of forming groups.

这里写图片描述

Stirling numbers of the second kind

Definition: The number of ways n n n non-identical balls in m identical boxes where none of the boxes are empty is known as the Stirling number of the second kind.

Theorem: Stirling number of the second kind S ( n , m ) S(n, m) S(n,m) has the following properties:

  • S ( n , 0 ) = 0 S(n,0)=0 S(n,0)=0
  • S ( n , 1 ) = 1 S(n, 1)=1 S(n,1)=1
  • KaTeX parse error: Unexpected character: '' at position 16: S(n, 2) = 2^{n-̲1}-1
    Proof:
    Assume there are n n n non-identical balls b 1 , b 2 , . . . , b n b_1, b_2, ... , b_n b1,b2,...,bn, from which we pick b 1 b_1 b1. Now for the other n − 1 n-1 n1 balls, there are two possibilities, either they can be in the same box as b 1 b_1 b1 or a box that doesn’t contain b 1 b_1 b1. But it can only satisfy one of these conditions, therefore there are 2 n − 1 − 1 2^{n-1}-1 2n11 ways of placing the balls.
  • S ( n , n ) = 1 S(n, n) = 1 S(n,n)=1

Theorem: Stirling number of the second kind satisfies the following recurrence relation.
KaTeX parse error: Unexpected character: '' at position 23: … = m*S(n-1, m)+̲S(n-1, m-1) (n …

Proof: Suppose there are n n n non-identical balls b 1 , b 2 , … , b n b_1, b_2, \dots, b_n b1,b2,,bn, from which we pick a ball b 1 b_1 b1.
Placing n balls into m boxes where no box is empty can be classified into two possibilities.

  1. b 1 b_1 b1 is placed on its own in a box, therefore, the count is S ( n − 1 , m − 1 ) S(n-1, m-1) S(n1,m1)
  2. b 1 b_1 b1 is not the only ball in its box. This is equivalent to placing n − 1 n-1 n1 balls in m m m boxes, where no box is empty. This yields the count S ( n − 1 , m ) . S(n-1, m). S(n1,m). Out of these boxes, b 1 b_1 b1 can be placed in any of these m m m boxes, so the total number of ways in this possibility equals to m ∗ S ( n − 1 , m ) m*S(n-1, m) mS(n1,m).

A generating function is a clothesline on which we hang up a sequence of numbers.
— — Herbert Wilf

这里写图片描述

Summary of placing balls into boxes problem

这里写图片描述

第一章 引论 1.1 组合数学研究的对象 1.2 组合问题典型实例 1.2.1 分派问题 1. 2.2 染色问题 1.2.3 幻方问题 1.2.4 36军官问题 1.2.5 中国邮路问题 习 题 第列与组合 2.1 两个基本计原理 2.2 无重集的列与组合 2.3 重集的列与组合 2.4 列生成算法 2.4.1 序法 2.4.2 字典序法 2.4.3 轮转法 2.5 组合生成算法 .2.6 应用举例 习 题 第三章 容斥原理 3.1 引 言 3.2 容斥原理 3.3 几个重要公式 3.4 列 3.5 有限制的列 3.6 棋阵多项式 3.7 禁位列 习 题 第四章 鸽巢原理 4.1 鸽巢原理 4. 2 鸽巢原理的推广形式 4. 3 ramsey 4.4 ramsey的性质 4.5 ramsey定理 习 题 第五章 母函 5.1 母函概念 5.2 幂级型母函 5.3 整的拆分 5.4 ferrers图 5.5 指型母函 习 题 第六章 递归关系 6.1 引言 6.2 几个典型的递归关系.. 6.3 用母函方法求解递归关系 6.4 常系线性齐次递归关系的求解 6.5 常系线性非齐次递归关系的求解 6.6 非常系非线性递归关系的求解 6.7 差分表法 6.8 stirling 习 题 第七章 polya定理 7.1 有限集的映射 7.2 群的基本概念 7.3 置换群 7.4 置换的奇偶性 7.5 置换群下的共轭类 7.6 burnside引理 7.7 polya定理 7.8 polya定理的母函型式 7.9 不标号图的计 习 题 第八章 图论基础 8.1 图的基本概念 8.2 同构图、完全图与分图 8.3 通路、回路与图的连通性 8.4 euler图与hamilton图 8.5 割集与树 8.6 图的矩阵表示法 8.7 平面图、对偶图与色 8.8 匹配理论 8.9 网络流 习 题 第九章 拉丁方与区组设计 9.1 引言 9.2 拉丁方 9.3 有限域 9.4 正交拉丁方的构造 9.5 完全区组设计 9.6 平衡不完全区组设计(bibd) 9.7 区组设计的构造 9.8 steiner三连系 9.9 hadamard矩阵 习 题 第十章 线性规划 10.1 lp问题引例 10.2 lp问题的一般形式 10.3 lp问题的标准型 10.4 可行域和最优可行解 10.5 单纯形法 10.6 单纯形表格法 10.7 两阶段法 10.8 对偶原理 10.9 对偶单纯形法 10.10 应用举例 习 题 第十一章 组合优化算法与计算的时间复杂度理论 11.1 dijkstra算法 11.2 floyd算法 11.3 kruskal算法 11.4 求最优树的破圈法和统观法 11.5 分图中最大匹配与最佳匹配的算法 11.6 fleury算法 11.7 中国邮路问题及其算法 11.8 深度优先搜索法--dfs算法 11.9 项目网络与关键路径法 11.10 网络最大流算法 11.11 状态转移法 11.12 好算法、坏算法和np类问题 11.13 npc类问题 11.14 货郎问题的近似解 习 题... 参考文献
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值