Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Catalan number
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Proof of the formula == There are several ways of explaining why the formula :<math>C_n = \frac{1}{n+1}{2n\choose n}</math> solves the combinatorial problems listed above. The first proof below uses a [[generating function]]. The other proofs are examples of [[bijective proof]]s; they involve literally counting a collection of some kind of object to arrive at the correct formula. === First proof === We first observe that all of the combinatorial problems listed above satisfy [[Johann Andreas Segner|Segner's]]<ref>A. de Segner, Enumeratio modorum, quibus figurae planae rectilineae per diagonales dividuntur in triangula. ''Novi commentarii academiae scientiarum Petropolitanae'' '''7''' (1758/59) 203β209.</ref> [[recurrence relation]] :<math>C_0 = 1 \quad \text{and} \quad C_{n+1}=\sum_{i=0}^n C_i\,C_{n-i}\quad\text{for }n\ge 0.</math> For example, every Dyck word {{mvar|w}} of length β₯ 2 can be written in a unique way in the form :{{math|1=''w'' = X''w''<sub>1</sub>Y''w''<sub>2</sub>}} with (possibly empty) Dyck words {{math|''w''<sub>1</sub>}} and {{math|''w''<sub>2</sub>}}. The [[generating function]] for the Catalan numbers is defined by :<math>c(x)=\sum_{n=0}^\infty C_n x^n.</math> The recurrence relation given above can then be summarized in generating function form by the relation :<math>c(x)=1+xc(x)^2;</math> in other words, this equation follows from the recurrence relation by expanding both sides into [[power series]]. On the one hand, the recurrence relation uniquely determines the Catalan numbers; on the other hand, interpreting {{math|1=''xc''{{sup|2}} β ''c'' + 1 = 0}} as a [[quadratic equation]] of {{mvar|c}} and using the [[quadratic formula]], the generating function relation can be algebraically solved to yield two solution possibilities :<math>c(x) = \frac{1+\sqrt{1-4x}}{2x}</math> or <math>c(x) = \frac{1-\sqrt{1-4x}}{2x}</math>. From the two possibilities, the second must be chosen because only the second gives :<math>C_0 = \lim_{x \to 0} c(x) = 1</math>. The square root term can be expanded as a power series using the [[binomial series]] <math display=block> \begin{align} 1 - \sqrt{1-4x} & = -\sum_{n=1}^{\infty} \binom{1/2}{n}(-4x)^{n} = -\sum_{n=1}^{\infty} \frac{(-1)^{n-1}(2n-3)!!}{2^{n}n!}(-4x)^{n} \\ &= -\sum_{n=0}^{\infty} \frac{(-1)^n(2n-1)!!}{2^{n+1}(n+1)!}(-4x)^{n+1} = \sum_{n=0}^{\infty} \frac{2^{n+1}(2n-1)!!}{(n+1)!}x^{n+1} \\ & = \sum_{n=0}^{\infty} \frac{2(2n)!}{(n+1)!n!}x^{n+1} = \sum_{n=0}^{\infty} \frac{2}{n+1} \binom{2n}{n}x^{n+1}\,. \end{align} </math> Thus, <math display=block> c(x) = \frac{1-\sqrt{1-4x}}{2x} = \sum_{n=0}^{\infty} \frac{1}{n+1} \binom{2n}{n}x^{n}\,. </math> === Second proof === {{See also|Method of images#Mathematics for discrete cases}} [[File:Catalan number-path reflection.svg|thumb|upright=0.5|Figure 1. The invalid portion of the path (dotted red) is flipped (solid red). Bad paths (after the flip) reach {{math|(''n'' β 1, ''n'' + 1)}} instead of {{math|(''n'', ''n'')}}.]] We count the number of paths which start and end on the diagonal of an {{math|''n'' Γ ''n''}} grid. All such paths have {{mvar|n}} right and {{mvar|n}} up steps. Since we can choose which of the {{math|2''n''}} steps are up or right, there are in total <math>\tbinom{2n}{n}</math> monotonic paths of this type. A ''bad'' path crosses the main diagonal and touches the next higher diagonal (red in the illustration). The part of the path after the higher diagonal is then flipped about that diagonal, as illustrated with the red dotted line. This swaps all the right steps to up steps and vice versa. In the section of the path that is not reflected, there is one more up step than right steps, so therefore the remaining section of the bad path has one more right step than up steps. When this portion of the path is reflected, it will have one more up step than right steps. Since there are still {{math|2''n''}} steps, there are now {{math|''n'' + 1}} up steps and {{math|''n'' β 1}} right steps. So, instead of reaching {{math|(''n'', ''n'')}}, all bad paths after reflection end at {{math|(''n'' β 1, ''n'' + 1)}}. Because every monotonic path in the {{math|(''n'' β 1) Γ (''n'' + 1)}} grid meets the higher diagonal, and because the reflection process is reversible, the reflection is therefore a bijection between bad paths in the original grid and monotonic paths in the new grid. The number of bad paths is therefore: :<math>{n-1 + n+1 \choose n-1} = {2n \choose n-1} = {2n \choose n+1}</math> and the number of Catalan paths (i.e. good paths) is obtained by removing the number of bad paths from the total number of monotonic paths of the original grid, :<math>C_n = {2n \choose n} - {2n \choose n+1} = \frac{1}{n+1}{2n \choose n}.</math> In terms of Dyck words, we start with a (non-Dyck) sequence of {{mvar|n}} X's and {{mvar|n}} Y's and interchange all X's and Y's after the first Y that violates the Dyck condition. After this Y, note that there is exactly one more Y than there are Xs. === Third proof === This bijective proof provides a natural explanation for the term {{math|''n'' + 1}} appearing in the denominator of the formula for {{math|''C''<sub>''n''</sub>}}. A generalized version of this proof can be found in a paper of Rukavicka Josef (2011).<ref>Rukavicka Josef (2011), ''On Generalized Dyck Paths, Electronic Journal of Combinatorics'' [http://www.combinatorics.org/ojs/index.php/eljc/article/view/v18i1p40/pdf online]</ref> [[Image:Catalan number exceedance example.png|frame|right|Figure 2. A path with exceedance 5.]] Given a monotonic path, the '''exceedance''' of the path is defined to be the number of '''vertical''' edges above the diagonal. For example, in Figure 2, the edges above the diagonal are marked in red, so the exceedance of this path is 5. Given a monotonic path whose exceedance is not zero, we apply the following algorithm to construct a new path whose exceedance is {{math|1}} less than the one we started with. * Starting from the bottom left, follow the path until it first travels above the diagonal. * Continue to follow the path until it ''touches'' the diagonal again. Denote by {{mvar|X}} the first such edge that is reached. * Swap the portion of the path occurring before {{mvar|X}} with the portion occurring after {{mvar|X}}. In Figure 3, the black dot indicates the point where the path first crosses the diagonal. The black edge is {{mvar|X}}, and we place the last lattice point of the red portion in the top-right corner, and the first lattice point of the green portion in the bottom-left corner, and place X accordingly, to make a new path, shown in the second diagram. [[Image:Catalan number swapping example.png|frame|center|Figure 3. The green and red portions are being exchanged.]] The exceedance has dropped from {{math|3}} to {{math|2}}. In fact, the algorithm causes the exceedance to decrease by {{math|1}} for any path that we feed it, because the first vertical step starting on the diagonal (at the point marked with a black dot) is the only vertical edge that changes from being above the diagonal to being below it when we apply the algorithm - all the other vertical edges stay on the same side of the diagonal. [[Image:Catalan number algorithm table.png|frame|right|Figure 4. All monotonic paths in a 3Γ3 grid, illustrating the exceedance-decreasing algorithm.]] It can be seen that this process is ''reversible'': given any path {{mvar|P}} whose exceedance is less than {{mvar|n}}, there is exactly one path which yields {{mvar|P}} when the algorithm is applied to it. Indeed, the (black) edge {{mvar|X}}, which originally was the first horizontal step ending on the diagonal, has become the ''last'' horizontal step ''starting'' on the diagonal. Alternatively, reverse the original algorithm to look for the first edge that passes ''below'' the diagonal. This implies that the number of paths of exceedance {{mvar|n}} is equal to the number of paths of exceedance {{math|''n'' β 1}}, which is equal to the number of paths of exceedance {{math|''n'' β 2}}, and so on, down to zero. In other words, we have split up the set of ''all'' monotonic paths into {{math|''n'' + 1}} equally sized classes, corresponding to the possible exceedances between 0 and {{mvar|n}}. Since there are <math>\textstyle {2n\choose n}</math> monotonic paths, we obtain the desired formula <math>\textstyle C_n = \frac{1}{n+1}{2n\choose n}.</math> Figure 4 illustrates the situation for {{math|1=''n'' = 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. There are five rows, that is {{math|1=''C''<sub>3</sub> = 5}}, and the last column displays all paths no higher than the diagonal. Using Dyck words, start with a sequence from <math>\textstyle \binom{2n}{n}</math>. Let <math>X_d</math> be the first {{mvar|X}} that brings an initial subsequence to equality, and configure the sequence as <math>(F)X_d(L)</math>. The new sequence is <math>LXF</math>. === Fourth proof === This proof uses the triangulation definition of Catalan numbers to establish a relation between {{math|''C''<sub>''n''</sub>}} and {{math|''C''<sub>''n''+1</sub>}}. Given a polygon {{mvar|P}} with {{math|''n'' + 2}} sides and a triangulation, mark one of its sides as the base, and also orient one of its {{math|2''n'' + 1}} total edges. There are {{math|(4''n'' + 2)''C''<sub>''n''</sub>}} such marked triangulations for a given base. Given a polygon {{mvar|Q}} with {{math|''n'' + 3}} sides and a (different) triangulation, again mark one of its sides as the base. Mark one of the sides other than the base side (and not an inner triangle edge). There are {{math|(''n'' + 2)''C''<sub>''n'' + 1</sub>}} such marked triangulations for a given base. There is a simple bijection between these two marked triangulations: We can either collapse the triangle in {{mvar|Q}} whose side is marked (in two ways, and subtract the two that cannot collapse the base), or, in reverse, expand the oriented edge in {{mvar|P}} to a triangle and mark its new side. Thus :<math>(4n+2)C_n = (n+2)C_{n+1}</math>. Write <math>\textstyle\frac{4n-2}{n+1}C_{n-1} = C_n.</math> Because :<math>(2n)!=(2n)!!(2n-1)!!=2^nn!(2n-1)!!</math> we have :<math>\frac{(2n)!}{n!}=2^n(2n-1)!!=(4n-2)!!!!.</math> Applying the recursion with <math>C_0=1</math> gives the result. === Fifth proof === This proof is based on the [[Dyck language|Dyck words]] interpretation of the Catalan numbers, so <math>C_n</math> is the number of ways to correctly match {{mvar|n}} pairs of brackets. We denote a (possibly empty) correct string with {{mvar|c}} and its inverse with {{mvar|c'}}. Since any {{mvar|c}} can be uniquely decomposed into <math>c = (c_1) c_2</math>, summing over the possible lengths of <math>c_1</math> immediately gives the recursive definition :<math>C_0 = 1 \quad \text{and} \quad C_{n+1} = \sum_{i=0}^n C_i\,C_{n-i}\quad\text{for }n\ge 0</math>. Let {{mvar|b}} be a balanced string of length {{math|2''n''}}, i.e. {{mvar|b}} contains an equal number of <math>(</math> and <math>)</math>, so <math>\textstyle B_n = {2n\choose n}</math>. A balanced string can also be uniquely decomposed into either <math>(c)b</math> or <math>)c'(b</math>, so :<math>B_{n+1} = 2\sum_{i=0}^n B_i C_{n-i}.</math> Any incorrect (non-Catalan) balanced string starts with <math>c)</math>, and the remaining string has one more <math>(</math> than <math>)</math>, so :<math>B_{n+1} - C_{n+1} = \sum_{i=0}^n {2i+1 \choose i} C_{n-i}</math> Also, from the definitions, we have: :<math>B_{n+1} - C_{n+1} = 2\sum_{i=0}^n B_i C_{n-i} - \sum_{i=0}^n C_i\,C_{n-i} = \sum_{i=0}^n (2B_i-C_i) C_{n-i}.</math> Therefore, as this is true for all {{mvar|n}}, :<math>2B_i - C_i = \binom{2i+1}{i}</math> :<math>C_i = 2B_i - \binom{2i+1}{i}</math> :<math>C_i = 2\binom{2i}{i} - \binom{2i+1}{i}</math> :<math>C_i=\frac{1}{i+1}\binom{2i}{i}</math> === Sixth proof === This proof is based on the [[Dyck language|Dyck words]] interpretation of the Catalan numbers and uses the [[cycle lemma#Proof_by_the_cycle_lemma|cycle lemma]] of Dvoretzky and Motzkin.<ref>{{citation | last1 = Dershowitz | first1 = Nachum | last2 = Zaks | first2 = Shmuel | year =1980 | title = Enumerations of ordered trees| journal = Discrete Mathematics | volume = 31 | pages = 9β28 | doi=10.1016/0012-365x(80)90168-5| hdl = 2027/uiuo.ark:/13960/t3kw6z60d | hdl-access = free }}</ref><ref>{{citation | last1 =Dvoretzky| first1= Aryeh| last2= Motzkin| first2=Theodore |year=1947| title =A problem of arrangements|journal= Duke Mathematical Journal| volume = 14| issue= 2|pages = 305β313| doi=10.1215/s0012-7094-47-01423-3}}</ref> We call a sequence of X's and Y's ''dominating'' if, reading from left to right, the number of X's is always strictly greater than the number of Y's. The cycle lemma<ref>{{cite journal |last1=Dershowitz |first1=Nachum |last2=Zaks |first2=Shmuel |title=The Cycle Lemma and Some Applications |journal=European Journal of Combinatorics |date=January 1990 |volume=11 |issue=1 |pages=35β40 |doi=10.1016/S0195-6698(13)80053-4 |url=http://www.cs.tau.ac.il/~nachumd/papers/CL.pdf }}</ref> states that any sequence of <math>m</math> X's and <math>n</math> Y's, where <math>m> n</math>, has precisely <math>m-n</math> dominating [[circular shift]]s. To see this, arrange the given sequence of <math>m+n</math> X's and Y's in a circle. Repeatedly removing XY pairs leaves exactly <math>m-n</math> X's. Each of these X's was the start of a dominating circular shift before anything was removed. For example, consider <math>\mathit{XXYXY}</math>. This sequence is dominating, but none of its circular shifts <math>\mathit{XYXYX}</math>, <math>\mathit{YXYXX}</math>, <math>\mathit{XYXXY}</math> and <math>\mathit{YXXYX}</math> are. A string is a Dyck word of <math>n</math> X's and <math>n</math> Y's if and only if prepending an X to the Dyck word gives a dominating sequence with <math>n+1</math> X's and <math>n</math> Y's, so we can count the former by instead counting the latter. In particular, when <math>m=n+1</math>, there is exactly one dominating circular shift. There are <math>\textstyle {2n+1 \choose n}</math> sequences with exactly <math>n+1</math> X's and <math>n</math> Y's. For each of these, only one of the <math>2n+1</math> circular shifts is dominating. Therefore there are <math>\textstyle\frac{1}{2n+1}{2n+1 \choose n}=C_n</math> distinct sequences of <math>n+1</math> X's and <math>n</math> Y's that are dominating, each of which corresponds to exactly one Dyck word.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)