vv

12453 Reputation

19 Badges

10 years, 1 days

MaplePrimes Activity


These are replies submitted by vv

@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

@dellair 

Note that Maximize also finds (generally) only local maxima. In your example the function was (almost) concave, that is why the command worked. Try:

Optimization:-Maximize(sin(x)*sin(x^2),x=1..7);

 

@Markiyan Hirnyk 

Your a  should be
a := int(eval(f,x=t)*exp(t), t = 0 .. x);

instead of

a := int(f*exp(t), t = 0 .. x);
Idem for b.
And Maple cannot compute them.

First 107 108 109 110 111 112 113 Last Page 109 of 166