Skip to content

第 6 章 容斥原理及应用 ​

错位排序的一些结论 ​

递推公式 ​

Dn=nDn−1+(−1)n,Dn=(n−1)(Dn−2+Dn−1)

常数 ​

可以使用上面的递推公式求出来错位排序常用的一些数值,D1=0,D2=1,D3=2,D4=9,D5=44,D6=265,D7=1854。

验算代码
cpp
#include <iostream>

using namespace std;

int main()
{
    int p = 0, q = 1;
    int n;
    scanf("%d", &n);

    for(int i = 3; i <= n; ++ i) {
        int tmp = (i-1)*(p+q);
        printf("D%d = %d\n", i, tmp);
        p = q;
        q = tmp;
    }
    return 0;
}

EX1 ​

Find the number of integers between 1 and 10,000 inclusive that are not divisible by 4,5, or 6.

本题写的详细些,后面类似的题目就不再解释太多细节。

设Ai,i=1,2,3分别为 1 到 10,000 之间能被 4、5 和 6 整除的个数。

计算集合大小时采用向下取整,例如⌊100006⌋=1666,表明还取不到下一个 6 的倍数。

A1∩A3表示既是 4 的倍数,也是 6 的倍数,4 和 6 的最小公倍数是 12,即能被 12 整除的数。

setsize
A12500
A22000
A31666
A1∩A2500
A1∩A3833
A2∩A3333
A1∩A2∩A3166
|A1―∩A2―∩A3―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|=10000−(2500+2000+1666)+(500+833+333)−166=5334

EX2 ​

Find the number of integers between 1 and 10,000 inclusive that are not divisible by 4, 6, 7, or 10.

验证代码
cpp
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int cnt = 0;
    vector<int> arr{4, 6, 7, 10};
    for(int i = 1; i <= 10000; ++ i) {
        bool flag = true;
        for(auto item: arr) {
            if(i%item == 0) {
                flag = false;
                break;
            }
        }
        if(flag) {
            printf("%d ", i);
            cnt ++;
            if(cnt % 20 == 0) printf("\n");
        }
    }
    printf("\nTotal number = %d\n", cnt);
    return 0;
}

EX3 ​

Find the number of integers between 1 and 10,000 that are neither perfect squares nor perfect cubes.

既是完全平方数也是完全立方数的数一定能拆分成 6 个相同数的乘积。

计算满足x2≤10000,y3≤10000,z6≤10000的最大整数解,得x=100,y=21,z=4。

setsize
A1100
A221
A1∩A24
|A1―∩A2―|=|S|−∑|Ai|+∑|AiAj|=10000−(100+21)+4=9883

EX4 ​

Determine the number of 12-combinations of the multiset

S={4⋅a,3⋅b,4⋅c,5⋅d}

多重集合的组合与方程的非负整数解个数等价,因此满足

0≤x1≤4,0≤x2≤3,0≤x3≤4,0≤x4≤5

的方程

x1+x2+x3+x4=12

设Ai,i=1,2,3,4分别是满足x1≥5,x2≥4,x3≥5,x4≥6的解组成的集合。

求满足x1≥5的解,进行变量代换y1=x1−5,y2=x2,y3=x3,y4=x4,方程转化为

y1+y2+y3+y4=7

此时方程的解个数为(7+4−17)=120,即|A1|=120。 同理可以计算|A2|=165,|A3|=120,|A4|=84。

求满足x1≥5,x2≥4的解,进行变量代换y1=x1−5,y2=x2−4,y3=x3,y4=x4,方程转化为

y1+y2+y3+y4=3

此时方程的解个数为(3+4−13)=20,即|A1∩A2|=20。

因此可以求出

setsize
A1120
A2165
A3120
A484
A1∩A220
A1∩A310
A1∩A44
A2∩A320
A2∩A410
A3∩A44
A1∩A2∩A30
A1∩A2∩A40
A1∩A3∩A40
A2∩A3∩A40
A1∩A2∩A3∩A40
|A1―∩A2―∩A3―∩A4―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|+∑|AiAjAkAu|=455−(120+165+120+84)+(20+10+4+20+10+4)=34

EX5 ​

Determine the number of 10-conbiations of the multiset

S={∞⋅a,4⋅b,5⋅c,7⋅d}

本题和上一题的区别就在于x1没有上界,不需要考虑x1上界的补集。 定义A1,A2,A3分别表示x2≥5,x3≥6,x4≥8。

