Re: Strange Det function behavior.

• To: mathgroup at smc.vnet.net
• Subject: [mg65482] Re: [mg65445] Strange Det function behavior.
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Wed, 5 Apr 2006 06:55:21 -0400 (EDT)
• References: <200604020900.FAA01592@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Alexander wrote:
> Dear MathGroup!
>
> Suppose we have defined the following function:
>
> f[x_Integer] := Det[ Table[ Random[]*t + i/j, {i, x}, {j, x} ] ];
>
> Now try to make a table for different values of argument (matrix
> dimension):
>
> Table[f[i], {i, 12}] // TableForm
>
> It takes a considerable time on my Celeron 1700 with Mathematica 5.2
> under WinXP to make such a table.
>
> Once we made this table we see very strange bihavior, all results
> before x=12 dimension are polynoms,
> but starting from x=12 result become very big and very
> strange, and in fact it's not even a polynom.
>
> I spend several hours try to understand why system acts so strange, and
> finally came to idea that the answer is in numbers representation and
> inner
> system algorithms used to evaluate Det function.
>
> It would be very interesting to see explanations of this result.
>
>
> Alexander.

to confirm that there is indeed a cause for the behavior you observed.

Det will use explicit cofactor expansion through dimension 11 x 11.
After that it will resort to a variant that uses one-step row reduction.
In some cases this might leave a denominator. I'm not sure if this will
ever happen for exact inputs but it certainly can happen for matrices
containing approximate numbers (because cancellations will not always be
exact).

I'll point out that the heuristics determining what method to use are
far from perfect (or, to paraphrase an old quote on the topic, if they
were flawless, they wouldn't be heuristics). Something on my neverending
to-do list is to have Det take a Method option. Even then it might be a
challenge to do it "perfectly" insofar as small variations in internals
of various methods can lead to noticeable performance differences.

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Transformstion to canonical form
• Next by Date: Re: Re: Typing special symbols in text mode?
• Previous by thread: Re: Strange Det function behavior.
• Next by thread: Re: Strange Det function behavior.