How many solutions for equation $x_1+x_2+x_3+x_4+x_5=15$ have exactly two variables equal to 1? ($x_i \ge 1 $)
Hint: think about splitting 15 beans among 5 children, considering the restrictions.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityHow many solutions for equation $x_1+x_2+x_3+x_4+x_5=15$ have exactly two variables equal to 1? ($x_i \ge 1 $)
Hint: think about splitting 15 beans among 5 children, considering the restrictions.
Step 1: Give 1 bean to each children. There is $1$ way to do this.
Step 2: Choose two of the children and tell them to go home. There are $\binom 52=10$ ways to do this.
Step 3: Give 1 bean to each children left. There is $1$ way to do this. You have $7$ beans left.
Step 4: Distribute at will the beans. This is a bars and stars problem. There are $\binom 92=36$ ways to do this.
Result: $10\cdot 36=360$.
Further HINT: There are $\binom52$ ways to choose two of the children to receive one bean each. Once they’ve been chosen, you have $13$ beans to distribute amongst three children in such a way that each child receives at least $2$ beans. There are as many ways to do that as there are to distribute $10$ beans amongst $3$ children so that each child gets at least one bean.
Step 1: Give 1 bean each to any two children and send them home.[${5\choose 2}$ = 10 ways.]
Step 2: Give 2 beans each to the remaining 3 children. 7 beans now remain.
Step 3: Distribute the remaining 7 beans among 3 children any way using "stars and bars" in ${9\choose 2}$ = 36 ways
Result: 10*36 = 360
Subtract $1$ from each variable, so the restriction is $x_i \ge 0$ and $\sum x_i = 10$. You can select the two variables getting value $0$ in $\binom{5}{2}$ ways, for the other three stars-and-bars tells you there are $\binom{10 + 3 - 1}{3 - 1}$ ways of solving the equation, for a total of:
$$ \binom{5}{2} \cdot \binom{10 + 3 - 1}{3 - 1} = 660 $$
solutions.