setsize
A1(83)=56
A2(73)=35
A3(53)=10
A1∩A20
A1∩A30
A2∩A30
A1∩A2∩A30
|A1―∩A2―∩A3―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|=286−(56+35+10)=185

EX6 ​

A bakery sells chocolate, cinnamon, and plain doughnuts and at a particular time has 6 chocolate, 6 cinnamon, and 3 plain. If a box contains 12 doughnuts, how many different options are there for a box of oughnuts?

该问题可以转化为方程

x1+x2+x3=12

在0≤x1≤6,0≤x2≤6,0≤x3≤3的条件下整数解的个数。

定义A1,A2,A3分别表示x1≥7,x2≥7,x3≥4。

setsize
A1(72)=21
A2(72)=21
A3(102)=45
A1∩A20
A1∩A3(32) = 3
A2∩A3(32)=3
A1∩A2∩A30
|A1―∩A2―∩A3―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|=(12+22)−(21+21+45)+(3+3)=91−(21+21+45)+(3+3)=10

EX7 ​

Determine the number of solutions of the equation x1+x2+x3+x4=14 in nonnegative integers x1,x2,x3, and x4 not exceeding 8.

本题可以利用对称性减少计算,

|A1―∩A2―∩A3―∩A4―|=(173)−4(83)=680−4×56=456

EX8 ​

Determine the number of solutions of the equation x1+x2+x3+x4+x5=14 in positive integers x1,x2,x3,x4, and x5 not exceeding 5.

类似上一题,不过本题强调正(positive)整数,取值范围因此是1≤xi≤5,先平移变成0≤yi≤4,求解方程∑yi=9。

|A1―∩A2―∩A3―∩A4―∩A5―|=(134)−5(84)+(52)(34)=715−5×70+10×0=365

EX9 👻 ​

Determine the number of integral solutions of the equation

x1+x2+x3+x4=20

that satisfy

1≤x1≤6,0≤x2≤7,4≤x3≤8,2≤x4≤6

过程略,答案 96。

EX10 ​

Let S be a multiset with k distinct objects with given repetition numbers nl,n2,...,nk, respectively. Let r be a positive integer such that there is at least one r-combination of S. Show that, in applying the inclusion-exclusion principle to determine the number of r-combinations of S, one has A1∩A2∩...∩Ak=∅.

多重集合 r 组合问题转化为方程∑i=0kxi=r,0≤xi≤ni的整数解问题。

假设存在一组解,因此有r≤∑i=0kni,记Ai为满足xi>ni的集合。

当A1∩A2∩...∩Ak≠∅,即存在r=∑i=0kxi>∑i=0kni≥r,产生矛盾,所以A1∩A2∩...∩Ak=∅。

CAUTION

本题的奇怪之处就在于题目没告诉这些A1、A2等究竟是什么,这是参考答案中突然定义的。

EX11 ​

Determine the number of permutations of {1, 2, ... ,8} in which no even integer is in its natural position.

|A1―∩A2―∩A3―∩A4―|=8!−4×7!+(42)×6!+(43)×5!+4!=715−5×70+10×0=24024

EX12 ​

Determine the number of permutations of {1, 2, ... ,8} in which exactly four integers are in their natural positions.

选出 4 个数放入自然位置,剩余 4 个数进行错位排序。

D4=4!(1−11!+12!−13!+14!)=9

因此总排列数为,

(84)×D4=70×9=630

提示

n 元素错位排序可以直接使用公式,

Dn=n!(1−11!+12!−13!+⋯+(−1)n1n!)

EX13 ​

Determine the number of permutations of {1, 2, ... ,9} in which at least one odd integer is in its natural position.

设Ai表示 i 在自然位置上,

setsize
Ai8!
Ai∩Aj7!
Ai∩Aj∩Ak6!
Ai∩Aj∩Ak∩Au5!
Ai∩Aj∩Ak∩Au∩Av4!
|A1∪A3∪A5∪A7∪A9|=S−|A1―∩A3―∩A5―∩A7―∩A9―|=5×8!−(52)×7!+(53)×6!−5×5!+4!=157824

提示

本题考查定理 6.1.2(正文 p102)至少具有性质的计数。大多数题目还是考察定理 6.1.1 不具有性质的容斥原理。

EX14 ​

