It's well known you can find a solution to the linear Diophantine equation
in polynomial time using the Extended Euclidean Algorithm. But I haven't been able to find a clear answer for the complexity of finding a non-negative integer solution, that is, .
The unbounded knapsack problem is NP-complete, and this is the case where the weights and costs are equal, but I'm not sure that the NP-hardness reduction applies given that additional constraint.
I have also found a statement that the "multidimensional knapsack problem" is NP-hard even with a single row, which seems to match this, but I lack a copy of Papadimitriou and Steiglitz to verify that statement, and can't figure out the reduction.
If this problem is NP-hard, then I'm also interested in showing that a related problem is also NP-hard: if we have one non-negative solution, can we find a second one? I'm trying to answer a question about the special case .