vv

13922 Reputation

20 Badges

10 years, 8 days

MaplePrimes Activity


These are replies submitted by vv

@Kitonum 

I agree, but I think that the command should have been programmed more carefully.

@Kitonum 
This one is bounded.

plots:-contourplot(1/(x^2+y^2), x = 0.05 .. 2, y = 0 .. 2, contours = 5);

(but here adding grid=[500,500]  ==> OK)

@brian bovril 

LPSolve will not be able to solve a VRP problem for n>20 say (I have tested on an abandoned "almost working" version). On the other side, the brute force (see the code in the other "VRP" thread)  works well for toy problems like this.

 

@brian bovril 

The code you have cited was from
http://www.mapleprimes.com/questions/220639-TSP-Integer-Program-Problem
and is for the TSP problem. (Note that in wiki the algorithm and the node 0 error is now corrected).
You try to use part of the code for VRP. It does not work.

What is needed is a correct and complete algorithm for VRP; it does not matter whether it uses a node 0 or not, the Maple code can be easily written and adapted.  Unfortunalely the algorithm is not clear (at least for me); for example what is the difference between N and C; do they contain 0? You should try to find a more clear version, or maybe someone here already knows these things.

 

@Joe Riel 

So, if A is a nxn binary matrix and d :=  its usual determinant, then:
- A has the rank n over the field Q (or R or C) iff d <> 0.
- A has the rank n over the field GF(2)   ( = Z2 )   iff d is odd.

@shzan 

Sorry but still not clear. You have a polynomial in several variables and you want a special order for its monomials. You must define this order. It does not matter whether this depends on the polynomial but it must be defined, I cannot guess it.

If this order cannot be expressed in terms of plex/grlex/tdeg accepted by sort then the list of the terms must be sorted via a custom function.

Maybe what you want is:

n:=9;  plex(seq([u[i],v[i]][], i=n..1,-1),d);
    plex(u[9], v[9], u[8], v[8], u[7], v[7], u[6], v[6], u[5], v[5],   u[4], v[4], u[3], v[3], u[2], v[2], u[1], v[1], d)

 

@acer 

Documented but still strange (at least in this case)    :-)

@acer 

Yes, radnormal should be enough. Actually it will use evala and RootOfs.

A strange fact is that using just
simplify(radnormal(f(3))) assuming positive;

the radicals persist.

 

 

@brian bovril 

Unfortunately the algorithm is not complete/clear:
- What is the role of the node 0?
- Is it in N? in C?
- What is c[0, j]  ?   Or is it not defined/necessary?
- Are (some) (0,j), (i,0) in A?

Also, an example with known solution would be nice.

 


 

Provided that Digits is >=3.  That's why I have used:
evalf[3](151/11);
convert(%,rational,3);

@taro 

@Axel Vogt 

This is exactly the same but a bit longer (due to the change and restore Digits)..

((t->[1,t[]])~)~(Tours);

@Kitonum 

@tomleslie 

In this context almost nothing can be guaranteed by a CAS: a zero of a continuous function, the convergence of a numerical sequence, ...
is(exp(1)+Pi, rational);
returns false, but this is not known. etc.

@acer 

You are right, I forgot (or maybe did not know) that for one variable method=branchandbound is able to find global extrema.

@dellair 

So, are you saying that Maple crashes is you copy&paste the above code in a fresh session?
In Maple 2016.2, 64 bit, Win 7 it works.

ok.mw

First 117 118 119 120 121 122 123 Last Page 119 of 176