Skip to content

第 8 章 特殊计数序列

EX1

Let 2n (equally spaced) points on a circle be chosen. Show that the number of ways to join these points in pairs, so that the resulting n line segments do not intersect, equals the nth Catalan number Cn.

EX1

记该问题的解为hn,选择一端固定在 1 上的线段为基线,另一端指向 2k,圆上的 2n 个点被分为两组,一组有 2k-2 个,另一组有 2n-2k 个,同时问题hn被划分为hk1hnk。所以有,

hn=k=1nhk1hnk,n1,h0=h1=1

显然hn与卡特兰数Cn有相同的递推关系和初始项,因此,

hn=1n+1(2nn)

信息

本题与第 7 章 EX41 是类似的问题

EX2

Prove that the number of 2-by-n arrays

x11x12x1nx21x22x2n

that can be made from the numbers 1,2, ..., 2n such that

x11x12x1nx21x22x2nx11x21,x12x22,...,x1nx2n

equals the nth Catalan number, Cn.

将数组第一行的元素标记为 +1,第二行元素标记为 -1。 问题可以转化为:将 +1 和 -1 按照从左到右的顺序排列,并且保证第 i 个 +1 在第 i 个 -1 前面,即x1ix2i1in)。

这与前 k 项和满足

a1+a2++ak0

等价,该问题与卡特兰数的组合意义相同,解即为第 n 个卡特兰数。

EX3

Write out all of the multiplication schemes for four numbers and the triangularization of a convex polygonal region of five sides corresponding to them.

考虑固定顺序的乘法,因此一共有Cn1=C3=14(63)=5种方案,与之对应的三角形划分如图所示。

EX3

EX4

Determine the triangularization of a convex polygonal region corresponding to the following multiplication schemes:

(a) (a1×(((a2×a3)×(a4×a5))×a6))

(b) (((a1×a2)×(a3×(a4×a5)))×((a6×a7)×a8))

EX4(a)

以 EX4(a) 为例,步骤同上一题,

EX4

EX5 ⭐

* Let m and n be nonnegative integers with n m. There are m + n people in line to get into a theater for which admission is 50 cents. Of the m + n people, n have a 50-cent piece and m have a $1 dollar bill. The box office opens with an empty cash register. Show that the number of ways the people can line up so that change is available when needed is

nm+1n+1(m+nm)

(The case m = n is the case treated in Section 8.1.)

EX6

Let the sequence h0,h1,...,hn, be defined by hn=2n2n+3,(n0). Determine the difference table, and find a formula for k=0nhk.

hn是 2 次多项式,因此有Δ3hn=0

计算h0=3,h1=4,h2=9,一阶差分Δ1h0=1,Δ1h1=5, 二阶差分Δ2h0=4,即得到第 0 条对角线。

349159444000

所以hn=3(n0)+(n1)+4(n2),进而

k=0nhk=3k=0n(k0)+k=0n(k1)+4k=0n(k2)=3(n+11)+(n+12)+4(n+13)n0

EX7

The general term hn of a sequence is a polynomial in n of degree 3. If the first four entries of the Oth row of its difference table are 1, -1, 3, 10, determine hn and a formula for k=0nhk·

由题意,hn是 3 次多项式,那么Δ4hn=0,求出差分表第 0 条对角线,

113102476330

因此hn=(n0)2(n1)+6(n2)3(n3),进而

k=0nhk=k=0n(k0)2k=0n(k1)+6k=0n(k2)3k=0n(k3)=(n+11)2(n+12)+6(n+13)3(n+14)n0

EX8

Find the sum of the fifth powers of the first n positive integers.

hn=n5,那么它的六阶差分为 0,求出差分表,

01322431024312513121178121013018057013201503907502403601200k5=(k1)+30(k2)+150(k3)+240(k4)+120(k5)k=1nk5=k=1n(k1)+30k=1n(k2)+150k=0n(k3)+240k=0n(k4)+120k=0n(k5)=(n+12)+30(n+13)+150(n+14)+240(n+15)+120(n+16)

EX9

Prove that the following formula holds for the kth-order differences of a sequence h0,h1,,hn,:

Δkhn=j=0k(1)kj(kj)hn+j

采用数学归纳法证明,当 k=0 时,有

Δhn=(1)0(00)h0=h0

成立,假设当k=m时结论成立,即有

Δmhn=j=0m(1)mj(mj)hn+j

k=m+1时,

