Number of unique ways to select $3$ balls from $4$ red balls, $2$ green balls and $1$ blue ball
up vote
1
down vote
favorite
Suppose there is a jar with $7$ balls: $4$ red, $2$ green and $1$ blue.
In how many unique ways can we choose $3$ balls?
Just by considering all the possibilities, I found out the answer is $6$. Namely:
- red, red, red
- red, red, green
- red, red, blue
- green, green, red
- green, green, blue
- blue, green, red
I was wondering if it is possible to express the solution in terms of the amount of different colors (in this case $3$) and the quantity per color. (in this case $4$, $2$ and $1$)
combinatorics
New contributor
|
show 2 more comments
up vote
1
down vote
favorite
Suppose there is a jar with $7$ balls: $4$ red, $2$ green and $1$ blue.
In how many unique ways can we choose $3$ balls?
Just by considering all the possibilities, I found out the answer is $6$. Namely:
- red, red, red
- red, red, green
- red, red, blue
- green, green, red
- green, green, blue
- blue, green, red
I was wondering if it is possible to express the solution in terms of the amount of different colors (in this case $3$) and the quantity per color. (in this case $4$, $2$ and $1$)
combinatorics
New contributor
It is possible. That said, for the given numbers, simply listing the possibilities is probably the most efficient method.
– N. F. Taussig
Nov 16 at 18:20
Another way to look at it is : Let $x_1,x_2,x_3$ be the number of red, green and blue balls respectively. You wish to find all possible solutions to $x_1+x_2+x_3=3$ such that $0leq x_1leq 4, 0leq x_2leq 2, 0leq x_3leq 1$. By the way your answer is $^7C_3$ I guess.
– Yadati Kiran
Nov 16 at 18:22
One might also think of this as a sample problem for counting the number of contingency tables with two rows and three columns having prescribed marginal sums. Even for two rows but arbitrarily many columns such counting problems have been shown to be NP hard.
– hardmath
Nov 16 at 18:25
@YadatiKiran $binom{7}{3}$ is an answer to a related but different question where the balls were all distinctly labeled. Here, presumably, the red balls are all identical, etc... Your rephrasing of the question however is correct, but the method of solution would likely either involve brute force, or inclusion-exclusion with stars and bars which is likely just as tedious as brute force here.
– JMoravitz
Nov 16 at 18:35
An alternate solution, which if you have access to computer software is easy to implement for reasonable numbers (but is practically brute force in disguise) is to look at the coefficient of $x^3$ in the expansion of $(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)$.
– JMoravitz
Nov 16 at 18:37
|
show 2 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Suppose there is a jar with $7$ balls: $4$ red, $2$ green and $1$ blue.
In how many unique ways can we choose $3$ balls?
Just by considering all the possibilities, I found out the answer is $6$. Namely:
- red, red, red
- red, red, green
- red, red, blue
- green, green, red
- green, green, blue
- blue, green, red
I was wondering if it is possible to express the solution in terms of the amount of different colors (in this case $3$) and the quantity per color. (in this case $4$, $2$ and $1$)
combinatorics
New contributor
Suppose there is a jar with $7$ balls: $4$ red, $2$ green and $1$ blue.
In how many unique ways can we choose $3$ balls?
Just by considering all the possibilities, I found out the answer is $6$. Namely:
- red, red, red
- red, red, green
- red, red, blue
- green, green, red
- green, green, blue
- blue, green, red
I was wondering if it is possible to express the solution in terms of the amount of different colors (in this case $3$) and the quantity per color. (in this case $4$, $2$ and $1$)
combinatorics
combinatorics
New contributor
New contributor
edited Nov 16 at 18:18
N. F. Taussig
42.4k93254
42.4k93254
New contributor
asked Nov 16 at 18:13
Whebon
82
82
New contributor
New contributor
It is possible. That said, for the given numbers, simply listing the possibilities is probably the most efficient method.
– N. F. Taussig
Nov 16 at 18:20
Another way to look at it is : Let $x_1,x_2,x_3$ be the number of red, green and blue balls respectively. You wish to find all possible solutions to $x_1+x_2+x_3=3$ such that $0leq x_1leq 4, 0leq x_2leq 2, 0leq x_3leq 1$. By the way your answer is $^7C_3$ I guess.
– Yadati Kiran
Nov 16 at 18:22
One might also think of this as a sample problem for counting the number of contingency tables with two rows and three columns having prescribed marginal sums. Even for two rows but arbitrarily many columns such counting problems have been shown to be NP hard.
– hardmath
Nov 16 at 18:25
@YadatiKiran $binom{7}{3}$ is an answer to a related but different question where the balls were all distinctly labeled. Here, presumably, the red balls are all identical, etc... Your rephrasing of the question however is correct, but the method of solution would likely either involve brute force, or inclusion-exclusion with stars and bars which is likely just as tedious as brute force here.
– JMoravitz
Nov 16 at 18:35
An alternate solution, which if you have access to computer software is easy to implement for reasonable numbers (but is practically brute force in disguise) is to look at the coefficient of $x^3$ in the expansion of $(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)$.
– JMoravitz
Nov 16 at 18:37
|
show 2 more comments
It is possible. That said, for the given numbers, simply listing the possibilities is probably the most efficient method.
– N. F. Taussig
Nov 16 at 18:20
Another way to look at it is : Let $x_1,x_2,x_3$ be the number of red, green and blue balls respectively. You wish to find all possible solutions to $x_1+x_2+x_3=3$ such that $0leq x_1leq 4, 0leq x_2leq 2, 0leq x_3leq 1$. By the way your answer is $^7C_3$ I guess.
– Yadati Kiran
Nov 16 at 18:22
One might also think of this as a sample problem for counting the number of contingency tables with two rows and three columns having prescribed marginal sums. Even for two rows but arbitrarily many columns such counting problems have been shown to be NP hard.
– hardmath
Nov 16 at 18:25
@YadatiKiran $binom{7}{3}$ is an answer to a related but different question where the balls were all distinctly labeled. Here, presumably, the red balls are all identical, etc... Your rephrasing of the question however is correct, but the method of solution would likely either involve brute force, or inclusion-exclusion with stars and bars which is likely just as tedious as brute force here.
– JMoravitz
Nov 16 at 18:35
An alternate solution, which if you have access to computer software is easy to implement for reasonable numbers (but is practically brute force in disguise) is to look at the coefficient of $x^3$ in the expansion of $(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)$.
– JMoravitz
Nov 16 at 18:37
It is possible. That said, for the given numbers, simply listing the possibilities is probably the most efficient method.
– N. F. Taussig
Nov 16 at 18:20
It is possible. That said, for the given numbers, simply listing the possibilities is probably the most efficient method.
– N. F. Taussig
Nov 16 at 18:20
Another way to look at it is : Let $x_1,x_2,x_3$ be the number of red, green and blue balls respectively. You wish to find all possible solutions to $x_1+x_2+x_3=3$ such that $0leq x_1leq 4, 0leq x_2leq 2, 0leq x_3leq 1$. By the way your answer is $^7C_3$ I guess.
– Yadati Kiran
Nov 16 at 18:22
Another way to look at it is : Let $x_1,x_2,x_3$ be the number of red, green and blue balls respectively. You wish to find all possible solutions to $x_1+x_2+x_3=3$ such that $0leq x_1leq 4, 0leq x_2leq 2, 0leq x_3leq 1$. By the way your answer is $^7C_3$ I guess.
– Yadati Kiran
Nov 16 at 18:22
One might also think of this as a sample problem for counting the number of contingency tables with two rows and three columns having prescribed marginal sums. Even for two rows but arbitrarily many columns such counting problems have been shown to be NP hard.
– hardmath
Nov 16 at 18:25
One might also think of this as a sample problem for counting the number of contingency tables with two rows and three columns having prescribed marginal sums. Even for two rows but arbitrarily many columns such counting problems have been shown to be NP hard.
– hardmath
Nov 16 at 18:25
@YadatiKiran $binom{7}{3}$ is an answer to a related but different question where the balls were all distinctly labeled. Here, presumably, the red balls are all identical, etc... Your rephrasing of the question however is correct, but the method of solution would likely either involve brute force, or inclusion-exclusion with stars and bars which is likely just as tedious as brute force here.
– JMoravitz
Nov 16 at 18:35
@YadatiKiran $binom{7}{3}$ is an answer to a related but different question where the balls were all distinctly labeled. Here, presumably, the red balls are all identical, etc... Your rephrasing of the question however is correct, but the method of solution would likely either involve brute force, or inclusion-exclusion with stars and bars which is likely just as tedious as brute force here.
– JMoravitz
Nov 16 at 18:35
An alternate solution, which if you have access to computer software is easy to implement for reasonable numbers (but is practically brute force in disguise) is to look at the coefficient of $x^3$ in the expansion of $(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)$.
– JMoravitz
Nov 16 at 18:37
An alternate solution, which if you have access to computer software is easy to implement for reasonable numbers (but is practically brute force in disguise) is to look at the coefficient of $x^3$ in the expansion of $(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)$.
– JMoravitz
Nov 16 at 18:37
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Consider the polynomial
$$eqalign{p(x)&:=(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)cr &=(1-x^5)(1-x^3)(1-x^2)(1-x)^{-3}cr &=(1-x^5)(1-x^3)(1-x^2)sum_{kgeq0}{2+kchoose k}x^k .cr}tag{1}$$
For each admissible choice of $rin[0 .. 4]$ red balls, $gin[0 .. 2]$ green balls, and $bin[0 .. 1]$ blue balls the expansion of this polynomial creates a term $x^r,x^g,x^b=x^{r+g+b}$. Now we want $r+g+b=3$. It follows that we have to extract $N:={rm coeff}[x^3]$ on the last line of $(1)$. Since
$$(1-x^5)(1-x^3)(1-x^2)=1-x^2-x^3+{rm higher terms}$$
it follows that
$$N={2+3choose3}-{2+1choose1}-{2+0choose0}=6 .$$
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Consider the polynomial
$$eqalign{p(x)&:=(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)cr &=(1-x^5)(1-x^3)(1-x^2)(1-x)^{-3}cr &=(1-x^5)(1-x^3)(1-x^2)sum_{kgeq0}{2+kchoose k}x^k .cr}tag{1}$$
For each admissible choice of $rin[0 .. 4]$ red balls, $gin[0 .. 2]$ green balls, and $bin[0 .. 1]$ blue balls the expansion of this polynomial creates a term $x^r,x^g,x^b=x^{r+g+b}$. Now we want $r+g+b=3$. It follows that we have to extract $N:={rm coeff}[x^3]$ on the last line of $(1)$. Since
$$(1-x^5)(1-x^3)(1-x^2)=1-x^2-x^3+{rm higher terms}$$
it follows that
$$N={2+3choose3}-{2+1choose1}-{2+0choose0}=6 .$$
add a comment |
up vote
0
down vote
accepted
Consider the polynomial
$$eqalign{p(x)&:=(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)cr &=(1-x^5)(1-x^3)(1-x^2)(1-x)^{-3}cr &=(1-x^5)(1-x^3)(1-x^2)sum_{kgeq0}{2+kchoose k}x^k .cr}tag{1}$$
For each admissible choice of $rin[0 .. 4]$ red balls, $gin[0 .. 2]$ green balls, and $bin[0 .. 1]$ blue balls the expansion of this polynomial creates a term $x^r,x^g,x^b=x^{r+g+b}$. Now we want $r+g+b=3$. It follows that we have to extract $N:={rm coeff}[x^3]$ on the last line of $(1)$. Since
$$(1-x^5)(1-x^3)(1-x^2)=1-x^2-x^3+{rm higher terms}$$
it follows that
$$N={2+3choose3}-{2+1choose1}-{2+0choose0}=6 .$$
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Consider the polynomial
$$eqalign{p(x)&:=(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)cr &=(1-x^5)(1-x^3)(1-x^2)(1-x)^{-3}cr &=(1-x^5)(1-x^3)(1-x^2)sum_{kgeq0}{2+kchoose k}x^k .cr}tag{1}$$
For each admissible choice of $rin[0 .. 4]$ red balls, $gin[0 .. 2]$ green balls, and $bin[0 .. 1]$ blue balls the expansion of this polynomial creates a term $x^r,x^g,x^b=x^{r+g+b}$. Now we want $r+g+b=3$. It follows that we have to extract $N:={rm coeff}[x^3]$ on the last line of $(1)$. Since
$$(1-x^5)(1-x^3)(1-x^2)=1-x^2-x^3+{rm higher terms}$$
it follows that
$$N={2+3choose3}-{2+1choose1}-{2+0choose0}=6 .$$
Consider the polynomial
$$eqalign{p(x)&:=(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)cr &=(1-x^5)(1-x^3)(1-x^2)(1-x)^{-3}cr &=(1-x^5)(1-x^3)(1-x^2)sum_{kgeq0}{2+kchoose k}x^k .cr}tag{1}$$
For each admissible choice of $rin[0 .. 4]$ red balls, $gin[0 .. 2]$ green balls, and $bin[0 .. 1]$ blue balls the expansion of this polynomial creates a term $x^r,x^g,x^b=x^{r+g+b}$. Now we want $r+g+b=3$. It follows that we have to extract $N:={rm coeff}[x^3]$ on the last line of $(1)$. Since
$$(1-x^5)(1-x^3)(1-x^2)=1-x^2-x^3+{rm higher terms}$$
it follows that
$$N={2+3choose3}-{2+1choose1}-{2+0choose0}=6 .$$
answered Nov 16 at 18:53
Christian Blatter
170k7111324
170k7111324
add a comment |
add a comment |
Whebon is a new contributor. Be nice, and check out our Code of Conduct.
Whebon is a new contributor. Be nice, and check out our Code of Conduct.
Whebon is a new contributor. Be nice, and check out our Code of Conduct.
Whebon is a new contributor. Be nice, and check out our Code of Conduct.
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%2f3001464%2fnumber-of-unique-ways-to-select-3-balls-from-4-red-balls-2-green-balls-an%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
It is possible. That said, for the given numbers, simply listing the possibilities is probably the most efficient method.
– N. F. Taussig
Nov 16 at 18:20
Another way to look at it is : Let $x_1,x_2,x_3$ be the number of red, green and blue balls respectively. You wish to find all possible solutions to $x_1+x_2+x_3=3$ such that $0leq x_1leq 4, 0leq x_2leq 2, 0leq x_3leq 1$. By the way your answer is $^7C_3$ I guess.
– Yadati Kiran
Nov 16 at 18:22
One might also think of this as a sample problem for counting the number of contingency tables with two rows and three columns having prescribed marginal sums. Even for two rows but arbitrarily many columns such counting problems have been shown to be NP hard.
– hardmath
Nov 16 at 18:25
@YadatiKiran $binom{7}{3}$ is an answer to a related but different question where the balls were all distinctly labeled. Here, presumably, the red balls are all identical, etc... Your rephrasing of the question however is correct, but the method of solution would likely either involve brute force, or inclusion-exclusion with stars and bars which is likely just as tedious as brute force here.
– JMoravitz
Nov 16 at 18:35
An alternate solution, which if you have access to computer software is easy to implement for reasonable numbers (but is practically brute force in disguise) is to look at the coefficient of $x^3$ in the expansion of $(1+x+x^2+x^3+x^4)(1+x+x^2)(1+x)$.
– JMoravitz
Nov 16 at 18:37