Determine a general formula for the number of permutations of the set {1, 2, ... , n} in which exactly k integers are in their natural positions.

选 k 个放到自然位置,其余 n-k 个进行错位排序。

(nk)Dn−k

EX15 ​

At a party, seven gentlemen check their hats. In how many ways can their hats be returned so that (a) no gentleman receives his own hat? (b) at least one of the gentlemen receives his own hat? (c) at least two of the gentlemen receive their own hats?

EX15Q(a) ​

进行错位排序,D7=1854。

EX15Q(b) ​

全排序减去错位排序(没有人在自然位置),即至少有一个在自然位置。7!−D7=3186。

EX15Q(c) ​

从上一问的结果(至少有一人在自然位置)中减去恰有一人在自然位置的情况,即至少有两人在自然位置,3186−7D6=3186−7×265=1331。

EX16 ​

Use combinatorial reasoning to derive the identity

n!=(n0)D0+(n1)Dn−1+(n2)Dn−2+⋯+(nn−1)D1+(nn)D0

(Here,D0 is defined to be 1.)

记S为{1,2,⋯,n}的全排列集合, Si表示恰有 i 个元素在自然位置的排序,显然{Si}划分了S, 因此|S|=∑i=0n|Si|。

全排列|S|=n!, 恰有 i 个自然位置的错位排序(参考 EX14), 有(ni)Dn−i个,因此等式成立。

NOTE

本题定义了D0=1,而本身的错位排序D1=0。

EX17 ​

Determine the number of permutations of the multiset

S={3⋅a,4⋅b,2⋅c}

where, for each type of letter, the letters of the same type do not appear consecutively. (Thus abbbbcaca is not allowed, but abbbacacb is.)

设Ai,i=1,2,3分别表示出现了aaa、bbbb和cc,A1可以当作aaa,b,b,b,b,c,c的排列,即(7142)=105。

setsize
A1105
A2(6312)=60
A3(8341)=280
A1∩A2(4112)=12
A1∩A3(6141)=30
A2∩A3(5311)=20
A1∩A2∩A3(3111)=3!=6
|A1―∩A2―∩A3―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|=1260−(105+60+280)+(12+30+20)−6=871

提示

本题是求的多重集合排序问题和上面的多重集合组合问题进行区分。

EX18 ​

Verify the factorial formula

n!=(n−1)((n−2)!+(n−1)!),(n=2,3,4,...).

没太看懂这题想干什么,难道是数学归纳法?

EX19 ​

Using the evaluation of the derangement numbers as given in Theorem 6.3.1, provide a proof of the relation

Dn=(n−1)(Dn−2+Dn−1),(n=3,4,5,...).

展开合并同类项即可,

Dn−2=(n−2)!∑i=0n−2(−1)ii!

将Dn−1拆分为能与Dn−2同类相加的两项,

Dn−1=(n−1)!∑i=0n−1(−1)ii!=(n−1)⋅(n−2)!(∑i=0n−2(−1)ii!+(−1)n−1(n−1)!)=(n−1)⋅(n−2)!∑i=0n−2(−1)ii!+(−1)n−1

将Dn−1与Dn−2求和,

Dn−1+Dn−2=n⋅(n−2)!∑i=0n−2(−1)ii!+(−1)n−1(n−1)(Dn−1+Dn−2)=n!∑i=0n−2(−1)ii!+(−1)n−1(n−1)

将Dn拆分为上述形式,

Dn=n!∑i=0n(−1)ii!=n!∑i=0n−2(−1)ii!+n!((−1)n−1(n−1)!+(−1)nn!)=n!∑i=0n−2(−1)ii!+(−1)n−1n+(−1)n=(n−1)(Dn−1+Dn−2)

综上,等式成立。

EX20 ​

Starting from the formula Dn = nDn- 1 + (_l)n, (n = 2,3,4, ... ), give a proof of Theorem 6.3.1.

使用数学归纳法证明,当n≥1时,总有

Dn=n!∑i=0n(−1)ii!

当 n=1 时,1 只能放在自然位置,没有错位排序,所以错位排序数为 0,且D1=1!×(1−1)=0成立。

当n≥2时,假设等式成立,对于 n+1 有

Dn+1=(n+1)Dn+(−1)n+1=(n+1)×n!∑i=0n(−1)ii!+(−1)n+1=(n+1)!∑i=0n(−1)ii!+(n+1)!×(−1)n+1(n+1)!=(n+1)!∑i=0n+1(−1)ii!

