Calculate combinations for 7 buckets with value summing to 5
$begingroup$
Imagine 7 separate machines each reporting a number.
Each machine can report any number 0 through 5 as their result. For any given test, the sum of the results reported across all 7 machines always results in the number 5.
for example
- 1-1-1-1-1-0-0
- 5-0-0-0-0-0-0
- 0-2-3-0-0-0-0
- 0-1-0-0-4-0-0
- 0-1-1-0-2-0-1
Questions
- How many combinations of results are there?
- what's a better way to describe the problem?
Thank you
Update (follow on questions)
Since there are only 7 solutions, do we have to find out the combinations for each of the solutions and add them together?
- "1+1+1+1+1" has 21 combinations C(7,5)
- 1-1-1-1-1-0-0
- 0-1-1-1-1-0-1
- 1-0-1-1-1-0-1
- ...etc
"2+3" has 21 combinations C(7,2)
- 0-2-3-0-0-0-0
- 2-0-3-0-0-0-0
- 0-2-0-0-0-3-0
- ...etc
"5" has 7 combinations C(7,1)
- 5-0-0-0-0-0-0
- 0-5-0-0-0-0-0
- 0-0-5-0-0-0-0
- ...etc
- "4+1" has 21 combinations C(7,2)
- "1+1+3" has 35 combinations C(7,3)
- "2+1+1+1" has 35 combinations C(7,5)
- "2+2+1" has 35 combinations C(7,3)
175 combinations - does that sound about right?
combinatorics combinations
$endgroup$
add a comment |
$begingroup$
Imagine 7 separate machines each reporting a number.
Each machine can report any number 0 through 5 as their result. For any given test, the sum of the results reported across all 7 machines always results in the number 5.
for example
- 1-1-1-1-1-0-0
- 5-0-0-0-0-0-0
- 0-2-3-0-0-0-0
- 0-1-0-0-4-0-0
- 0-1-1-0-2-0-1
Questions
- How many combinations of results are there?
- what's a better way to describe the problem?
Thank you
Update (follow on questions)
Since there are only 7 solutions, do we have to find out the combinations for each of the solutions and add them together?
- "1+1+1+1+1" has 21 combinations C(7,5)
- 1-1-1-1-1-0-0
- 0-1-1-1-1-0-1
- 1-0-1-1-1-0-1
- ...etc
"2+3" has 21 combinations C(7,2)
- 0-2-3-0-0-0-0
- 2-0-3-0-0-0-0
- 0-2-0-0-0-3-0
- ...etc
"5" has 7 combinations C(7,1)
- 5-0-0-0-0-0-0
- 0-5-0-0-0-0-0
- 0-0-5-0-0-0-0
- ...etc
- "4+1" has 21 combinations C(7,2)
- "1+1+3" has 35 combinations C(7,3)
- "2+1+1+1" has 35 combinations C(7,5)
- "2+2+1" has 35 combinations C(7,3)
175 combinations - does that sound about right?
combinatorics combinations
$endgroup$
1
$begingroup$
Note that for "2+3", you would be looking for P(7,2)=42 instead. The machine with 3 does not need to be behind the machine with 2.
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:25
1
$begingroup$
The number of combinations would be, respectively: 21,42,7,42,105,140,105
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:34
add a comment |
$begingroup$
Imagine 7 separate machines each reporting a number.
Each machine can report any number 0 through 5 as their result. For any given test, the sum of the results reported across all 7 machines always results in the number 5.
for example
- 1-1-1-1-1-0-0
- 5-0-0-0-0-0-0
- 0-2-3-0-0-0-0
- 0-1-0-0-4-0-0
- 0-1-1-0-2-0-1
Questions
- How many combinations of results are there?
- what's a better way to describe the problem?
Thank you
Update (follow on questions)
Since there are only 7 solutions, do we have to find out the combinations for each of the solutions and add them together?
- "1+1+1+1+1" has 21 combinations C(7,5)
- 1-1-1-1-1-0-0
- 0-1-1-1-1-0-1
- 1-0-1-1-1-0-1
- ...etc
"2+3" has 21 combinations C(7,2)
- 0-2-3-0-0-0-0
- 2-0-3-0-0-0-0
- 0-2-0-0-0-3-0
- ...etc
"5" has 7 combinations C(7,1)
- 5-0-0-0-0-0-0
- 0-5-0-0-0-0-0
- 0-0-5-0-0-0-0
- ...etc
- "4+1" has 21 combinations C(7,2)
- "1+1+3" has 35 combinations C(7,3)
- "2+1+1+1" has 35 combinations C(7,5)
- "2+2+1" has 35 combinations C(7,3)
175 combinations - does that sound about right?
combinatorics combinations
$endgroup$
Imagine 7 separate machines each reporting a number.
Each machine can report any number 0 through 5 as their result. For any given test, the sum of the results reported across all 7 machines always results in the number 5.
for example
- 1-1-1-1-1-0-0
- 5-0-0-0-0-0-0
- 0-2-3-0-0-0-0
- 0-1-0-0-4-0-0
- 0-1-1-0-2-0-1
Questions
- How many combinations of results are there?
- what's a better way to describe the problem?
Thank you
Update (follow on questions)
Since there are only 7 solutions, do we have to find out the combinations for each of the solutions and add them together?
- "1+1+1+1+1" has 21 combinations C(7,5)
- 1-1-1-1-1-0-0
- 0-1-1-1-1-0-1
- 1-0-1-1-1-0-1
- ...etc
"2+3" has 21 combinations C(7,2)
- 0-2-3-0-0-0-0
- 2-0-3-0-0-0-0
- 0-2-0-0-0-3-0
- ...etc
"5" has 7 combinations C(7,1)
- 5-0-0-0-0-0-0
- 0-5-0-0-0-0-0
- 0-0-5-0-0-0-0
- ...etc
- "4+1" has 21 combinations C(7,2)
- "1+1+3" has 35 combinations C(7,3)
- "2+1+1+1" has 35 combinations C(7,5)
- "2+2+1" has 35 combinations C(7,3)
175 combinations - does that sound about right?
combinatorics combinations
combinatorics combinations
edited Dec 27 '18 at 21:24
N. F. Taussig
45.3k103358
45.3k103358
asked Mar 29 '18 at 18:08
eAndyeAndy
12
12
1
$begingroup$
Note that for "2+3", you would be looking for P(7,2)=42 instead. The machine with 3 does not need to be behind the machine with 2.
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:25
1
$begingroup$
The number of combinations would be, respectively: 21,42,7,42,105,140,105
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:34
add a comment |
1
$begingroup$
Note that for "2+3", you would be looking for P(7,2)=42 instead. The machine with 3 does not need to be behind the machine with 2.
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:25
1
$begingroup$
The number of combinations would be, respectively: 21,42,7,42,105,140,105
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:34
1
1
$begingroup$
Note that for "2+3", you would be looking for P(7,2)=42 instead. The machine with 3 does not need to be behind the machine with 2.
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:25
$begingroup$
Note that for "2+3", you would be looking for P(7,2)=42 instead. The machine with 3 does not need to be behind the machine with 2.
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:25
1
1
$begingroup$
The number of combinations would be, respectively: 21,42,7,42,105,140,105
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:34
$begingroup$
The number of combinations would be, respectively: 21,42,7,42,105,140,105
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:34
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
The numbers of all 7 machines sum to 5, so this is essentially asking the number of ways to sort 5 objects into 7 containers.
One way to do this is to add 6 dividers.
$$1st(container)|2nd|3rd|4th|5th|6th|7th$$
Each permutation of the 6 dividers and 5 objects(11 total) gives a different configuration. The number of ways to arrange 11 things is 11!. Since the order of the dividers do not matter, divide by 6!. If the objects are indistinguishable, then their order does not matter either, and divide by 5!.
$$frac{11!}{5!cdot 6!}=462$$
Take a look at a simpler example - arranging 3 objects into 2 boxes. In this case, only 1 divider is needed. Objects to the left of the divider belong to box 1, objects to the right in box 2. In all cases, the sum is 3.
$$***|$$
$$**|*$$
$$*|**$$
$$|***$$
$endgroup$
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
add a comment |
$begingroup$
Let $x_k$ be the nonnegative integer reported by machine $k$. Since the sum of the values reported by the machines is $5$, we seek the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 5$$
in the nonnegative integers. A particular solution corresponds to the placement of six addition signs in a row of five ones. For instance,
$$+ + 1 + + 1 1 1 + + 1$$
corresponds to the solution $x_1 = x_2 = 0$, $x_3 = 1$, $x_4 = 0$, $x_5 = 3$, $x_6 = 0$, $x_7 = 1$. The number of such solutions is the number of ways we can select which six of the eleven positions required for five ones and six addition signs will be filled with addition signs, which is
$$binom{5 + 6}{6} = binom{11}{6} = 462$$
In general, a particular solution of the equation
$$x_1 + x_2 + x_3 + cdots + x_n = k$$
in the nonnegative integers corresponds to the placement of $n - 1$ addition signs in a row of $k$ ones. The number of such solutions is the number of ways we can choose which $n - 1$ of the $n + k - 1$ positions required for $k$ ones and $n - 1$ addition signs will be filled with addition signs, which is
$$binom{n + k - 1}{n - 1}$$
This is the number of ways of placing $k$ identical objects in $n$ bins. It is also the number of ways of selecting $k$ objects from $n$ types of objects, if there are at least $k$ objects of each of the $n$ types.
Why is your attempt incorrect?
You did not take into account which machine exhibits which amount.
The number $5$ can be partitioned as follows:
begin{align*}
5 & = 5\
& = 4 + 1\
& = 3 + 2\
& = 3 + 1 + 1\
& = 2 + 2 + 1\
& = 2 + 1 + 1 + 1\
& = 1 + 1 + 1 + 1 + 1
end{align*}
One machine exhibits the number $5$: There are $7$ ways to select the machine that exhibits the number $5$, which you handled correctly.
One machine exhibits the number $4$ and a different machine exhibits the number $1$: There are $7$ ways to select the machine that exhibits the number $4$ and $6$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and a different machine exhibits the number $2$: There are $7$ ways to select the machine that exhibits the number $3$ and $2$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and two other machines each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $3$ and $binom{6}{2}$ ways to select which two of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{2} = 105$$
such cases.
Two machines each exhibit the number $2$ and another machine exhibits the number $1$: There are $binom{7}{2}$ ways to select the machines that exhibit the number $2$ and $5$ ways to select which of the remaining machines exhibits the number $1$. There are
$$binom{7}{2}binom{5}{1} = 105$$
such cases.
One machine exhibits the number $2$ and three other machines that each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $2$ and $binom{6}{3}$ ways to select which three of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{3} = 140$$
such cases.
Five machines each exhibit the number $1$: There are $$binom{7}{5} = 35$$ ways to select which five of the seven machines exhibit the number $1$, as you found.
Total: The number of ways the sum of the numbers exhibited by the seven machines could equal $5$ is
$$7 + 42 + 42 + 105 + 105 + 140 + 21 = 462$$
as we found above.
$endgroup$
add a comment |
Your Answer
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%2f2713648%2fcalculate-combinations-for-7-buckets-with-value-summing-to-5%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$
The numbers of all 7 machines sum to 5, so this is essentially asking the number of ways to sort 5 objects into 7 containers.
One way to do this is to add 6 dividers.
$$1st(container)|2nd|3rd|4th|5th|6th|7th$$
Each permutation of the 6 dividers and 5 objects(11 total) gives a different configuration. The number of ways to arrange 11 things is 11!. Since the order of the dividers do not matter, divide by 6!. If the objects are indistinguishable, then their order does not matter either, and divide by 5!.
$$frac{11!}{5!cdot 6!}=462$$
Take a look at a simpler example - arranging 3 objects into 2 boxes. In this case, only 1 divider is needed. Objects to the left of the divider belong to box 1, objects to the right in box 2. In all cases, the sum is 3.
$$***|$$
$$**|*$$
$$*|**$$
$$|***$$
$endgroup$
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
add a comment |
$begingroup$
The numbers of all 7 machines sum to 5, so this is essentially asking the number of ways to sort 5 objects into 7 containers.
One way to do this is to add 6 dividers.
$$1st(container)|2nd|3rd|4th|5th|6th|7th$$
Each permutation of the 6 dividers and 5 objects(11 total) gives a different configuration. The number of ways to arrange 11 things is 11!. Since the order of the dividers do not matter, divide by 6!. If the objects are indistinguishable, then their order does not matter either, and divide by 5!.
$$frac{11!}{5!cdot 6!}=462$$
Take a look at a simpler example - arranging 3 objects into 2 boxes. In this case, only 1 divider is needed. Objects to the left of the divider belong to box 1, objects to the right in box 2. In all cases, the sum is 3.
$$***|$$
$$**|*$$
$$*|**$$
$$|***$$
$endgroup$
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
add a comment |
$begingroup$
The numbers of all 7 machines sum to 5, so this is essentially asking the number of ways to sort 5 objects into 7 containers.
One way to do this is to add 6 dividers.
$$1st(container)|2nd|3rd|4th|5th|6th|7th$$
Each permutation of the 6 dividers and 5 objects(11 total) gives a different configuration. The number of ways to arrange 11 things is 11!. Since the order of the dividers do not matter, divide by 6!. If the objects are indistinguishable, then their order does not matter either, and divide by 5!.
$$frac{11!}{5!cdot 6!}=462$$
Take a look at a simpler example - arranging 3 objects into 2 boxes. In this case, only 1 divider is needed. Objects to the left of the divider belong to box 1, objects to the right in box 2. In all cases, the sum is 3.
$$***|$$
$$**|*$$
$$*|**$$
$$|***$$
$endgroup$
The numbers of all 7 machines sum to 5, so this is essentially asking the number of ways to sort 5 objects into 7 containers.
One way to do this is to add 6 dividers.
$$1st(container)|2nd|3rd|4th|5th|6th|7th$$
Each permutation of the 6 dividers and 5 objects(11 total) gives a different configuration. The number of ways to arrange 11 things is 11!. Since the order of the dividers do not matter, divide by 6!. If the objects are indistinguishable, then their order does not matter either, and divide by 5!.
$$frac{11!}{5!cdot 6!}=462$$
Take a look at a simpler example - arranging 3 objects into 2 boxes. In this case, only 1 divider is needed. Objects to the left of the divider belong to box 1, objects to the right in box 2. In all cases, the sum is 3.
$$***|$$
$$**|*$$
$$*|**$$
$$|***$$
edited Mar 29 '18 at 21:34
answered Mar 29 '18 at 18:12
Xiangyu ChenXiangyu Chen
4191417
4191417
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
add a comment |
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
only the combinations where the numbers sum to 5 matter. Does your solution still work?
$endgroup$
– eAndy
Mar 29 '18 at 19:50
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
$begingroup$
@eandy Yes, this solution is valid.
$endgroup$
– N. F. Taussig
Mar 30 '18 at 14:09
add a comment |
$begingroup$
Let $x_k$ be the nonnegative integer reported by machine $k$. Since the sum of the values reported by the machines is $5$, we seek the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 5$$
in the nonnegative integers. A particular solution corresponds to the placement of six addition signs in a row of five ones. For instance,
$$+ + 1 + + 1 1 1 + + 1$$
corresponds to the solution $x_1 = x_2 = 0$, $x_3 = 1$, $x_4 = 0$, $x_5 = 3$, $x_6 = 0$, $x_7 = 1$. The number of such solutions is the number of ways we can select which six of the eleven positions required for five ones and six addition signs will be filled with addition signs, which is
$$binom{5 + 6}{6} = binom{11}{6} = 462$$
In general, a particular solution of the equation
$$x_1 + x_2 + x_3 + cdots + x_n = k$$
in the nonnegative integers corresponds to the placement of $n - 1$ addition signs in a row of $k$ ones. The number of such solutions is the number of ways we can choose which $n - 1$ of the $n + k - 1$ positions required for $k$ ones and $n - 1$ addition signs will be filled with addition signs, which is
$$binom{n + k - 1}{n - 1}$$
This is the number of ways of placing $k$ identical objects in $n$ bins. It is also the number of ways of selecting $k$ objects from $n$ types of objects, if there are at least $k$ objects of each of the $n$ types.
Why is your attempt incorrect?
You did not take into account which machine exhibits which amount.
The number $5$ can be partitioned as follows:
begin{align*}
5 & = 5\
& = 4 + 1\
& = 3 + 2\
& = 3 + 1 + 1\
& = 2 + 2 + 1\
& = 2 + 1 + 1 + 1\
& = 1 + 1 + 1 + 1 + 1
end{align*}
One machine exhibits the number $5$: There are $7$ ways to select the machine that exhibits the number $5$, which you handled correctly.
One machine exhibits the number $4$ and a different machine exhibits the number $1$: There are $7$ ways to select the machine that exhibits the number $4$ and $6$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and a different machine exhibits the number $2$: There are $7$ ways to select the machine that exhibits the number $3$ and $2$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and two other machines each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $3$ and $binom{6}{2}$ ways to select which two of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{2} = 105$$
such cases.
Two machines each exhibit the number $2$ and another machine exhibits the number $1$: There are $binom{7}{2}$ ways to select the machines that exhibit the number $2$ and $5$ ways to select which of the remaining machines exhibits the number $1$. There are
$$binom{7}{2}binom{5}{1} = 105$$
such cases.
One machine exhibits the number $2$ and three other machines that each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $2$ and $binom{6}{3}$ ways to select which three of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{3} = 140$$
such cases.
Five machines each exhibit the number $1$: There are $$binom{7}{5} = 35$$ ways to select which five of the seven machines exhibit the number $1$, as you found.
Total: The number of ways the sum of the numbers exhibited by the seven machines could equal $5$ is
$$7 + 42 + 42 + 105 + 105 + 140 + 21 = 462$$
as we found above.
$endgroup$
add a comment |
$begingroup$
Let $x_k$ be the nonnegative integer reported by machine $k$. Since the sum of the values reported by the machines is $5$, we seek the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 5$$
in the nonnegative integers. A particular solution corresponds to the placement of six addition signs in a row of five ones. For instance,
$$+ + 1 + + 1 1 1 + + 1$$
corresponds to the solution $x_1 = x_2 = 0$, $x_3 = 1$, $x_4 = 0$, $x_5 = 3$, $x_6 = 0$, $x_7 = 1$. The number of such solutions is the number of ways we can select which six of the eleven positions required for five ones and six addition signs will be filled with addition signs, which is
$$binom{5 + 6}{6} = binom{11}{6} = 462$$
In general, a particular solution of the equation
$$x_1 + x_2 + x_3 + cdots + x_n = k$$
in the nonnegative integers corresponds to the placement of $n - 1$ addition signs in a row of $k$ ones. The number of such solutions is the number of ways we can choose which $n - 1$ of the $n + k - 1$ positions required for $k$ ones and $n - 1$ addition signs will be filled with addition signs, which is
$$binom{n + k - 1}{n - 1}$$
This is the number of ways of placing $k$ identical objects in $n$ bins. It is also the number of ways of selecting $k$ objects from $n$ types of objects, if there are at least $k$ objects of each of the $n$ types.
Why is your attempt incorrect?
You did not take into account which machine exhibits which amount.
The number $5$ can be partitioned as follows:
begin{align*}
5 & = 5\
& = 4 + 1\
& = 3 + 2\
& = 3 + 1 + 1\
& = 2 + 2 + 1\
& = 2 + 1 + 1 + 1\
& = 1 + 1 + 1 + 1 + 1
end{align*}
One machine exhibits the number $5$: There are $7$ ways to select the machine that exhibits the number $5$, which you handled correctly.
One machine exhibits the number $4$ and a different machine exhibits the number $1$: There are $7$ ways to select the machine that exhibits the number $4$ and $6$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and a different machine exhibits the number $2$: There are $7$ ways to select the machine that exhibits the number $3$ and $2$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and two other machines each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $3$ and $binom{6}{2}$ ways to select which two of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{2} = 105$$
such cases.
Two machines each exhibit the number $2$ and another machine exhibits the number $1$: There are $binom{7}{2}$ ways to select the machines that exhibit the number $2$ and $5$ ways to select which of the remaining machines exhibits the number $1$. There are
$$binom{7}{2}binom{5}{1} = 105$$
such cases.
One machine exhibits the number $2$ and three other machines that each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $2$ and $binom{6}{3}$ ways to select which three of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{3} = 140$$
such cases.
Five machines each exhibit the number $1$: There are $$binom{7}{5} = 35$$ ways to select which five of the seven machines exhibit the number $1$, as you found.
Total: The number of ways the sum of the numbers exhibited by the seven machines could equal $5$ is
$$7 + 42 + 42 + 105 + 105 + 140 + 21 = 462$$
as we found above.
$endgroup$
add a comment |
$begingroup$
Let $x_k$ be the nonnegative integer reported by machine $k$. Since the sum of the values reported by the machines is $5$, we seek the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 5$$
in the nonnegative integers. A particular solution corresponds to the placement of six addition signs in a row of five ones. For instance,
$$+ + 1 + + 1 1 1 + + 1$$
corresponds to the solution $x_1 = x_2 = 0$, $x_3 = 1$, $x_4 = 0$, $x_5 = 3$, $x_6 = 0$, $x_7 = 1$. The number of such solutions is the number of ways we can select which six of the eleven positions required for five ones and six addition signs will be filled with addition signs, which is
$$binom{5 + 6}{6} = binom{11}{6} = 462$$
In general, a particular solution of the equation
$$x_1 + x_2 + x_3 + cdots + x_n = k$$
in the nonnegative integers corresponds to the placement of $n - 1$ addition signs in a row of $k$ ones. The number of such solutions is the number of ways we can choose which $n - 1$ of the $n + k - 1$ positions required for $k$ ones and $n - 1$ addition signs will be filled with addition signs, which is
$$binom{n + k - 1}{n - 1}$$
This is the number of ways of placing $k$ identical objects in $n$ bins. It is also the number of ways of selecting $k$ objects from $n$ types of objects, if there are at least $k$ objects of each of the $n$ types.
Why is your attempt incorrect?
You did not take into account which machine exhibits which amount.
The number $5$ can be partitioned as follows:
begin{align*}
5 & = 5\
& = 4 + 1\
& = 3 + 2\
& = 3 + 1 + 1\
& = 2 + 2 + 1\
& = 2 + 1 + 1 + 1\
& = 1 + 1 + 1 + 1 + 1
end{align*}
One machine exhibits the number $5$: There are $7$ ways to select the machine that exhibits the number $5$, which you handled correctly.
One machine exhibits the number $4$ and a different machine exhibits the number $1$: There are $7$ ways to select the machine that exhibits the number $4$ and $6$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and a different machine exhibits the number $2$: There are $7$ ways to select the machine that exhibits the number $3$ and $2$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and two other machines each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $3$ and $binom{6}{2}$ ways to select which two of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{2} = 105$$
such cases.
Two machines each exhibit the number $2$ and another machine exhibits the number $1$: There are $binom{7}{2}$ ways to select the machines that exhibit the number $2$ and $5$ ways to select which of the remaining machines exhibits the number $1$. There are
$$binom{7}{2}binom{5}{1} = 105$$
such cases.
One machine exhibits the number $2$ and three other machines that each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $2$ and $binom{6}{3}$ ways to select which three of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{3} = 140$$
such cases.
Five machines each exhibit the number $1$: There are $$binom{7}{5} = 35$$ ways to select which five of the seven machines exhibit the number $1$, as you found.
Total: The number of ways the sum of the numbers exhibited by the seven machines could equal $5$ is
$$7 + 42 + 42 + 105 + 105 + 140 + 21 = 462$$
as we found above.
$endgroup$
Let $x_k$ be the nonnegative integer reported by machine $k$. Since the sum of the values reported by the machines is $5$, we seek the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 5$$
in the nonnegative integers. A particular solution corresponds to the placement of six addition signs in a row of five ones. For instance,
$$+ + 1 + + 1 1 1 + + 1$$
corresponds to the solution $x_1 = x_2 = 0$, $x_3 = 1$, $x_4 = 0$, $x_5 = 3$, $x_6 = 0$, $x_7 = 1$. The number of such solutions is the number of ways we can select which six of the eleven positions required for five ones and six addition signs will be filled with addition signs, which is
$$binom{5 + 6}{6} = binom{11}{6} = 462$$
In general, a particular solution of the equation
$$x_1 + x_2 + x_3 + cdots + x_n = k$$
in the nonnegative integers corresponds to the placement of $n - 1$ addition signs in a row of $k$ ones. The number of such solutions is the number of ways we can choose which $n - 1$ of the $n + k - 1$ positions required for $k$ ones and $n - 1$ addition signs will be filled with addition signs, which is
$$binom{n + k - 1}{n - 1}$$
This is the number of ways of placing $k$ identical objects in $n$ bins. It is also the number of ways of selecting $k$ objects from $n$ types of objects, if there are at least $k$ objects of each of the $n$ types.
Why is your attempt incorrect?
You did not take into account which machine exhibits which amount.
The number $5$ can be partitioned as follows:
begin{align*}
5 & = 5\
& = 4 + 1\
& = 3 + 2\
& = 3 + 1 + 1\
& = 2 + 2 + 1\
& = 2 + 1 + 1 + 1\
& = 1 + 1 + 1 + 1 + 1
end{align*}
One machine exhibits the number $5$: There are $7$ ways to select the machine that exhibits the number $5$, which you handled correctly.
One machine exhibits the number $4$ and a different machine exhibits the number $1$: There are $7$ ways to select the machine that exhibits the number $4$ and $6$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and a different machine exhibits the number $2$: There are $7$ ways to select the machine that exhibits the number $3$ and $2$ ways to select which of the remaining machines exhibits the number $1$. There are $7 cdot 6 = 42$ such cases.
One machine exhibits the number $3$ and two other machines each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $3$ and $binom{6}{2}$ ways to select which two of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{2} = 105$$
such cases.
Two machines each exhibit the number $2$ and another machine exhibits the number $1$: There are $binom{7}{2}$ ways to select the machines that exhibit the number $2$ and $5$ ways to select which of the remaining machines exhibits the number $1$. There are
$$binom{7}{2}binom{5}{1} = 105$$
such cases.
One machine exhibits the number $2$ and three other machines that each exhibit the number $1$: There are $7$ ways to select the machine that exhibits the number $2$ and $binom{6}{3}$ ways to select which three of the other six machines exhibit the number $1$. There are
$$binom{7}{1}binom{6}{3} = 140$$
such cases.
Five machines each exhibit the number $1$: There are $$binom{7}{5} = 35$$ ways to select which five of the seven machines exhibit the number $1$, as you found.
Total: The number of ways the sum of the numbers exhibited by the seven machines could equal $5$ is
$$7 + 42 + 42 + 105 + 105 + 140 + 21 = 462$$
as we found above.
answered Mar 30 '18 at 14:48
N. F. TaussigN. F. Taussig
45.3k103358
45.3k103358
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%2f2713648%2fcalculate-combinations-for-7-buckets-with-value-summing-to-5%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
1
$begingroup$
Note that for "2+3", you would be looking for P(7,2)=42 instead. The machine with 3 does not need to be behind the machine with 2.
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:25
1
$begingroup$
The number of combinations would be, respectively: 21,42,7,42,105,140,105
$endgroup$
– Xiangyu Chen
Mar 29 '18 at 21:34