Skip to main content
edited title
Link
user39115
  • 1.8k
  • 2
  • 18
  • 26

Complexity of an algorithm to solve somelinear diophantine equations

Source Link
user39115
  • 1.8k
  • 2
  • 18
  • 26

Complexity of an algorithm to solve some diophantine equations

A friend of mine ask me yesterday a problem, however, the interesting part for me it is not his problem, but what I will ask here.

I want to know the optimal complexity of an algorithm (I mean the complexity of the more efficient algorithm) that solves the following problem:

Input: $n\in \mathbb N, h\in \mathbb N, (a_1,\ldots,a_n)\in \mathbb N^n.$

Output: Cardinality of the set $\{(j_1,\ldots,j_n)\in \mathbb N^n:\sum_{i=1}^n j_i a_i=h\}.$

Hope the question does make sense.