1
$\begingroup$

Find the number of solutions to the equation $x_1 + x_2 + x_3 + x_4 + x_5 = 22$, where $x_1, x_2, x_3, x_4$ and $x_5$ are non-negative integers, and $x_1+x_2 \leq 2$. (You may leave the answer as an expression consisting of binomial coefficients.) So I tried solving it and I think we need to consider the cases when $x_1+x_2$ is equal to $2$; when $x_1+x_2$ is equal to $1$ and so on.

$\endgroup$
  • 1
    $\begingroup$ Your thought is correct. You have three problems, one for each sum of $x1+x2$. Are you familiar with stars and bars? Search the site or Wikipedia for it. $\endgroup$ – Ross Millikan Aug 24 '18 at 5:22
  • $\begingroup$ Yes but the thing I want to know is is this using principle of inclusion and exclusion here.The answer is 24C2 +2*23C2 +3*22C2.I am not sure why they are multiplying by 2 and 3,Could you elaborate please. $\endgroup$ – Sparsh Aug 24 '18 at 5:33
  • $\begingroup$ I think I got it.Please let me know if my reasoning is correct.So $\endgroup$ – Sparsh Aug 24 '18 at 5:42
  • $\begingroup$ The answer you stated is correct. It is obtained by treating the cases $x_1 + x_2 = 0$, $x_1 + x_2 = 1$, and $x_1 + x_2 = 2$ separately, then adding the results. $\endgroup$ – N. F. Taussig Aug 24 '18 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.