0
$\begingroup$

I have a equation where $x_1 + x_2 + x_3 = c$ for some constant $c$ and we have a condition that each $x_i \leq k_i$, where all $k_i$ are different. My question is how do we find the number of positive integral solutions? (Methods without using binomial coeffs preferable as we aren't taught that yet)

$\endgroup$

1 Answer 1

0
$\begingroup$

The condition $x_1 + x_2 + x_3 = c$ with all $x_i$ positive has a solution set that is a triangle in $\mathbb{Z}^3$ with edge $c-2$. So it's easy enough to find out how many solutions are in the triangle. Each $x_i \leq k_i$ condition cuts off a tip of this triangle, each of which is a smaller triangle. So find the number of points in each smaller triangle and subtract them from the number of points in the larger triangle.

It can be helpful to note that the number of points in a triangle of edge $n$ is $\frac{n(n+1)}{2}$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .