A local mart sells 6 kinds of candy bar. You want to buy 15 candy bars. How many possibilities are there if you want more than 5 bars of any one of the kinds?
Is there any hint to solve this questions?
A local mart sells 6 kinds of candy bar. You want to buy 15 candy bars. How many possibilities are there if you want more than 5 bars of any one of the kinds?
Is there any hint to solve this questions?
This problem can be solved by using Stars and Bars combinatorial theorems. See also extended stars-and-bars problem(where the upper limit of the variable is bounded)
Let $x_i$ be the number of bars of kind $i$ with $i=1,\dots,6$. Note that there are at most $2$ kinds of candy bar with more than $5$ bars (because $3\cdot 6>15$).
Case 1: $\binom{6}1$ ways to choose a kind and, by Stars and Bars, $\binom{14}{5}$ non-negative integer solutions of $$y_1+x_2+x_3+x_4+x_5+x_6=15-6=9$$ with $y_1=x_1-6$.
Case 2: $\binom{6}2$ ways to choose the two kinds and, by Stars and Bars, $\binom{8}{5}$ non-negative integer solutions of $$y_1+y_2+x_3+x_4+x_5+x_6=15-6-6=3$$ with $y_1=x_1-6$, $y_2=x_2-6$.
Hence the final answer is $$\binom{6}1\binom{14}{5}-\binom{6}2\binom{8}{5}.$$