Carl Love

Carl Love

28045 Reputation

25 Badges

12 years, 333 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@casperyc Actually, having just run both NullSpace(GaussianElimination(M)) and NullSpace(M), I see no benefit to the preliminary step.

@casperyc Actually, having just run both NullSpace(GaussianElimination(M)) and NullSpace(M), I see no benefit to the preliminary step.

@PatrickT wrote:

The use of thisproc inside subsindets is very neat.

At first it seems recursive, but essentially it is not: The recursive call can only ever proceed one step. You could just as well write the procedure like below. This is probably a little faster, and is how I would've written it were I not working from your code. This also avoids the redundancy of rebuilding the format for each float.

Round3:= proc(x, n::nonnegint:= 1)
local format:= cat("%.", n, "f");
     subsindets(x, float, f-> parse(sprintf(format, f)))
end proc;

@PatrickT wrote:

The use of thisproc inside subsindets is very neat.

At first it seems recursive, but essentially it is not: The recursive call can only ever proceed one step. You could just as well write the procedure like below. This is probably a little faster, and is how I would've written it were I not working from your code. This also avoids the redundancy of rebuilding the format for each float.

Round3:= proc(x, n::nonnegint:= 1)
local format:= cat("%.", n, "f");
     subsindets(x, float, f-> parse(sprintf(format, f)))
end proc;

@Markiyan Hirnyk I (or my guess at least) stand corrected. You should make it an Answer so that I can vote up. I wonder why the intermediate step of GaussianElimination makes a difference. I would think that NullSpace would do that anyway.

@Markiyan Hirnyk I (or my guess at least) stand corrected. You should make it an Answer so that I can vote up. I wonder why the intermediate step of GaussianElimination makes a difference. I would think that NullSpace would do that anyway.

I think that "somewhat complicated" is an understatement. Your C5 is a dense 6 x 12 Matrix of "somewhat dense" polynomials in 12 variables. I guess (just guessing here) that this is well beyond the capability of any computer or CAS currently in existence.

I got an error trying to load your C4. The code to generate the matrices seems missing.

Briefly, this issue in handled by the output= permutation option to sort in Maple 17. I see from your header that you are using Maple 15. In that case you can do something like this:

Original list:
L:= [2,4,5,0,-1];
                        [2, 4, 5, 0, -1]
Pair each element with its index number:
L1:= [seq]([L[i],i], i= 1..nops(L));
           [[2, 1], [4, 2], [5, 3], [0, 4], [-1, 5]]
sort(L1);
           [[-1, 5], [0, 4], [2, 1], [4, 2], [5, 3]]

Briefly, this issue in handled by the output= permutation option to sort in Maple 17. I see from your header that you are using Maple 15. In that case you can do something like this:

Original list:
L:= [2,4,5,0,-1];
                        [2, 4, 5, 0, -1]
Pair each element with its index number:
L1:= [seq]([L[i],i], i= 1..nops(L));
           [[2, 1], [4, 2], [5, 3], [0, 4], [-1, 5]]
sort(L1);
           [[-1, 5], [0, 4], [2, 1], [4, 2], [5, 3]]

@somayeh Please repost this as a new Question. Also, show a little of the code for how you obtained the vector before you sorted it. It looks like it may actually be a list rather than a Vector.

@somayeh Please repost this as a new Question. Also, show a little of the code for how you obtained the vector before you sorted it. It looks like it may actually be a list rather than a Vector.

@Markiyan Hirnyk "Compromise" has a second definition different from the one used in that Wikipedia article. I see that that secondary meaning is absent from many of the online dictionaries. The secondary definition is "2. Something that combines qualities or elements of different things" from www.thefreedictionary.com or "1b : something intermediate between or blending qualities of two different things" from www.merriam-webster.com/dictionary . I meant the blending of the ideas of high density and low degree, one of which makes the polynomials larger while the other makes them smaller.

@Markiyan Hirnyk "Compromise" has a second definition different from the one used in that Wikipedia article. I see that that secondary meaning is absent from many of the online dictionaries. The secondary definition is "2. Something that combines qualities or elements of different things" from www.thefreedictionary.com or "1b : something intermediate between or blending qualities of two different things" from www.merriam-webster.com/dictionary . I meant the blending of the ideas of high density and low degree, one of which makes the polynomials larger while the other makes them smaller.

@Markiyan Hirnyk The dense, degree= 1 is a good compromise. I had considered using dense, but decided against having thousands of terms.

@Markiyan Hirnyk The dense, degree= 1 is a good compromise. I had considered using dense, but decided against having thousands of terms.

First 629 630 631 632 633 634 635 Last Page 631 of 709