For Programmers: Free Programming Magazines  


Home > Archive > Mathematica > April 2005 > Eigensystem Bug? OS-X









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Eigensystem Bug? OS-X
Erich Mueller

2005-04-15, 9:00 am

I have some strange behavior of Eigensystem and Eigenvectors [but not
Eigenvalues] on my G5 running OS-X 10.3.8, and Mathematica 5.1.0.0.

The Kernel Hangs when I try to calculate the Eigenvectors of the 18x18
Matrix at the end of this message. [Its the smallest matrix for which I
have the problem.] It does not respond to an "Abort Evaluation", or
"Interupt Evaluation Signal", and I must kill it from the terminal.

There is no problem finding the eigenvalues of this same matrix on a PC.
Is there someone who can suggest a fix/workaround? Failing that, is
there anyone with a mac who can verify the problem?

Thanks,
Erich


{{-4., 1., 1., 1., 0., 0., 1., 0., 0., 0., 0. + 1.*I, 0. + 1.*I, 0. -
1.*I, 0., 0., 0. - 1.*I, 0., 0.},
{1., -4., 1., 0., 1., 0., 0., 1., 0., 0. + 1.*I, 0., 0. + 1.*I, 0., 0.
- 1.*I, 0., 0., 0. - 1.*I, 0.},
{1., 1., -4., 0., 0., 1., 0., 0., 1., 0. + 1.*I, 0. + 1.*I, 0., 0.,
0., 0. - 1.*I, 0., 0., 0. - 1.*I},
{1., 0., 0., -4., 1., 1., 1., 0., 0., 0. - 1.*I, 0., 0., 0., 0. +
1.*I, 0. + 1.*I, 0. - 1.*I, 0., 0.},
{0., 1., 0., 1., -4., 1., 0., 1., 0., 0., 0. - 1.*I, 0., 0. + 1.*I,
0., 0. + 1.*I, 0., 0. - 1.*I, 0.},
{0., 0., 1., 1., 1., -4., 0., 0., 1., 0., 0., 0. - 1.*I, 0. + 1.*I, 0.
+ 1.*I, 0., 0., 0., 0. - 1.*I},
{1., 0., 0., 1., 0., 0., -4., 1., 1., 0. - 1.*I, 0., 0., 0. - 1.*I,
0., 0., 0., 0. + 1.*I, 0. + 1.*I},
{0., 1., 0., 0., 1., 0., 1., -4., 1., 0., 0. - 1.*I, 0., 0., 0. -
1.*I, 0., 0. + 1.*I, 0., 0. + 1.*I},
{0., 0., 1., 0., 0., 1., 1., 1., -4., 0., 0., 0. - 1.*I, 0., 0., 0. -
1.*I, 0. + 1.*I, 0. + 1.*I, 0.},
{0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 4.,
-1., -1., -1., 0., 0., -1., 0., 0.},
{0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0., -1.,
4., -1., 0., -1., 0., 0., -1., 0.},
{0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I, -1.,
-1., 4., 0., 0., -1., 0., 0., -1.},
{0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0., -1.,
0., 0., 4., -1., -1., -1., 0., 0.},
{0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0., 0.,
-1., 0., -1., 4., -1., 0., -1., 0.},
{0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I, 0.,
0., -1., -1., -1., 4., 0., 0., -1.},
{0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I, -1.,
0., 0., -1., 0., 0., 4., -1., -1.},
{0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I, 0.,
-1., 0., 0., -1., 0., -1., 4., -1.},
{0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0., 0.,
0., -1., 0., 0., -1., -1., -1., 4.}}

Jens-Peer Kuska

2005-04-16, 8:58 am

Hi,

try

