1

I have a problem with 6 variables, something like: $ai + bj + ck + dm + en + fo = g$ where $a-g$ are constants, positive integers (non-zero, not necessarily primes) and $i-o$ are variables, positive integers (including zero). I'd like to know if there is a more specific solution for this problem, than the Euclidean algorithm which can yield negative results?

inf3rno
  • 313
  • 1
  • 13
  • 2
    In order to solve$$ax+by=p$$for the values $x,y$ where $a,b,p$ are known you can apply the extended Euclidean algorithm. – Peter Foreman Mar 05 '20 at 22:57
  • 2
    There is a method for solving linear diophantine equations using 'Continued Fractions'. You can find it in any elementary number theory book having a chapter on continued fractions. – SARTHAK GUPTA Mar 08 '20 at 15:26
  • @SARTHAKGUPTA Thanks, I'll read about it. Do these solutions work for multiple variables? In my current case I have 6 tournament levels, which means 6 variables and 7 constants. – inf3rno Mar 08 '20 at 17:27
  • I have no idea whether it works for more than $2$ variables. – SARTHAK GUPTA Mar 08 '20 at 17:36
  • 1
    @SARTHAKGUPTA I found it meanwhile: https://math.stackexchange.com/a/145348/136773 It can be solved, though the solutions I get with it can be negative integers, but I need only positive integers, so maybe there are better algorithms for this specific case. I think I should rephrase my question. – inf3rno Mar 08 '20 at 17:46
  • 1
    @SARTHAKGUPTA Okay, I edited it, hopefully it is an easier read now for math experts. :-) – inf3rno Mar 08 '20 at 17:56
  • @inf3rno https://math.stackexchange.com/questions/3576060/how-to-solve-left-beginmatrix-x-1x-2x-3-cdotsx-k-phi-1-x-12x-23x

    See if this is helpful

    – SARTHAK GUPTA Mar 10 '20 at 21:19
  • @SARTHAKGUPTA It looks like a different problem, but I am not an expert. Thanks btw.! – inf3rno Mar 10 '20 at 22:29

0 Answers0