﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Snowdream-随笔分类-Mathematics</title><link>http://www.blogjava.net/zellux/category/24281.html</link><description>盲目、宽泛、浮躁的学习笔记 | 都大二了，总得学点什么了。。。</description><language>zh-cn</language><lastBuildDate>Sun, 18 Nov 2007 22:15:15 GMT</lastBuildDate><pubDate>Sun, 18 Nov 2007 22:15:15 GMT</pubDate><ttl>60</ttl><item><title>Exponentiating by squaring </title><link>http://www.blogjava.net/zellux/archive/2007/11/18/161322.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Sat, 17 Nov 2007 16:56:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/11/18/161322.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/161322.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/11/18/161322.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/161322.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/161322.html</trackback:ping><description><![CDATA[http://www.wiki.cn/wiki/Exponentiation_by_squaring<br />
<br />
<p><strong>Exponentiating by squaring</strong> is an <a title="Algorithm" href="http://www.wiki.cn/wiki/Algorithm">algorithm</a> used for the fast computation of large <a title="Integer" href="http://www.wiki.cn/wiki/Integer">integer</a> powers of a <a title="Number" href="http://www.wiki.cn/wiki/Number">number</a>. It is also known as the <strong>square-and-multiply</strong> algorithm or <strong>binary exponentiation</strong>. In <a title="Additive group" href="http://www.wiki.cn/wiki/Additive_group">additive groups</a> the appropriate name is <strong>double-and-add</strong> algorithm. It implicitly uses the <a title="Binary numeral system" href="http://www.wiki.cn/wiki/Binary_numeral_system">binary</a> expansion of the exponent. It is of quite general use, for example in <a title="Modular arithmetic" href="http://www.wiki.cn/wiki/Modular_arithmetic">modular arithmetic</a>. </p>
<img src ="http://www.blogjava.net/zellux/aggbug/161322.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-11-18 00:56 <a href="http://www.blogjava.net/zellux/archive/2007/11/18/161322.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>拿糖果的博弈问题</title><link>http://www.blogjava.net/zellux/archive/2007/10/16/153205.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Tue, 16 Oct 2007 03:30:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/10/16/153205.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/153205.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/10/16/153205.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/153205.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/153205.html</trackback:ping><description><![CDATA[更详细的分析google Nim Game<br />
http://www.math.ucla.edu/~tom/Game_Theory/comb.pdf<br />
<br />
<br />
发信人: flyskyf (flysky), 信区: Algorithm<br />
标 &nbsp;题: 拿糖果问题<br />
发信站: 水木社区 (Mon Oct 15 19:07:51 2007), 站内<br />
<br />
现有4堆糖果.分别为1,2,4,8<br />
甲乙两人分别从中拿糖果<br />
<br />
规则:<br />
1 每人可以从某一堆中拿任意多个<br />
2 甲乙两人交替拿<br />
3 谁拿到最后一个糖果或最后几个糖果算赢.<br />
<br />
请问谁有必胜把握?怎样实现?<br />
<br />
<br />
发信人: meeme (米鸣), 信区: Algorithm<br />
标 &nbsp;题: Re: 拿糖果问题<br />
发信站: 水木社区 (Mon Oct 15 19:26:32 2007), 站内<br />
<br />
转成二进制<br />
<br />
1 &nbsp; =0001<br />
2 &nbsp; =0010<br />
4 &nbsp; =0100<br />
8-1 =0111 &nbsp; +<br />
-----------<br />
&nbsp;&nbsp; &nbsp; 0222<br />
这样每个位上都有两个1。<br />
比如个位上，1和7在个位上都有一个1<br />
对方不可能同时把这两个1拿走。所以对方是拿不完的。<br />
对方拿完之后，自己再拿若干个调整成这种状态。<br />
<br />
中间应该有不少证明...<br />
<br />
<br />
<img src ="http://www.blogjava.net/zellux/aggbug/153205.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-10-16 11:30 <a href="http://www.blogjava.net/zellux/archive/2007/10/16/153205.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ferrers图像 </title><link>http://www.blogjava.net/zellux/archive/2007/10/16/153197.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Tue, 16 Oct 2007 03:19:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/10/16/153197.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/153197.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/10/16/153197.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/153197.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/153197.html</trackback:ping><description><![CDATA[http://www.ekany.com/wdg98/zhsx/2/2_6.htm<br />
<br />
Ferrers图像&nbsp;
<p>&nbsp;&nbsp;&nbsp; 一个从上而下的n层格子，m<sub>i</sub> 为第i层的格子数，当m<sub>i</sub>&gt;=m<sub>i+1</sub>(i=1,2,<sup>...</sup>,n-1)
，即上层的格子数不少于下层的格子数时，称之为Ferrers图像，如图(2-6-2)示。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image123.gif" alt="" border="0" height="245" width="327" /></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
图&nbsp;&nbsp; (2-6-2)</p>
<p>&nbsp;&nbsp;&nbsp; Ferrers图像具有如下性质：&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 1.每一层至少有一个格子。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 2.第一行与第一列互换，第二行于第二列互换，&#8230;，即图(2-6-3)绕虚线轴旋转所得的图仍然是Ferrers图像。两个Ferrers
图像称为一对共轭的Ferrers图像。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 利用Ferrers图像可得关于整数拆分的十分有趣的结果。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; (a)整数n拆分成k个数的和的拆分数，和数n拆分成个数的和的拆分数相等。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font color="#3333ff">因整数n拆分成k个数的和的拆分可用一k行的图像表示。所得的Ferrers图像的共轭图像最上面一行有k个格子。例如：&nbsp;</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image124.gif" alt="" border="0" height="219" width="563" /></p>
<p align="center"> <font color="#3333ff">图&nbsp;&nbsp; (2-6-3)&nbsp;</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; (b)整数n拆分成最多不超过m个数的和的拆分数，和n拆分成最大不超过m的拆分数相等。
理由和(a)相类似。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font color="#3333ff">因此，拆分成最多不超过m个数的和的拆分数的母函数是&nbsp;</font></p>
<p><font color="#3333ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image102.gif" alt="" border="0" height="44" width="156" /></font></p>
<p><font color="#3333ff">&nbsp;&nbsp;&nbsp; 拆分成最多不超过m-1个数的和的拆分数的母函数是&nbsp;</font></p>
<p><font color="#3333ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image104.gif" alt="" border="0" height="44" width="165" /></font></p>
<p><font color="#3333ff">&nbsp;&nbsp;&nbsp; 所以正好拆分成m个数的和的拆分数的母函数为&nbsp;</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image106.gif" alt="" border="0" height="140" width="205" /></p>
<p>&nbsp;&nbsp;&nbsp; (c)整数n拆分成互不相同的若干奇数的和的的拆分数,和n拆分成自共轭的Ferrers图像的拆分数相等.
设&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image108.gif" alt="" border="0" height="24" width="243" /></p>
<p>其中n<sub>1</sub>&gt;n<sub>2</sub>&gt;<sup>...</sup>&gt;n<sub>k</sub>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 构造一个Ferrers图像，其第一行，第一列都是n<sub>1</sub>+1格，对应于2n<sub>1</sub>+1，第二行，第二列各n<sub>2</sub>+1格，对应于2n<sub>2</sub>+1。以此类推。由此得到的Ferres图像是共轭的。反过来也一样。&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font color="#3333ff">例如 17=9+5+3 对应为Ferrers图像为 </font></p>
<p><font color="#3333ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.ekany.com/wdg98/zhsx/2/2_6.pic/image125.gif" alt="" border="0" height="267" width="510" /></font>
</p>
<p align="center"><font color="#3333ff">图&nbsp;&nbsp; (2-6-4) </font></p>
<p align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<br />
费勒斯（Ferrers）图象<o:p></o:p>
<p style="color: #000000;">假定n拆分为n=n1+n2+n3+&#8230;&#8230;+nk，且n1&gt;=n2&gt;=n3&gt;=&#8230;&#8230;&gt;=nk</p>
<p style="color: #000000;">我们将它排列成阶梯形，左边看齐，我们可以得到一个类似倒阶梯图像，这种图像我们称之为Ferrers图像，如对于20=10+5+4+1，我们有图像：</p>
<table border="1" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
        </tr>
        <tr>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" colspan="5" width="189">
            <p style="color: #000000;">&nbsp;</p>
            </td>
        </tr>
        <tr>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" colspan="6" width="227">
            <p style="color: #000000;">&nbsp;</p>
            </td>
        </tr>
        <tr>
            <td style="color: #000000;" valign="top" width="38">
            <p style="color: #000000;"><o:p>&nbsp;</o:p></p>
            </td>
            <td style="color: #000000;" colspan="9" width="340">
            <p style="color: #000000;">&nbsp;</p>
            </td>
        </tr>
    </tbody>
