How to Solve a Stars and Bars Discrete Math Problem

3.2k Views Asked by At

After a (not very successful) trick or treating round, Candice has 15 Tootsie rolls and 10 Twizzlers in her pillow case. Her mother asks her to share the loot with her three younger brothers. (A) How many different ways can she do this? (B) How many different ways can she do this after her Mother warns her to give at least one of each type of candies to each of her brothers?

2

There are 2 best solutions below

5
On

1) If there were only 15 items on type 1 without restrictions, all you need to do ot distribute among 4 people is to see that it is in fact just $\binom{17}{3}$ because there are 3 bars 2) I this case just subtract 3 from each type and repeat the calculations in 1)

2
On

Let's look at stars and bars first, with $15$ Tootsie rolls.
One way of distributing them to her $3$ brothers could be

$\Large\boxed.\boxed.\boxed.+\boxed.\boxed.\boxed.\boxed.\boxed.+\boxed.\boxed.\boxed.\boxed.\boxed.\boxed.\boxed.= 15$

The Tootsie rolls (n) are "stars" and the $+'s$ are "bars", and it should be clear that we can get all the ways to distribute by just deciding where to put the $+'s$, which can be done in $\binom{17}2$ ways.

Note for reference that the number of $+'s$ (bars) will always be $1$ less than the number of children (k), thus the generalised formula $\binom{n+k-1}{k-1}$


For part $1$, we distribute the two types separately (independently), and multiply, viz $\binom{17}{2}\binom{12}{2}$

For part $2$, we pre-distribute $3$ Tootsie rolls and $3$ Twizzlers, (one each) and distribute the balance using stars and bars, as before.