Finding the generating function for the Catalan number sequence
up vote
2
down vote
favorite
I know that generating function for the Catalan number sequence is $$f(x) = frac{1 -sqrt{4x}}{2x}$$ but I wan to prove it.
So the sequence for the Catalan numbers is $$1,1,2,5,14....$$ as we all know.
Now I have to find a generating function that generates this sequence.
I read that we can prove it this way: Asssume that $f(x)$ is the generating function for the Catalan sequence then by the Cauchy product rule it can be shown that $xf(x)^2 = f(x) − 1$
And so this implies that $$xf(x)^2 - f(x) + 1 = 0$$ and so we can get that $$f(x) = frac{1-sqrt{4x}}{2x}$$
But I can't get to understand how is that possible ? Like assume that $f(x)$ is the generating function for the Catalan sequence, then how come by the Cauchy product we have that $xf(x)^2 = f(x) − 1$
I know that if we multiply the sequence $$1,1,2,5,14,....$$
By itself we would get in the resulting sequence $$1,1,5,14,...$$
Because we have that $c_k = a_0b_k + a_1b_{k-1}+ ........ + a_kb_0$ using the cauchy product formula but still how do we have that $xf(x)^2 = f(x) − 1$
and how did we get that
$$f(x) = frac{1-sqrt{4x}}{2x}$$
from
$xf(x)^2 = f(x) − 1$ ? did we use the quadratic formula some how ?
combinatorics discrete-mathematics generating-functions catalan-numbers
add a comment |
up vote
2
down vote
favorite
I know that generating function for the Catalan number sequence is $$f(x) = frac{1 -sqrt{4x}}{2x}$$ but I wan to prove it.
So the sequence for the Catalan numbers is $$1,1,2,5,14....$$ as we all know.
Now I have to find a generating function that generates this sequence.
I read that we can prove it this way: Asssume that $f(x)$ is the generating function for the Catalan sequence then by the Cauchy product rule it can be shown that $xf(x)^2 = f(x) − 1$
And so this implies that $$xf(x)^2 - f(x) + 1 = 0$$ and so we can get that $$f(x) = frac{1-sqrt{4x}}{2x}$$
But I can't get to understand how is that possible ? Like assume that $f(x)$ is the generating function for the Catalan sequence, then how come by the Cauchy product we have that $xf(x)^2 = f(x) − 1$
I know that if we multiply the sequence $$1,1,2,5,14,....$$
By itself we would get in the resulting sequence $$1,1,5,14,...$$
Because we have that $c_k = a_0b_k + a_1b_{k-1}+ ........ + a_kb_0$ using the cauchy product formula but still how do we have that $xf(x)^2 = f(x) − 1$
and how did we get that
$$f(x) = frac{1-sqrt{4x}}{2x}$$
from
$xf(x)^2 = f(x) − 1$ ? did we use the quadratic formula some how ?
combinatorics discrete-mathematics generating-functions catalan-numbers
From oeis.org/A000108 :G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x). G.f. A(x) satisfies A = 1 + x*A^2.
– Lisa
Dec 1 '15 at 22:06
The first part of this answer gives the derivation in quite a bit of detail.
– Brian M. Scott
Dec 2 '15 at 6:57
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I know that generating function for the Catalan number sequence is $$f(x) = frac{1 -sqrt{4x}}{2x}$$ but I wan to prove it.
So the sequence for the Catalan numbers is $$1,1,2,5,14....$$ as we all know.
Now I have to find a generating function that generates this sequence.
I read that we can prove it this way: Asssume that $f(x)$ is the generating function for the Catalan sequence then by the Cauchy product rule it can be shown that $xf(x)^2 = f(x) − 1$
And so this implies that $$xf(x)^2 - f(x) + 1 = 0$$ and so we can get that $$f(x) = frac{1-sqrt{4x}}{2x}$$
But I can't get to understand how is that possible ? Like assume that $f(x)$ is the generating function for the Catalan sequence, then how come by the Cauchy product we have that $xf(x)^2 = f(x) − 1$
I know that if we multiply the sequence $$1,1,2,5,14,....$$
By itself we would get in the resulting sequence $$1,1,5,14,...$$
Because we have that $c_k = a_0b_k + a_1b_{k-1}+ ........ + a_kb_0$ using the cauchy product formula but still how do we have that $xf(x)^2 = f(x) − 1$
and how did we get that
$$f(x) = frac{1-sqrt{4x}}{2x}$$
from
$xf(x)^2 = f(x) − 1$ ? did we use the quadratic formula some how ?
combinatorics discrete-mathematics generating-functions catalan-numbers
I know that generating function for the Catalan number sequence is $$f(x) = frac{1 -sqrt{4x}}{2x}$$ but I wan to prove it.
So the sequence for the Catalan numbers is $$1,1,2,5,14....$$ as we all know.
Now I have to find a generating function that generates this sequence.
I read that we can prove it this way: Asssume that $f(x)$ is the generating function for the Catalan sequence then by the Cauchy product rule it can be shown that $xf(x)^2 = f(x) − 1$
And so this implies that $$xf(x)^2 - f(x) + 1 = 0$$ and so we can get that $$f(x) = frac{1-sqrt{4x}}{2x}$$
But I can't get to understand how is that possible ? Like assume that $f(x)$ is the generating function for the Catalan sequence, then how come by the Cauchy product we have that $xf(x)^2 = f(x) − 1$
I know that if we multiply the sequence $$1,1,2,5,14,....$$
By itself we would get in the resulting sequence $$1,1,5,14,...$$
Because we have that $c_k = a_0b_k + a_1b_{k-1}+ ........ + a_kb_0$ using the cauchy product formula but still how do we have that $xf(x)^2 = f(x) − 1$
and how did we get that
$$f(x) = frac{1-sqrt{4x}}{2x}$$
from
$xf(x)^2 = f(x) − 1$ ? did we use the quadratic formula some how ?
combinatorics discrete-mathematics generating-functions catalan-numbers
combinatorics discrete-mathematics generating-functions catalan-numbers
asked Dec 1 '15 at 22:03
alkabary
4,0741437
4,0741437
From oeis.org/A000108 :G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x). G.f. A(x) satisfies A = 1 + x*A^2.
– Lisa
Dec 1 '15 at 22:06
The first part of this answer gives the derivation in quite a bit of detail.
– Brian M. Scott
Dec 2 '15 at 6:57
add a comment |
From oeis.org/A000108 :G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x). G.f. A(x) satisfies A = 1 + x*A^2.
– Lisa
Dec 1 '15 at 22:06
The first part of this answer gives the derivation in quite a bit of detail.
– Brian M. Scott
Dec 2 '15 at 6:57
From oeis.org/A000108 :
G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x). G.f. A(x) satisfies A = 1 + x*A^2.
– Lisa
Dec 1 '15 at 22:06
From oeis.org/A000108 :
G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x). G.f. A(x) satisfies A = 1 + x*A^2.
– Lisa
Dec 1 '15 at 22:06
The first part of this answer gives the derivation in quite a bit of detail.
– Brian M. Scott
Dec 2 '15 at 6:57
The first part of this answer gives the derivation in quite a bit of detail.
– Brian M. Scott
Dec 2 '15 at 6:57
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
The $n^{th}$ catalan number $C_n$ is the number of ways to arrange $2n$ parentheses in a way that makes sense. For example, there are exactly $2$ ways for $n=2$: (()) and ()(). This gives us a recursive way to calculate $C_n$. To find $C_3$, note that there will be a first time in each sequence of parentheses when every left parenthesis is matched by a right parenthesis. In (())(), this happens for the first time after (()). So each sequence starts off with (x), where x is a valid, possibly empty, sequence of parentheses. There are $C_2$ ways for x to have length 2. There are $C_1$ ways for x to have length 1, and $C_1$ ways to fill in the last 2 parentheses in the sequence. There are $C_0$ ways for x to be empty, and $C_2$ ways to fill in the last four parentheses. So we have $C_3=C_2C_0+C_1C_1+C_0C_2$. This can give us the formula we want in general, $C_n=sum_{i=0}^{n-1}C_iC_{n-i-1}$. So if we start with the generating function $f(x)=sum_{i=0}^{infty} C_ix^i$ and square it, we get $f(x)^2=sum_{i=0}^{infty} (sum_{j=0}^{i}C_iC_{i-j})x^i=sum_{i=0}^{infty} C_{i+1}x^i=frac{f(x)-1}{x}$. Rearranging,
$xf(x)^2-f(x)+1=0$
Now you have a quadratic equation in $f(x)$, so you can use the quadratic formula to get: $$f(x)=frac{1-sqrt{1-4x}}{2x}$$
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
The $n^{th}$ catalan number $C_n$ is the number of ways to arrange $2n$ parentheses in a way that makes sense. For example, there are exactly $2$ ways for $n=2$: (()) and ()(). This gives us a recursive way to calculate $C_n$. To find $C_3$, note that there will be a first time in each sequence of parentheses when every left parenthesis is matched by a right parenthesis. In (())(), this happens for the first time after (()). So each sequence starts off with (x), where x is a valid, possibly empty, sequence of parentheses. There are $C_2$ ways for x to have length 2. There are $C_1$ ways for x to have length 1, and $C_1$ ways to fill in the last 2 parentheses in the sequence. There are $C_0$ ways for x to be empty, and $C_2$ ways to fill in the last four parentheses. So we have $C_3=C_2C_0+C_1C_1+C_0C_2$. This can give us the formula we want in general, $C_n=sum_{i=0}^{n-1}C_iC_{n-i-1}$. So if we start with the generating function $f(x)=sum_{i=0}^{infty} C_ix^i$ and square it, we get $f(x)^2=sum_{i=0}^{infty} (sum_{j=0}^{i}C_iC_{i-j})x^i=sum_{i=0}^{infty} C_{i+1}x^i=frac{f(x)-1}{x}$. Rearranging,
$xf(x)^2-f(x)+1=0$
Now you have a quadratic equation in $f(x)$, so you can use the quadratic formula to get: $$f(x)=frac{1-sqrt{1-4x}}{2x}$$
add a comment |
up vote
3
down vote
The $n^{th}$ catalan number $C_n$ is the number of ways to arrange $2n$ parentheses in a way that makes sense. For example, there are exactly $2$ ways for $n=2$: (()) and ()(). This gives us a recursive way to calculate $C_n$. To find $C_3$, note that there will be a first time in each sequence of parentheses when every left parenthesis is matched by a right parenthesis. In (())(), this happens for the first time after (()). So each sequence starts off with (x), where x is a valid, possibly empty, sequence of parentheses. There are $C_2$ ways for x to have length 2. There are $C_1$ ways for x to have length 1, and $C_1$ ways to fill in the last 2 parentheses in the sequence. There are $C_0$ ways for x to be empty, and $C_2$ ways to fill in the last four parentheses. So we have $C_3=C_2C_0+C_1C_1+C_0C_2$. This can give us the formula we want in general, $C_n=sum_{i=0}^{n-1}C_iC_{n-i-1}$. So if we start with the generating function $f(x)=sum_{i=0}^{infty} C_ix^i$ and square it, we get $f(x)^2=sum_{i=0}^{infty} (sum_{j=0}^{i}C_iC_{i-j})x^i=sum_{i=0}^{infty} C_{i+1}x^i=frac{f(x)-1}{x}$. Rearranging,
$xf(x)^2-f(x)+1=0$
Now you have a quadratic equation in $f(x)$, so you can use the quadratic formula to get: $$f(x)=frac{1-sqrt{1-4x}}{2x}$$
add a comment |
up vote
3
down vote
up vote
3
down vote
The $n^{th}$ catalan number $C_n$ is the number of ways to arrange $2n$ parentheses in a way that makes sense. For example, there are exactly $2$ ways for $n=2$: (()) and ()(). This gives us a recursive way to calculate $C_n$. To find $C_3$, note that there will be a first time in each sequence of parentheses when every left parenthesis is matched by a right parenthesis. In (())(), this happens for the first time after (()). So each sequence starts off with (x), where x is a valid, possibly empty, sequence of parentheses. There are $C_2$ ways for x to have length 2. There are $C_1$ ways for x to have length 1, and $C_1$ ways to fill in the last 2 parentheses in the sequence. There are $C_0$ ways for x to be empty, and $C_2$ ways to fill in the last four parentheses. So we have $C_3=C_2C_0+C_1C_1+C_0C_2$. This can give us the formula we want in general, $C_n=sum_{i=0}^{n-1}C_iC_{n-i-1}$. So if we start with the generating function $f(x)=sum_{i=0}^{infty} C_ix^i$ and square it, we get $f(x)^2=sum_{i=0}^{infty} (sum_{j=0}^{i}C_iC_{i-j})x^i=sum_{i=0}^{infty} C_{i+1}x^i=frac{f(x)-1}{x}$. Rearranging,
$xf(x)^2-f(x)+1=0$
Now you have a quadratic equation in $f(x)$, so you can use the quadratic formula to get: $$f(x)=frac{1-sqrt{1-4x}}{2x}$$
The $n^{th}$ catalan number $C_n$ is the number of ways to arrange $2n$ parentheses in a way that makes sense. For example, there are exactly $2$ ways for $n=2$: (()) and ()(). This gives us a recursive way to calculate $C_n$. To find $C_3$, note that there will be a first time in each sequence of parentheses when every left parenthesis is matched by a right parenthesis. In (())(), this happens for the first time after (()). So each sequence starts off with (x), where x is a valid, possibly empty, sequence of parentheses. There are $C_2$ ways for x to have length 2. There are $C_1$ ways for x to have length 1, and $C_1$ ways to fill in the last 2 parentheses in the sequence. There are $C_0$ ways for x to be empty, and $C_2$ ways to fill in the last four parentheses. So we have $C_3=C_2C_0+C_1C_1+C_0C_2$. This can give us the formula we want in general, $C_n=sum_{i=0}^{n-1}C_iC_{n-i-1}$. So if we start with the generating function $f(x)=sum_{i=0}^{infty} C_ix^i$ and square it, we get $f(x)^2=sum_{i=0}^{infty} (sum_{j=0}^{i}C_iC_{i-j})x^i=sum_{i=0}^{infty} C_{i+1}x^i=frac{f(x)-1}{x}$. Rearranging,
$xf(x)^2-f(x)+1=0$
Now you have a quadratic equation in $f(x)$, so you can use the quadratic formula to get: $$f(x)=frac{1-sqrt{1-4x}}{2x}$$
edited Nov 17 at 19:57
user50393
134
134
answered Dec 1 '15 at 22:48
Timur vural
763
763
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1555547%2ffinding-the-generating-function-for-the-catalan-number-sequence%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
From oeis.org/A000108 :
G.f.: A(x) = (1 - sqrt(1 - 4*x)) / (2*x). G.f. A(x) satisfies A = 1 + x*A^2.
– Lisa
Dec 1 '15 at 22:06
The first part of this answer gives the derivation in quite a bit of detail.
– Brian M. Scott
Dec 2 '15 at 6:57