MathGroup Archive 2004

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

Search the Archive

Re: Slow LinearSolve.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49674] Re: [mg49657] Slow LinearSolve.
  • From: Garry Helzer <gah at math.umd.edu>
  • Date: Tue, 27 Jul 2004 07:00:58 -0400 (EDT)
  • References: <200407260828.EAA08839@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

In this case it helps to specify the solution method.

LinearSolve[A,b,Method->OneStepRowReduction]

solves the system in about 10 seconds on my machine(Mac OS 10.3.4, dual 
2GHz processors, 2.5GB RAM).

You are asking Mathematica for an exact solution. Is this what you 
intended? The (unsimplified) output generated a pdf file of more than 
1000 pages before I killed the process. This hardly seems useful. If 
you could be content with machine precision floating point try

LinearSolve[N[A],N[b]]

Which takes 0.01 seconds on my machine.


On Jul 26, 2004, at 4:28 AM, Aaron Fude wrote:

>  Hi,
>
>  Within 24 hours and counting, Mathematica was not able to solve Ax = 
> b for
>  the following A and the following B. Another system does this in a 
> matter of seconds.
>  How do make Mathematica do the same? I use "LinearSolve[A, b]"
>
>  A = {{1, -I, -1, I, 1, -I, -1, I, 1, -I, -1, I, 1}, {1, 
> E^(((-5*I)/12)*Pi),
>  E^(((-5*I)/6)*Pi),
>  E^(((3*I)/4)*Pi), E^((I/3)*Pi), E^((-I/12)*Pi), -I, 
> E^(((-11*I)/12)*Pi),
>  E^(((2*I)/3)*Pi),
>  E^((I/4)*Pi), E^((-I/6)*Pi), E^(((-7*I)/12)*Pi), -1},
>  {1, E^((-I/3)*Pi), E^(((-2*I)/3)*Pi), -1, E^(((2*I)/3)*Pi), 
> E^((I/3)*Pi), 1,
>  E^((-I/3)*Pi),
>  E^(((-2*I)/3)*Pi), -1, E^(((2*I)/3)*Pi), E^((I/3)*Pi), 1},
>  {1, E^((-I/4)*Pi), -I, E^(((-3*I)/4)*Pi), -1, E^(((3*I)/4)*Pi), I,
>  E^((I/4)*Pi), 1,
>  E^((-I/4)*Pi), -I, E^(((-3*I)/4)*Pi), -1}, {1, E^((-I/6)*Pi),
>  E^((-I/3)*Pi), -I,
>  E^(((-2*I)/3)*Pi), E^(((-5*I)/6)*Pi), -1, E^(((5*I)/6)*Pi),
>  E^(((2*I)/3)*Pi), I,
>  E^((I/3)*Pi), E^((I/6)*Pi), 1}, {1, E^((-I/12)*Pi), E^((-I/6)*Pi),
>  E^((-I/4)*Pi),
>  E^((-I/3)*Pi), E^(((-5*I)/12)*Pi), -I, E^(((-7*I)/12)*Pi),
>  E^(((-2*I)/3)*Pi),
>  E^(((-3*I)/4)*Pi), E^(((-5*I)/6)*Pi), E^(((-11*I)/12)*Pi), -1},
>  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, E^((I/12)*Pi), 
> E^((I/6)*Pi),
>  E^((I/4)*Pi),
>  E^((I/3)*Pi), E^(((5*I)/12)*Pi), I, E^(((7*I)/12)*Pi), 
> E^(((2*I)/3)*Pi),
>  E^(((3*I)/4)*Pi),
>  E^(((5*I)/6)*Pi), E^(((11*I)/12)*Pi), -1}, {1, E^((I/6)*Pi), 
> E^((I/3)*Pi),
>  I,
>  E^(((2*I)/3)*Pi), E^(((5*I)/6)*Pi), -1, E^(((-5*I)/6)*Pi),
>  E^(((-2*I)/3)*Pi), -I,
>  E^((-I/3)*Pi), E^((-I/6)*Pi), 1}, {1, E^((I/4)*Pi), I, 
> E^(((3*I)/4)*Pi), -1,
>  E^(((-3*I)/4)*Pi), -I, E^((-I/4)*Pi), 1, E^((I/4)*Pi), I,
>  E^(((3*I)/4)*Pi), -1},
>  {1, E^((I/3)*Pi), E^(((2*I)/3)*Pi), -1, E^(((-2*I)/3)*Pi), 
> E^((-I/3)*Pi), 1,
>  E^((I/3)*Pi),
>  E^(((2*I)/3)*Pi), -1, E^(((-2*I)/3)*Pi), E^((-I/3)*Pi), 1},
>  {1, E^(((5*I)/12)*Pi), E^(((5*I)/6)*Pi), E^(((-3*I)/4)*Pi), 
> E^((-I/3)*Pi),
>  E^((I/12)*Pi), I,
>  E^(((11*I)/12)*Pi), E^(((-2*I)/3)*Pi), E^((-I/4)*Pi), E^((I/6)*Pi),
>  E^(((7*I)/12)*Pi), -1},
>  {1, I, -1, -I, 1, I, -1, -I, 1, I, -1, -I, 1}}
>
>  b = {0, (-2*I)/5, 0, (-2*I)/3, 0, -2*I, Pi, 2*I, 0, (2*I)/3, 0, 
> (2*I)/5, 0}
>
>
Garry Helzer
gah at math.umd.edu


  • Prev by Date: Re: Slow LinearSolve.
  • Next by Date: Re: Slow LinearSolve.
  • Previous by thread: Slow LinearSolve.
  • Next by thread: Re: Slow LinearSolve.