Why is the formula for combinations with repetition equal to $(n + k - 1)$ choose $k$?
$begingroup$
If we had something like:
$$
x_1 + x_2 + x_3 = 7, x_i >= 0
$$
It could be solved using the stars and bars method:
$$
****|**|*
$$
The number of ways to choose 2 spots for the bars is 9 choose 2. But using the $(n+r-1)$ choose $r$ formula, it would be:
(7 + 3 - 1) choose 3 = 9 choose 3.
So I'm confused why the formula for combinations with repetition isn't $(n+r-1)$ choose $(r-1)$. It seems like what we care about is the number of bars involved in choosing r objects, which is $r-1$. Why is r used in the formula whatsoever?
combinatorics discrete-mathematics combinations
$endgroup$
add a comment |
$begingroup$
If we had something like:
$$
x_1 + x_2 + x_3 = 7, x_i >= 0
$$
It could be solved using the stars and bars method:
$$
****|**|*
$$
The number of ways to choose 2 spots for the bars is 9 choose 2. But using the $(n+r-1)$ choose $r$ formula, it would be:
(7 + 3 - 1) choose 3 = 9 choose 3.
So I'm confused why the formula for combinations with repetition isn't $(n+r-1)$ choose $(r-1)$. It seems like what we care about is the number of bars involved in choosing r objects, which is $r-1$. Why is r used in the formula whatsoever?
combinatorics discrete-mathematics combinations
$endgroup$
add a comment |
$begingroup$
If we had something like:
$$
x_1 + x_2 + x_3 = 7, x_i >= 0
$$
It could be solved using the stars and bars method:
$$
****|**|*
$$
The number of ways to choose 2 spots for the bars is 9 choose 2. But using the $(n+r-1)$ choose $r$ formula, it would be:
(7 + 3 - 1) choose 3 = 9 choose 3.
So I'm confused why the formula for combinations with repetition isn't $(n+r-1)$ choose $(r-1)$. It seems like what we care about is the number of bars involved in choosing r objects, which is $r-1$. Why is r used in the formula whatsoever?
combinatorics discrete-mathematics combinations
$endgroup$
If we had something like:
$$
x_1 + x_2 + x_3 = 7, x_i >= 0
$$
It could be solved using the stars and bars method:
$$
****|**|*
$$
The number of ways to choose 2 spots for the bars is 9 choose 2. But using the $(n+r-1)$ choose $r$ formula, it would be:
(7 + 3 - 1) choose 3 = 9 choose 3.
So I'm confused why the formula for combinations with repetition isn't $(n+r-1)$ choose $(r-1)$. It seems like what we care about is the number of bars involved in choosing r objects, which is $r-1$. Why is r used in the formula whatsoever?
combinatorics discrete-mathematics combinations
combinatorics discrete-mathematics combinations
edited Jan 29 at 21:03
Michael Rybkin
4,084422
4,084422
asked Jan 29 at 19:55
Inertial IgnoranceInertial Ignorance
17419
17419
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
You are confusing yourself as to what role the $n$ plays and what role the $r$ plays. In order to try to clarify this, I will use neither $n$ nor will I use $r$.
The number of non-negative integer solutions to the following system:
$$begin{cases}x_1+x_2+dots+x_a = b\0leq x_iend{cases}$$
is going to be
$$binom{a+b-1}{a-1}$$
which is the same thing as
$$binom{a+b-1}{b}$$
These are equal due to the well known identity that $binom{n}{r}=binom{n}{n-r}$, e.g. to choose $r$ winners from $n$ people and the rest be losers is the same as choosing $n-r$ losers from $n$ people instead and the rest be winners.
Your confusion comes from some people choosing to write the formula with $n$ representing the number of balls and $k$ the number of bins while other people might choose to write $n$ as the number of bins with $k$ as the number of balls. In the first case it might have been written as $binom{n+k-1}{k-1}$ and in the second case it might have been written as $binom{n+k-1}{k}$. These are the same formula just with the roles of $n$ and $k$ reversed!
In either case, the top of the binomial coefficient will be the number of balls plus the number of bins minus one, and the bottom will be the number of bins minus one (or equivalently, the number of balls). Do not try to memorize formulas based on how they appear... instead try to learn formulas for what they mean and what they actually represent.
$endgroup$
add a comment |
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%2f3092645%2fwhy-is-the-formula-for-combinations-with-repetition-equal-to-n-k-1-choos%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You are confusing yourself as to what role the $n$ plays and what role the $r$ plays. In order to try to clarify this, I will use neither $n$ nor will I use $r$.
The number of non-negative integer solutions to the following system:
$$begin{cases}x_1+x_2+dots+x_a = b\0leq x_iend{cases}$$
is going to be
$$binom{a+b-1}{a-1}$$
which is the same thing as
$$binom{a+b-1}{b}$$
These are equal due to the well known identity that $binom{n}{r}=binom{n}{n-r}$, e.g. to choose $r$ winners from $n$ people and the rest be losers is the same as choosing $n-r$ losers from $n$ people instead and the rest be winners.
Your confusion comes from some people choosing to write the formula with $n$ representing the number of balls and $k$ the number of bins while other people might choose to write $n$ as the number of bins with $k$ as the number of balls. In the first case it might have been written as $binom{n+k-1}{k-1}$ and in the second case it might have been written as $binom{n+k-1}{k}$. These are the same formula just with the roles of $n$ and $k$ reversed!
In either case, the top of the binomial coefficient will be the number of balls plus the number of bins minus one, and the bottom will be the number of bins minus one (or equivalently, the number of balls). Do not try to memorize formulas based on how they appear... instead try to learn formulas for what they mean and what they actually represent.
$endgroup$
add a comment |
$begingroup$
You are confusing yourself as to what role the $n$ plays and what role the $r$ plays. In order to try to clarify this, I will use neither $n$ nor will I use $r$.
The number of non-negative integer solutions to the following system:
$$begin{cases}x_1+x_2+dots+x_a = b\0leq x_iend{cases}$$
is going to be
$$binom{a+b-1}{a-1}$$
which is the same thing as
$$binom{a+b-1}{b}$$
These are equal due to the well known identity that $binom{n}{r}=binom{n}{n-r}$, e.g. to choose $r$ winners from $n$ people and the rest be losers is the same as choosing $n-r$ losers from $n$ people instead and the rest be winners.
Your confusion comes from some people choosing to write the formula with $n$ representing the number of balls and $k$ the number of bins while other people might choose to write $n$ as the number of bins with $k$ as the number of balls. In the first case it might have been written as $binom{n+k-1}{k-1}$ and in the second case it might have been written as $binom{n+k-1}{k}$. These are the same formula just with the roles of $n$ and $k$ reversed!
In either case, the top of the binomial coefficient will be the number of balls plus the number of bins minus one, and the bottom will be the number of bins minus one (or equivalently, the number of balls). Do not try to memorize formulas based on how they appear... instead try to learn formulas for what they mean and what they actually represent.
$endgroup$
add a comment |
$begingroup$
You are confusing yourself as to what role the $n$ plays and what role the $r$ plays. In order to try to clarify this, I will use neither $n$ nor will I use $r$.
The number of non-negative integer solutions to the following system:
$$begin{cases}x_1+x_2+dots+x_a = b\0leq x_iend{cases}$$
is going to be
$$binom{a+b-1}{a-1}$$
which is the same thing as
$$binom{a+b-1}{b}$$
These are equal due to the well known identity that $binom{n}{r}=binom{n}{n-r}$, e.g. to choose $r$ winners from $n$ people and the rest be losers is the same as choosing $n-r$ losers from $n$ people instead and the rest be winners.
Your confusion comes from some people choosing to write the formula with $n$ representing the number of balls and $k$ the number of bins while other people might choose to write $n$ as the number of bins with $k$ as the number of balls. In the first case it might have been written as $binom{n+k-1}{k-1}$ and in the second case it might have been written as $binom{n+k-1}{k}$. These are the same formula just with the roles of $n$ and $k$ reversed!
In either case, the top of the binomial coefficient will be the number of balls plus the number of bins minus one, and the bottom will be the number of bins minus one (or equivalently, the number of balls). Do not try to memorize formulas based on how they appear... instead try to learn formulas for what they mean and what they actually represent.
$endgroup$
You are confusing yourself as to what role the $n$ plays and what role the $r$ plays. In order to try to clarify this, I will use neither $n$ nor will I use $r$.
The number of non-negative integer solutions to the following system:
$$begin{cases}x_1+x_2+dots+x_a = b\0leq x_iend{cases}$$
is going to be
$$binom{a+b-1}{a-1}$$
which is the same thing as
$$binom{a+b-1}{b}$$
These are equal due to the well known identity that $binom{n}{r}=binom{n}{n-r}$, e.g. to choose $r$ winners from $n$ people and the rest be losers is the same as choosing $n-r$ losers from $n$ people instead and the rest be winners.
Your confusion comes from some people choosing to write the formula with $n$ representing the number of balls and $k$ the number of bins while other people might choose to write $n$ as the number of bins with $k$ as the number of balls. In the first case it might have been written as $binom{n+k-1}{k-1}$ and in the second case it might have been written as $binom{n+k-1}{k}$. These are the same formula just with the roles of $n$ and $k$ reversed!
In either case, the top of the binomial coefficient will be the number of balls plus the number of bins minus one, and the bottom will be the number of bins minus one (or equivalently, the number of balls). Do not try to memorize formulas based on how they appear... instead try to learn formulas for what they mean and what they actually represent.
answered Jan 29 at 20:02


JMoravitzJMoravitz
48.7k43988
48.7k43988
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%2f3092645%2fwhy-is-the-formula-for-combinations-with-repetition-equal-to-n-k-1-choos%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