符合等式,综上证毕。

EX21 ​

Prove that Dn is an even number if and only if n is an odd number.

语句 p:n 为奇数;语句 q:Dn为偶数。 原题目可以转化为证明如下两个命题:若 p 成立,则 q 也成立;若 q 成立,则 p 也成立。

我们先考虑命题二,对于命题二我们验证它的「逆否命题」,若¬q成立,则¬p也成立。 命题转化为,n 为偶数时,Dn为奇数。

观察式子Dn=nDn−1+(−1)n,当 n 为偶数时,nDn−1项为偶数,(−1)n=1,显然Dn为奇数,命题二的逆否命题为真,命题二也为真。

对于命题一,我们采用数学归纳法证明。当 n 为奇数时, 并且当 n=1 时,有D1=0,显然成立;

当 n=2k+1(≥1) 时,设D2k+1为偶数;那么当n=2k+3时,D2k+3=(2k+3)D2k+2+(−1)(2k+3)=(2k+3)D2k+2−1,由命题二的逆否命题可知D2k+2一定为奇数,进而两个奇数的乘积(2k+3)D2k+2也为奇数,减一后为偶数。

综上,当 n 为奇数时,命题得证。

因为命题一和命题二均为真,因此可以说,Dn是偶数当且仅当 n 是奇数。

简评

颇有点压轴题的感觉,证明若 n 为奇数,则Dn为偶数这个命题前, 需要先证明若 n 为偶数,则Dn为奇数。 如果有前一问的引导,难度会小一些;若是直接跳跃性地构造最后一问,难度就大很多。

EX22 ​

Show that the numbers Qn of Section 6.5 can be rewritten in the form

Qn=(n−1)!(n−n−11!+n−22−n−33!+⋯+(−1)n−1(n−1)!)

对Qn定义的变形,

Qn=n!−(n−11)(n−1)!+(n−12)(n−2)!+⋯+(−1)n−1(n−1n−1)1!=∑k=0n−1(n−1k)(−1)k(n−k)!=∑k=0n−1(n−1)!k!⋅(n−k−1)!⋅(−1)k⋅(n−k)!=(n−1)!∑k=0n−1(−1)kn−kk!=(n−1)!(n−00!−n−11!+n−22!+⋯+(−1)n−1n−(n−1)(n−1)!)=(n−1)!(n−n−11!+n−22−n−33!+⋯+(−1)n−1(n−1)!)

综上,证毕。

EX23 ​

(Continuation of Exercise 22.) Use the identity

(−1)kn−kk!=(−1)knk!+(−1)k−11(k−1)!

to prove that Qn=Dn+Dn−1,(n=2,3,...).

Qn=(n−1)!∑k=0n−1(−1)kn−kk!=(n−1)!∑k=0n−1((−1)knk!+(−1)k−11(k−1)!)=nDn−1+(n−1)!∑k=1n−1(−1)k−1(k−1)!=nDn−1+(n−1)!∑i=0n−2(−1)i(i)!=nDn−1+(n−1)Dn−2=Dn−1+(n−1)(Dn−1+Dn−2),for Dn=(n−1)(Dn−1+Dn−2)=Dn+Dn−1

提示

该解法需要使用Dn=(n−1)(Dn−1+Dn−2)的化简技巧, 答案的则是巧妙地添加了一个为 0 的项(−1)nn−nn!,进而,

Qn=(n−1)!∑k=0n(−1)kn−kk!

在之后的展开项中则分别是Dn,Dn−1的定义形式。

EX24 ​

What is the number of ways to place six nonattacking rooks on the 6-by-6 boards with forbidden positions as shown? EX24

设rk为在 k 个禁止位上摆放棋子的方法数,

EX24 Q(a) ​

显然,r0=1,r1=6,禁止位置的集合可以划分为 3 个独立的部分,每一部分最多只能放置一辆车。

因此,r2=(32)×22=12,r3=(33)23=8。

禁止位置上无法摆放四辆及以上的车,因此,ri=0,i≥4。

综上,可以列表,

k0123456
rk16128000

并且计算摆放的方法数。

∑k=0nrk(−1)k(n−k)!=1×6!−6×5!+12×4!−8×3!=240

EX24 Q(b) ​

