Re: Slow LinearSolve.

• To: mathgroup at smc.vnet.net
• Subject: [mg49675] Re: [mg49657] Slow LinearSolve.
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Tue, 27 Jul 2004 07:00:59 -0400 (EDT)
• References: <200407260802.EAA08533@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```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}

Try it as below. The result is large. Offhand I do not know whether it
can or should simplify to a "nice" small form.

Timing[ls = LinearSolve[A, b, Method->OneStepRowReduction];]

Daniel Lichtblau
Wolfram Research

```

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