Eigensystem[Map[SetPrecision[#, 50]
&,yourMatrix,{2}]]

I expect a problem in the extern numerical
librarys and

this should switch to the inter multi-precision
funcitons.

Regards

Jens



"Erich Mueller" <em256@NOSPAM.cornell.edu> schrieb
im Newsbeitrag news:d3o0f3$bnc$1@smc.vnet.net...
>I have some strange behavior of Eigensystem and
>Eigenvectors [but not
> Eigenvalues] on my G5 running OS-X 10.3.8, and
> Mathematica 5.1.0.0.
>
> The Kernel Hangs when I try to calculate the
> Eigenvectors of the 18x18
> Matrix at the end of this message. [Its the
> smallest matrix for which I
> have the problem.] It does not respond to an
> "Abort Evaluation", or
> "Interupt Evaluation Signal", and I must kill it
> from the terminal.
>
> There is no problem finding the eigenvalues of
> this same matrix on a PC.
> Is there someone who can suggest a
> fix/workaround? Failing that, is
> there anyone with a mac who can verify the
> problem?
>
> Thanks,
> Erich
>
>
> {{-4., 1., 1., 1., 0., 0., 1., 0., 0., 0., 0. +
> 1.*I, 0. + 1.*I, 0. -
> 1.*I, 0., 0., 0. - 1.*I, 0., 0.},
> {1., -4., 1., 0., 1., 0., 0., 1., 0., 0. +
> 1.*I, 0., 0. + 1.*I, 0., 0.
> - 1.*I, 0., 0., 0. - 1.*I, 0.},
> {1., 1., -4., 0., 0., 1., 0., 0., 1., 0. +
> 1.*I, 0. + 1.*I, 0., 0.,
> 0., 0. - 1.*I, 0., 0., 0. - 1.*I},
> {1., 0., 0., -4., 1., 1., 1., 0., 0., 0. -
> 1.*I, 0., 0., 0., 0. +
> 1.*I, 0. + 1.*I, 0. - 1.*I, 0., 0.},
> {0., 1., 0., 1., -4., 1., 0., 1., 0., 0., 0. -
> 1.*I, 0., 0. + 1.*I,
> 0., 0. + 1.*I, 0., 0. - 1.*I, 0.},
> {0., 0., 1., 1., 1., -4., 0., 0., 1., 0., 0.,
> 0. - 1.*I, 0. + 1.*I, 0.
> + 1.*I, 0., 0., 0., 0. - 1.*I},
> {1., 0., 0., 1., 0., 0., -4., 1., 1., 0. -
> 1.*I, 0., 0., 0. - 1.*I,
> 0., 0., 0., 0. + 1.*I, 0. + 1.*I},
> {0., 1., 0., 0., 1., 0., 1., -4., 1., 0., 0. -
> 1.*I, 0., 0., 0. -
> 1.*I, 0., 0. + 1.*I, 0., 0. + 1.*I},
> {0., 0., 1., 0., 0., 1., 1., 1., -4., 0., 0.,
> 0. - 1.*I, 0., 0., 0. -
> 1.*I, 0. + 1.*I, 0. + 1.*I, 0.},
> {0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0.,
> 0. + 1.*I, 0., 0., 4.,
> -1., -1., -1., 0., 0., -1., 0., 0.},
> {0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0.,
> 0., 0. + 1.*I, 0., -1.,
> 4., -1., 0., -1., 0., 0., -1., 0.},
> {0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I,
> 0., 0., 0. + 1.*I, -1.,
> -1., 4., 0., 0., -1., 0., 0., -1.},
> {0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I,
> 0. + 1.*I, 0., 0., -1.,
> 0., 0., 4., -1., -1., -1., 0., 0.},
> {0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I,
> 0., 0. + 1.*I, 0., 0.,
> -1., 0., -1., 4., -1., 0., -1., 0.},
> {0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0.,
> 0., 0., 0. + 1.*I, 0.,
> 0., -1., -1., -1., 4., 0., 0., -1.},
> {0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 0., 0. -
> 1.*I, 0. - 1.*I, -1.,
> 0., 0., -1., 0., 0., 4., -1., -1.},
> {0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0. -
> 1.*I, 0., 0. - 1.*I, 0.,
> -1., 0., 0., -1., 0., -1., 4., -1.},
> {0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0. -
> 1.*I, 0. - 1.*I, 0., 0.,
> 0., -1., 0., 0., -1., -1., -1., 4.}}
>



Peter Pein

2005-04-16, 8:58 am

Only a guess, because I've got a windows-pc:

What happens if you try Eigenvectors[Rationalize@mat] ?

Erich Mueller wrote:
> I have some strange behavior of Eigensystem and Eigenvectors [but not
> Eigenvalues] on my G5 running OS-X 10.3.8, and Mathematica 5.1.0.0.
>
> The Kernel Hangs when I try to calculate the Eigenvectors of the 18x18
> Matrix at the end of this message. [Its the smallest matrix for which I
> have the problem.] It does not respond to an "Abort Evaluation", or
> "Interupt Evaluation Signal", and I must kill it from the terminal.
>
> There is no problem finding the eigenvalues of this same matrix on a PC.
> Is there someone who can suggest a fix/workaround? Failing that, is
> there anyone with a mac who can verify the problem?
>
> Thanks,
> Erich
>
>
> {{-4., 1., 1., 1., 0., 0., 1., 0., 0., 0., 0. + 1.*I, 0. + 1.*I, 0. -
> 1.*I, 0., 0., 0. - 1.*I, 0., 0.},
> {1., -4., 1., 0., 1., 0., 0., 1., 0., 0. + 1.*I, 0., 0. + 1.*I, 0., 0.
> - 1.*I, 0., 0., 0. - 1.*I, 0.},
> {1., 1., -4., 0., 0., 1., 0., 0., 1., 0. + 1.*I, 0. + 1.*I, 0., 0.,
> 0., 0. - 1.*I, 0., 0., 0. - 1.*I},
> {1., 0., 0., -4., 1., 1., 1., 0., 0., 0. - 1.*I, 0., 0., 0., 0. +
> 1.*I, 0. + 1.*I, 0. - 1.*I, 0., 0.},
> {0., 1., 0., 1., -4., 1., 0., 1., 0., 0., 0. - 1.*I, 0., 0. + 1.*I,
> 0., 0. + 1.*I, 0., 0. - 1.*I, 0.},
> {0., 0., 1., 1., 1., -4., 0., 0., 1., 0., 0., 0. - 1.*I, 0. + 1.*I, 0.
> + 1.*I, 0., 0., 0., 0. - 1.*I},
> {1., 0., 0., 1., 0., 0., -4., 1., 1., 0. - 1.*I, 0., 0., 0. - 1.*I,
> 0., 0., 0., 0. + 1.*I, 0. + 1.*I},
> {0., 1., 0., 0., 1., 0., 1., -4., 1., 0., 0. - 1.*I, 0., 0., 0. -
> 1.*I, 0., 0. + 1.*I, 0., 0. + 1.*I},
> {0., 0., 1., 0., 0., 1., 1., 1., -4., 0., 0., 0. - 1.*I, 0., 0., 0. -
> 1.*I, 0. + 1.*I, 0. + 1.*I, 0.},
> {0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 4.,
> -1., -1., -1., 0., 0., -1., 0., 0.},
> {0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0., -1.,
> 4., -1., 0., -1., 0., 0., -1., 0.},
> {0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I, -1.,
> -1., 4., 0., 0., -1., 0., 0., -1.},
> {0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0., -1.,
> 0., 0., 4., -1., -1., -1., 0., 0.},
> {0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0., 0.,
> -1., 0., -1., 4., -1., 0., -1., 0.},
> {0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I, 0.,
> 0., -1., -1., -1., 4., 0., 0., -1.},
> {0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I, -1.,
> 0., 0., -1., 0., 0., 4., -1., -1.},
> {0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I, 0.,
> -1., 0., 0., -1., 0., -1., 4., -1.},
> {0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0., 0.,
> 0., -1., 0., 0., -1., -1., -1., 4.}}
>

--
Peter Pein
Berlin

Sseziwa Mukasa

2005-04-16, 8:58 am


On Apr 15, 2005, at 4:47 AM, Erich Mueller wrote:

> I have some strange behavior of Eigensystem and Eigenvectors [but not
> Eigenvalues] on my G5 running OS-X 10.3.8, and Mathematica 5.1.0.0.
>
> The Kernel Hangs when I try to calculate the Eigenvectors of the 18x18
> Matrix at the end of this message. [Its the smallest matrix for which I
> have the problem.] It does not respond to an "Abort Evaluation", or
> "Interupt Evaluation Signal", and I must kill it from the terminal.
>
> There is no problem finding the eigenvalues of this same matrix on a
> PC.
> Is there someone who can suggest a fix/workaround? Failing that, is
> there anyone with a mac who can verify the problem?
>


I have the same problem in version 5 on Mac OS X 10.3.8. It is not a
case of the front end taking a long time to format output because
suppressing the output with ; still takes forever to compute.

On the other hand the matrix is very ill conditioned, so reduction to
Schur form using SchurDecomposition would probably be preferable. You
can then find eigenvectors by inverse iteration.

Regards,

Ssezi

János

2005-04-19, 8:59 am

Well, on my 1.25 GHz G4 I started it on Friday morning and now on
Monday morning it is still running. It is the kernel that is using
75=85 % of CPU time according to top under a pre-release of Tiger.
The front end had no chance yet to participate in any action. It
consumed about 70MB of memory in the last three days - but that can
be caused also by other programs I run leaking memory.

János
On Apr 15, 2005, at 4:47 AM, Erich Mueller wrote:

> I have some strange behavior of Eigensystem and Eigenvectors [but not
> Eigenvalues] on my G5 running OS-X 10.3.8, and Mathematica 5.1.0.0.
>
> The Kernel Hangs when I try to calculate the Eigenvectors of the 18x18
> Matrix at the end of this message. [Its the smallest matrix for
> which I
> have the problem.] It does not respond to an "Abort Evaluation", or
> "Interupt Evaluation Signal", and I must kill it from the terminal.
>
> There is no problem finding the eigenvalues of this same matrix on
> a PC.
> Is there someone who can suggest a fix/workaround? Failing that, is
> there anyone with a mac who can verify the problem?
>
> Thanks,
> Erich
>
>
> {{-4., 1., 1., 1., 0., 0., 1., 0., 0., 0., 0. + 1.*I, 0. + 1.*I, 0. -
> 1.*I, 0., 0., 0. - 1.*I, 0., 0.},
> {1., -4., 1., 0., 1., 0., 0., 1., 0., 0. + 1.*I, 0., 0. + 1.*I,
> 0., 0.
> - 1.*I, 0., 0., 0. - 1.*I, 0.},
> {1., 1., -4., 0., 0., 1., 0., 0., 1., 0. + 1.*I, 0. + 1.*I, 0., 0.,
> 0., 0. - 1.*I, 0., 0., 0. - 1.*I},
> {1., 0., 0., -4., 1., 1., 1., 0., 0., 0. - 1.*I, 0., 0., 0., 0. +
> 1.*I, 0. + 1.*I, 0. - 1.*I, 0., 0.},
> {0., 1., 0., 1., -4., 1., 0., 1., 0., 0., 0. - 1.*I, 0., 0. + 1.*I,
> 0., 0. + 1.*I, 0., 0. - 1.*I, 0.},
> {0., 0., 1., 1., 1., -4., 0., 0., 1., 0., 0., 0. - 1.*I, 0. +
> 1.*I, 0.
> + 1.*I, 0., 0., 0., 0. - 1.*I},
> {1., 0., 0., 1., 0., 0., -4., 1., 1., 0. - 1.*I, 0., 0., 0. - 1.*I,
> 0., 0., 0., 0. + 1.*I, 0. + 1.*I},
> {0., 1., 0., 0., 1., 0., 1., -4., 1., 0., 0. - 1.*I, 0., 0., 0. -
> 1.*I, 0., 0. + 1.*I, 0., 0. + 1.*I},
> {0., 0., 1., 0., 0., 1., 1., 1., -4., 0., 0., 0. - 1.*I, 0., 0.,
> 0. -
> 1.*I, 0. + 1.*I, 0. + 1.*I, 0.},
> {0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 4.,
> -1., -1., -1., 0., 0., -1., 0., 0.},
> {0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0.,
> -1.,
> 4., -1., 0., -1., 0., 0., -1., 0.},
> {0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I,
> -1.,
> -1., 4., 0., 0., -1., 0., 0., -1.},
> {0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I, 0. + 1.*I, 0., 0.,
> -1.,
> 0., 0., 4., -1., -1., -1., 0., 0.},
> {0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I, 0., 0. + 1.*I, 0., 0.,
> -1., 0., -1., 4., -1., 0., -1., 0.},
> {0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0., 0., 0., 0. + 1.*I, 0.,
> 0., -1., -1., -1., 4., 0., 0., -1.},
> {0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0., 0., 0. - 1.*I, 0. - 1.*I,
> -1.,
> 0., 0., -1., 0., 0., 4., -1., -1.},
> {0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0., 0. - 1.*I, 0., 0. - 1.*I, 0.,
> -1., 0., 0., -1., 0., -1., 4., -1.},
> {0., 0., 0. + 1.*I, 0., 0., 0. + 1.*I, 0. - 1.*I, 0. - 1.*I, 0., 0.,
> 0., -1., 0., 0., -1., -1., -1., 4.}}




-------------------------------------------------
People never lie so much as after a
hunt, during a war or before an election
- Otto von Bismarck -

carlos@colorado.edu

2005-04-20, 9:00 am

On my old G4 laptop running MacOS, and calling
your matrix A:

Print[Timing[Eigenvalues[Rationalize[A]]
//InputForm]];

{0.133333 Second, {-6, -6, -6, -6, 0, 0, 6, 6, 6,
6, -3*Sqrt[2], -3*Sqrt[2], -3*Sqrt[2], -3*Sqrt[2], 3*Sqrt[2],
3*Sqrt[2], 3*Sqrt[2], 3*Sqrt[2]}}

Note that all eigenvalues of the rationalized matrix are real.
In floating form and using Chop to get rid of tiny scraps:

Print[Timing[Chop[Eigenvalues[A]]//InputForm]];

{0. Second, {-6.000000000000011,
6.000000000000005, -6.0000000000000036, -6.000000000000003,
6.000000000000001, 5.999999999999999,
5.999999999999997, -5.999999999999993, -4.242640687119292,
-4.2426406871192865, 4.242640687119285, 4.242640687119285,
4.242640687119284, -4.242640687119283,
4.242640687119282, -4.242640687119281, 0, 0}}

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com