Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Solve - takes very long time

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121804] Solve - takes very long time
  • From: Fredob <fredrik.doberl at gmail.com>
  • Date: Mon, 3 Oct 2011 04:21:54 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi,

I tried the following on Mathematica 8 and it doesn't seem to stop
running (waited 40 minutes on a 2.6 Ghz processor w 6 GB of primary
memory).

Solve[
 {100*Subscript[x, 2] + 10*Subscript[x, 1] + Subscript[x, 0] +
    100*Subscript[y, 2] + 10*Subscript[y, 1] + Subscript[y, 0] ==
   100*Subscript[z, 2] + 10*Subscript[z, 1] + Subscript[z, 0],
   Subscript[x, 0] > 0, Subscript[y, 0] > 0, Subscript[z, 0] > 0,
  Subscript[x, 1] > 0, Subscript[y, 1] > 0, Subscript[z, 1] > 0,
  Subscript[x, 2] > 0, Subscript[y, 2] > 0, Subscript[z, 2] > 0,
  Subscript[x, 0] <= 9, Subscript[y, 0] <= 9, Subscript[z, 0] <= 9,
  Subscript[x, 1] <= 9, Subscript[y, 1] <= 9, Subscript[z, 1] <= 9,
  Subscript[x, 2] <= 9, Subscript[y, 2] <= 9, Subscript[z, 2] <= 9,
  Subscript[x, 0] != Subscript[y, 0] != Subscript[z, 0] != Subscript[
   x, 1] != Subscript[y, 1] != Subscript[z, 1] != Subscript[x, 2] !=
   Subscript[y, 2] != Subscript[z, 2]},
 {Subscript[x, 2], Subscript[y, 2], Subscript[z, 2], Subscript[x, 1],
  Subscript[y, 1], Subscript[z, 1], Subscript[x, 0], Subscript[y, 0],
  Subscript[z, 0] },
 Integers]

The problem was a homework for my daugther where you are supposed to
use all digits to build - but only once - 2 three digit numbers and
addition.




  • Prev by Date: Re: count zeros in a number
  • Next by Date: Re: HoldForm and Sum
  • Previous by thread: workaround for GraphPlot not accepting node list?
  • Next by thread: Re: Solve - takes very long time