Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5383

Re: Solve - takes very long time

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Solve - takes very long time
Date 2011-10-05 08:06 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j6h35d$70h$1@smc.vnet.net> (permalink)
References <j6bris$8m4$1@smc.vnet.net> <201110040530.BAA20723@smc.vnet.net>

Show all headers | View raw


The conditions #[[2]] < #[[5]] and #[[3]] < #[[6]] do not belong, however.

Bobby

On Tue, 04 Oct 2011 00:30:53 -0500, Ray Koopman <koopman@sfu.ca> wrote:

> On Oct 3, 1:26 am, Fredob <fredrik.dob...@gmail.com> wrote:
>> 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.
>
> For each of the 42 solutions found by the brute force search given
> below there are seven other solutions that may be obtained by
> interchanging x0,y0 and/or x1,y1 and/or x2,y2.
>
> FromDigits/@Partition[#,3]& /@ Select[Permutations@Range@9,
>   #[[1]] < #[[4]] && #[[2]] < #[[5]] && #[[3]] < #[[6]] &&
>   #.{100,10,1,100,10,1,-100,-10,-1} == 0 &]
>
> {{124,659,783}, {125,739,864}, {127,359,486},
>  {127,368,495}, {128,439,567}, {134,658,792},
>  {142,596,738}, {142,695,837}, {143,586,729},
>  {152,487,639}, {152,784,936}, {162,387,549},
>  {162,783,945}, {173,286,459}, {173,295,468},
>  {182,394,576}, {182,493,675}, {214,569,783},
>  {214,659,873}, {215,478,693}, {215,748,963},
>  {216,378,594}, {216,738,954}, {218,349,567},
>  {218,439,657}, {234,657,891}, {235,746,981},
>  {241,596,837}, {243,576,819}, {243,675,918},
>  {251,397,648}, {271,593,864}, {271,683,954},
>  {281,394,675}, {314,658,972}, {317,529,846},
>  {317,628,945}, {324,567,891}, {324,657,981},
>  {341,586,927}, {342,576,918}, {352,467,819}}
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Solve - takes very long time Fredob <fredrik.doberl@gmail.com> - 2011-10-03 08:26 +0000
  Re: Solve - takes very long time Ray Koopman <koopman@sfu.ca> - 2011-10-04 05:33 +0000
  Re: Solve - takes very long time "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-10-04 05:33 +0000
  Re: Solve - takes very long time Peter Pein <petsie@dordos.net> - 2011-10-04 05:36 +0000
  Re: Solve - takes very long time DrMajorBob <btreat1@austin.rr.com> - 2011-10-05 08:06 +0000

csiph-web