Number of pathsin a grid with restrictions
$begingroup$
Please help, I am stuck with this example. Prove that the Catalan number $C_n$ equals the number of lattice paths from $(0,0)$
to $(2n, 0)$ using only upsteps $(1, 1)$ and downsteps $(1, -1)$ that never go above the
horizontal axis (so there are as many up steps as there are downsteps). (These
are sometimes called Dyck paths.) Thanks.
combinatorics catalan-numbers
$endgroup$
add a comment |
$begingroup$
Please help, I am stuck with this example. Prove that the Catalan number $C_n$ equals the number of lattice paths from $(0,0)$
to $(2n, 0)$ using only upsteps $(1, 1)$ and downsteps $(1, -1)$ that never go above the
horizontal axis (so there are as many up steps as there are downsteps). (These
are sometimes called Dyck paths.) Thanks.
combinatorics catalan-numbers
$endgroup$
2
$begingroup$
If I were you I would try out the first several values of $n$ and see how they form the Catalan numbers, then try to understand and prove the relation $C_n=C_0C_{n-1}+C_1C_{n-2}+cdots+C_{n-1}C_0$.
$endgroup$
– Elliot G
Nov 3 '15 at 8:18
$begingroup$
Have you looked at Wikipedia?
$endgroup$
– Ross Millikan
Dec 18 '18 at 5:29
add a comment |
$begingroup$
Please help, I am stuck with this example. Prove that the Catalan number $C_n$ equals the number of lattice paths from $(0,0)$
to $(2n, 0)$ using only upsteps $(1, 1)$ and downsteps $(1, -1)$ that never go above the
horizontal axis (so there are as many up steps as there are downsteps). (These
are sometimes called Dyck paths.) Thanks.
combinatorics catalan-numbers
$endgroup$
Please help, I am stuck with this example. Prove that the Catalan number $C_n$ equals the number of lattice paths from $(0,0)$
to $(2n, 0)$ using only upsteps $(1, 1)$ and downsteps $(1, -1)$ that never go above the
horizontal axis (so there are as many up steps as there are downsteps). (These
are sometimes called Dyck paths.) Thanks.
combinatorics catalan-numbers
combinatorics catalan-numbers
asked Nov 3 '15 at 7:58
Pls2Pls2
6713
6713
2
$begingroup$
If I were you I would try out the first several values of $n$ and see how they form the Catalan numbers, then try to understand and prove the relation $C_n=C_0C_{n-1}+C_1C_{n-2}+cdots+C_{n-1}C_0$.
$endgroup$
– Elliot G
Nov 3 '15 at 8:18
$begingroup$
Have you looked at Wikipedia?
$endgroup$
– Ross Millikan
Dec 18 '18 at 5:29
add a comment |
2
$begingroup$
If I were you I would try out the first several values of $n$ and see how they form the Catalan numbers, then try to understand and prove the relation $C_n=C_0C_{n-1}+C_1C_{n-2}+cdots+C_{n-1}C_0$.
$endgroup$
– Elliot G
Nov 3 '15 at 8:18
$begingroup$
Have you looked at Wikipedia?
$endgroup$
– Ross Millikan
Dec 18 '18 at 5:29
2
2
$begingroup$
If I were you I would try out the first several values of $n$ and see how they form the Catalan numbers, then try to understand and prove the relation $C_n=C_0C_{n-1}+C_1C_{n-2}+cdots+C_{n-1}C_0$.
$endgroup$
– Elliot G
Nov 3 '15 at 8:18
$begingroup$
If I were you I would try out the first several values of $n$ and see how they form the Catalan numbers, then try to understand and prove the relation $C_n=C_0C_{n-1}+C_1C_{n-2}+cdots+C_{n-1}C_0$.
$endgroup$
– Elliot G
Nov 3 '15 at 8:18
$begingroup$
Have you looked at Wikipedia?
$endgroup$
– Ross Millikan
Dec 18 '18 at 5:29
$begingroup$
Have you looked at Wikipedia?
$endgroup$
– Ross Millikan
Dec 18 '18 at 5:29
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Note that these paths are the same as the lattice paths from $(0,0)$ to $(n,n)$ that stay below the diagonal line ${(x,x) : x in mathbb{R} }$. Let such paths be called "good paths" and let "bad paths" be lattice paths from $(0,0)$ to $(n,n)$ that cross the diagonal. Then
# good paths = # paths - # bad paths
The total number of lattice paths from $(0,0)$ to $(n,n)$ is $dbinom{2n}{n}$ since we have to take $2n$ steps, and we have to choose when to take the $n$ steps to the right.
To count the total number of bad paths, we do the following: every bad path crosses the main diagonal, implying that it touches the diagonal just above it. Specifically, every bad path must touch the line $L = {(x,x+1) : x in mathbb{R}}$. Given a bad path, break it up into two portions: the portion before the first time the path touches $L$, and the portion after. If we reflect the first portion over the line $L$, then we have a lattice path from $(-1,1)$ to $(n,n)$. This gives a bijection between bad paths and lattice paths from $(-1,1)$ to $(n,n)$. Since there are $dbinom{2n}{n+1}$ such lattice paths, there must be $dbinom{2n}{n+1}$ bad paths.
Putting this all together yields
$$binom{2n}{n} - binom{2n}{n-1} = C_n$$
total good paths.
$endgroup$
add a comment |
$begingroup$
The typical method for counting Dyck paths (that I know) goes as follows:
For every Dyck path $D$ from $(0,0)$ to $(2n,0)$, $D$ must begin with an upstep and eventually return to the x-axis with a downstep. Say $(2m,0)$ is the the first time $D$ returns to the x-axis. Then the sub-path of $D$ which goes from $(1,1)$ to $(2m-1,1)$ is a Dyck path (albeit shifted up) of length $m-1$, and the part of $D$ which goes from $(2m,0)$ to $(2n,0)$ is also a Dyck path (of length $n-m$).
Every Dyck path admits a unique decomposition in this way. That is, each Dyck path of length $n$ yields an ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$. Here, $m$ may be any positive integer less than or equal to $n$.
Too, every ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$ gives a unique Dyck path under the this construction.
So $$C_n=sum_{m=1}^{n} C_{m-1}C_{n-m},$$ which gives the Catalan numbers.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f1510816%2fnumber-of-pathsin-a-grid-with-restrictions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Note that these paths are the same as the lattice paths from $(0,0)$ to $(n,n)$ that stay below the diagonal line ${(x,x) : x in mathbb{R} }$. Let such paths be called "good paths" and let "bad paths" be lattice paths from $(0,0)$ to $(n,n)$ that cross the diagonal. Then
# good paths = # paths - # bad paths
The total number of lattice paths from $(0,0)$ to $(n,n)$ is $dbinom{2n}{n}$ since we have to take $2n$ steps, and we have to choose when to take the $n$ steps to the right.
To count the total number of bad paths, we do the following: every bad path crosses the main diagonal, implying that it touches the diagonal just above it. Specifically, every bad path must touch the line $L = {(x,x+1) : x in mathbb{R}}$. Given a bad path, break it up into two portions: the portion before the first time the path touches $L$, and the portion after. If we reflect the first portion over the line $L$, then we have a lattice path from $(-1,1)$ to $(n,n)$. This gives a bijection between bad paths and lattice paths from $(-1,1)$ to $(n,n)$. Since there are $dbinom{2n}{n+1}$ such lattice paths, there must be $dbinom{2n}{n+1}$ bad paths.
Putting this all together yields
$$binom{2n}{n} - binom{2n}{n-1} = C_n$$
total good paths.
$endgroup$
add a comment |
$begingroup$
Note that these paths are the same as the lattice paths from $(0,0)$ to $(n,n)$ that stay below the diagonal line ${(x,x) : x in mathbb{R} }$. Let such paths be called "good paths" and let "bad paths" be lattice paths from $(0,0)$ to $(n,n)$ that cross the diagonal. Then
# good paths = # paths - # bad paths
The total number of lattice paths from $(0,0)$ to $(n,n)$ is $dbinom{2n}{n}$ since we have to take $2n$ steps, and we have to choose when to take the $n$ steps to the right.
To count the total number of bad paths, we do the following: every bad path crosses the main diagonal, implying that it touches the diagonal just above it. Specifically, every bad path must touch the line $L = {(x,x+1) : x in mathbb{R}}$. Given a bad path, break it up into two portions: the portion before the first time the path touches $L$, and the portion after. If we reflect the first portion over the line $L$, then we have a lattice path from $(-1,1)$ to $(n,n)$. This gives a bijection between bad paths and lattice paths from $(-1,1)$ to $(n,n)$. Since there are $dbinom{2n}{n+1}$ such lattice paths, there must be $dbinom{2n}{n+1}$ bad paths.
Putting this all together yields
$$binom{2n}{n} - binom{2n}{n-1} = C_n$$
total good paths.
$endgroup$
add a comment |
$begingroup$
Note that these paths are the same as the lattice paths from $(0,0)$ to $(n,n)$ that stay below the diagonal line ${(x,x) : x in mathbb{R} }$. Let such paths be called "good paths" and let "bad paths" be lattice paths from $(0,0)$ to $(n,n)$ that cross the diagonal. Then
# good paths = # paths - # bad paths
The total number of lattice paths from $(0,0)$ to $(n,n)$ is $dbinom{2n}{n}$ since we have to take $2n$ steps, and we have to choose when to take the $n$ steps to the right.
To count the total number of bad paths, we do the following: every bad path crosses the main diagonal, implying that it touches the diagonal just above it. Specifically, every bad path must touch the line $L = {(x,x+1) : x in mathbb{R}}$. Given a bad path, break it up into two portions: the portion before the first time the path touches $L$, and the portion after. If we reflect the first portion over the line $L$, then we have a lattice path from $(-1,1)$ to $(n,n)$. This gives a bijection between bad paths and lattice paths from $(-1,1)$ to $(n,n)$. Since there are $dbinom{2n}{n+1}$ such lattice paths, there must be $dbinom{2n}{n+1}$ bad paths.
Putting this all together yields
$$binom{2n}{n} - binom{2n}{n-1} = C_n$$
total good paths.
$endgroup$
Note that these paths are the same as the lattice paths from $(0,0)$ to $(n,n)$ that stay below the diagonal line ${(x,x) : x in mathbb{R} }$. Let such paths be called "good paths" and let "bad paths" be lattice paths from $(0,0)$ to $(n,n)$ that cross the diagonal. Then
# good paths = # paths - # bad paths
The total number of lattice paths from $(0,0)$ to $(n,n)$ is $dbinom{2n}{n}$ since we have to take $2n$ steps, and we have to choose when to take the $n$ steps to the right.
To count the total number of bad paths, we do the following: every bad path crosses the main diagonal, implying that it touches the diagonal just above it. Specifically, every bad path must touch the line $L = {(x,x+1) : x in mathbb{R}}$. Given a bad path, break it up into two portions: the portion before the first time the path touches $L$, and the portion after. If we reflect the first portion over the line $L$, then we have a lattice path from $(-1,1)$ to $(n,n)$. This gives a bijection between bad paths and lattice paths from $(-1,1)$ to $(n,n)$. Since there are $dbinom{2n}{n+1}$ such lattice paths, there must be $dbinom{2n}{n+1}$ bad paths.
Putting this all together yields
$$binom{2n}{n} - binom{2n}{n-1} = C_n$$
total good paths.
edited Dec 18 '18 at 4:20
Rohit Pandey
1,6331023
1,6331023
answered Nov 3 '15 at 16:21
Marcus MMarcus M
8,84911047
8,84911047
add a comment |
add a comment |
$begingroup$
The typical method for counting Dyck paths (that I know) goes as follows:
For every Dyck path $D$ from $(0,0)$ to $(2n,0)$, $D$ must begin with an upstep and eventually return to the x-axis with a downstep. Say $(2m,0)$ is the the first time $D$ returns to the x-axis. Then the sub-path of $D$ which goes from $(1,1)$ to $(2m-1,1)$ is a Dyck path (albeit shifted up) of length $m-1$, and the part of $D$ which goes from $(2m,0)$ to $(2n,0)$ is also a Dyck path (of length $n-m$).
Every Dyck path admits a unique decomposition in this way. That is, each Dyck path of length $n$ yields an ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$. Here, $m$ may be any positive integer less than or equal to $n$.
Too, every ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$ gives a unique Dyck path under the this construction.
So $$C_n=sum_{m=1}^{n} C_{m-1}C_{n-m},$$ which gives the Catalan numbers.
$endgroup$
add a comment |
$begingroup$
The typical method for counting Dyck paths (that I know) goes as follows:
For every Dyck path $D$ from $(0,0)$ to $(2n,0)$, $D$ must begin with an upstep and eventually return to the x-axis with a downstep. Say $(2m,0)$ is the the first time $D$ returns to the x-axis. Then the sub-path of $D$ which goes from $(1,1)$ to $(2m-1,1)$ is a Dyck path (albeit shifted up) of length $m-1$, and the part of $D$ which goes from $(2m,0)$ to $(2n,0)$ is also a Dyck path (of length $n-m$).
Every Dyck path admits a unique decomposition in this way. That is, each Dyck path of length $n$ yields an ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$. Here, $m$ may be any positive integer less than or equal to $n$.
Too, every ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$ gives a unique Dyck path under the this construction.
So $$C_n=sum_{m=1}^{n} C_{m-1}C_{n-m},$$ which gives the Catalan numbers.
$endgroup$
add a comment |
$begingroup$
The typical method for counting Dyck paths (that I know) goes as follows:
For every Dyck path $D$ from $(0,0)$ to $(2n,0)$, $D$ must begin with an upstep and eventually return to the x-axis with a downstep. Say $(2m,0)$ is the the first time $D$ returns to the x-axis. Then the sub-path of $D$ which goes from $(1,1)$ to $(2m-1,1)$ is a Dyck path (albeit shifted up) of length $m-1$, and the part of $D$ which goes from $(2m,0)$ to $(2n,0)$ is also a Dyck path (of length $n-m$).
Every Dyck path admits a unique decomposition in this way. That is, each Dyck path of length $n$ yields an ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$. Here, $m$ may be any positive integer less than or equal to $n$.
Too, every ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$ gives a unique Dyck path under the this construction.
So $$C_n=sum_{m=1}^{n} C_{m-1}C_{n-m},$$ which gives the Catalan numbers.
$endgroup$
The typical method for counting Dyck paths (that I know) goes as follows:
For every Dyck path $D$ from $(0,0)$ to $(2n,0)$, $D$ must begin with an upstep and eventually return to the x-axis with a downstep. Say $(2m,0)$ is the the first time $D$ returns to the x-axis. Then the sub-path of $D$ which goes from $(1,1)$ to $(2m-1,1)$ is a Dyck path (albeit shifted up) of length $m-1$, and the part of $D$ which goes from $(2m,0)$ to $(2n,0)$ is also a Dyck path (of length $n-m$).
Every Dyck path admits a unique decomposition in this way. That is, each Dyck path of length $n$ yields an ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$. Here, $m$ may be any positive integer less than or equal to $n$.
Too, every ordered pair of Dyck paths, the first of length $m-1$ and the second of length $n-m$ gives a unique Dyck path under the this construction.
So $$C_n=sum_{m=1}^{n} C_{m-1}C_{n-m},$$ which gives the Catalan numbers.
answered Nov 3 '15 at 19:33
Michael EngenMichael Engen
393
393
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.
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%2f1510816%2fnumber-of-pathsin-a-grid-with-restrictions%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
2
$begingroup$
If I were you I would try out the first several values of $n$ and see how they form the Catalan numbers, then try to understand and prove the relation $C_n=C_0C_{n-1}+C_1C_{n-2}+cdots+C_{n-1}C_0$.
$endgroup$
– Elliot G
Nov 3 '15 at 8:18
$begingroup$
Have you looked at Wikipedia?
$endgroup$
– Ross Millikan
Dec 18 '18 at 5:29