Positive solution for linear Diophantine equations

  • Context: Undergrad 
  • Thread starter Thread starter pyfgcr
  • Start date Start date
  • Tags Tags
    Linear Positive
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 7K views
pyfgcr
Messages
22
Reaction score
0
The linear Diophantine equations: ax+by=c, a,b,c is natural numbers.
If c is a multiple of gcd(a,b), there is infinite integer solutions, and I know how to find x,y.
However, I wonder how to find positive integer solution x,y only.
 
Mathematics news on Phys.org
pyfgcr said:
The linear Diophantine equations: ax+by=c, a,b,c is natural numbers.
If c is a multiple of gcd(a,b), there is infinite integer solutions, and I know how to find x,y.
However, I wonder how to find positive integer solution x,y only.


They may not exists. For example, the equation [itex]\,7x+6y=5\,[/itex] cannot have positive solutions, but it has

solutions, like [itex]\,(5,-6)\,[/itex]

DonAntonio
 
Shouldn't that be (5,-5)?
 
Mensanator said:
Shouldn't that be (5,-5)?


Yes, you're right of course. Thanks.

DonAntonio
 
All solutions of the Diophantine equation ax+ by= c (assuming a, b, relatively prime) are of the form x= x0+ kb, y= y0- ka for k any integer. If you want both x and y positive, you must be able to choose k so that those are positive. Whether that is possible, of course, depends on a, b, x0, and y0.