Number of positive integral solution of $\sum_{i=1}^{10} x_i=30,\text{ where } 0 < x_i<7, \forall 1\le i\le 10$

62 Views Asked by At

I want to find the number of positive integer solutions of the equations given by $$\sum_{i=1}^{10} x_i=30,\text{ where } 0 < x_i<7, \forall 1\le i\le 10.$$ I know the case that, for any pair of positive integers $n$ and $k$, the number of distinct $k$-tuples of positive integers whose sum is $n$ is given by the binomial coefficient ${n-1}\choose {k-1}$.
But, in my case there is a restriction of solutions that, for all $i$ we must have $0<x_i<7$, where $x_i$ are positive integers. Please help me to solve this. Thank you.

2

There are 2 best solutions below

1
On

Following my comment, you can use Principle of Inclusion Exclusion. First find all ways (no upper bound on $x_i$), then subtract off number of ways given $x_1 > 5,$ given $x_2 > 5, \dots,$ given $x_{10} > 5,$ then add back number of ways given $x_i, x_j > 5$ for every $\{i, j\},$ then subtract off number of ways given $x_i, x_j, x_k > 5,$ you get the idea.

7
On

Computing $(x+x^2+x^3+x^4+x^5+x^6)^{10}$ with Wolfram gives a coefficient of $2930455$ to $x^{30}$.