Integer solutions in an equation

68 Views Asked by At

Find how many integer solutions has the equation

$$1.\ \ x_1 + x_2 + x_3 = 100;\ x_1 ≥ 0;\ x_2 ≥ 0;\ x_3 ≥ 0;$$

$$2.\ \ x_1 + x_2 + x_3 = 100;\ x_1 ≥ 0;\ x_2 ≥ 30;\ 10 ≤ x_3 ≤ 20.$$

1

There are 1 best solutions below

0
On BEST ANSWER

For the first problem, refer this

Using the method mentioned above I am going to outline how you may approach the problem.

First give $30$ coins to to $x_2$ and $10$ coins to $x_3$. Now you have $60$ coins left. Find the NNIS (Non-negative integral solutions) to $$x_1+x_2'+x_3'=60$$

This gives you the cases where $x_1\geq0,x_2\geq30,x_3\geq10$

This also contains the cases where $x_3$ gets more than $20$ coins. So we need to calculate the unfavourable cases to subtract them from the total cases to get the answer. The unfavorable cases will be when $x_3$ gets $21$ or more coins. Evidently, the NNIS of $$x_1+x_2'+x_3''=49$$ Represents those cases.

Finally, Total cases - Unfavourable cases = Favourable Cases