</table>
<p style="color: #000000;">对于Ferrers图像，我们很容易知道以下两条性质：</p>
<p style="color: #000000;">（1）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 每层至少一个格子<o:p></o:p></p>
<p style="color: #000000;">（2）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 行列互换，所对应的图像仍为Ferrers图像，他应该为该图像的共轭图像<o:p></o:p></p>
<p style="color: #000000;">&nbsp;&nbsp; 任意的Ferrers图像对应一个整数的拆分，而可用Ferrers图像方便地证明：</p>
<p style="color: #000000;">（1）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n拆分为k个整数的拆分数，与n拆分成最大数为k的拆分数相等<o:p></o:p></p>
<p style="color: #000000;">（2）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n拆分为最多不超过k个数的拆分数，与n拆分成最大数不超过k的拆分数相等<o:p></o:p></p>
<p style="color: #000000;">（3）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n拆分为互不相同的若干奇数的拆分数，与n拆分成图像自共轭的拆分的拆分数相等<o:p></o:p></p>
<br />
<img src ="http://www.blogjava.net/zellux/aggbug/153197.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-10-16 11:19 <a href="http://www.blogjava.net/zellux/archive/2007/10/16/153197.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Catalan 数</title><link>http://www.blogjava.net/zellux/archive/2007/09/17/145952.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Mon, 17 Sep 2007 11:55:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/09/17/145952.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/145952.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/09/17/145952.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/145952.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/145952.html</trackback:ping><description><![CDATA[<p>n个不同的物体按固定次序入栈，随时可以出栈，求最后可能的出栈序列的总数。<br />
只想到这个问题等价于把n个push和n个pop操作排列，要求任意前几个操作中push数都不能少于pop数，至于这个排列数怎么求就不知道了。请教了peter大牛后，原来这就是一个Catalan数的应用。<br />
</p>
<p>Wikipedia上的Catalan numbers:<br />
</p>
<p>In <a title="Combinatorial mathematics" href="http://en.wikilib.com/wiki/Combinatorial_mathematics">combinatorial mathematics</a>, the <strong>Catalan numbers</strong> form a <a title="Sequence" href="http://en.wikilib.com/wiki/Sequence">sequence</a> of <a title="Natural number" href="http://en.wikilib.com/wiki/Natural_number">natural numbers</a> that occur in various <a title="Counting problem" href="http://en.wikilib.com/wiki/Counting_problem">counting problems</a>, often involving <a title="Recursion" href="http://en.wikilib.com/wiki/Recursion">recursively</a> defined objects. They are named for the <a title="Belgium" href="http://en.wikilib.com/wiki/Belgium">Belgian</a> <a title="Mathematician" href="http://en.wikilib.com/wiki/Mathematician">mathematician</a> <a title="Eug&#232;ne Charles Catalan" href="http://en.wikilib.com/wiki/Eug%C3%A8ne_Charles_Catalan">Eug&#232;ne Charles Catalan</a> (1814&#8211;1894).</p>
<p>The <em>n</em><sup>th</sup> Catalan number is given directly in terms of <a title="Binomial coefficient" href="http://en.wikilib.com/wiki/Binomial_coefficient">binomial coefficients</a> by</p>
<dl>
<dd><img class="tex" alt="C_n = \frac{1}{n+1}{2n\choose n} = \frac{(2n)!}{(n+1)!\,n!} \qquad\mbox{ for }n\ge 0." src="http://en.wikilib.com/images/math/3/b/d/3bd4ac77a4af3f894d8e88ed7e1ba418.png" /></dd></dl>
<p>The first Catalan numbers (sequence <a class="extiw" title="oeis:A000108" href="http://www.research.att.com/%7Enjas/sequences/A000108">A000108</a> in <a title="On-Line Encyclopedia of Integer Sequences" href="http://en.wikilib.com/wiki/On-Line_Encyclopedia_of_Integer_Sequences">OEIS</a>) for <em>n</em> = 0, 1, 2, 3, &#8230; are</p>
<dl>
<dd><a title="1 (number)" href="http://en.wikilib.com/wiki/1_%28number%29">1</a>, <a title="1 (number)" href="http://en.wikilib.com/wiki/1_%28number%29">1</a>, <a title="2 (number)" href="http://en.wikilib.com/wiki/2_%28number%29">2</a>, <a class="new" title="5 (number)" href="http://en.wikilib.com/wiki?title=5_%28number%29&amp;action=edit">5</a>, <a title="14 (number)" href="http://en.wikilib.com/wiki/14_%28number%29">14</a>, <a title="42 (number)" href="http://en.wikilib.com/wiki/42_%28number%29">42</a>, <a title="132 (number)" href="http://en.wikilib.com/wiki/132_%28number%29">132</a>, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 477638700, 1767263190, 6564120420, 24466267020, 91482563640, 343059613650, 1289904147324, 4861946401452, &#8230;</dd></dl>
<h2>Properties</h2>
<p>An alternative expression for <em>C</em><sub><em>n</em></sub> is</p>
<dl>
<dd><img class="tex" alt="C_n = {2n\choose n} - {2n\choose n-1} \quad\mbox{ for }n\ge 1." src="http://en.wikilib.com/images/math/b/c/b/bcbb18522547b930bde29e1bedc2b058.png" /></dd></dl>
<p>This shows that <em>C</em><sub><em>n</em></sub> is a <a title="Natural number" href="http://en.wikilib.com/wiki/Natural_number">natural number</a>, which is not <em>a priori</em> obvious from the first formula given. This expression forms the basis for Andr&#233;'s proof of the correctness of the formula (see below under <a title="" href="http://en.wikilib.com/wiki/Catalan_number#Second_proof">second proof</a>).</p>
<p>The Catalan numbers satisfy the <a title="Recurrence relation" href="http://en.wikilib.com/wiki/Recurrence_relation">recurrence relation</a></p>
<dl>
<dd><img class="tex" alt="C_0 = 1 \quad \mbox{and} \quad C_{n+1}=\sum_{i=0}^{n}C_i\,C_{n-i}\quad\mbox{for }n\ge 0." src="http://en.wikilib.com/images/math/6/2/1/6217b3c99a3243afcd5d8dbd58186822.png" /></dd></dl>
<p>They also satisfy:</p>
<dl>
<dd><img class="tex" alt="C_0 = 1 \quad \mbox{and} \quad C_{n+1}=\frac{2(2n+1)}{n+2}C_n," src="http://en.wikilib.com/images/math/8/a/4/8a49332e4a46b3a2c7accec81160f5e3.png" /></dd></dl>
<p>which can be a more efficient way to calculate them.</p>
<p>Asymptotically, the Catalan numbers grow as</p>
<dl>
<dd><img class="tex" alt="C_n \sim \frac{4^n}{n^{3/2}\sqrt{\pi}}" src="http://en.wikilib.com/images/math/3/f/8/3f838aaa56c7ec71f80454fc181fea99.png" /></dd></dl>
<p>in the sense that the quotient of the <em>n</em><sup>th</sup> Catalan number and the expression on the right <a title="Limit (mathematics)" href="http://en.wikilib.com/wiki/Limit_%28mathematics%29">tends towards</a> 1 for <em>n</em>&nbsp;&#8594;&nbsp;&#8734;. (This can be proved by using <a title="Stirling's approximation" href="http://en.wikilib.com/wiki/Stirling%27s_approximation">Stirling's approximation</a> for <em>n</em>!.)</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: Applications in combinatorics" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=2">edit</a>]</div>
<p><a id="Applications_in_combinatorics" name="Applications_in_combinatorics"></a></p>
<h2>Applications in combinatorics</h2>
<p>There are many counting problems in <a title="Combinatorics" href="http://en.wikilib.com/wiki/Combinatorics">combinatorics</a> whose solution is given by the Catalan numbers. The book <em>Enumerative Combinatorics: Volume 2</em> by combinatorialist <a title="Richard P. Stanley" href="http://en.wikilib.com/wiki/Richard_P._Stanley">Richard P. Stanley</a> contains a set of exercises which describe 66 different interpretations of the Catalan numbers. Following are some examples, with illustrations of the case <em>C</em><sub>3</sub> = 5.</p>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of <strong>Dyck words</strong> of length 2<em>n</em>. A Dyck word is a <a title="String (computer science)" href="http://en.wikilib.com/wiki/String_%28computer_science%29">string</a> consisting of <em>n</em> X's and <em>n</em> Y's such that no initial segment of the string has more Y's than X's (see also <a title="Dyck language" href="http://en.wikilib.com/wiki/Dyck_language">Dyck language</a>). For example, the following are the Dyck words of length 6:</li>
</ul>
<div class="center"><big>XXXYYY &nbsp;&nbsp;&nbsp; XYXXYY &nbsp;&nbsp;&nbsp; XYXYXY &nbsp;&nbsp;&nbsp; XXYYXY &nbsp;&nbsp;&nbsp; XXYXYY.</big></div>
<ul>
    <li>Re-interpreting the symbol X as an open <a title="Parenthesis" href="http://en.wikilib.com/wiki/Parenthesis">parenthesis</a> and Y as a close parenthesis, <em>C</em><sub><em>n</em></sub> counts the number of expressions containing <em>n</em> pairs of parentheses which are correctly matched:</li>