Δm+1hn=Δmhn+1Δmhn=j=0m(1)mj(mj)hn+1+jj=0m(1)mj(mj)hn+j=j=1m+1(1)mj+1(mj1)hn+jj=0m(1)mj(mj)hn+j=(hn+(m+1)(1)mhn)+j=1m((1)mj+1(mj1)(1)mj(mj))hn+j=(1)(m+1)(m+1)hn+(m+1)+(1)(m+1)0hn+0+j=1m((1)m+1j(mj1)+(1)m+1j(mj))hn+j=(1)(m+1)(m+1)hn+(m+1)+(1)(m+1)0hn+0+j=1m(1)m+1j(m+1j))hn+j=j=0m+1(1)m+1j(m+1j)hn+j

综上,证毕。

EX10

If hn is a polynomial in n of degree m, prove that the constants c0,c1,,cm such that

hn=c0(n0)+c1(n1)++cm(nm)

are uniquely determined. (Cf. Theorem 8.2.2.)

本题主要证明唯一性,假设存在不同的序列{ci}i=0m和 序列{di}i=0m使得存在 i 满足 cidi,其中0im

hn=c0(n0)+c1(n1)++cm(nm)=d0(n0)+d1(n1)++dm(nm)k=0m(ckdk)(nk)=0

显然(nk)>0,那么只能是ckdk=0,0km,这与假设矛盾,因此假设不成立。

EX11

Compute the Stirling numbers of the second kind S(8, k), (k = 0, 1, ..., 8).

第二类 Stirling 数的性质,

  1. S(p,0)=0,p1
  2. S(p,p)=1,p0
  3. S(p,k)=kS(p1,k)+S(p1,k1)

进行打表,

k012345678
S(8,k)0112796617011050266281
验证程序
cpp
 #include <iostream>
#include <vector>

using namespace std;
int main() {
    auto stirList = vector<vector<int>>(10, vector<int>(10, 0));
    for(int p = 1; p < 10; ++ p) {
        stirList[p][p] = 1;
    }
    for(int p = 2; p < 10; ++ p) {
        for(int k = 1; k < p; ++ k) {
            stirList[p][k] = stirList[p-1][k] * k + stirList[p-1][k-1];
        }
    }
    for(int p = 0; p < 10; ++ p) {
        for(int k = 0; k <= p; ++ k) {
            printf("%d\t", stirList[p][k]);
        }
        printf("\n");
    }

    printf("\n S(8, k), k = 0, 1, 2, ..., 8\n");
    for(int k = 0; k <= 8; ++ k) {
        printf("%d\t", stirList[8][k]);
    }
    return 0;
}

EX12

Prove that the Stirling numbers of the second kind satisfy the following relations:

(a) S(n,1)=1,(n1)

(b) S(n,2)=2n11,(n2)

(c) S(n,n1)=(nn),(n1)

(d) S(n,n2)=(n3)+3(n4)(n2)

EX12(a)

由定理 8.2.5 知S(p,k)是把 p 个元素集合划分到 k 个不可区分的盒子且没有空盒子的划分个数。 因此,S(p,1)是把 p 个元素划分到 1 个盒子且没有空盒子的划分个数,显然只有 1 种。

EX12(b)

S(p,p)=1,S(p,1)=1S(n,2)=2S(n1,2)+S(n1,1)=2S(n1,2)+1=2(2S(n2,2)+S(n2,1))+1=22S(n2,2)+(1+2)=23S(n3,2)+(1+2+22)==2n2S(n(n2),2)+(1+2+22++2n3)=12n112=2n11

EX12(c)

使用数学归纳法证明,当 n=1 时,S(1,0)=0=(12),显然成立。假设当n=k时有S(k,k1)=(k2),当n=k+1时有,

S(k+1,k)=kS(k,k)+S(k,k1)=k+(k2)=k+k(k1)2=k(k+1)2=(k+12)

综上,证毕。

EX12(d)

考虑问题:将 n 个元素划分到 n-2 个不可区分的盒子且没有空盒子的个数 S(n, n-2)。

如果有一个盒子中有三个元素,有(n3)种情况;如果有两个盒子各有两个元素,先从 n 个元素中选出 2 个,再从剩余 n-2 个元素中选出 2 个,两种情况对称,因此是(n2)(n22)2!=3(n4)

因此有S(n,n2)=(n3)+3(n4)

EX13

Let X be a p-element set and let Y be a k-element set. Prove that the number of functions f:XY which map X onto Y equals

k!S(p,k)=S(p,k)

