Catalan Numbers
EXAMPLE: The th Catalan number is .
- Catalan number: ,
- Let be the generating function of the sequence of Catalan numbers.
- ? No, because it gives a negative sequence.
Counting Permutations with GFs
QUESTION: Let . For every , let be the number of -combinations of with repetition where every appears times.
- is the number of ways of distributing unlabeled objects into labeled boxes such that objects are sent to box . (Type 2 distribution problem)
THEOREM: .
EXAMPLE: Let be the # of ways of distributing identical books to 5 persons such that person 1, 2, 3, and 4 receive , , , books, respectively.
- ;
;
;
;
QUESTION: Let . For every , let be the number of -permutations of with repetition where every appears times.
- is the number of ways of distributing labeled objects into labeled boxes such that objects are sent to box for all . (Type 1 distribution problem)
THEOREM: .
EXAMPLE: Find
- # of -permutations of with repetition where 1 appears an even number of times
- ,
Stirling Number
EXAMPLE: Show that // (Type 3 distribution problem)
- the # of ways of distributing labeled objects into unlabeled boxes s.t. no box is empty
- be the # of ways of distributing labeled objects into labeled boxes s.t. no box is empty.
THEOREM: // (Type 4 distribution problem)
- // the last entry is 1; otherwise
EXAMPLE: What is the number of ways of distributing 20 unlabeled objects into 5 unlabeled boxes such that no box is empty? That is,
这种分布问题直接套公式就行了?
这符号量,简直在给大脑做压力测试。
这类题要是没生成函数得写多少行。
那个 $p_5(20)$ 的结果 84 是怎么从那个大乘积里算出来的?
以前为了搞定 $S_2$ 熬了几个通宵,结果最后少写了个负号,差点没把书给撕了。
数学这玩意,看的时候觉得自己懂了,笔一拿直接懵。
$binom{-5}{5}$ 怎么变 $binom{9}{5}$ 的?这步没看懂。
所以最后 p5(20) 是 84 种分法?感觉比硬枚举快多了。
枚举得死人,这方法虽然看着唬人但确实省事。
S2(n,j) 那个容斥原理的求和式子背了忘忘了背,太折磨。
之前做括号匹配题用过卡特兰数,没想到还能这么推。
纯路过,这符号密度劝退我了 😂
符号炸裂我直接跳过去,真是眼花缭乱
那个分书例题里,为什么可以直接把几个级数乘起来?
那个x∑Cₙ₊₁xⁿ = C(x)−1不就是错位相减嘛,把级数展开就明白了
看着挺简洁,自己推一遍全是坑。
所以卡特兰数选减号是因为加号会让常数项变无穷大?
手算那个 126 的时候差点把阶乘搞错,太容易粗心了。
当年考组合数学就栽在生成函数上,现在看还是头大。
这推导步骤跳得有点快,中间那步平方展开没看懂。
其实就是柯西乘积,搜一下那个公式就明白了。
生成函数搞组合真挺神的,不过手算起来还是容易漏项
指数型生成函数这波操作太秀了
这操作确实绝了
p5(20)=84这步算得挺巧
这步确实挺巧妙的
这段推导思路挺清晰
生成函数推卡特兰数那几步太丝滑了
卡特兰数那个正负号取舍讲得挺细
偶数个1那步展开真绝
看到那步我直接愣住了
Stirling数那堆求和看着头晕
同感,递推式绕来绕去
最后整数分拆那个84怎么来的,看半天才看懂
Type 1到4的分布问题分类确实清晰
同感,分类特别清楚
用指数型母函数处理排列问题那块,展开太丝滑了
这个递推公式挺好用
看到Catalan数就头大
那个分书例题算出来 126,心算差点没跟上
p₅(20)=84这个数是不是也能递推出来?想验证下
感觉这种代数操作像变魔术,结果对但过程摸不着头脑
Stirling数那个推导过程有点绕,得拿笔算几遍
确实需要多推几遍
生成函数太牛了,直接把求和变成乘积
同感,这转换太绝了
长推导直接跳过,只看结论了😂
不是说Catalan数能数二叉树吗,这跟生成函数咋对应上的?
离散数学要是考这个,我直接交白卷
我也怕考到这种题目啊
有没人用这个算过实际问题?比如括号匹配那种经典题
p5(20)居然才84,直觉以为会更多
懂了,C(x)选减号是因为展开后系数得非负,加号会出负数序列😂
那个x∑Cₙ₊₁xⁿ = C(x)−1是怎么推的?卡在这步了
应该是把 $sum C_n x^n$ 往后移一项,然后减掉 $C_0$。
a20=126这步要是手算得算到明年
直接上计算器,别折磨自己
之前上组合数学被生成函数折磨过,现在看还是头皮发麻
这个递推式Cₙ₊₁=ΣCₖCₙ₋ₖ,是不是意味着每一步都在拆解结构?
看这堆求和符号直接劝退,我连C(x)是啥都没搞明白
看这堆符号,我直接晕了
我看完差点没站稳,求个简化步骤
这个生成函数的收敛半径怎么算的?有人有步骤吗,能不能举个具体例子
Catalan数那步变号搞了好久才明白
这公式一看就头大,竟然还能这么简洁 😂