sursumCorda

1279 Reputation

15 Badges

2 years, 340 days

MaplePrimes Activity


These are replies submitted by sursumCorda

@Carl Love Thanks for your comments. The reason why I try different methods is that, recently, I read an old essay on Mathematica which claims that if one large graph is Hamiltonian, then running ChvátalQ may be faster than running native Combinatorica`HamiltonianQ. So I want to test the same thing in Maple.

Besides, the help page also says: By setting infolevel[IsHamiltonian] to an integer greater than 1 a message will be displayed stating how the graph was proven, or disproven, to be Hamiltonian. But this setting doesn't work in some cases. (Although I never need such messages, a bug described below does exist.)
Attachment: infolevel[IsHamiltonian].mws

@acer "Strangely" means: Maple can work out 

minimize(x^3 + y^3 + z^3 - 4*x*y*z, x = 0 .. infinity, y = 0 .. infinity) assuming z>0;

correctly, or work out 

minimize(x^3 + y^3 - 4*x*y, x = 0 .. infinity, y = 0 .. infinity); # Put z = 1 here, and remove the constant.

correctly, but Maple give incorrect result for 

minimize(x^2 + y^2 - 4*x*y, x = 0 .. infinity, y = 0 .. infinity); # cubic → quadratic

How about x^n+y^n-4*x*y
I don't know why Maple cannot deal with x2+y2-4xy (or more clearly, (x-y)2-2xy).

This may be a serious issue; it turns out that certain Maple's symbolic results (without any warnings) are not always reliable indeed. For a simple problem, we can easily discover potential mistakes, but what about large-scale and complex problems…

@mmcdara Some substitutions can be applied, but unfortunately, they are of no effect. For instance, 

minimize(evalindets(x^3 + y^3 + z^3 - 4*x*y*z, 'symbol', x -> 1/x - 1), [x, y, z] =~ 0 .. 1);

still returns 0. Set [x,y,z]=~10^(-12)..1 may avoid incorrect result. However, I hope that Maple can "prove" the minimum (or infimum) by itself (like Mathematica); otherwise Optimization:-Minimize is certainly the better choice. 

@acer Thanks for your examples. Strangely, 

minimize(x^3 + y^3 + z^3 - 4*x*y*z, x = 0 .. infinity, y = 0 .. infinity) assuming z>0;

returns correct results, but the much easier version 

minimize((x - y)^2 - k*x*y, [x = 0 .. infinity, y = 0 .. infinity]) assuming (k > 0);

still returns wrong results. Any reason?

@acer For users, the following one may be better in some sense. 

eval(eval(foldl(uneval(seq), F(i, j, k), i = 1 .. Ri, j = 1 .. Rj, k = 1 .. Rk)));

Or equivalently, 

(eval@@2@foldl)(''seq'',F(i,j,k),i=1..Ri,j=1..Rj,k=1..Rk);

Since it is more direct than using _seq or S (or other dummy names), though I think that there is no essential difference for Maple between them. (But strangely, while eval(subs(...)) works, subs[eval](...) fails.)
John Fredsted's construction is simple as well, but for big (i.e., long) sequence, eval–foldl–seq version is faster in my computer.

First 21 22 23 Page 23 of 23