X 映射到 Y 是满射,映射函数等价于把 p 个元素放入到 k 个可区分的盒子中,即有S(p,k)个; 同时由可区分盒子与不可区分盒子划分的关系,有S(p,k)=k!S(p,k), 因此映射函数的个数也等于k!S(p,k)

翻译错误

中文版中满射(onto)被错译成到上函数

EX14 ⭐

* Find and verify a general formula for

k=0nkp

involving Stirling numbers of the second kind.

EX15

The number of partitions of a set of n elements into k distinguishable boxes (some of which may be empty) is kn. By counting in a different way, prove that

kn=(k1)1!S(n,1)+(k2)2!S(n,2)++(kn)n!S(n,n)

If kn, define S(n,k) to be 0.

方法一:考虑把 n 个元素分别放在 k 个盒子中,每个元素有 k 种放置放法,因此共kn种方法。

方法二:先区分盒子是否非空,从 k 个盒子中选出 i 个非空盒子,问题变为把 n 个元素放入 i 个可区分盒子且盒子非空中的方法数,即为S(n,i),i 可能的取值为i=1,2,,k

i=1k(ki)S(n,i)=i=1k(ki)i!S(n,i)

方法一和方法二是同一问题的两种解决方法,因此等价,所以有,

kn=(k1)1!S(n,1)+(k2)2!S(n,2)++(kn)n!S(n,n)

翻译错误

本题中文书中有翻译错误,把可区分写成了不可区分

EX16

Compute the Bell number B8. (Cf. Exercise 11.)

Bell 数Bp是第 p 行的第二类 Stirling 数S(p,k)之和。

0+1+127+966+1701+1050+266+28+1=4140
程序验证
cpp
#include <iostream>
#include <vector>

using namespace std;
int main() {
    auto stirList = vector<vector<int>>(10, vector<int>(10, 0));
    for(int p = 1; p < 10; ++ p) {
        stirList[p][p] = 1;
    }
    for(int p = 2; p < 10; ++ p) {
        for(int k = 1; k < p; ++ k) {
            stirList[p][k] = stirList[p-1][k] * k + stirList[p-1][k-1];
        }
    }
    for(int p = 0; p < 10; ++ p) {
        for(int k = 0; k <= p; ++ k) {
            printf("%d\t", stirList[p][k]);
        }
        printf("\n");
    }

    printf("\n S(8, k), k = 0, 1, 2, ..., 8\n");
    int bellNum = 0;
    for(int k = 0; k <= 8; ++ k) {
        printf("%d\t", stirList[8][k]);
        bellNum += stirList[8][k];
    }
    printf("\n Bell number B8 is %d\n", bellNum);
    return 0;
}

EX17

Compute the triangle of Stirling numbers of the first kind s(n, k) up to n = 7.

第一类 Stirling 数的递推关系为,

s(p,k)=(p1)s(p1,k)+s(p1,k1)

初始条件与第二类 Stirling 数相同,s(p,p)=1,s(p,0)=0,p1,s(0,0)=1

程序验证
cpp
#include <iostream>
#include <vector>

using namespace std;
int main() {
    auto firstStirList = vector<vector<int>>(10, vector<int>(10, 0));
    for(int p = 1; p < 10; ++ p) {
        firstStirList[p][p] = 1;
    }
    for(int p = 2; p < 10; ++ p) {
        for(int k = 1; k < p; ++ k) {
            firstStirList[p][k] = firstStirList[p-1][k] * (p-1)
                                + firstStirList[p-1][k-1];
        }
    }
    for(int p = 0; p < 10; ++ p) {
        for(int k = 0; k <= p; ++ k) {
            printf("%d\t", firstStirList[p][k]);
        }
        printf("\n");
    }

    printf("\n s(7, k), k = 0, 1, 2, ..., 7\n");
    for(int k = 0; k <= 7; ++ k) {
        printf("%d\t", firstStirList[7][k]);
    }
    return 0;
}

EX18

Write [n]k as a polynomial in n for k = 5,6, and 7.

由定义可以求出[n]5

5=n(n1)(n2)(n3)(n4)=n510n4+35n350n2+24n

也可以通过查表写[n]7

7=k=07(1)7ks(7,k)nk=n721n6+175n5735n4+1624n31764n2+720n

EX19 👻

Prove that the Stirling numbers of the first kind satisfy the following formulas:

(a) s(n,1)=(n1)!,(n1)

(b) s(n,n1)=(n2),(n1)

结合递归式,易证。

EX20

