0

For part a: 8 objects total

I tried 49 Choose 8 which is wrong

For part b: 14 objects total

For part c: 26 objects total

These two I did not know how to do because my process for part a is incorrect.

Jinzu
  • 819
  • (a) is a basic stars-and-bars problem; (b) and (c) will in addition require an inclusion-exclusion argument. The first link gives you a formula for solving (a) together with a decent explanation of where it comes from. – Brian M. Scott Oct 20 '13 at 01:54
  • How do you know when to use stars and bars? Why would I use stars and bars here and not $C_8^{49}$? – Jinzu Oct 20 '13 at 02:30
  • Why not $C_{49}^8$? Let choose 8 marbels of 27 identical. If they were pairwise different you really would have $C_{27}^8$ different combinations. But they are identical and obviously you have only one possible combination and it even doesn't matter how many of them there are (if there is enough number of them). – Smylic Oct 20 '13 at 03:25

2 Answers2

1

For the part a you can assume that you have infinite number of balls of each king and you need to find number of combinations with repetitions $\left(\!\!\binom{8}{3}\!\!\right) = \binom{8+3-1}{3-1} = \binom{10}{2} = 45$.

For the part b such assumption is incorrect, but if you choose $k$ golf balls then you should choose one of $\left(\!\!\binom{14-k}{2}\!\!\right) = \binom{14-k+2-1}{2-1} = 15-k$ combination of two other kinds. So the answer is $\sum_{k=0}^8 15-k = 9\cdot15 - \frac{8\cdot9}2 = 99$.

For the part c you can choose 0 to 8 golf balls and 0 to 14 ping pong balls and all the rest will be marbles. So we get $9 \cdot 15 = 135$ sets.

Smylic
  • 6,715
1

How do you know when to use stars and bars? Why would I use stars and bars here and not $C_8^{49}$?

There actually are $\binom{49}8$ different sets of $8$ objects that you could pick from this collection of $14$ identical ping pong balls, $8$ identical golf balls, and $27$ identical marbles. If you quoted the question exactly, your answer is literally correct, and the person who wrote the question didn’t ask what he or she intended to ask. Thanks to years of experience with the subject and the kinds of problems that are commonly used, I know that the intention was to ask in how many distinguishable ways $8$ of these objects can be chosen; the signal here is the word identical.

There are $\binom{14}3\binom82\binom{27}3$ ways to choose a set containing $3$ ping pong balls, $2$ golf balls, and $3$ marbles, but since we can’t tell one ping pong ball, golf ball, or marble from another, these $29,811,600$ sets of objects are indistinguishable and are supposed to be counted as just one way. In other words, we’re counting two sets as identical if they have the same number of objects of each type. In this sense a set of these objects is completely determined by the three numbers $n_p,n_g$, and $n_m$, the numbers of ping pong balls, golf balls, and marbles, respectively, in the set: two sets with the same values for those three numbers are considered identical and counted as just one way of choosing the objects.

We can therefore recast the problem: we want to count the number of solutions to the equation $$n_p+n_g+n_m=8\tag{1}$$ such that $n_p,n_g$, and $n_m$ are integers satisfying the inequalities $0\le n_p\le 14$, $0\le n_g\le 8$, and $0\le n_m\le 27$. In this case the upper limits of $14,8$, and $27$ are irrelevant: no solution of $(1)$ in non-negative integers violates any of those restrictions. Thus, for all practical purposes we’re just counting the solutions to $(1)$ in non-negative integers. This is an example of a basic stars-and-bars problem; the formula given (and reasonably well explained) at the link gives us the answer

$$\binom{8+3-1}{3-1}=\binom{10}2=45\;.$$

Similarly, the second problem was intended to ask for the number of distinguishable sets of $14$ items, which is the number of solutions to the equation

$$n_p+n_g+n_m=14\tag{2}$$

such that $n_p,n_g$, and $n_m$ are integers satisfying the inequalities $0\le n_p\le 14$, $0\le n_g\le 8$, and $0\le n_m\le 27$. This time one of the upper limits matters: $(2)$ has solutions in non-negative integers that violate the upper limit of $8$ on $n_g$. The trick here is to forget that limit for a moment, pretending that we actually have at least $14$ golf balls available, and get a preliminary total of

$$\binom{14+3-1}{3-1}=\binom{16}2$$

solutions. Some of these solutions, however, are inadmissible, since they involve taking more than $8$ golf balls; we’d like to count the inadmissible solutions and subtract them from the total.

Let $n_p'=n_p$, $n_g'=n_g-9$, and $n_m'=n_m$; if $\langle n_p,n_g,n_m\rangle$ is a solution to $(2)$ such that $0\le n_p\le 14$, $n_g\ge 9$ (and is therefore inadmissible), and $0\le n_m\le 27$, then $\langle n_p',n_g',n_m'\rangle$ is a solution in non-negative integers to

$$n_p'+n_g'+n_m'=5\;,\tag{3}$$

since $14-9=4$. Conversely, any solution to $(3)$ in non-negative integers becomes an inadmissible solution to $(2)$ when you add $9$ to $n_g'$. Thus, $(2)$ has

$$\binom{5+3-1}{3-1}=\binom72$$

inadmissible solutions, and the answer to (b) is therefore only

$$\binom{16}2-\binom72=120-21=99\;.$$

For (c) you’ll be counting integer solutions to

$$n_p+n_g+n_m=26\tag{3}$$

that satisfy the inequalities $0\le n_p\le 14$, $0\le n_g\le 8$, and $0\le n_m\le 27$, and you’ll have to work a bit harder to count the inadmissible solutions. The problem is that there are solutions to $(3)$ that violate the bound $n_p\le 14$ but neither of the other upper bounds; solutions that violate the bound $n_g\le 8$ but neither of the other upper bounds; and solutions that violate both the bound $n_p\le 14$ and the bound $n_g\le 8$. (The third upper bound cannot be violated, since we’re choosing only $26$ objects.) I’ve already illustrated most of the ideas that you need; the very first sentence of the Wikipedia article on the inclusion-exclusion principle is the one missing piece.

Brian M. Scott
  • 616,228