MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Diophantic Equations with Constraints

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49456] Re: [mg49443] Diophantic Equations with Constraints
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 21 Jul 2004 06:39:16 -0400 (EDT)
  • References: <200407201153.HAA23709@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*
> Hi group,
>
> given an equation like
>
> 	3x + 2y - z == 148
> with
> x in Range[3,8],
> y in Range[0,12],
> z in Range[1,9],
>
> what would be the best way to solve this?
>
> Thanks and best regards,
>
> Michael
>
>

Trying the simplest way:


Reduce[{3*x + 2*y - z == 148, 3 <= x <= 8, 0 <= y <= 12,
    1 <= z <= 9}, {x, y, z}, Integers]


False

No solutions.
Just to confirm this here is another approach:


NMinimize[{Abs[3*x + 2*y - z - 148],
    3 <= x <= 8 && 0 <= y <= 12 && 1 <= z <= 9 &&
     (x | y | z) $B":(B Integers}, {x, y, z}]


{101., {x -> 8, y -> 12, z -> 1}}



Andrzej Kozlowski
Chiba, Japan
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: Re: Diophantic Equations with Constraints
  • Next by Date: Re: Diophantic Equations with Constraints
  • Previous by thread: Re: Diophantic Equations with Constraints
  • Next by thread: Re: Diophantic Equations with Constraints