VerifY that [n]n = n!, and write n! as a polynomial in n using the Stirling numbers of the first kind. Do this explicitly for n = 6.

[n]p的定义形式[n]p=n(n1)(n2)(n(p1)),p1,当 n=0 时,[n]0=1

带入p=n显然有[n]n=n!,n0

[n]p与第一类 Stirling 数的关系, [n]p=k=0p(1)kps(p,k)nk

带入p=n有,

n!=[n]n=k=0n(1)nks(p,k)nk

n=6时,结合 s(p, k) 三角形有,

6!=6615×65+85×64225×63+274×62120×61+0×60

EX21

For each integer n = 1,2,3,4,5, construct the diagram of the set Pn of partitions of n, partially ordered by majorization.

这里的图(diagram)指的是 Ferrers 图,这是很容易画出的,以5=4+1为例,

EX21

信息

本题应该是优超(majorize)关系的 Hasse 图。

EX22 👻

(a) Calculate the partition number p6 and construct the diagram of the set P6, partially ordered by majorization.

(b) Calculate the partition number p7 and construct the diagram of the set P7, partially ordered by majorization.

EX22(a)

以 (a) 为例,6 对应的分拆为,

6,51,42,411,33,321,3111,222,2211,21111,111111

因此p6=11

EX23

A total order on a finite set has a unique maximal element (a largest element) and a unique minimal element (a smallest element). What are the largest partition and smallest partition in the lexicographic order on Pn (a total order)?

最大分拆为 n,最小分拆为n=1+1++1

EX24 🚧

A partial order on a finite set may have many maximal elements and minimal elements. In the set Pn of partitions of n partially ordered by majorization, prove that there is a unique maximal element and a unique minimal element.

简评

看了几份答案,似乎都不是严格的证明, 只是稍微解释了n比其它都大,1+1++1n比其它都小。

待完善

EX25

Let t1,t2,,tm be distinct positive integers, and let

qn=qn(t1,t2,,tm)

equal the number of partitions of n in which all parts are taken from t1,t2,,tm. Define q0=1. Show that the generating function for q0,q1,,qn, is

k=1m(1xtk)1
k=1m(1xtk)1=11xt111xt211xtm=(n1=0xt1n1)(n2=0xt2n2)(nm=0xtmnm)=n1=0n2=0nm=0xn1t1+n2t2+nmtm=n=0qnxn

由分拆数的性质,qn等于方程n1t1+n2t2++nmtm=n非负整数解n1,n2,,nm的个数, 所以q0,q1,,qn,的生成函数为

k=1m(1xtk)k

EX26 👻

Determine the conjugate of each of the following partitions:

(a) 12=5+4+2+1

(b) 15=6+4+3+1+1

(c) 20=6+6+4+4

(d) 21=6+5+4+3+2+1

(e) 29=8+6+6+4+3+2

EX26(a)

以 (a) 为例,先画出 Ferrrers 图,再画出共轭分拆的图,

EX26

因此共轭分拆为12=4+3+2+2+1

EX27

For each integer n > 2, determine a self-conjugate partition of n that has at least two parts.

λ是 n 的分拆n1+n2++nk,当 n 为奇数时,取n1=(n+1)2,n2=n3==nk=1,k=n+12

当 n 为偶数时,取n1=n2,n2=2,n3=n4==nk=1,k=n2

以 n=7 和 n=8 分别为奇数和偶数的例子,如图,

EX27

EX28

Prove that conjugation reverses the order of majorization; that is, if λ and μ are partitions of n and λ is majorized by μ, then μ is majorized by λ.

由题意,当λμ优超时,有

(1)λ1+λ2++λiμ1+μ2+μi,1ik

假设μλ,即存在 k 使,

μ1+μ2++μiλ1+λ2++λi,1i<kμ1+μ2++μk>λ1+λ2++λk

即有μk>λk,记u=μk,v=λk。又因为μλ都是 n 的分拆,所以有

μk+1+μk+2+λk+1+λk+2+

如图,由互换行列前后的关系可得,

EX28

μk+1+μk+2=1u(uik),λk+1+λk+2+=i=1v(λik)

根据放缩,

i=1v(μik)<i=1ui=1v(λik)

可得

(2)μ1+μ2++μv<λ1+λ2++λv

其中 (1) 式与 (2) 式矛盾,因此假设不成立,综上,证毕。

EX29

