1
$\begingroup$

I'm having a slight problem with a simple equation of the sort $a_1+a_2+a_3...=n$. Where $n,a_1, a_2, a_3... \in N$. I do know how to find the number of solutions to these equations when they are of the regular form. But if you apply a constraint, I'm unable to solve it.

$a_1+a_2+a_3+a_4+a_5+a_6=14$

The above equation has the constraints that all of them are whole numbers and that none of them are greater than 4. I need to find the number of solutions to the problem.

Could I please get some help regarding this problem?

Any help would be appreciated. Thank you.

$\endgroup$
1
$\begingroup$

HINT: Since you can solve the regular form substitute $a_i = b_i -1$ where $b_i \in \mathbb N$. It is in the 'regular' form now. What similar thing can you do to deal with the $a_i \le 4$ constraint?

$\endgroup$
  • $\begingroup$ Hmmm Nope, I don't get quite what you mean. I understand how to apply the constraint that $a_1$ should always be a positive integer ($a_1$ >= 1). But not that it should be lesser than some value. $\endgroup$ – nobody_nowhere Jan 11 '15 at 20:18
  • $\begingroup$ Substituting $a_i = b_i - 1$ would just complicate my problem, it'll change my equation to $b_1 + b_2 + b_3 + b_4 + b_5 + b_6 = 20$ but now, $b_i$ is $\leq$ 5 now. :/ I simply don't get it :/ $\endgroup$ – nobody_nowhere Jan 11 '15 at 20:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.