1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Positive solution for linear Diophantine equations

  1. Nov 27, 2012 #1
    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.
     
  2. jcsd
  3. Nov 27, 2012 #2

    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
     
  4. Nov 29, 2012 #3
    Shouldn't that be (5,-5)?
     
  5. Nov 29, 2012 #4

    Yes, you're right of course. Thanks.

    DonAntonio
     
  6. Nov 29, 2012 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    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 postive. Whether that is possible, of course, depends on a, b, x0, and y0.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Positive solution for linear Diophantine equations
  1. Diophantine Equations (Replies: 3)

  2. Diophantine Equations (Replies: 10)

Loading...