roman_pearce

Mr. Roman Pearce

1678 Reputation

19 Badges

20 years, 215 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

...it makes things like sqrt(1/(1-x)) very difficult to 'preserve', since most operations will switch it to sqrt(-1/(x-1)), which does not have the same branch cut! This is a great point - what a disaster. I was trying to think of a way to fix this problem. It would be nice if normal never changed a sign, but then how would you cancel out a gcd ? It's the leading coefficient problem again. Do you have any suggestions ?
...it makes things like sqrt(1/(1-x)) very difficult to 'preserve', since most operations will switch it to sqrt(-1/(x-1)), which does not have the same branch cut! This is a great point - what a disaster. I was trying to think of a way to fix this problem. It would be nice if normal never changed a sign, but then how would you cancel out a gcd ? It's the leading coefficient problem again. Do you have any suggestions ?
What do you mean by the term "global order" and how does one "specify the domain for computations"? The issue is very simple. Maple needs to sort expressions in order to be fast. The only question is, how does it sort ? Keep in mind, Maple must be able to sort all objects that can possibly exist according to some internally consistent order. This is the "global order" I was referring to. And the user can enter anything. They can enter sin(x)*sqrt(x-y)^(1/z) and all kinds of junk. The question is, how do you sort those ? It's not an easy problem if you think about it. One solution is to make the user implicitly tell you how to sort, by having them describe the objects they will be computing with first. The user specifies the domain for the computations, and from that the system extracts information about how to sort. For example, in Magma if I want to compute with polynomials in {x,y} with rational coefficients, I would enter something like the following:
P := PolynomialRing(RationalField(), 2);
f := y^2-x^2;
If you then print out f you will see that Magma reordered it -x^2+y^2, putting x before y. Why did it do that ? Well, I put x before y when I described the domain, so Magma used my order. As we have already seen, the results of some algorithms may not be unique. In fact, the thing you are trying to compute may not be unique mathematically, as for example, a factorization (primary decomposition) of a polynomial system. But Magma makes a special effort to always return the same result given the same order. If I give Magma a different order I may get a different result though. This is a perfectly valid way to solve the problem, and it has some very nice benefits too. It is much easier to code algorithms because you don't have to check for a bunch of different domains. The system knows the domain and you get that information automatically. The downside is the following: if I start up a system like Magma and enter
f := y^2-x^2;
I will get an error. In Magma you get the error "User error: Identifier 'y' has not been declared or assigned". You see, the system doesn't know what 'y' is, and it has no general facility to compute with things if it doesn't know what they are or where they belong. This includes as a subset the problem of sorting. I don't want to seem like I'm picking on Magma, because this design really isn't a problem for them. Magma primarily deals with algebra, where it is a benefit to set up your domain and have confidence that the system is working inside of that domain and not doing any funny stuff behind the scenes. But such a design would never work for Maple. Maple's goal is to be a general purpose system, where the user can enter anything and compute with it. Such a system has to be capable of representing and computing with any object at a fundamental level. Things like x^2+sin(x) have to work, and the user is not going to describe what domain they think that lies in. For complicated expressions they probably don't even know and they trust the system to figure it out. As an aside, this issue of knowing what domain you're in is the source of many bugs in Maple. Algorithms are run when they are possibly not valid, because the different parts of the system can only guess at what the objects they are computing with actually represent. Anyways, now that Maple allows the user to enter anything, you are back to the sorting issue again. How does Maple sort ? Well, it has to allocate memory for objects, and to be efficient it stores only one copy of each object, so it sorts objects by their address in memory. This is not totally random. If you start up Maple and enter S := {x,y,z} it will show you those terms in the order that you entered them. It creates them in that order and the set is sorted by increasing address. If you then enter T := {z,t,y} I guarantee you it will put y before z. However, because memory is recycled this scheme gets random very quickly. Objects are initially created by increasing address, but as soon as you recycle memory all bets are off. You could probably make this process deterministic so that Maple as a whole would be deterministic, but at that point you have to ask "is this a good idea ?" Determinism is only useful in so far as it allows you to describe or predict what happens. The process underlying where in memory Maple puts various objects is so complex that it is chaotic. Nobody can describe let alone predict where objects will go during a large computation, so what determinism really gives you is a false sense of security. It's like plugging the same number into a chaotic model and being relieved to get the same result each time, when if you were to change even the very last decimal place you would get a totally different and completely unpredictable answer. The point is, you really can't predict what is going on underneath. Now for the point. Given that the underlying processes are completely unpredictable, how do you build software that is robust ? You make it random. By building some randomness into the design, you are guaranteed that 1) the software can deal with its own complexity, ie: it won't break if things change slightly and 2) if there is a bug, you are likely to discover it. That in a nutshell is the philosophy behind Maple. I don't know whether the designers intended it to be this way, but the Maple kernel works pretty well as a result. I'm reminded of a quote by Ralph Waldo Emerson (regarding consistency and hobgoblins) which I'm worried might be taken as an insult. The point is that at a very low level, there's no hope of making Maple behave consistently in any meaningful way, so it's best not to worry about it and instead simply focus on making the algorithms correct.
What do you mean by the term "global order" and how does one "specify the domain for computations"? The issue is very simple. Maple needs to sort expressions in order to be fast. The only question is, how does it sort ? Keep in mind, Maple must be able to sort all objects that can possibly exist according to some internally consistent order. This is the "global order" I was referring to. And the user can enter anything. They can enter sin(x)*sqrt(x-y)^(1/z) and all kinds of junk. The question is, how do you sort those ? It's not an easy problem if you think about it. One solution is to make the user implicitly tell you how to sort, by having them describe the objects they will be computing with first. The user specifies the domain for the computations, and from that the system extracts information about how to sort. For example, in Magma if I want to compute with polynomials in {x,y} with rational coefficients, I would enter something like the following:
P := PolynomialRing(RationalField(), 2);
f := y^2-x^2;
If you then print out f you will see that Magma reordered it -x^2+y^2, putting x before y. Why did it do that ? Well, I put x before y when I described the domain, so Magma used my order. As we have already seen, the results of some algorithms may not be unique. In fact, the thing you are trying to compute may not be unique mathematically, as for example, a factorization (primary decomposition) of a polynomial system. But Magma makes a special effort to always return the same result given the same order. If I give Magma a different order I may get a different result though. This is a perfectly valid way to solve the problem, and it has some very nice benefits too. It is much easier to code algorithms because you don't have to check for a bunch of different domains. The system knows the domain and you get that information automatically. The downside is the following: if I start up a system like Magma and enter
f := y^2-x^2;
I will get an error. In Magma you get the error "User error: Identifier 'y' has not been declared or assigned". You see, the system doesn't know what 'y' is, and it has no general facility to compute with things if it doesn't know what they are or where they belong. This includes as a subset the problem of sorting. I don't want to seem like I'm picking on Magma, because this design really isn't a problem for them. Magma primarily deals with algebra, where it is a benefit to set up your domain and have confidence that the system is working inside of that domain and not doing any funny stuff behind the scenes. But such a design would never work for Maple. Maple's goal is to be a general purpose system, where the user can enter anything and compute with it. Such a system has to be capable of representing and computing with any object at a fundamental level. Things like x^2+sin(x) have to work, and the user is not going to describe what domain they think that lies in. For complicated expressions they probably don't even know and they trust the system to figure it out. As an aside, this issue of knowing what domain you're in is the source of many bugs in Maple. Algorithms are run when they are possibly not valid, because the different parts of the system can only guess at what the objects they are computing with actually represent. Anyways, now that Maple allows the user to enter anything, you are back to the sorting issue again. How does Maple sort ? Well, it has to allocate memory for objects, and to be efficient it stores only one copy of each object, so it sorts objects by their address in memory. This is not totally random. If you start up Maple and enter S := {x,y,z} it will show you those terms in the order that you entered them. It creates them in that order and the set is sorted by increasing address. If you then enter T := {z,t,y} I guarantee you it will put y before z. However, because memory is recycled this scheme gets random very quickly. Objects are initially created by increasing address, but as soon as you recycle memory all bets are off. You could probably make this process deterministic so that Maple as a whole would be deterministic, but at that point you have to ask "is this a good idea ?" Determinism is only useful in so far as it allows you to describe or predict what happens. The process underlying where in memory Maple puts various objects is so complex that it is chaotic. Nobody can describe let alone predict where objects will go during a large computation, so what determinism really gives you is a false sense of security. It's like plugging the same number into a chaotic model and being relieved to get the same result each time, when if you were to change even the very last decimal place you would get a totally different and completely unpredictable answer. The point is, you really can't predict what is going on underneath. Now for the point. Given that the underlying processes are completely unpredictable, how do you build software that is robust ? You make it random. By building some randomness into the design, you are guaranteed that 1) the software can deal with its own complexity, ie: it won't break if things change slightly and 2) if there is a bug, you are likely to discover it. That in a nutshell is the philosophy behind Maple. I don't know whether the designers intended it to be this way, but the Maple kernel works pretty well as a result. I'm reminded of a quote by Ralph Waldo Emerson (regarding consistency and hobgoblins) which I'm worried might be taken as an insult. The point is that at a very low level, there's no hope of making Maple behave consistently in any meaningful way, so it's best not to worry about it and instead simply focus on making the algorithms correct.
Is this a point release with bugfixes in the library or is it strictly a Vista compatibility update ?
William, you sent me a private message and I'm trying to reply but it says you've blocked private messages. Please unblock them.
William, you sent me a private message and I'm trying to reply but it says you've blocked private messages. Please unblock them.
Has anyone tried QEPCAD ? The people behind it did some very good work in this area, I would expect it to be good.
Has anyone tried QEPCAD ? The people behind it did some very good work in this area, I would expect it to be good.
Don't use SMP support in Maple 11. This is the first release to include it and it is practically experimental. Even when it works you will not get a 2x speedup, because something like this takes years to get right. That being said, I think the company should be commended for aggressively trying to add this feature because it is critically important in the long run. But what is in Maple 11 is really more like the first big milestone. It is there: people can try it, bugs can be reported, and development can continue, and I know a lot of people who are looking forward to seeing it improve in the future.
Can you upload a matrix to MaplePrimes or somehow post in on the web ? If possible, one with less than 10^5 rows/columns to start. I want to have a crack at it.
You should run Structured Gaussian Elimination on such a matrix. See http://www.farcaster.com/papers/crypto-solve/node5.html
Has anyone else tried this ? Does this work ?
Get an Intel Core 2 Duo with 4 MB of L2 cache and at least 4 GB of 666 MHz RAM (leave room for more RAM later). You really want the 4 MB of cache to ensure good performance. These computers are not too expensive, so you can possibly buy two of them. I have been writing a C library for some time now and the performance of these things is incredible. In the past I have also been a big fan of AMD, however the Athlon X2 can not really compete except on low price. The Opterons are still fast processors and they may be better for some numerical workloads, however the Core 2 Duo's large cache and overall efficiency make it the current chip to beat. That may change when AMD's quad core Barcelona chip comes out this fall. If you want to run 64-bit software I strongly suggest you go with Linux, simply because there is no 64-bit version of Maple for Windows, nor is there likely to be one before the next major release. I'm not sure about Matlab, but I would expect it to have an x86-64 version for Windows by now. How much power do you need ? Our lab has an Intel Xeon 5160 (4 processor 2 chip Core 2 Duo). It is very hard to max this thing out for any length of time doing anything. Just make sure you get fast RAM (666 MHz DDR2 minimum - dual channel is worth it) and a large cache (4MB) and you are set.
It doesn't make any sense to market math to people who do not understand it, because they can't use it. How do they know the solution they got was right, or that their model was even right ? Does Maplesoft really want to be responsible for this market's ignorance ? Because these people will blame Maple when something is "wrong" even if it is their lack of understanding. I wish Maplesoft would push algorithm development and market a system that can really compute anything. We need software that scales, so that engineers and scientists can solve their problems symbolically. Despite many advances, Maple and Mathematica really don't scale, and if people are looking for a reason as to why the market for computer algebra systems is so small - that is it.
First 23 24 25 26 27 28 29 Last Page 25 of 39