# A question related to stars and bars method

I was reading this question on quora, number of ways to distribute 8 identical balls in 3 different boxes, none being empty, Kavita Chawdhary gave an excellent answer but I was thinking if I remove the condition none being empty then what the answer would be.

★ ★ ★ ★ ★ ★ | ★ | ★

There will be $$8$$ stars and the $$2$$ bars can go to any of the $$9$$ places because there is no restriction now. But it gives $$\binom{9}{2}$$. But it is not of course what stars bars algorithm says, $$\binom{n + k - 1}{n}$$. What am I getting wrong?

• There will be 8 stars and the 2 bars, so you have ten places and you get $\binom{10}{2}$ possibilities. Jul 1 at 14:43

You have reduced the problem to counting strings of $$n=8$$ stars and $$k-1=2$$ bars. There are actually 10 places that the bars can go, not 9, so $$\binom{10}{2}$$ options. This is equal to the $$\binom{n+k-1}{n}=\binom{10}{8}$$ by symmmetry of Pascal's triangle.
• I just wonder where is the $10th$ option Jul 1 at 14:45
• $_1 ★_2 ★_3 ★_4 ★_5 ★_6 ★_7 ★_8 ★_9$ Jul 1 at 14:51
• so it is it $_1 ★_2 ★_3 ★_4 ★_5 ★_6 ★_7 ★_8 \mid_9 ★_{10}$. Thanks Jul 1 at 14:58