Carl Love

Carl Love

28085 Reputation

25 Badges

13 years, 94 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

And here's the imaginary part:

@dharr Okay, I understand, and I withdraw my comment about it being incorrect. And I put a more-formal withdrawal at the top of the Reply.

[Edit: I understand dharr's followup explanation, and I withdraw my comment about the work being incorrect. I didn't realize that it was just solving (correctly) a different problem than the OP intended, specifically one where certain edges are forbidden.]

@dharr Your algorithm for reducing the Hamiltonian cycle to a Hamiltonian path is incorrect. In particular, I don't understand how you chose your edges. If I apply my dummy-vertex algorithm (from my Answer below) to your points, I get a significantly shorter minimal path, 7.3 vs. 9.8. You can easily verify from the plots that my path is Hamiltonian and my edge weights are the same as yours.

restart:
pts:= [[0,0], [1,2], [4,2], [3,1], [5,1]]:  
n:= nops(pts):
GT:= GraphTheory: LA:= LinearAlgebra:
G:= (GT:-Graph@Matrix)(
   n+1, 
   (i,j)-> `if`(i=j, 0, `if`(i>n or j>n, 1, LA:-Norm(<pts[i]-pts[j]>, 2))), 
   shape= symmetric, datatype= hfloat
):
(MinDist, HamPath):= GT:-TravelingSalesman(G, startvertex= n+1):
MinDist-= 2; HamPath:= HamPath[2..-2];
                  MinDist := 7.30056307974577
                   HamPath := [1, 2, 4, 3, 5]
#Plot:
H:= GT:-InducedSubgraph(G, [$1..n]):  #Discard dummy
GT:-SetVertexPositions(H, pts);
GT:-HighlightTrail(H, HamPath);
GT:-DrawGraph(H, axes= frame, scaling= constrained);

I think you're posting in the wrong forum. As far as I know, no Meplesoft product has a subpart named "Workday".

I wonder how ChatGPT came up with the non-existent command Optimization:-LinearSumAssignment. It had to have read that somewhere; it doesn't just make up fake Maple command names on a whim.

@C_R The command that you're thinking of is called unames.

@Scot Gould I've also noticed a speed improvement the past day or two 

@nm The counter can be reset, without using restart, by

`tools/genglobal`[1](_C, 1, reset);

That form of the command just does the reset without returning a name. So, the next call to `tools/genglobal`(_C) will return _C1.

@Scot Gould I've experienced the same thing as you: The norification flag used to do something (not something that I find useful---but that's beside the point) and now it just says Loading.

See the help page ?simplify,size.

@mmcdara Those two things are not necessary for your example, but might be needed for some generalization that you have in mind. What I can't figure out is why assigning invfunc[phi] doesn't require the unprotect, but assigning both invfunc[phi] and invfunc[invphi] does require it.

The use of invfunc can be implemented like this:

restart:
phi:= u-> (u^(-theta)-1)/theta:
invphi:= unapply(solve(phi(x)=u, x), u):
unprotect(invfunc): invfunc[phi]:= invphi: invfunc[invphi]:= phi: protect(invfunc):
C:= (u,v)-> simplify((phi@@(-1))(phi(u)+phi(v))):
C(u,v);

            

To understand better what's going on here, check out showstat(`@@`).

@janhardo I don't find it at all surprising that ChatGPT can give you an extensive discussion of the infinitude of primes, which is one of the most-ancient topics of formal abstract mathematics. But how does it involve Maple or any computer language?

Yes, I have noticed that most operations on MaplePrimes have been much slower for a few weeks.

I deleted your Question from today because it is essentially the same as this one. If you have additional information, put it in this thread. 

First 21 22 23 24 25 26 27 Last Page 23 of 709