roman_pearce

Mr. Roman Pearce

1673 Reputation

19 Badges

17 years, 217 days
CECM/SFU
Research Associate
Abbotsford, British Columbia, Canada

I am a research associate at Simon Fraser University and a member of the Computer Algebra Group at the CECM.

MaplePrimes Activity


These are replies submitted by roman_pearce

@jjweimer I just tried it.  It looks to me like the right margin is wider than the left margin.  Is that what you are talking about?

Yep, that's a bug.  I assume that A1,A2,A3 are not defined and you want the empty ideal.

I think Maple is using a dense algorithm.  It would be useful to know what LinearAlgebra routines do not have sparse algorithms so that this deficiency could be addressed.

 @Bryon I suggest the following.  For users with reputation over 100:

- Put a "spam" button on every post so marking spam takes one click and no page loads.

- If the user clicks the spam button, add the "spam" keyword to the post.

- Hide all posts with the "spam" keyword by default (for everyone).

- Add an option to "Flag" for "not spam" to flag posts incorrectly marked as spam.

@acer It's kind of ridiculous that "arbitrary precision" does not extend to plots.

Copy the code into a text file, save it somewhere, and use the read command to read it in.

@tomleslie The lcoeff command computes the leading coefficient (and monomial) with respect to various term orderings.  You should use that in programs.  In the worst case it is linear time.

@ The solver described here is used by LinearSolve and the solve command in the case of exact rational coefficients.

In the LinearAlgebra package the LUDecomposition command computes an LU decomposition which can be applied using BackwardSubstitute and ForwardSubstitute commands.  These work over all kinds of domains, in particular numerical domains, and should support different matrix shapes such as banded matrices. However, it does not appear there is any general sparse code for LU decomposition.

Can anyone else comment?

What would you like to do in the case where a monomial in [x,y,z] appears more than once with different multipliers, e.g. a*x^2*y^2 and if b*x^2*y^2 were to appear also?

If you look at the help page ?mod you can see there are functions for linear algebra mod p, e.g.:

A := Matrix([[1,2,3],[4,5,6]]);
Gaussjord(A) mod 7;

There are also faster compiled routines in the LinearAlgebra:-Modular subpackage.  However, as far as I know there is nothing specifically optimized for linear algebra mod 2, i.e. using XOR and bit packing, the method of the four Russians, etc.

Just a guess, but try replacing ** with ^ as in:

factor(-8*((16*I)*g^4*(-4*mc^2+u)^(-2)*(4*mb^2-u)^(-2)*u^(-1)*(12*mb^2-u)*
(-4*s*mb^2+16*mb^4-4*u*mb^2+t*u-4*t*mb^2)*s*(4*s*mb^2+4*mc^2*s+16*mc^2*mb^2
-s^2-4*t*mc^2+t^2-4*t*mb^2)*(12*mc^2-u)+(16*I)*(4*s*mb^2+4*mc^2*s+u^2-4*mc^2*u
+16*mc^2*mb^2-4*u*mb^2-s^2)*(12*mc^2-t)*g^4*(t-4*mb^2)^(-2)*(4*mc^2-t)^(-2)*
(-t+12*mb^2)*(-4*s*mb^2+16*mb^4-4*u*mb^2+t*u-4*t*mb^2)*s*t^(-1))^2);

For a program such as Maple, which covers most of mathematics, there will always be lots of things which are not as efficient as a specialized program.  Effort tends to be directed into things which will either have a broad impact on the rest of Maple, or make some new area of computation accessible.

For example, the computation of Pi (and e, and probably others) right now goes into the kernel to evaluate the hypergeometric function.  That's one piece of code which is used in a lot of ways to do a lot of different things.

The real cost of software is in complexity and maintenance, so you have to be selective about what code you have.  A specialized program for computing Pi to high precision might not be useful enough.  How often would you need it?

@Chris Maple 17 and up use a sorted data structure for polynomials.  The reason is high performance.  E.g. adding two polynomials is done with a merge in linear time, whereas before Maple would have to use an n^2 loop or sort to combine like terms.

@acer The most useful one I've found is ?MapleGetInterruptValue which allows you to check for an interrupt, then clean up and exit if required.

The ordering of monomials is relatively new (as of Maple 17), and is the result of a new data structure being used for expanded polynomials.  Otherwise, the terms in sums and products are not sorted.  You can see what Maple is storing in each case by using the dismantle command:

dismantle(y*x); # general product of terms which is not sorted
dismantle(y+x+1);  # general sum of terms which is not sorted
dismantle(y+x^2+1);  # expanded polynomial which is sorted

The POLY data structure is used when the polynomial has degree > 1 and at least two terms.  There are some restrictions on the degree and number of variables allowed.

2 3 4 5 6 7 8 Last Page 4 of 39