# Number of integer solutions to a strict inequality

$$x_1+x_2+x_3+x_4+x_5+x_6<538|x_i>0$$ The inequality is strict. Apparently, there are $$\binom{537}{6}$$ solutions to this after adding a new variable, $$x_7$$, that serves as a balance. Could someone walk me through this step-by-step? I realize that, if the inequality is strict, then $$x_7 > 0$$. I'm confused about the logic of counting the number of integer solutions.

• Look up stars and bars and search for that on this site. – Ross Millikan Sep 8 '20 at 14:12
• @RossMillikan Thanks for the guidance. I posted an answer – elbecker Sep 8 '20 at 14:26

Imagine 538 placeholder spaces to put an object. First add a balance variable $$x_7$$ to make an equality. $$x_1+x_2+x_3+x_4+x_5+x_6+x_7=538|x_7>0$$ The restriction on this variable is that $$x_7>0$$ for the equality and original strict inequality to hold true. Now distribute 1 object each to variables $${x_1...x_7}$$ due to the restriction that $$x_i>0$$. This leaves 531 objects to distribute among 7 variables. There are 6 dividers to partition the set into 7 parts, which means there are $$531+6=537$$ placeholders for either a divider or an object. The answer is therefore $$537\choose{6}$$.
• $x_7$ $\ge 0$, your answer is wrong – user800216 Sep 8 '20 at 16:33
• what you missed is that $x_7$ does not have to be strict – user800216 Sep 8 '20 at 16:50
• @elbecker: When you force $x_y$ to be positive and require that $x_1+\ldots+x_7=538$, you’re forcing $x_1+\ldots+x_6$ to be strictly less than $538$, thereby eliminating the solutions in which $x_1+\ldots+x_6=538$. You need to replace $538$ by $539$ if you want to require that $x_7$ be positive. Then your approach works and is at least arguably slightly simpler than elbecker’s. – Brian M. Scott Sep 8 '20 at 16:51