r2=3×2+(32)×42=54r3=(31)×2×(21)×4+43=112r4=(32)×22+(31)×2×42=108r5=(32)×22×4=48r6=23=8
k0123456
rk11254112108488
∑k=0nrk(−1)k(n−k)!=1×6!−12×5!+54×4!−112×3!+108×2!−48×1!+8×0!=80

EX24 Q(c) ​

将棋盘禁止位分为相互独立的F1和F2,分别求出F1和F2能摆放车的方法数,如下表

k0123
F1(k)1561
k012
F2(k)131

进而求出rk=∑j=0kF1(j)F2(k−j),

k0123456
rk182224910
∑k=0nrk(−1)k(n−k)!=1×6!−8×5!+22×4!−24×3!+9×2!−1×1!+0×0!=161

EX25 ​

Count the permutations i1i2i3i4i5i6 of {1, 2, 3, 4, 5, 6}, where i1≠1,5,i3≠2,3,5;i4≠4; and i6≠5,6.

该问题等价于棋盘问题,可以把不等式转化为每一行(列)限制的序号,本题画出图像后可以发现,有 4 个大小为 1 的禁止块,2 个大小为 2 的禁止块。

从行的角度来思考,最多放置 4 个车,因为只有 4 行有禁止位,所以r5=r6=0。

对于r2的计算方法是:先固定一个,寻找另一个可能的位置,因此r2=6+4+3+3+2+2=20。

r3=(3+3+2+2)+(2+2+1)+(2)+(2)+(1)=20r+4=2+2+2+1=7
k0123456
rk182020700
∑k=0nrk(−1)k(n−k)!=1×6!−8×5!+20×4!−20×3!+7×2!−0×1!+0×0!=134

EX25 & EX26

EX25PS ​

本题与其他禁止位放车问题的区别是:本题不太容易拆分成几个独立的部分。

EX26 ​

Count the permutations i1i2i3i4i5i6 of {1, 2, 3, 4,5, 6}, where i1≠1,2,3;i2≠1;i3≠1;i5≠5,6 and i6≠5,6.

题目转化过程同 EX25,不过这次计算类似 EX24。将棋盘禁止位置划分为F1,F2。

对于每一部分,先计算摆放车可能的种类数,

k0123
F1(k)1540
k0123
F2(k)1420
rk=∑i=0nF1(i)×F2(k−i)
k0123456
rk192626800
∑k=0nrk(−1)k(n−k)!=1×6!−9×5!+26×4!−26×3!+8×2!=124

EX27 ​

