Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

RE: Diophantic Equations with Constraints

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49483] RE: [mg49443] Diophantic Equations with Constraints
  • From: "Florian Jaccard" <florian.jaccard at eiaj.ch>
  • Date: Thu, 22 Jul 2004 02:44:47 -0400 (EDT)
  • Reply-to: <florian.jaccard at eiaj.ch>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello !

You can use Reduce :

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

Out[1]=
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

Greetings

F.Jaccard

-----Message d'origine-----
De : Michael S. [mailto:MikeSuesserott at t-online.de]
Envoyé : mar., 20. juillet 2004 13:54
À : mathgroup at smc.vnet.net
Objet : [mg49443] Diophantic Equations with Constraints


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




  • Prev by Date: Re: If-statement problems
  • Next by Date: Re: If-statement problems
  • Previous by thread: Re: Diophantic Equations with Constraints
  • Next by thread: nonparametric or robust regression code