L12 – Combinatorics: Sets, Multisets, Binomial Inversion, and Distribution Problems

Discrete Mathematics2026年4月13日发布 芮和
1.1K 180
9,489字
40–60 分钟

Catalan Number

THEOREM: The nnth Catalan number CnC_n is the number of solutions of the system

{x1+x2++x2n=nx1+x2++xii2, i=1,2,,2n1xi{0,1}, i=1,2,,2n\begin{cases}x_1 + x_2 + \cdots + x_{2n} = n \\x_1 + x_2 + \cdots + x_i \leq \frac{i}{2},\ i = 1,2, \dots, 2n – 1 \\x_i \in \{0,1\},\ i = 1,2, \dots, 2n\end{cases}

and is equal to 1n+1(2nn)\displaystyle\frac{1}{n+1}\binom{2n}{n}.

  • 𝒞n\mathcal{C}_n is the set of all solutions of the system
    • 𝒙𝒊12𝒙𝒊\boldsymbol{x_i \mapsto 1 – 2x_i}: a bijection from 𝒞n\mathcal{C}_n to the ballot sequences of length 2n2n // |𝒞𝒏|=𝑪𝒏\boldsymbol{|\mathcal{C}_n| = C_n}
  • 𝒯n\mathcal{T}_n: the set of all T-routes from (1,2)(1,2) to (2n,1)(2n, 1) above the x-axis//?|𝑪𝒏|=|𝒯𝒏|\boldsymbol{|C_n| = |\mathcal{T}_n|}
  • A map𝒇:𝒞𝒏𝒯𝒏\boldsymbol{f: \mathcal{C}_n \to \mathcal{T}_n} Given a solution (x1,x2,,x2n)𝒞n(x_1, x_2, \dots, x_{2n}) \in \mathcal{C}_n,
    • Let Pi=(i,1+12x1++12xi)P_i = \left(i, 1 + 1 – 2x_1 + \cdots + 1 – 2x_i\right) for all i=1,2,,2ni = 1,2, \dots, 2n
    • 1+12x1++12xi>01 + 1 – 2x_1 + \cdots + 1 – 2x_i > 0 for i=1,2,,2ni = 1,2, \dots, 2n
    • P1=(1,1+12x1)=(1,2)P_1 = (1, 1 + 1 – 2x_1) = (1,2);
      P2n=(2n,1)P_{2n} = (2n, 1)
    • PiPi1=(1,12xi)(1,1),(1,1), i=2,,2nP_i – P_{i-1} = (1, 1 – 2x_i) \in {(1,1), (1,-1)},\ i = 2, \dots, 2n
    • P1,P2,,P2nP_1, P_2, \dots, P_{2n} is a T-route above the x-axis
  • A map𝒈:𝒯𝒏𝒞𝒏\boldsymbol{g: \mathcal{T}_n \to \mathcal{C}_n}: Given a T-route (1,2)(1,2) to (2n,1)(2n, 1) above the x-axis, say {Pi(ui,vi):i[2n]}\{P_i(u_i, v_i): i \in [2n]\},
    • (u1,v1)=(1,2),(u2n,v2n)=(2n,1)(u_1, v_1) = (1,2), (u_{2n}, v_{2n}) = (2n, 1)
    • x1=2v12=0x_1 = \frac{2 – v_1}{2} = 0
    • xi=1(vivi1)2{0,1}, i=2,,2nx_i = \frac{1 – (v_i – v_{i-1})}{2} \in \{0,1\},\ i = 2, \dots, 2n
    • x1+x2++x2n=2n+1v2n2=nx_1 + x_2 + \cdots + x_{2n} = \frac{2n + 1 – v_{2n}}{2} = n
    • x1+x2++xi=i+1vi212, i=1,2,,2nx_1 + x_2 + \cdots + x_i = \frac{i + 1 – v_i}{2} \leq \frac{1}{2},\ i = 1,2, \dots, 2n
  • A=P1=(1,2)A = P_1 = (1,2): a=1,α=2a = 1, \alpha = 2;
    B=P2n=(2n,1)B = P_{2n} = (2n, 1): b=2n,β=1b = 2n, \beta = 1
    • |𝒞n|=(2n1)!(n1)!n!(2n1)!(n+1)!(n2)!=(2n)!n!(n+1)!=1n+1(2nn)\displaystyle |\mathcal{C}_n| = \frac{(2n-1)!}{(n-1)!n!} – \frac{(2n-1)!}{(n+1)!(n-2)!} = \frac{(2n)!}{n!(n+1)!} = \frac{1}{n+1}\binom{2n}{n}

Combinations of Sets

DEFINITION: Let A={a1,,an}A = \{a_1, \dots, a_n\} and let r{0,1,,n}r \in \{0,1, \dots, n\}. An rr-combination of AA is simply an rr-subset of AA. // for simplicity, we may use A=[n]A = [n]

  • {ai1,,air}\{a_{i_1}, \dots, a_{i_r}\} with 1i1<i2<<irn1 \leq i_1 < i_2 < \dots < i_r \leq n

THEOREM: For all n+n \in \mathbb{Z}^+ and r{0,1,,n}r \in \{0,1, \dots, n\}, the number of rr-combinations of an nn-element set is (nr)=n!r!(nr)!\binom{n}{r} = \frac{n!}{r!(n-r)!}.

DEFINITION: Let A={a1,,an}A = \{a_1, \dots, a_n\} and let r0r \geq 0. An rr-combination (with repetition) of AA is a multiset {x1a1,,xnan}\{x_1 \cdot a_1, \dots, x_n \cdot a_n\} of AA of rr elements, where x1,,xn0x_1, \dots, x_n \geq 0 are integers and x1++xn=rx_1 + \dots + x_n = r. // for simplicity, we may use A=[n]A = [n]

  • {ai1,,air}\{a_{i_1}, \dots, a_{i_r}\} with 1i1i2irn1 \leq i_1 \leq i_2 \leq \dots \leq i_r \leq n

THEOREM: For all n+n \in \mathbb{Z}^+ and r0r \geq 0, the number of rr-combinations (with repetition) of an nn element set is (n+r1r)\binom{n + r – 1}{r}.

  • 𝒰\mathcal{U}: the set of all rr-combinations of [n][n]with repetition
  • 𝒱\mathcal{V}: the set of all rr-combinations of [n+r1][n + r – 1]without repetition
    • Let U={u1,u2,,ur}𝒰U = \{u_1, u_2, \dots, u_r\} \in \mathcal{U} and 1u1u2urn1 \leq u_1 \leq u_2 \leq \dots \leq u_r \leq n.
      • 1u1<u2+1<u3+2<<ur+r1n+r11 \leq u_1 < u_2 + 1 < u_3 + 2 < \dots < u_r + r – 1 \leq n + r – 1
        • {u1,u2+1,,ur+r1}𝒱\{u_1, u_2 + 1, \dots, u_r + r – 1\} \in \mathcal{V}
        • f:𝒰𝒱, {u1,u2,,ur}{u1,u2+1,,ur+r1}f: \mathcal{U} \to \mathcal{V},\ \{u_1, u_2, \dots, u_r\} \mapsto \{u_1, u_2 + 1, \dots, u_r + r – 1\}
      • ff is a bijection. Hence, |𝒰|=|𝒱|=(n+r1r)|\mathcal{U}| = |\mathcal{V}| = \binom{n + r – 1}{r}

THEOREM: The number of natural number solutions of the equation x1+x2++xn=rx_1 + x_2 + \dots + x_n = r is (n+r1r)\binom{n + r – 1}{r}.

  • 𝒳={(x1,,xn):x1,,xn\mathcal{X} = \{(x_1, \dots, x_n): x_1, \dots, x_n \in \mathbb{N} and x1++xn=r}x_1 + \dots + x_n = r\}
  • 𝒴\mathcal{Y}: the set of all rr-combinations of [n][n] with repetition
  • f:𝒳𝒴, (x1,,xn){x11,x22,,xnn}f: \mathcal{X} \to \mathcal{Y},\ (x_1, \dots, x_n) \mapsto \{x_1 \cdot 1, x_2 \cdot 2, \dots, x_n \cdot n\}
  • ff is a bijection. Hence, |𝒳|=|𝒴|=(n+r1r)|\mathcal{X}| = |\mathcal{Y}| = \binom{n + r – 1}{r}.

Combinations of Multiset

DEFINITION: Let A={n1a1,,nkak}A = \{n_1 \cdot a_1, \dots, n_k \cdot a_k\} be an nn-multiset. Let r{0,1,,n}r \in \{0,1, \dots, n\}. An rr-combination of AA is an rr-subset (multiset) of AA.

  • {x1a1,x2a2,,xkak}\{x_1 \cdot a_1, x_2 \cdot a_2, \dots, x_k \cdot a_k\}, where 0xini0 \leq x_i \leq n_i for every i[k]i \in [k] and x1+x2++xk=rx_1 + x_2 + \dots + x_k = r.

EXAMPLE: A={1a,2b,3c}A = \{1 \cdot a, 2 \cdot b, 3 \cdot c\}

  • {1b,2c}\{1 \cdot b, 2 \cdot c\} is a 3-combination of AA; a 3-subset of AA

REMARK: understanding combinations of a set with those of a multiset

  • For every r{0,1,,n}r \in \{0,1, \dots, n\}, an rr-combination of A={a1,a2,,an}A = \{a_1, a_2, \dots, a_n\} without repetition is an rr-combination of {1a1,1a2,,1an}\{1 \cdot a_1, 1 \cdot a_2, \dots, 1 \cdot a_n\}.
  • For every r0r \geq 0, an rr-combination of A={a1,a2,,an}A = \{a_1, a_2, \dots, a_n\} with repetition is an rr-combination of {a1,a2,,an}\{\infty \cdot a_1, \infty \cdot a_2, \dots, \infty \cdot a_n\}.

Inverse Binomial Transform

DEFINITION: The binomial transform of {an}ns\{a_n\}_{n\geq s} is a sequence {bn}ns\{b_n\}_{n\geq s} s.t.

bn=k=sn(nk)ak(1)b_n = \sum_{k=s}^n \binom{n}{k} a_k \tag{1}

DEFINITION: The inverse binomial transform of {bn}ns\{b_n\}_{n\geq s} is a sequence {an}ns\{a_n\}_{n\geq s} s.t.

an=k=sn(1)nk(nk)bk(2)a_n = \sum_{k=s}^n (-1)^{n-k} \binom{n}{k} b_k \tag{2}

QUESTION: Given (1), how to find the sequence {an}\{a_n\}?

  • Answer: {an}\{a_n\} is the inverse binomial transform of {bn}\{b_n\}
  • Application: determine {an}\{a_n\} via {bn}\{b_n\}

Combinatorial Proofs

DEFINITION: A combinatorial proof of an identity L=RL = R is

  • a double counting proof, showing that L,RL, R count the same set but in different ways:
    • L=|X|=RL = |X| = R and L,RL, R count |X||X| in different ways.
  • a bijective proof, which shows a bijection between the sets counted by LL and RR:
    • L=|X|,R=|Y|L = |X|, R = |Y| and there is a bijection f:XYf: X \to Y.

EXAMPLE: (ni)=(nni)\binom{n}{i} = \binom{n}{n-i}

  • X={s{0,1}n:sX = \{s \in \{0,1\}^n: s contains ii 0’s}={s{0,1}n:s\} = \{s \in \{0,1\}^n: s contains nin-i 1’s}\}
    • (ni)=|X|\binom{n}{i} = |X|
    • (nni)=|X|\binom{n}{n-i} = |X|

LEMMA: (nk)(ki)=(ni)(niki)\binom{n}{k}\binom{k}{i} = \binom{n}{i}\binom{n-i}{k-i} for any n,k,in,k,i \in \mathbb{N} such that nkin \geq k \geq i.

  • Let U={u1,u2,,un}U = \{u_1, u_2, …, u_n\} be a finite set of nn elements
  • Let X={(A,B):AU,|A|=k,BA,|B|=i}X = \{(A,B): A \subseteq U, |A| = k, B \subseteq A, |B| = i\}
    • choose AA then choose BB: |X|=(nk)(ki)|X| = \binom{n}{k}\binom{k}{i}
    • choose BB then choose AA: |X|=(ni)(niki)|X| = \binom{n}{i}\binom{n-i}{k-i}

LEMMA: k=in(1)nk(nk)(ki)={1n=i0n>i\sum_{k=i}^n (-1)^{n-k} \binom{n}{k}\binom{k}{i} =\begin{cases}1 & n = i \\0 & n > i\end{cases}.

  • (nk)(ki)=(ni)(niki)\binom{n}{k}\binom{k}{i} = \binom{n}{i}\binom{n-i}{k-i} as nki0n \geq k \geq i \geq 0
  • 𝐥𝐞𝐟𝐭=k=in(1)nk(ni)(niki)\textbf{left} = \sum_{k=i}^n (-1)^{n-k} \binom{n}{i}\binom{n-i}{k-i}
    =(ni)k=in(1)(ni)(ki)(niki)= \binom{n}{i} \sum_{k=i}^n (-1)^{(n-i)-(k-i)} \binom{n-i}{k-i}
    =(ni)j=0ni(1)(ni)j(nij)= \binom{n}{i} \sum_{j=0}^{n-i} (-1)^{(n-i)-j} \binom{n-i}{j}
    =𝐫𝐢𝐠𝐡𝐭= \textbf{right}

LEMMA: Let n,s,snn, s \in \mathbb{N}, s \leq n. Then k=sni=skak,iαk=i=snk=inak,iβk\sum_{k=s}^n \underbrace{\sum_{i=s}^k a_{k,i}}_{\alpha_k} = \sum_{i=s}^n \underbrace{\sum_{k=i}^n a_{k,i}}_{\beta_k}

𝒌\boldsymbol{k} \ iisss+1s+1s+2s+2\cdotsnnrow sum
𝒔\boldsymbol{s}as,sa_{s,s}\cdots𝜶𝒔\boldsymbol{\alpha_s}
𝒔+1\boldsymbol{s+1}as+1,sa_{s+1,s}as+1,s+1a_{s+1,s+1}\cdots𝜶𝒔+1\boldsymbol{\alpha_{s+1}}
𝒔+2\boldsymbol{s+2}as+2,sa_{s+2,s}as+2,s+1a_{s+2,s+1}as+2,s+2a_{s+2,s+2}\cdots𝜶𝒔+2\boldsymbol{\alpha_{s+2}}
\vdots\vdots\vdots\vdots\ddots\vdots\vdots
𝒏\boldsymbol{n}an,sa_{n,s}an,s+1a_{n,s+1}an,s+2a_{n,s+2}\cdotsan,na_{n,n}𝜶𝒏\boldsymbol{\alpha_n}
col sumβs\beta_sβs+1\beta_{s+1}βs+2\beta_{s+2}\cdotsβn\beta_n\sum\sum

THEOREM: Let {an},{bn}\{a_n\}, \{b_n\} be two sequences s.t. for all nsn \geq s, an=k=sn(nk)bka_n = \sum_{k=s}^n \binom{n}{k} b_k. Then
bn=k=sn(1)nk(nk)akb_n = \sum_{k=s}^n (-1)^{n-k} \binom{n}{k} a_k(ns)(n \geq s).

  • k=sn(1)nk(nk)ak=k=sn(1)nk(nk)i=sk(ki)bi=i=snk=in(1)nk(nk)(ki)bi=bn\sum_{k=s}^n (-1)^{n-k} \binom{n}{k} a_k = \sum_{k=s}^n (-1)^{n-k} \binom{n}{k} \sum_{i=s}^k \binom{k}{i} b_i = \sum_{i=s}^n \sum_{k=i}^n (-1)^{n-k} \binom{n}{k} \binom{k}{i} b_i = b_n

Distribution Problems

The Problem Statement: distributing nn objects into kk boxes

  • Objects may be distinguishable (labeled with1,2,,𝒏\boldsymbol{1,2, \dots, n}) or indistinguishable (unlabeled)
  • Boxes may be distinguishable (labeled with 1,2,,k1,2, \dots, k) or indistinguishable (unlabeled)
  • What is the number of methods of distributing nn objects into kk?
Problem TypeObjectsBoxes
1labeledlabeled
2unlabeledlabeled
3labeledunlabeled
4unlabeledunlabeled
Problem Classification

Type 1

Problem: distributing nn labeled objects into kk labeled boxes

Classifications
n1+n2++nk=nn_1 + n_2 + \dots + n_k = n
n1,n2,,nkn_1, n_2, …, n_k \in \mathbb{N}

THEOREM: The # of ways of distributing nn labeled objects into kk labeled boxes such that nin_i objects are placed into box ii for every i[k]i \in [k] is N1=n!n1!n2!nk!N_1 = \frac{n!}{n_1! n_2! \dots n_k!}.

  • SS: the set of the expected distributing schemes
  • |S|=(nn1)(nn1n2)(nn1nk1nk)=n!n1!n2!nk!|S| = \binom{n}{n_1} \binom{n-n_1}{n_2} \dots \binom{n-n_1-\dots-n_{k-1}}{n_k} = \frac{n!}{n_1! n_2! \dots n_k!}

REMARK: N1=N_1 = # of permutations of {n11,,nkk}\{n_1 \cdot 1, …, n_k \cdot k\}


Type 2

Problem: distributing nn unlabeled objects into kk labeled boxes

Classifications
n1+n2++nk=nn_1 + n_2 + \dots + n_k = n
n1,n2,,nkn_1, n_2, …, n_k \in \mathbb{N}

THEOREM: The number of ways of distributing nn unlabeled objects into kk labeled boxes is N2=(n+k1n)N_2 = \binom{n + k – 1}{n}.

  • SS: the set of the expected distributing schemes
  • T={(n1,n2,,nk):n1+n2++nk=n;n1,n2,,nk}T = \{(n_1, n_2, …, n_k): n_1 + n_2 + \dots + n_k = n; n_1, n_2, …, n_k \in \mathbb{N}\}
  • f:TSf: T \to S(n1,n2,,nk)(n_1, n_2, …, n_k) \mapsto a scheme where nin_i objects are put into box ii
    • ff is a bijection. Hence, |S|=|T|=(n+k1n)|S| = |T| = \binom{n + k – 1}{n}

REMARK: N2=N_2 = # of nn-combinations of {1,,k}\{\infty \cdot 1, …, \infty \cdot k\}

© 版权声明

相关文章

18 条评论

  • 凛音晴美
    凛音晴美 读者

    这排列组合看得我头大

    中国福建
    回复
  • 太阳风车骑士
    太阳风车骑士 读者

    这分布问题的四种类型分类得挺清晰

    中国香港
    回复
  • Starfall Serenade
    Starfall Serenade 读者

    这公式排版看得我眼花

    中国湖南
    回复
  • 血战八方
    血战八方 读者

    双射那部分理解起来有点绕

    中国浙江
    回复
  • 斜阳故里
    斜阳故里 读者

    这组合数学内容有点烧脑

    中国广东
    回复
    • 反向摸鱼
      反向摸鱼 读者

      同感,组合数学确实难

      韩国@ 斜阳故里
      回复
  • 青岚夜语
    青岚夜语 读者

    Catalan数在路径计数中的应用挺巧妙

    中国
    回复
  • 玛瑙
    玛瑙 游客

    实际应用场景能举个例吗

    中国吉林
    回复
  • 铜琵铁板
    铜琵铁板 游客

    组合恒等式推导过程挺清晰

    中国辽宁
    回复
  • 云雾轻绕
    云雾轻绕 读者

    映射关系这部分需要多看看

    印度
    回复
  • 梦幻
    梦幻 读者

    这组合恒等式推导过程挺严谨

    新加坡
    回复
    • 红绡
      红绡 读者

      同感,推导很清晰

      中国山东@ 梦幻
      回复
  • 橄榄枝
    橄榄枝 读者

    双射证明这部分写得挺直观

    越南
    回复
    • 机智的皮皮虾
      机智的皮皮虾 读者

      我也觉得挺清晰

      日本@ 橄榄枝
      回复
  • BumbleBeeBaby
    BumbleBeeBaby 读者

    这分布问题的分类整理得挺清楚

    越南
    回复
  • Tiger王
    Tiger王 读者

    卡塔兰数这映射关系还挺巧妙

    中国陕西
    回复
  • 银月幻术师
    银月幻术师 游客

    这公式看着头大,组合数学真要命🤯

    中国辽宁
    回复