2008/5/23 Oliver Kullmann <O.Kullmann at swansea.ac.uk>:
> Hi,
>
> (%i6) M;
> (%o6) matrix([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4],[1,0,2,1,2,1,3,2,2,1,3,2,3,2,4,3],
> [1,2,0,1,2,3,1,2,2,3,1,2,3,4,2,3],[2,1,1,0,3,2,2,1,3,2,2,1,4,3,3,2],
> [1,2,2,3,0,1,1,2,2,3,3,4,1,2,2,3],[2,1,3,2,1,0,2,1,3,2,4,3,2,1,3,2],
> [2,3,1,2,1,2,0,1,3,4,2,3,2,3,1,2],[3,2,2,1,2,1,1,0,4,3,3,2,3,2,2,1],
> [1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3],[2,1,3,2,3,2,4,3,1,0,2,1,2,1,3,2],
> [2,3,1,2,3,4,2,3,1,2,0,1,2,3,1,2],[3,2,2,1,4,3,3,2,2,1,1,0,3,2,2,1],
> [2,3,3,4,1,2,2,3,1,2,2,3,0,1,1,2],[3,2,4,3,2,1,3,2,2,1,3,2,1,0,2,1],
> [3,4,2,3,2,3,1,2,2,3,1,2,1,2,0,1],[4,3,3,2,3,2,2,1,3,2,2,1,2,1,1,0])
> (%i7) charpoly(M,x);
charpoly computer the determinant using a slow algorithm. If you set
ratmx to true, a faster algorithm is used:
(%i5) charpoly(M, x), ratmx=true;
(%o5) x^16-640*x^14-10240*x^13-61440*x^12-131072*x^11
HTH,
--
Andrej