MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let n>3. Is there any way to generate all integer solutions of linear diophantine equation in n variables, or at least to determine number of such solutions?

Thanks in advance.

share|cite|improve this question
up vote 3 down vote accepted

The number of solutions is either zero or infinite. As for the ways to generate them, yes there are many ways. Look at Morris Newman's "Integer matrices", and check out "Hermite Normal Form".

share|cite|improve this answer
Say if $\sum_{i=1}^k a_ix_i = N$ is the equation with $gcd(a_i,a_j)=1$ if $i\neq j$, then if we seek solutions $x_i:0\leq x_i<a_i$, then is the solution unique? – Turbo Sep 14 '13 at 17:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.