       Re: Diophantic Equations with Constraints

• To: mathgroup at smc.vnet.net
• Subject: [mg49462] Re: Diophantic Equations with Constraints
• From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
• Date: Wed, 21 Jul 2004 06:39:22 -0400 (EDT)
• References: <cdj1t2\$nbi\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```"Michael S." <MikeSuesserott at t-online.de> wrote:
> given an equation like
>
>         3x + 2y - z == 14
> 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?

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

Out=
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

David Cantrell

```

• Prev by Date: RE: Diophantic Equations with Constraints
• Next by Date: AW: 3D graphs with constraints
• Previous by thread: RE: Diophantic Equations with Constraints
• Next by thread: Re: Diophantic Equations with Constraints