数论--卡特兰数
来源:互联网 发布:手机ui界面设计软件 编辑:程序博客网 时间:2024/04/29 01:42
Catalan 卡特兰数
1,2,5,14,42,132,429...
1.catalan(n) = C(n 2n)/(n + 1) 但是计算时一般不用,容易溢出
2.c[0] = 1
c[n + 1] = c[0] * c[n] + c[1] * c[n - 1] + ... + c[n] * c[0]
3.c[0] = 1
(n + 2) * c[n + 1] = (4 * n + 2) * c[n]
递推公式 c[n + 1] = (4n + 2) / (n + 2) * c[n].
应用:
1.多边形的三角剖分数目
三角形->1
4边形->2
五边形->5
2.数字加括号的方式
(1 2) ->1种
(1 2) 3,1 (2 3) -> 2种
((1 2) 3) 4,(1 2)(3 4),(1 (2 3)) 4,1 ((2 3) 4),1(2 (3 4)) -> 5种
3.the number of rooted, trivalent trees with n+1 nodes
4. the number of paths of length 2n through an n-by-n grid that do not rise above the main diagonal
在2n * 2n的棋盘上,从(1,1)至(2n,2n)而不穿过对角线的走法(一侧)
5.不同形态的二叉树数目
6.The number of ways 2n people, seated round a table, can shake hands in n pairs, without their arms crossing.
- 【卡特兰数】【数论】
- 数论--卡特兰数
- 算法-数论-卡特兰数
- 数论-卡特兰数的应用
- 卡特兰数 Catalan数 ( ACM 数论 组合 )
- 卡特兰数 Catalan数 ( ACM 数论 组合 )
- HDU 3240 Counting Binary Trees 数论-卡特兰数
- 卡特兰数(Catalan Number) 算法、数论 组合~
- 卡特兰数,高精度卡特兰数
- 卡特兰数
- 卡特兰数(Catalan)
- 卡特兰数
- 卡特兰数
- 卡特兰数 大数
- 卡特兰数
- 卡特兰数
- 卡特兰数
- 卡特兰数
- 2017.08.14回顾 IV的系数
- vps加HHVM服务器的安装
- HDU 4819 Mosaic(二维线段树单点更新+区间查询+自己的写法模板)
- Spring MVC-DispatcherServlet
- 12.Bound Service
- 数论--卡特兰数
- 剑指offer55
- 移动端JS事件、移动端框架
- HDUOJ 2544 最短路(Dijkstra)
- 后缀数组,倍增算法
- 自定义 View 初探,一个简单的验证码View (一)
- python中counter()记数
- SpannableString同时设置ClickableSpan和ForegroundColorSpan时ForegroundColorSpan不生效的解决办法
- HDU