</ul>
<div class="center"><big>((())) &nbsp;&nbsp;&nbsp; ()(()) &nbsp;&nbsp;&nbsp; ()()() &nbsp;&nbsp;&nbsp; (())() &nbsp;&nbsp;&nbsp; (()())</big></div>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of different ways <em>n</em>&nbsp;+&nbsp;1 factors can be completely <a title="Bracket" href="http://en.wikilib.com/wiki/Bracket">parenthesized</a> (or the number of ways of <a title="Associativity" href="http://en.wikilib.com/wiki/Associativity">associating</a> <em>n</em> applications of a <a title="Binary operator" href="http://en.wikilib.com/wiki/Binary_operator">binary operator</a>). For <em>n</em> = 3 for example, we have the following five different parenthesizations of four factors:</li>
</ul>
<div class="center"><img class="tex" alt="((ab)c)d \quad (a(bc))d \quad(ab)(cd) \quad a((bc)d) \quad a(b(cd))" src="http://en.wikilib.com/images/math/0/f/9/0f95f511173c52ef07ab865ac7bc9b3f.png" /></div>
<ul>
    <li>Successive applications of a binary operator can be represented in terms of a <a title="Binary tree" href="http://en.wikilib.com/wiki/Binary_tree">binary tree</a>. It follows that <em>C</em><sub><em>n</em></sub> is the number of rooted ordered binary <a title="Tree (graph theory)" href="http://en.wikilib.com/wiki/Tree_%28graph_theory%29">trees</a> with <em>n</em>&nbsp;+&nbsp;1 leaves:</li>