A carousel has eight seats, each representing a different animal. Eight girls are seated on the carousel facing forward (each girl ooks at another girl's back). In how many ways can the girls change seats so that each has a different girl in front of her? How does the problem change if all the seats are identical?

设 8 个位置的座位编号分别为1,2,...,8,并且 i 号座位面向 i+1 号座位(1≤i≤7),8 号座位面向 1 号座位。

第 i 个女孩分别坐在 i 号座位上,重排后坐到si号座位上,并且要求si不能面向si+1, (s8不能面向s1)。

记Ai表示排列s1s2⋯s8中si面向si+1 (其中1≤i≤7), A8表示表示排列s1s2⋯s8中s8面向s1。

对于|A1|, 有 8 种方式决定s1, s2只能在前面,有 1 种方式,其余可以随意排列。 因此|A1|=8×1×6!。|Ai|同理。

对于|A1∩A2|, 有 8 种方式决定s1s2s3;其余可以随意排列。 因此|A1∩A2|=8×5!, 其余|Ai∩Aj|同理。

|A1―∩A2―∩⋯∩A4―|=|S|−∑|Ai|+∑|AiAj|−⋯+∑|A1A2⋯A7A8|=8!−(81)×8×6!+(82)×8×5!−⋯+8=13000

当所有座位都相同时,第一个选择座位的女孩只有 1 种选法,破环后,其余人选法不变,因此排列总数为13000/8=1625。

EX27PS ​

参考答案给的符号有些歧义,Ai和As表示的含义不一样,但符号相同, 如 |A1| 对前者(|Ai=1|)来说,是s1面向s2的情况; 对于后者(|As=1|)来说则是所有 1 个交集的情况∑|Ai|。

EX28 ​

A carousel has eight seats, each representing a different animal. Eight boys are seated on the carousel but facing inward, so that each boy faces another (each boy looks at another boy's front). In how many ways can the boys change seats so that each faces a different boy? How does the problem change if all the seats are dentical?

第 i 个男孩坐在 i 号座位上,重排后坐到si号座位上。 设Ai表示si与si+4 面对面(1≤i≤4), 因此需要求所有 i 与 i+4 没有面对面的情况, 即|A1―∩A2―∩A3―∩A4―|。

对于|A1|, 有 8 种方式决定s1, s5只能在对面,有 1 种方式,其余可以随意排列。 因此|A1|=8×1×6!。 |A2|,|A3|,|A4|同理。

对于|A1∩A2|, 有 8 种方式决定s1,s5随之确定; 有 6 种方式确定s2,s6也随之确定,其余可以随意排列。 因此|A1∩A2|=8×6×4!, 其余|Ai∩Aj|同理。

|A1―∩A2―∩A3―∩A4―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|+∑|AiAjAkAu|=8!−(41)(8×6!)+(42)(8×6×4!)−(43)(8×6×4×2!)+(44)(8×6×4×2)=23040

当所有座位都相同时,则变成了换排列,因此排列总数为23040/8=2880。

EX29 ​

A subway has six stops on its route from its base location. There are 10 people on the subway as it departs its base location. Each person exits the subway at one of its six stops, and at each stop at least one person exits. In how many ways can this happen?

如果没有任何限制,10 个人一共有610种下车方案。 设Ai表示没人在 i 车站下车,所以有|Ai|=510; 对于|Ai∩Aj|=410。 同理,可以计算多个子集车站没人下车的情况。

|A1―∩A2―∩⋯∩A6―|=|S|−∑|Ai|+∑|AiAj|−⋯+∑|A1A2⋯A6|=610+(−1)k(6k)(6−k)10=610−6×510+15×410−20×310+15×210−6×110+1×010=1165626

EX30 ​

How many circular permutations are there of the multiset

{3⋅a,4⋅b,2⋅c,1⋅d},

where, for each type of letter, all letters of that type do not appear consecutively?

设Ai,i=1,2,3分别表示出现了aaa、bbbb和cc, A1可以当作aaa,b,b,b,b,c,c,d的循环排列, 即18×(8142)=105。

setsize
A1105
A260
A3280
A1∩A212
A1∩A330
A2∩A320
A1∩A2∩A33
|A1―∩A2―∩A3―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|=110×10!3!⋅4!⋅2!⋅1!−(105+60+280)+(12+30+20)−3=1260−(105+60+280)+(12+30+20)−3=874

顺便一提

参考答案认为一个 d 本身就是所有的 d 连续出现。

Since d appears in the multiset with multiplicity one, it is vacuously true that for any circular permutation of the multiset, all occurrences of d will appear consecutively.

当然,最后解题时还是认为连续最起码要有一前一后的两项才算连续,所谓连续,参考 EX17,甚至本题数据和结果都与这题一致。

EX31 ​

How many circular permutations are there of the multiset

{2⋅a,3⋅b,4⋅c,5⋅d},

where, for each type of letter, all letters of that type do not appear consecutively?

设Ai,i=1,2,3,4分别表示出现了aa、bbb、ccccc和ddddd,A1可以当作 aa,b,b,b,c,c,c,c,d,d,d,d,d的循环排列,即113×(131345)=27720。

setsize
A127720
A26930
A32520
A41260
A1∩A21260
A1∩A3504
A1∩A4280
A2∩A3168
A2∩A4105
A3∩A460
A1∩A2∩A342
A1∩A2∩A430
A1∩A3∩A420
$ A_2 \cap A_3 \cap A_4$12
A1∩A2∩A3∩A46
|A1―∩A2―∩A3―∩A4―|=|S|−∑|Ai|+∑|AiAj|−∑|AiAjAk|+∑|AiAjAkAu|=114×14!2!⋅3!⋅4!⋅5!−(27720+6930+2520+1260)+(1260+504+280+168+105+60)−(42+30+20+12)+6=180180−(27720+6930+2520+1260)+(1260+504+280+168+105+60)−(42+30+20+12)+6=144029

EX32-40 说明 🚧 👻 ​

后面的题目似乎都是 6.5 小结莫比乌斯反演的练习题。

其中 EX32 是关键的 🔑 题目; EX33 是加星题目(*); EX36 是带有禁止位置的放车问题,虽然指明了用 6.5 中的解题方法。但用 EX24 中的方法也能很快做出答案(6 种)。