2

How many solutions are there for the inequation: $7 \le x_1 + x_2 + x_3 + x_4 \le 12$?

So I thought about counting solutions for $x_1 + x_2 + x_3 + x_4\le 12$ then, count solutions for $x_1 + x_2 + x_3 + x_4\le 7$ and then subtract.

I read somewhere that $x_1 + x_2 + x_3 + x_4 \le 12$ can be written as $x_1 + x_2 + x_3 + x_4 + x_5 = 12$ so number of solutions is ${12 + 4 \choose 4} = 1820$

Number of solutions for $x_1 + x_2 + x_3 + x_4 + x_5 = 7$ would be ${7 + 4 \choose 4} = 330$

Final answer: $1820 - 330 = 1490$

Is this correct?

1 Answers1

3

You should always make clear the types of your variables, as well as any restrictions. Readers shouldn't have to guess the intended meaning.

Assuming nonnegative integer variables, your approach is correct, but you have a minor error.

You want to subtract the solutions to $x_1+x_2+x_3+x_4 \le 6$, so you get $$ {\small{\binom{12+5-1}{5-1}}}-{\small{\binom{6+5-1}{5-1}}} = {\small{\binom{16}{4}}}-{\small{\binom{10}{4}}} =1820-210 =1610 $$ If the variables were specified as positive integers, you would get $$ {\small{\binom{13-1}{5-1}}}-{\small{\binom{7-1}{5-1}}} = {\small{\binom{12}{4}}}-{\small{\binom{6}{4}}} =495-15 =480 $$

quasi
  • 58,772