</ul>
<div class="center">
<div class="floatnone"><span><a class="image" title="" href="http://en.wikilib.com/wiki/Image:Catalan_number_binary_tree_example.png"><img height="92" alt="" src="http://en.wikilib.com/images/0/01/Catalan_number_binary_tree_example.png" width="496" longdesc="/wiki/Image:Catalan_number_binary_tree_example.png" /></a></span></div>
</div>
<p>If the leaves are labelled, we have the <a title="" href="http://en.wikilib.com/wiki/Catalan_number#Quadruple_factorial">quadruple factorial</a> numbers.</p>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of non-isomorphic full binary trees with <em>n</em> vertices that have children, usually called internal vertices or branches. (A rooted binary tree is <em>full</em> if every vertex has either two children or no children.)</li>
</ul>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of <strong>monotonic paths</strong> along the edges of a grid with <em>n</em> &#215; <em>n</em> square cells, which do not cross the diagonal. A monotonic path is one which starts in the lower left corner, finishes in the upper right corner, and consists entirely of edges pointing rightwards or upwards. Counting such paths is equivalent to counting Dyck words: X stands for "move right" and Y stands for "move up". The following diagrams show the case <em>n</em> = 4:</li>
</ul>
<div class="center">
<div class="floatnone"><span><a class="new" title="Image:Catalan number 4x4 grid example.svg" href="http://en.wikilib.com/wiki?title=Special:Upload&amp;wpDestFile=Catalan_number_4x4_grid_example.svg">Image:Catalan number 4x4 grid example.svg</a></span></div>
</div>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of different ways a <a title="Convex polygon" href="http://en.wikilib.com/wiki/Convex_polygon">convex polygon</a> with <em>n</em>&nbsp;+&nbsp;2 sides can be cut into <a title="Triangle (geometry)" href="http://en.wikilib.com/wiki/Triangle_%28geometry%29">triangles</a> by connecting vertices with <a title="Straight line" href="http://en.wikilib.com/wiki/Straight_line">straight lines</a>. The following hexagons illustrate the case <em>n</em> = 4:</li>
</ul>
<div class="center">
<div class="floatnone"><span>Error creating thumbnail:</span></div>
</div>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of <a title="Stack" href="http://en.wikilib.com/wiki/Stack">stack</a>-sortable <a title="Permutation" href="http://en.wikilib.com/wiki/Permutation">permutations</a> of {1, ..., <em>n</em>}. A permutation <em>w</em> is called <strong>stack-sortable</strong> if <em>S</em>(<em>w</em>) = (1, ..., <em>n</em>), where <em>S</em>(<em>w</em>) is defined recursively as follows: write <em>w</em> = <em>unv</em> where <em>n</em> is the largest element in <em>w</em> and <em>u</em> and <em>v</em> are shorter sequences, and set <em>S</em>(<em>w</em>) = <em>S</em>(<em>u</em>)<em>S</em>(<em>v</em>)<em>n</em>, with <em>S</em> being the identity for one-element sequences.</li>
</ul>
<ul>
    <li><em>C</em><sub><em>n</em></sub> is the number of <a title="Noncrossing partition" href="http://en.wikilib.com/wiki/Noncrossing_partition">noncrossing partitions</a> of the set { 1, ..., <em>n</em> }. <em>A fortiori</em>, <em>C</em><sub><em>n</em></sub> never exceeds the <em>n</em>th <a title="Bell numbers" href="http://en.wikilib.com/wiki/Bell_numbers">Bell number</a>. <em>C</em><sub><em>n</em></sub> is also the number of noncrossing partitions of the set { 1, ..., 2<em>n</em> } in which every block is of size 2. The conjunction of these two facts may be used in a proof by <a title="Mathematical induction" href="http://en.wikilib.com/wiki/Mathematical_induction">mathematical induction</a> that all of the <em>free</em> <a title="Cumulant" href="http://en.wikilib.com/wiki/Cumulant">cumulants</a> of degree more than 2 of the <a title="Wigner semicircle law" href="http://en.wikilib.com/wiki/Wigner_semicircle_law">Wigner semicircle law</a> are zero. This law is important in <a title="Free probability" href="http://en.wikilib.com/wiki/Free_probability">free probability</a> theory and the theory of <a title="Random matrices" href="http://en.wikilib.com/wiki/Random_matrices">random matrices</a>.</li>
