Stars and Bars vs PIE

559 Views Asked by At

I randomly made up this question so I could check:

There are $3$ kids and $6$ gifts, how many ways to distribute so that each kid has at least one gift.

Obviously,

$**|**|**$ there are $\binom{5}{2} = 10$ solutions by stars-and-bars.

PIE approach:

There are $3$ choices for each of the $6$ gifts $= 3^6$.

Let the kids be $ABC$, it is possible that $AB, BC, AC$ got all the gifts and one group didnt so:

$3^6 - 3(2^6)$

But then that also includes $A, B, C$ only getting the gifts (twice for each) so we add $3$.

$3^6 - 3(2^6) + 3 = 540$.

Obviously, the first one has to be correct, but why doesnt the second approach work?

2

There are 2 best solutions below

5
On BEST ANSWER

Because in the second version you treat the gifts as different and in the first version you treat them as equivalent.

0
On

Another way by PIE would be:

There are $3^6=729$ possibilities.

If one kid gets 6 gifts: 3 possibilities.

If one kid gets 5 gifts and another 1 gift: ${6 \choose 1}\times 6=36$ possibilities.

If one kid gets 4 gifts and another 2 gifts: ${6 \choose 2}\times 6=90$ possibilities.

If one kid gets 3 gifts and another 3 gifts: ${6 \choose 3}\times 3=60$ possibilities.

Therefore there remain $729-189=540$ possibilities.