       How to calculate a few biggest eigen values for a huge matrix

• To: mathgroup at smc.vnet.net
• Subject: [mg4094] How to calculate a few biggest eigen values for a huge matrix
• From: Hidetoshi SHIMODAIRA <shimo at stat.t.u-tokyo.ac.jp>
• Date: Tue, 4 Jun 1996 02:17:17 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```I've just joined this mailing-list, and I have questions.

I am interested in calculating eigenvectors (and eigenvalues) for,
say, 300x300 matrix. I need just a few (three or four) of the biggest
eigenvalues.  In this order, Eigenvalues and Eigenvectors seem not be
efficient, so I want to write some code.

First I try to write it as a regular function of Mathematica and used
Compile, but it failed, since it cannot deal with matrix of real.

Next I am thinking to write the code in C, and use it from Mathematica
using MathLink.  This again fails, since the mcc does not work well on
my linux box.  The reason seems to be the libML.a came with
Mathematica was compiled so that symbols have underscore as the first
letter, but my version of linux does not use it, so the linker fails
to find the symbols for libML.

Does anybody know a solution to this problem?  Thanks.

### P.S.  the other problem I want to solve is to find
the additive constant, which is - min_{i,j,k} (d_ij+d_jk-d_ik), where
d_ij is the symmetric distance matrix, such that d_ij=d_ji and d_ii=0.

I tried
-Min[Table[-d[[i,k]]+
Min[Table[d[[i,j]]+d[[k,j]],{j,1,m}]],
{i,2,m},{k,1,i-1}]];

But this is extremely slow for a big matrix. Also another
implementation using f[a_,b_] := Inner[Plus,a,b,Min] was also very
slow.

Please let me know any solution to this.

//\\\
@ @     Hidetoshi SHIMODAIRA    <shimo at stat.t.u-tokyo.ac.jp>
O      Dept. of Math. Eng. & Info. Physics, Univ. of Tokyo

==== [MESSAGE SEPARATOR] ====

```