</ul>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: Proof of the formula" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=3">edit</a>]</div>
<p><a id="Proof_of_the_formula" name="Proof_of_the_formula"></a></p>
<h2>Proof of the formula</h2>
<p>There are several ways of explaining why the formula</p>
<dl>
<dd><img class="tex" alt="C_n = \frac{1}{n+1}{2n\choose n}" src="http://en.wikilib.com/images/math/2/f/7/2f7536241ecfa219d69ce879aee0b690.png" /></dd></dl>
<p>solves the combinatorial problems listed above. The first proof below uses a <a title="Generating function" href="http://en.wikilib.com/wiki/Generating_function">generating function</a>. The second and third proofs are examples of <a title="Bijective proof" href="http://en.wikilib.com/wiki/Bijective_proof">bijective proofs</a>; they involve literally counting a collection of some kind of object to arrive at the correct formula.</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: First proof" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=4">edit</a>]</div>
<p><a id="First_proof" name="First_proof"></a></p>
<h3>First proof</h3>
<p>We start with the observation that several of the combinatorial problems listed above can easily be seen to satisfy the <a title="Recurrence relation" href="http://en.wikilib.com/wiki/Recurrence_relation">recurrence relation</a></p>
<dl>
<dd><img class="tex" alt="C_0 = 1 \quad \mbox{and} \quad C_{n+1}=\sum_{i=0}^{n}C_i\,C_{n-i}\quad\mbox{for }n\ge 0." src="http://en.wikilib.com/images/math/6/2/1/6217b3c99a3243afcd5d8dbd58186822.png" /></dd></dl>
<p>For example, every Dyck word <em>w</em> of length &#8805; 2 can be written in a unique way in the form</p>
<dl>
<dd><em>w</em> = X<em>w</em><sub>1</sub>Y<em>w</em><sub>2</sub></dd></dl>
<p>with (possibly empty) Dyck words <em>w</em><sub>1</sub> and <em>w</em><sub>2</sub>.</p>
<p>The <a title="Generating function" href="http://en.wikilib.com/wiki/Generating_function">generating function</a> for the Catalan numbers is defined by</p>
<dl>
<dd><img class="tex" alt="c(x)=\sum_{n=0}^\infty C_n x^n." src="http://en.wikilib.com/images/math/0/9/9/099acd90b5a02e418266e228dce42baa.png" /></dd></dl>
<p>As explained in the article titled <a title="Cauchy product" href="http://en.wikilib.com/wiki/Cauchy_product">Cauchy product</a>, the sum on the right side of the above recurrence relation is the coefficient of <em>x</em><sup><em>n</em></sup> in the product</p>
<dl>
<dd><img class="tex" alt="\left(\sum_{i=0}^\infty C_i x^i\right)^2." src="http://en.wikilib.com/images/math/0/9/b/09b5ee7eef383a2195ea39fe80ad6326.png" /></dd></dl>
<p>Therefore</p>
<dl>
<dd><img class="tex" alt="\left(\sum_{i=0}^\infty C_i x^i\right)^2 = \sum_{n=0}^\infty C_{n+1} x^n." src="http://en.wikilib.com/images/math/7/e/d/7edde9913f5f6539332dc91d07a0f06a.png" /></dd></dl>
<p>Multiplying both sides by <em>x</em>, we get</p>
<dl>
<dd><img class="tex" alt="x\left(\sum_{i=0}^\infty C_i x^i\right)^2 = \sum_{n=0}^\infty C_{n+1} x^{n+1} = \sum_{n=1}^\infty C_n x^n = -1 + \sum_{n=0}^\infty C_n x^n." src="http://en.wikilib.com/images/math/6/d/7/6d772a87129eaeaac18cb5593c5f4744.png" /></dd></dl>
<p>So we have</p>
<dl>
<dd><img class="tex" alt="c(x)=1+xc(x)^2,\," src="http://en.wikilib.com/images/math/3/e/9/3e94115a8614394d2173f5e236666409.png" /></dd></dl>
<p>and hence</p>
<dl>
<dd><img class="tex" alt="c(x) = \frac{1-\sqrt{1-4x}}{2x}." src="http://en.wikilib.com/images/math/5/5/f/55f71088f2677c2c0ca9fc2803bb381a.png" /></dd></dl>
<p>The square root term can be expanded as a power series using the identity</p>
<dl>
<dd><img class="tex" alt="\sqrt{1+y} = 1 - 2\sum_{n=1}^\infty {2n-2 \choose n-1} \left(\frac{-1}{4}\right)^n  \frac{y^n}{n} ," src="http://en.wikilib.com/images/math/f/9/3/f93a1c2e37d78a6ccc19a093f32288d0.png" /></dd></dl>
<p>which can be proved, for example, by the <a title="Binomial theorem" href="http://en.wikilib.com/wiki/Binomial_theorem#Newton.27s_generalized_binomial_theorem">binomial theorem</a>, (or else directly by considering repeated derivatives of <img class="tex" alt="\sqrt{1+y}" src="http://en.wikilib.com/images/math/3/5/9/359cde1ccf64c847be8a3a89003911ae.png" />) together with judicious juggling of factorials. Substituting this into the above expression for <em>c</em>(<em>x</em>) produces, after further manipulation,</p>
<dl>
<dd><img class="tex" alt="c(x) = \sum_{n=0}^\infty {2n \choose n} \frac{x^n}{n+1.}" src="http://en.wikilib.com/images/math/9/7/0/970cda73b92cc5fcd73ea50e1f1a4150.png" /></dd></dl>
<p>Equating coefficients yields the desired formula for <em>C</em><sub><em>n</em></sub>.</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: Second proof" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=5">edit</a>]</div>
<p><a id="Second_proof" name="Second_proof"></a></p>
<h3>Second proof</h3>
<p>This proof depends on a trick due to D. Andr&#233;, which is now more generally known as the <a class="new" title="Reflection principle (combinatorics)" href="http://en.wikilib.com/wiki?title=Reflection_principle_%28combinatorics%29&amp;action=edit">reflection principle</a> (not to be confused with the <a class="new" title="Schwarz reflection theorem" href="http://en.wikilib.com/wiki?title=Schwarz_reflection_theorem&amp;action=edit">Schwarz reflection theorem</a> in <a title="Complex analysis" href="http://en.wikilib.com/wiki/Complex_analysis">complex analysis</a>). It is most easily expressed in terms of the "monotonic paths which do not cross the diagonal" problem (see <a title="" href="http://en.wikilib.com/wiki/Catalan_number#Applications_in_combinatorics">above</a>).</p>
<div class="thumb tright">
<div style="width: 308px"><a class="internal" title="Figure 1. The green portion of the path is being flipped." href="http://en.wikilib.com/wiki/Image:Catalan_number_reflection_example.png"><img height="164" alt="Figure 1. The green portion of the path is being flipped." src="http://en.wikilib.com/images/3/3f/Catalan_number_reflection_example.png" width="306" longdesc="/wiki/Image:Catalan_number_reflection_example.png" /></a>
<div class="thumbcaption">Figure 1. The green portion of the path is being flipped.</div>
</div>
</div>
<p>Suppose we are given a monotonic path in an <em>n</em> &#215; <em>n</em> grid that <em>does</em> cross the diagonal. Find the first edge in the path that lies above the diagonal, and <em>flip</em> the portion of the path occurring after that edge, along a line parallel to the diagonal. (In terms of Dyck words, we are starting with a sequence of <em>n</em> X's and <em>n</em> Y's which is <em>not</em> a Dyck word, and exchanging all X's with Y's after the first Y that violates the Dyck condition.) The resulting path is a monotonic path in an (<em>n</em> &#8722; 1) &#215; (<em>n</em> + 1) grid. Figure 1 illustrates this procedure; the green portion of the path is the portion being flipped.</p>
<p>Since every monotonic path in the (<em>n</em> &#8722; 1) &#215; (<em>n</em> + 1) grid must cross the diagonal at some point, every such path can be obtained in this fashion in precisely one way. The number of these paths is equal to</p>
<dl>
<dd><img class="tex" alt="{2n\choose n-1}" src="http://en.wikilib.com/images/math/1/b/b/1bbba9502fa1bee3260b5a4d899ca8af.png" />.</dd></dl>
<p>Therefore, to calculate the number of monotonic <em>n</em> &#215; <em>n</em> paths which do <em>not</em> cross the diagonal, we need to subtract this from the <em>total</em> number of monotonic <em>n</em> &#215; <em>n</em> paths, so we finally obtain</p>
<dl>
<dd><img class="tex" alt="{2n\choose n}-{2n\choose n-1}" src="http://en.wikilib.com/images/math/5/8/d/58d2e21c221b2e3b3876c4331600f7ca.png" /></dd></dl>
<p>which is the <em>n</em>th Catalan number <em>C</em><sub><em>n</em></sub>.</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: Third proof" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=6">edit</a>]</div>
<p><a id="Third_proof" name="Third_proof"></a></p>
<h3>Third proof</h3>
<p>The following bijective proof, while being more involved than the previous one, provides a more natural explanation for the term <em>n</em> + 1 appearing in the denominator of the formula for <em>C</em><sub><em>n</em></sub>.</p>
<div class="thumb tright">
<div style="width: 146px"><a class="internal" title="Figure 2. A path with exceedance 5." href="http://en.wikilib.com/wiki/Image:Catalan_number_exceedance_example.png"><img height="143" alt="Figure 2. A path with exceedance 5." src="http://en.wikilib.com/images/a/aa/Catalan_number_exceedance_example.png" width="144" longdesc="/wiki/Image:Catalan_number_exceedance_example.png" /></a>
<div class="thumbcaption">Figure 2. A path with exceedance 5.</div>
</div>
</div>
<p>Suppose we are given a monotonic path, which may happen to cross the diagonal. The <strong>exceedance</strong> of the path is defined to be the number of pairs of edges which lie <em>above</em> the diagonal. For example, in Figure 2, the edges lying above the diagonal are marked in red, so the exceedance of the path is 5.</p>
<p>Now, if we are given a monotonic path whose exceedance is not zero, then we may apply the following algorithm to construct a new path whose exceedance is one less than the one we started with.</p>
<ul>
    <li>Starting from the bottom left, follow the path until it first travels above the diagonal.</li>
    <li>Continue to follow the path until it <em>touches</em> the diagonal again. Denote by <em>X</em> the first such edge that is reached.</li>
    <li>Swap the portion of the path occurring before <em>X</em> with the portion occurring after <em>X</em>.</li>