Prove that the number of partitions of the positive integer n into parts each of which is at most 2 equals n/2+1. (Remark: There is a formula, namely the nearest integer to $\frac{(n+3)^2}{12}, for the number of partitions of n into parts each of which is at most 3 but it is much more difficult to prove. There is also one for partitions with no part more than 4, but it is even more complicated and difficult to prove.)

n=2r时,每一部分至多是 2 的分拆为

1n,211n2,221n4,,2r

n=2r+1时,每一部分最多是 2 的分拆为

1n,211n2,221n4,,2r11

不论奇偶,都是分拆为 r+1 个部分,当 r 为偶数时,r+1=n2+1=n/2+1,当 r 为奇数时,r+1=n12+1=(n+1)/2=n/2+1

综上,分拆成每一部分至多是 2 的分拆数等于n/2

EX30

Prove that the partition function satisfies

pn>pn1(n2)

考虑 n-1 的分拆数和 n 的分拆数,显然所有 n-1 的分拆数 +1 都是 n 的分拆数,此外 n 还有它自己作为分拆数,因此一定有pn>pn1

EX31 🚧

Evaluate hk1(k) the number of regions into which k-dimensional space is partitioned by k - 1 hyperplanes in general position.

hk1(k)=(k10)+(k11)++(k1k1)+(k1k)=2k1

EX32

Use the recurrence relation (8.31) to compute the small Schroder numbers s8 and s9.

小 Schroder 数的性质:

  1. s1=s2=1
  2. (n+2)sn+23(2n+1)xn+1+(n1)sn=0,n1

由递推关系和初始项,可以计算出s3=3,s4=11,s5=45,s6=197,s7=903

8s83×13×903+5×197=0

求出s8=4279,同理可以求出9s93×15×4279+6×903=0,得s9=20793

EX33

Use the recurrence relation (8.32) to compute the large Schroder numbers R7 and R8. Verify that R7=2s8 and R8=2s9, as stated in Corollary 8.5.8.

大 Schroder 数的性质:

Rn=r=0n1nr+1(2nr)!r![(nr)!]2

带入n=7计算,

R7=r=0718r(14r)!r![(7r)!]2=1814!0!(7!)2+1713!1!(6!)2+1612!2!(5!)2+1511!3!(4!)2+1410!4!(3!)2+139!5!(2!)2+128!6!(1!)2+117!7!(0!)2=8558=2×4279=2s8

提示

题目要求使用递推关系计算,大 Schroder 数的递推关系为,

Rn=Rn1+k=1nRk1Rnk

注意与 Catalan 数进行区分。

EX34

Use the generating function for the large Schroder numbers to compute the first few large Schroder numbers.

大 Schroder 数序列的生成函数为

n=0Rnxn=12x((x1)x26x+1)

x26x+1在 x=0 处的泰勒级数为13x4x212x344x4+

因此,

k=0Rnxn=12x((x1)(13x4x212x344x4+))=2x+4x2+12x3+44x4+2x=1+2x+6x2+22x3+

综上,有R0=1,R1=2,R2=6,R3=22

EX35

Use the generating function for the small Schroder numbers to compute the first few small Schroder numbers.

小 Schroder 数序列的生成函数为

n=1snxn=14(1+xx26x+1)

同上,带入x26x+1的泰勒级数,

k=1snxn=4x+4x2+12x3+44x4+4=x+x2+3x3+11x4+

综上,有r1=1,r2=1,r3=3,r4=11

EX36

Prove that the Catalan number Cn equals the number of lattice paths from (0,0) to (2n, 0) using only upsteps (1, 1) and downsteps (1, -1) that never go above the horizontal axis (so there are as many up steps as there are downsteps). (These are sometimes called Dyck paths.)

记上行步 (1,1) 为 -1,下行步 (1,-1) 为 +1,步行序列为a1,a2,,a2n

因为起点 y 坐标与终点 y 坐标相同,那么一定有 n 个上行步(+1)和 n 个下行步(-1),并且从不经过水平轴上方的格路径,即前 k 项和a1+a2++ak0,1k2n,该问题与第 n 个 Catalan 数的组合意义相同,因此等于Cn

EX37 ⭐

* The large Schroder number Cn counts the number of subdiagonal HVD-lattice paths from (0,0) to (n, n). The small Schroder number counts the number of dissections of a convex polygonal region of n + 1. Since Rn=2sn+1 for n 1, there are as many subdiagonal HVD-lattice paths from (0,0) to (n, n) as there are dissections of a convex polygonal region of n + 1 sides. Find a one-to-one correspondence between these lattice paths and these dissections.