Strategy for overly long computations?

• To: mathgroup at smc.vnet.net
• Subject: [mg35327] Strategy for overly long computations?
• From: "Peter S. Shenkin" <shenkin at mindspring.com>
• Date: Mon, 8 Jul 2002 03:19:24 -0400 (EDT)
• Organization: MindSpring Enterprises
• Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm trying to solve a set of 5 eqns in 5 unknowns, three of which
are quadratic and two of which are linear.  I'm only interested
in three of the unknowns, so first I eliminate the other two.

So far, Mathematica 4.0 on an UltraSPARC has been grinding away for
over 24 hours on this system at 96% of the CPU.  There are no
errmsgs.

Does anyone out there have any insight into any of:

1.  Whether this system is so tough it'll take "forever" to get
through all the possibilities;

2.  Whether there's some way of reorganizing the calculation so
that Mathematica can work faster;

3.  Whether I'm encountering some sort of bug or malfunction;

4.  Whether I'm doing something really stupid.

Thanks.  The system is shown here;  I'm running in background,
redirecting stdin from a file with contents shown here.  The
calculation through the first Save is nearly immediate;  almost
all the time so far is taken up in the Reduce step.

For clarity, let me say that I'm running the job as:

math < intersect >& intersect.log &

-------------------
cn1 = ( x - x1 )^2 + ( y - y1 )^2 + ( z - z1 )^2  == r1^2
cn2 = ( x - x2 )^2 + ( y - y2 )^2 + ( z - z2 )^2  == r2^2
lgrx = ( x - xv ) + lm1 * ( x - x1 ) + lm2 * ( x - x2 ) == 0
lgry = ( y - yv ) + lm1 * ( y - y1 ) + lm2 * ( y - y2 ) == 0
lgrz = ( z - zv ) + lm1 * ( z - z1 ) + lm2 * ( z - z2 ) == 0

lgrxyz = { lgrx, lgry, lgrz }
elim = Eliminate[ lgrxyz, {lm1,lm2} ]
eqns = { cn1, cn2, elim }

Save[ "intersect.out", cn1, cn2, lgrx, lgry, lgrz, lgrzyx, elim, eqns ]

redn = Reduce[ eqns, {x,y,z} ]
Save[ "intersect.out", redn ]
soln = Solve[ eqns, {x,y,z} ]
Save[ "intersect.out", soln ]
-------------------

-P.

--

work: shenkin at schrodinger.com = 100%
play: shenkin at mindspring.com  =   0%
Peter S. Shenkin              = Dull boy

--

• Prev by Date: Re: AppendTo VERY slow
• Next by Date: RE: AppendTo VERY slow
• Previous by thread: Re: Inherited Cell Option Values
• Next by thread: RE: Strategy for overly long computations?