找回密码
 快速注册
搜索
查看: 104|回复: 4

[组合] 卡塔兰数列

[复制链接]

21

主题

80

回帖

590

积分

积分
590

显示全部楼层

大白兔奶糖 发表于 2024-10-6 18:34 |阅读模式
Screenshot 2024-10-06 at 18-31-09 神奇的卡塔兰(Catalan)数.png
不用生成函数,不用组合意义和几何图形。
有递归定义推导递推公式

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2024-10-6 20:05
大白兔奶糖 发表于 2024-10-6 10:34
不用生成函数,不用组合意义和几何图形。
有递归定义推导递推公式

gameludere.com/2020/02/03/euler-polygon-triangulation-problem有类似的推导。希望对你有帮助
\[   E_{n}= E_{2}E_{n-1} +  E_{3}E_{n-2} + \cdots + E_{n-1}E_{2}\]where we place for uniformity \(E_{2} = 1 \). This recurrence formula was introduced by Segner in 1758.
Now let’s compute the generating function of the numbers  \(E_ {n} \):
\[ F(x) = E_{0} + E_{1}\cdot x + E_{2} \cdot x^2 + E_{3}\cdot x^{3}+  \cdots \]where \(E_{0} = E_{1} = 0 \).
If we calculate the square of the \(F (x) \), with the product rule between two polynomials, we have:
\[ (F(x))^{2} = E_{3}\cdot x^{4} + E_{4}\cdot x^{5} + E_{5} \cdot x^{6} + \cdots\]by virtue of the recurrence equation satisfied by the coefficients \(E_ {n} \). With simple steps we can write the functional equation satisfied by the function \(F (x) \):
\[ F(x)^2 – xF(x) + x^{3} = 0 \]The initial conditions are \(F (0) = 0 \) and \(F’ (0) = 0 \), where the symbol \(F’ (0) \) denotes the derivative calculated at the point \(x = 0\). Solving with respect to \(F (x) \) and taking into account the initial conditions, we find the following solution (the other with the positive sign is discarded):
\[F(x)= x \left(\frac{1- \sqrt{1- 4x}}{2}\right)\]We now use the Taylor-McLaurin series development of the function \(\sqrt{1-4x} \), that is Newton’s binomial formula, valid for \(| x | <1 \) and for every real number \(\alpha \):
\[\begin{array}{l} (1+t)^{\alpha} &= \sum\limits_{k=0}^{\infty} \dbinom{\alpha}{k} t^{k}   \\ &= 1 + \alpha t + \dfrac{\alpha \cdot (\alpha -1)t^{2}}{2!}+   \dfrac{\alpha \cdot (\alpha -1)(\alpha -2)t^{3}}{3!} + \cdots \\\end{array}\]In our case \(\alpha = \frac{1}{2}\) and \(t = -4x \). The binomial coefficient \(\dbinom{\frac {1}{2}}{n} \) has the following expression:
\[\dbinom{\frac {1}{2}}{n} =\frac{\left(\frac{1}{2}\right)\left(\frac{-1}{2}\right)\left(\frac{-3}{2}\right) \cdots \left(\frac{-(2n-3)}{2 }\right)}{n!}=\frac{(-1)^{n-1}}{2^{2n-1}n}\binom{2n-2}{n-1}\]where we used the following formula, which is easily proved by the induction method:
\[   1 \cdot 3 \cdot 5   \cdots \cdot (2n-1)= \frac {(2n)!}{2^{n}n!}\]Continuing we have:
\[\binom {\frac {1}{2}}{n}(-4)^{n}=\left(\frac{-2}{n}\right)\binom {2n-2}{n-1}\]Finally, putting together what we have found, we have that the coefficient of the power \(x^{n}\) in the generating function \(F (x) \) is:
\[    E(n)=\frac {1}{n-1} \binom {2n-4}{n-2}\]

21

主题

80

回帖

590

积分

积分
590

显示全部楼层

 楼主| 大白兔奶糖 发表于 2024-10-6 20:34
hbghlyj 发表于 2024-10-6 20:05
https://www.gameludere.com/2020/02/03/euler-polygon-triangulation-problem有类似的推导。希望对你有帮 ...

你的方法用了生成函数

27

主题

1010

回帖

1万

积分

积分
12585

显示全部楼层

战巡 发表于 2024-10-6 22:28
居然还限定方法,你这纯属给自己找麻烦

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2025-1-2 21:19
大白兔奶糖 发表于 2024-10-6 12:34
你的方法用了生成函数

你应该知道 卡塔兰数列 计算二叉树的数量

给定一个顶点编号为 $0$ 到 $n$ 的多边形的三角剖分,构建一个树,其顶点是图形的边,包括多边形的 $n+1$ 条边和 $n-2$ 条内部边。根是连接顶点 $0$ 和顶点 $1$ 的外部边。对于每条内部边 $e$,它与两个三角形 $T_1$ 和 $T_2$ 接壤,假设 $T_1$ 离根边 $(0,1)$ 更远,则 $e$ 的右(左)子节点是 $T_1$ 中顺时针(逆时针)与 $e$ 相邻的边。

给定 $x_1\cdots x_n$ 的括号化,构建一个树,每个中间结果在执行所有乘法时都有一个顶点。如果结果 $a$ 是通过按顺序计算 $b$ 和 $c$ 的乘积得到的,则 $a$ 有左子节点和右子节点 $b$ 和 $c$。

例如,对于 $(1\,2)(3\,(4\,5))$,树是

这棵树对应于三角剖分


其树是

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 13:10

Powered by Discuz!

× 快速回复 返回顶部 返回列表