What is the number of solutions of a linear equation? for example look at this equation:
$X_1+X_2+...+X_n=r$
The number of solutions is the following formula, because the way of choosing $r$ objects from $n$ distinct objects when repetition is allowed is going to be this formula
$C(n+r-1,r)$
Now what about this equation
$2X_1+4X_2+X_3=24$
What is the number of solutions?$X_i$ is non negative integer
However, if the coefficients can be arbitrary, I'm pretty sure even finding out whether it has a solution is NP complete.
– Irvan Oct 18 '14 at 13:53