vv

13837 Reputation

20 Badges

9 years, 326 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love 

1. The triangle inequality must be checked for all i,j,k,  not only for i<j<k. In your example, the resulting matrix violates the triangle inequality.

2. The u[i] variables are for the TSP problem, not VRP. There, u[i] need not be >=0 [actually, obviously, if u[i] satisfy the conditions, u[i]+const satisfy too]. A special solution for u[i] is the step at which the vertex i is visited (but u[i] is not unique).
In VRP the problem is that the tours do not have the length n, so, insted of n should be the lenth (which is not known, probably it is possible to use the sum over i,j of x[i,j,v]).
There is another problem. In my brute-force solution, the tours are disjoint (except vertex 1, of course). I don't have an example where nondisjoint tours lead to a better solution.

 

@Carl Love 

When running your worksheet I obtain other results. Please check.
Note also that " Check and ENFORCE triangle inequality " does not work this way.

@Carl Love You forgot op:
factor(op(1, convert(cos(Pi/257), RootOf)), sqrt(257));

@Kitonum 

Sure.
Note that in fact (-1)^(1/7) is itself a radical, so, if we want a simple cos(Pi/7)  we may use ( (-1)^(1/7) + 1/(-1)^(1/7) )/2.

@Kitonum 

Actually,

@Stretto 

(3^3)%/3;   is displayed  27/3  when interface(typesetting=standard);
Probably you have an older Maple version where interface(typesetting=standard) is the default.

But you should consider the fact that, unlike LaTeX, Maple is not a typesetting program. Maple offers some minimal options (note the inert operators %xxx were introduced mainly for other purposes) in this direction, but in general a user  wants correct results rather than special appearence. Not to mention that there are so many possibilities ...

BTW, most people will avoid a/b*c (in maths) and write  (a/b)*c. Maple does not care, it will return the "native" form.

 

@Kitonum 

It's shorter because you have not started from the integral, so, no need for IntegrationTools.

Actually I find the last of my favorites not so bad. It is rather compact:

P.S. The D notation should be natural for a mathematician. It is used by Dieudonné/Bourbaki.
But of course, De gustibus (et coloribus) non disputandum.

@mmcdara 

I'd prefer to see   instead of

Or, maybe   or 

@Carl Love 

For the body of a module the documentation is not clear enough. It seems that the assignments to locals are always executed here.
For example, if in Rand the ModuleLoad is removed, it works the same from library or directly.

Just want to add that the final answer can be simplified a bit, but unfortunately Maple needs a litte help for this:

simplify(eval(ans, t=2*ln(z))):
ANS:=simplify(eval(%, z=exp(t/2)));

 

@Kitonum 

Of course, a more "artistic" version is welcome.

@acer
Sometimes this old post works. In this case:

Par3d((8 - x^2 - y^2-z)*(x^2 + y^2-z), x=0, y=0, z=4, 10, 40,40):
PLOT3D(%);

 

 

@Earl 

The options are distinct.
For more than one inequalities, inequal fills the intersection while implicitplot fills the union.

@Carl Love 

Such a method has chances only for simple expressions (not containing user's function calls).
A general method would need a kernel redesign.

First 51 52 53 54 55 56 57 Last Page 53 of 176