Is it normal for Maple to continue evaluating for more than 24 h?

Although my calculations are somehow complicated, I don't think that's normal so I finally stoped it.

What are possible solutions? or shall I give it more time?!

acer's picture

how could we say?

How could we give a sensible reply, with absolutely no information at all about what it is that your computations are doing?

acer

alec's picture

Normal

It may be normal, if similar problems, but with less parameters run for, say, 1 hour, 4 hours, and 8 hours, and you could estimate the run time for large problems from that.

Otherwise, it is not normal.

In general, if a problem runs for more than 2-3 hours, I would try to use Compiler:-Compile to speed it up, or use something different than Maple.

Alec

roman_pearce's picture

10 minute rule

If it takes more than 10 minutes then the software is too slow and I would look for alternatives. What type of calculations are you doing ?

Roman, wouldn't that mean

Roman, wouldn't that mean that some problems would never get solved as everyone would be spending all their time looking for alternative software?

David Clayworth Maplesoft GUI Developer

Axel Vogt's picture

ROL

That was a good one!

He might have meant, that users become too much unpatient beyond 10 min.

For commercial administrative software one usually expects less than 1 sec
due to such user expectations (not that all will do, try SAP or other stuff ...)

Too true

<p>He probably did. It is true though that some problems of the class that Maple is designed to solve can't be solved in 10 mins (or 24 hours).</p>
<p>David Clayworth Maplesoft GUI Developer</p>

alec's picture

Some experience

I had several times Maple running for several days. Usually it was for computing of the next term of a sequence in the OEIS. In such situations, computing few previous terms first, I could estimate the time needed for the next term.

Alec

roman_pearce's picture

10 minute rule

10 minutes on a 3 GHz computer is O(10^12) cycles, so a computation that is O(10^9) or less should terminate. Most problems are not of that size, so unless you know otherwise you are probably just wasting time. It's a fairly safe rule of thumb, and it's conveniently about the same as a coffee break.

I'm trying to find the

I'm trying to find the eigenvalues of a 4 X 4 matrix. The matrix elements are polynomials of ~60 terms.

alec's picture

Symbolic solution

You could try to find the Characteristic Polynomial first - that should be fast. And then try to find its roots.

Alec

Robert Israel's picture

Symbolic solution

The characteristic polynomial of a 4 x 4 matrix is a quartic.  In the absence of some special structure (e.g. it is reducible, or is a composition of two quadratics), the symbolic solution would require substituting the (already very complicated) formula for the coefficients of the quartic into the rather complicated general solution of the quartic.

> _EnvExplicit := true:
    solve(a*x^4 + b*x^3 + c*x^2 + d * x + e = 0, x);

The result would be a nightmare.  So you really don't want to use that explicit formula.  The characteristic polynomial will be bad enough. 

If a 4 x 4 matrix has entries which are each composed of 60 terms, then in the absence of simplification
the determinant (i.e. the constant term of the characteristic polynomial), written out in full, would have 4! * 60^4 = 311040000 terms.  You'd need an awful lot of memory to store such a monstrosity.  Perhaps you should re-think why you need a symbolic expression for the eigenvalues.

alec's picture

But

That is certainly true. But it might be faster, and it may be worth to try. Who knows -maybe it can be factorized, simplified, or reduced to some special form,such as λ4-a, for example. If a problem is related to some nice structure (as it happens often in physics), that may be the case.

Also, in some cases the printing of the output is very slow, much slower than the calculations themselves, and even can crash Maple. One should make sure that the output is not printed.

Alec

Robert Israel's picture

Yes, but...

I agree. But if there is some special structure, there may be better ways to discover such a structure than by grinding out the characteristic polynomial.

One thing you might try is substituting some fairly small more-or-less random integers for the symbolic parameters and looking at the characteristic polynomial for this special case, which should share any structure that the general case has.  If you find such a structure, there will probably be simpler ways to show that this occurs in general.  For example, if the characteristic polynomial is lambda^4 - a, the fourth power of your matrix will be a times the identity matrix.

 

The problem is solved. I was

The problem is solved. I was mistaken in defining some of the elements and in substituting for the symbols. When I corrected them the matrix became so simple.

Thanks all

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}