</ul>
<p>The following example should make this clearer. In Figure 3, the black circle indicates the point where the path first crosses the diagonal. The black edge is <em>X</em>, and we swap the red portion with the green portion to make a new path, shown in the second diagram.</p>
<div class="center">
<div class="thumb tnone">
<div style="width: 343px"><a class="internal" title="Figure 3. The green and red portions are being exchanged." href="http://en.wikilib.com/wiki/Image:Catalan_number_swapping_example.png"><img height="156" alt="Figure 3. The green and red portions are being exchanged." src="http://en.wikilib.com/images/1/13/Catalan_number_swapping_example.png" width="341" longdesc="/wiki/Image:Catalan_number_swapping_example.png" /></a>
<div class="thumbcaption">Figure 3. The green and red portions are being exchanged.</div>
</div>
</div>
</div>
<p>Notice that the exceedance has dropped from three to two. In fact, the algorithm will cause the exceedance to decrease by one, for any path that we feed it.</p>
<div class="thumb tright">
<div style="width: 311px"><a class="internal" title="Figure 4. All monotonic paths in a 3&#215;3 grid, illustrating the exceedance-decreasing algorithm." href="http://en.wikilib.com/wiki/Image:Catalan_number_algorithm_table.png"><img height="338" alt="Figure 4. All monotonic paths in a 3&#215;3 grid, illustrating the exceedance-decreasing algorithm." src="http://en.wikilib.com/images/6/65/Catalan_number_algorithm_table.png" width="309" longdesc="/wiki/Image:Catalan_number_algorithm_table.png" /></a>
<div class="thumbcaption">Figure 4. All monotonic paths in a 3&#215;3 grid, illustrating the exceedance-decreasing algorithm.</div>
</div>
</div>
<p>It is also not difficult to see that this process is <em>reversible</em>: given any path <em>P</em> whose exceedance is less than <em>n</em>, there is exactly one path which yields <em>P</em> when the algorithm is applied to it.</p>
<p>This implies that the number of paths of exceedance <em>n</em> is equal to the number of paths of exceedance <em>n</em> &#8722; 1, which is equal to the number of paths of exceedance <em>n</em> &#8722; 2, and so on, down to zero. In other words, we have split up the set of <em>all</em> monotonic paths into <em>n</em> + 1 equally sized classes, corresponding to the possible exceedances between 0 and <em>n</em>. Since there are</p>
<dl>
<dd><img class="tex" alt="{2n\choose n}" src="http://en.wikilib.com/images/math/c/9/2/c92da943df73dc077dbee5514376346a.png" /></dd></dl>
<p>monotonic paths, we obtain the desired formula</p>
<dl>
<dd><img class="tex" alt="C_n = \frac{1}{n+1}{2n\choose n}." src="http://en.wikilib.com/images/math/c/d/d/cdd0aed4c95a95711a0dbe1bf2b627c8.png" /></dd></dl>
<p>Figure 4 illustrates the situation for <em>n</em> = 3. Each of the 20 possible monotonic paths appears somewhere in the table. The first column shows all paths of exceedance three, which lie entirely above the diagonal. The columns to the right show the result of successive applications of the algorithm, with the exceedance decreasing one unit at a time. Since there are five rows, <em>C</em><sub>3</sub> = 5.</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: Hankel matrix" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=7">edit</a>]</div>
<p><a id="Hankel_matrix" name="Hankel_matrix"></a></p>
<h2>Hankel matrix</h2>
<p>The <em>n</em>&#215;<em>n</em> <a title="Hankel matrix" href="http://en.wikilib.com/wiki/Hankel_matrix">Hankel matrix</a> whose (<em>i</em>,&nbsp;<em>j</em>) entry is the Catalan number <em>C</em><sub><em>i</em>+<em>j</em></sub> has <a title="Determinant" href="http://en.wikilib.com/wiki/Determinant">determinant</a> 1, regardless of the value of <em>n</em>. For example, for <em>n</em> = 4 we have</p>
<dl>
<dd><img class="tex" alt="\det\begin{bmatrix}1 &amp; 1 &amp; 2 &amp; 5 \\ 1 &amp; 2 &amp; 5 &amp; 14 \\ 2 &amp; 5 &amp; 14 &amp; 42 \\ 5 &amp; 14 &amp; 42 &amp; 132\end{bmatrix} = 1" src="http://en.wikilib.com/images/math/b/3/4/b343632207d325a9034ca070c2ff4877.png" /></dd></dl>
<p>Note that if the entries are ``shifted", namely the Catalan numbers <em>C</em><sub><em>i</em>+<em>j</em>+1</sub>, the determinant is still 1, regardless of the size of <em>n</em>. For example, for <em>n</em> = 4 we have</p>
<dl>
<dd><img class="tex" alt="\det\begin{bmatrix}1 &amp; 2 &amp; 5 &amp; 14 \\ 2 &amp; 5 &amp; 14 &amp; 42 \\ 5 &amp; 14 &amp; 42 &amp; 132 \\ 14 &amp; 42 &amp; 132 &amp; 429 \end{bmatrix} = 1" src="http://en.wikilib.com/images/math/4/7/a/47a3417c3b5431effd27921e10843596.png" />.</dd></dl>
<p>The Catalan numbers is the unique sequence with this property.</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: Quadruple factorial" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=8">edit</a>]</div>
<p><a id="Quadruple_factorial" name="Quadruple_factorial"></a></p>
<h2>Quadruple factorial</h2>
<p>The quadruple factorial is given by <img class="tex" alt="\frac{2n!}{n!}" src="http://en.wikilib.com/images/math/7/1/6/71601208bc5bcedbb64efa37fd859312.png" />, or <img class="tex" alt="\left(n+1\right)! C_n" src="http://en.wikilib.com/images/math/0/6/0/060bab7aad3b5f3d54db456ec19ec64b.png" />. This is the solution to labelled variants of the above combinatorics problems. It is entirely distinct from the <a title="Factorial" href="http://en.wikilib.com/wiki/Factorial#Multifactorials">multifactorials</a>.</p>
<p>&nbsp;</p>
<div class="editsection" style="float: right; margin-left: 5px">[<a title="Edit section: History" href="http://en.wikilib.com/wiki?title=Catalan_number&amp;action=edit&amp;section=9">edit</a>]</div>
<p><a id="History" name="History"></a></p>
<h2>History</h2>
<p>The Catalan sequence was first described in the <a title="18th century" href="http://en.wikilib.com/wiki/18th_century">18th century</a> by <a title="Leonhard Euler" href="http://en.wikilib.com/wiki/Leonhard_Euler">Leonhard Euler</a>, who was interested in the number of different ways of dividing a polygon into triangles. The sequence is named after <a title="Eug&#232;ne Charles Catalan" href="http://en.wikilib.com/wiki/Eug%C3%A8ne_Charles_Catalan">Eug&#232;ne Charles Catalan</a>, who discovered the connection to parenthesized expressions. The counting trick for Dyck words was found by D. Andr&#233; in 1887.</p>
<img src ="http://www.blogjava.net/zellux/aggbug/145952.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-09-17 19:55 <a href="http://www.blogjava.net/zellux/archive/2007/09/17/145952.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Functional Programming For The Rest of Us</title><link>http://www.blogjava.net/zellux/archive/2007/08/24/139194.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Fri, 24 Aug 2007 14:54:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/08/24/139194.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/139194.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/08/24/139194.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/139194.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/139194.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: http://www.defmacro.org/ramblings/fp.html还是放在Mathematics类吧Functional Programming For The Rest of UsMonday, June 19, 2006IntroductionProgrammers are procrastinators. Get in, get some coffee, ...&nbsp;&nbsp;<a href='http://www.blogjava.net/zellux/archive/2007/08/24/139194.html'>阅读全文</a><img src ="http://www.blogjava.net/zellux/aggbug/139194.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-08-24 22:54 <a href="http://www.blogjava.net/zellux/archive/2007/08/24/139194.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>离散学习笔记 - 群 (1)</title><link>http://www.blogjava.net/zellux/archive/2007/08/07/135088.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Tue, 07 Aug 2007 14:31:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/08/07/135088.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/135088.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/08/07/135088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/135088.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/135088.html</trackback:ping><description><![CDATA[1. 一个有限非空集合M到自身的一个双射称为<span style="color: red; font-weight: bold;">置换</span>。<br>若M的元素个数为n，记M的所有置换的集合记作S<sub>n</sub>，则不难得出S<sub>n</sub>的元素个数为n个元素的排列数，即<br>| S<sub>n</sub> | = n!<br><br>2. Sn的一个把i<sub>1</sub>变到i<sub>2</sub>，i<sub>2</sub>变到i<sub>3</sub>，&#8230;&#8230;，i<sub>k-1</sub>变到i<sub>k</sub>，i<sub>k</sub>变到i<sub>1</sub>，而其余的元（如果还有）不变的置换称为k阶<span style="color: red; font-weight: bold;">循环置换</span><br>如<br>(1 2 3 4 5 6)&nbsp; =&nbsp; (1) = (2) = ... = (6)，称为恒等置换<br>&nbsp;1 2 3 4 5 6<br><br>3.几个定理：<br>1) 设f，g为两个不相交的循环置换，则fg = gf<br>2) 任意置换均可唯一地分解成不相交循环置换的乘积<br>这个定理可由构造法证得，该证法同时也给出了分解为循环置换的乘积的方法<br>3) 任意置换均可分解为对换的乘积（不唯一），例如<br>(12)(345) = (12)(35)(34) = (12)(14)(41)(35)(34)<br><br>4. 置换的奇偶性<br>1) 设f &#8712;Sn，规定f的符号为<br>Sgn f = &#8719;[ f(i) - f(j) ] / (i - j)<br>貌似就是逆序对数的奇偶性，奇为-1，偶为1<br>2) Sgn(fg) = (Sgn f)(Sgn g)<br>3) n &gt; 1时，Sn中奇置换与偶置换的个数相等，均为n! / 2<br>可通过分离一组对换积证得<br><span style="font-size: 12pt;"><span style="font-size: 12pt;"><span style="font-size: 12pt;"><br></span></span></span><font size="-1"></font>   <img src ="http://www.blogjava.net/zellux/aggbug/135088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-08-07 22:31 <a href="http://www.blogjava.net/zellux/archive/2007/08/07/135088.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>离散学习笔记 - 基数（势）</title><link>http://www.blogjava.net/zellux/archive/2007/07/28/133040.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Sat, 28 Jul 2007 11:20:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/07/28/133040.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/133040.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/07/28/133040.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/133040.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/133040.html</trackback:ping><description><![CDATA[<p>1. 设A, B为两个集合，若存在从A到B的双射函数，则称A与B是<strong style="COLOR: red">等势</strong>的，记为A≈B<br>N*N ≈ N的一种证明：构造双射函数 n = 2<sup>a</sup> * (2b - 1)。<br></p>
<p>2. 设A, B, C为任意的集合，则<br>(1) A≈A<br>(2) 若A≈B，则B≈A<br>(3) 若A≈B且B≈C，则A≈C<br></p>
<p>3. Cantor定理<br>(1) N不与R等势<br>(2) 设A为任意的集合，则A不与P(A)等势<br></p>
<p>4. 若一个集合A与某个自然数n等势，则称A是<strong style="COLOR: red">有穷集合</strong>，否则称A为<span style="COLOR: red"><strong>无穷集合</strong></span>。</p>
<img src ="http://www.blogjava.net/zellux/aggbug/133040.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-07-28 19:20 <a href="http://www.blogjava.net/zellux/archive/2007/07/28/133040.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>离散学习笔记 - 自然数 (2)</title><link>http://www.blogjava.net/zellux/archive/2007/07/28/132964.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Sat, 28 Jul 2007 08:37:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/07/28/132964.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/132964.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/07/28/132964.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/132964.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/132964.html</trackback:ping><description><![CDATA[<p>1. 数学归纳法证明自然数的性质P：<br>第一，构造 S = { n | n &#8712;N ∧ P(n) }<br>第二，证明S是归纳集<br></p>
<p>2. 设A为一个集合，如果A中任何元素的元素也是A的元素，则称A为<strong style="COLOR: red">传递集</strong>。每个自然数都是传递集。<br>以下命题等价：<br>(1) A是传递集<br>(2) &#8746;A 包含于 A<br>(3) 对于任意的y&#8712;A，y包含于A<br>(4) A包含于P(A)<br>(5) P(A)为传递集<br></p>
<p>3. 设A为一个集合，称从A*A到A的函数为A上的<span style="COLOR: red"><strong>二元运算</strong></span>。<br>另+: N*N -&gt; N，且对于任意的m, n &#8712;N，+(&lt;m, n&gt;) = A<sub>m</sub>(n), 记作m + n，称+为N上的<span style="COLOR: red"><strong>加法运算<br></strong></span><span>另&#183;: N*N -&gt; N，且对于任意的m, n &#8712;N，&#183;(&lt;m, n&gt;) = M<sub>m</sub>(n)，记作m&#183;n，称&#183;为N上的<strong style="COLOR: #ff0000">乘法运算</strong>。<br></span></p>
<p><span>&nbsp;</p>
</span><span></span>
<img src ="http://www.blogjava.net/zellux/aggbug/132964.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-07-28 16:37 <a href="http://www.blogjava.net/zellux/archive/2007/07/28/132964.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>离散学习笔记 - 自然数 (1)</title><link>http://www.blogjava.net/zellux/archive/2007/07/27/132875.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Fri, 27 Jul 2007 11:36:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/07/27/132875.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/132875.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/07/27/132875.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/132875.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/132875.html</trackback:ping><description><![CDATA[<p>1. Peano 系统</p>
<p>Peano系统是满足以下公设的有序三元组&lt;M, F, e&gt;，其中M为一个集合，F为M到M的函数，e为首元素。5条公设为：</p>
<p>(1) e &#8712;M<br>(2) M在F下是封闭的<br>(3) e ￠ ranF （暂时只找到这个符号表示&#8220;不属于&#8221; 囧）<br>(4) F是单射的<br>(5) 如果M的子集A满足 (e属于A) 且 (A在F下是封闭的)，则A=M<br>(5)称为极小性公设<br></p>
<p>2. 设A为一个集合，称 A&#8746;{A} 为A的<strong style="COLOR: red">后继</strong>，记作A<sup>+</sup>, 并称求集合的后继为<span style="COLOR: red"><strong>后继运算</strong></span>。<br></p>
<p>3. 设A为一个集合，若A满足：<br>(1) &#216;&nbsp; &#8712;A，<br>(2) 若对于一切 a &#8712;A，则 a<sup>+</sup> &#8712;A，<br>则称A是<strong style="COLOR: red">归纳集</strong>。<br></p>
<p>4. 从归纳集的定义可以看出，&#216;，&#216;<sup>+</sup>, &#216;<sup>++</sup>,... 是所有归纳集的元素，于是可以将它们定义成<span style="COLOR: red"><strong>自然数</strong></span>。<br>自然数是属于每个归纳集的集合，将&#216;，&#216;<sup>+</sup>, &#216;<sup>++</sup>,...分别记为0, 1, 2, ...<br>设D={v | v是归纳集|，称&#8745;D为全体自然数集合，记为N.<br>设N为自然数集合，&#963;: N -&gt; N，且&#963;(n) = n<sup>+</sup>, 则&lt;N, &#963;, &#216;&gt;是Peano系统。<br>这个Peano系统的第(5)条公设提出了证明自然数性质的一种方法，即<span style="COLOR: red"><strong>数学归纳法</strong></span>，称此公设为<strong style="COLOR: red">数学归纳法原理</strong>。</p>
<img src ="http://www.blogjava.net/zellux/aggbug/132875.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-07-27 19:36 <a href="http://www.blogjava.net/zellux/archive/2007/07/27/132875.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>离散学习笔记 - 序关系</title><link>http://www.blogjava.net/zellux/archive/2007/07/25/132268.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Wed, 25 Jul 2007 04:26:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/07/25/132268.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/132268.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/07/25/132268.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/132268.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/132268.html</trackback:ping><description><![CDATA[各符号的定义与上文中最近处的定义相同。<br>1. 设R属于A*A，若R是自反的、反对称的和传递的，则称R是A上的偏序关系。 partial order<br>2. 称一个非空集合A及其A上的一个偏序关系&lt;=组成的有序二元组(a, &lt;=)为一个偏序集。partially ordered set, or simply poset.<br>3. 若(A, &lt;=)为一个偏序集，若对于一切x,y属于A，如果x&lt;=y或者y&lt;=x成立，则称x与y是可比的。<br>4. 若x与y是可比的，且x&lt;y（即x&lt;=y且x!=y），但不存在z属于A，使得x&lt;z&lt;y，则称y覆盖x。<br>5. 哈斯图作法： Hasse diagram<br>(1) 省去关系图中每个顶点处的环。<br>(2) 若y覆盖x，则将代表y的顶点放在代表x的顶点之上，并连线，省去有向边的箭头。<br>6. 若对于一切x,y属于A，x与y均可比，则称&lt;=为A上的全序关系，或线性关系。linear order<br>7. 若R是反自反的和传递的，则称R为A上的拟序关系，常将R记作&lt;。<br>8. 最大元 最小元 极大元 极小元 上界 下界 最小上界 最大下界<br>其实这些词的区别和高数中的很相近，&#8220;最&#8221;针对自身集合的所有元素，&#8220;极&#8221;针对自身集合的部分元素，&#8220;界&#8221;指有一个更大的包含自身集合的参照系下的情况。<br>9. 线性关系中由于任何两个元素均可比，因此哈斯图中就可以表示为一条直线，从而容易理解线性的由来。又称为链，元素个数称为链的长度。<br>10. 良序关系：拟全序集(A, &lt;)中任何非空子集均有最小元。<br><br> <img src ="http://www.blogjava.net/zellux/aggbug/132268.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-07-25 12:26 <a href="http://www.blogjava.net/zellux/archive/2007/07/25/132268.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>离散学习笔记 - 二元关系</title><link>http://www.blogjava.net/zellux/archive/2007/07/25/132238.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Wed, 25 Jul 2007 03:03:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/07/25/132238.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/132238.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/07/25/132238.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/132238.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/132238.html</trackback:ping><description><![CDATA[1.闭包 Closure<br>(1) 自反 reflexive<br>对称 symmetric<br>传递 transitive<br>(2) 其中，设R属于A*A（A为非空集合），则r(R) = R与A上恒等关系的并，s(R) = R与R的逆的并，<br>t(R) = R 并 R^2 并 R^3 并...并 R^l。<br>(3) rs(R) = sr(R)<br>rt(R) = tr(R)<br>st(R) 属于 ts(R)<br><br><br> 2. 等价关系和划分<br>(1) 设R属于A*A，若R是自反的、对称的和传递的，则称R为A上的等价关系。<br>(2) 令[x]<sub>R</sub>为x的关于R的等价类，在不引起混乱时可简记为[x]。<br>(3) 以关于R的全体不同的等价类为元素的集合称为A关于R的商集，记作A/R。<br>(4) 设A为非空集合，若存在A的一个子集族S满足<br>a. S中不包含空集元素<br>b. 对于一切x,y属于S，且x,y不相等，则x与y不相交的(disjoint)<br>c. S中所有集合的并为A<br>则称S为A的一个划分，S中元素称为划分块。<br>(5) 非空集合A上的等价关系与A的划分是一一对应的。<br>(6) 第二类Stirling数，表示将n个不同的球放入r个相同的盒子中的方案数，可以由下列递归式计算：<br>f(n, r) = r * f(n - 1, r) + f(n - 1, r - 1)<br>很容易理解的一个递归式，其中初始状态为<br>f(n, 0) = 0, f(n, 1) = 1, f(n, 2) = 2^(n-1) - 1, f(n, n - 1) = C(n, 2), f(n, n) = 1<br>(7) A上等价关系的数量可以通过Stiring数求出，以A={a,b,c,d}为例<br>f(4,1) + f(4,2) + f(4,3) + f(4,4) = 15<br><img src ="http://www.blogjava.net/zellux/aggbug/132238.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-07-25 11:03 <a href="http://www.blogjava.net/zellux/archive/2007/07/25/132238.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一些数独技巧(Very Easy - Hard)</title><link>http://www.blogjava.net/zellux/archive/2007/07/20/131435.html</link><dc:creator>ZelluX</dc:creator><author>ZelluX</author><pubDate>Fri, 20 Jul 2007 03:59:00 GMT</pubDate><guid>http://www.blogjava.net/zellux/archive/2007/07/20/131435.html</guid><wfw:comment>http://www.blogjava.net/zellux/comments/131435.html</wfw:comment><comments>http://www.blogjava.net/zellux/archive/2007/07/20/131435.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zellux/comments/commentRss/131435.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zellux/services/trackbacks/131435.html</trackback:ping><description><![CDATA[<p>from <a href="http://www.brainbashers.com/">www.BrainBashers.com</a><br>1. Intersection 横断，游戏一开始就使用的常见技巧。</p>
<p><img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokuintersections.gif" width=308 border=0>&nbsp; <img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokuintersections2.gif" width=308 border=0></p>
<p>2. Forced Moves 排除所有其他可能性后唯一的答案<br></p>
<p><img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokuforcedmoves.gif" width=308 border=0>&nbsp; <img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokuforcedmoves2.gif" width=308 border=0><br></p>
<p>3. Pinned Squares<br>Intersection 的加强版，根据更多的情况确定某一个数字在该区域的唯一可能位置。<br><img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokupinnedsquares.gif" width=308 border=0>&nbsp; <img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokupinnedsquares2.gif" width=308 border=0></p>
<p>4. Locked Sets</p>
<p>如图一R5C1和R6C1只能填1或8，由此可排除与他们有关的域中的其他格填1和8的可能性，从而R6C2只能填5。</p>
<p><img height=292 alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokulockedsets1.gif" width=308 border=0>&nbsp; <img alt="Sudoku Image" src="http://www.brainbashers.com/gifs/sudokulockedsets2.gif" border=0></p>
<img src ="http://www.blogjava.net/zellux/aggbug/131435.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zellux/" target="_blank">ZelluX</a> 2007-07-20 11:59 <a href="http://www.blogjava.net/zellux/archive/2007/07/20/131435.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>