Re: Diophantic Equations with Constraints

*To*: mathgroup at smc.vnet.net*Subject*: [mg49457] Re: [mg49444] Diophantic Equations with Constraints*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Wed, 21 Jul 2004 06:39:17 -0400 (EDT)*References*: <200407201153.HAA23713@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

On 20 Jul 2004, at 20:53, Michael S. wrote: > *This message was transferred with a trial version of CommuniGate(tm) > Pro* > The equation should read > > 3x + 2y - z == 14 (not 148) > > Anyway, it's the principle of the thing I'd be interested in. > > Thanks, > > Michael > With the new equation we get: Reduce[{3*x + 2*y - z == 14, 3 <= x <= 8, 0 <= y <= 12, 1 <= z <= 9}, {x, y, z}, Integers] y == 0 && z == 1 && x == 5 || y == 0 && z == 4 && x == 6 || y == 0 && z == 7 && x == 7 || y == 1 && z == 3 && x == 5 || y == 1 && z == 6 && x == 6 || y == 1 && z == 9 && x == 7 || y == 2 && z == 2 && x == 4 || y == 2 && z == 5 && x == 5 || y == 2 && z == 8 && x == 6 || y == 3 && z == 1 && x == 3 || y == 3 && z == 4 && x == 4 || y == 3 && z == 7 && x == 5 || y == 4 && z == 3 && x == 3 || y == 4 && z == 6 && x == 4 || y == 4 && z == 9 && x == 5 || y == 5 && z == 5 && x == 3 || y == 5 && z == 8 && x == 4 || y == 6 && z == 7 && x == 3 || y == 7 && z == 9 && x == 3 and NMinimize[{Abs[3*x + 2*y - z - 14], 3 <= x <= 8 && 0 <= y <= 12 && 1 <= z <= 9 && (x | y | z) $B":(B Integers}, {x, y, z}] {0., {x -> 5, y -> 0, z -> 1}} NMinimize normally just finds one solution and it turns out to be the first one returned by Reduce. Andrzej Kozlowski Chiba, Japan http://www.mimuw.edu.pl/~akoz/

**References**:**Diophantic Equations with Constraints***From:*"Michael S." <MikeSuesserott@t-online.de>