Carl Love

Carl Love

28100 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk 

Okay, you're right, it's easy. Yes, I read the (very brief) help before replying. It has nothing to say on the matter. The key thing is that GraphTheory:-SequenceGraph maintains the order in its generic sequence labelling---a fact that isn't mentioned on its very brief help page---but which I can see from reading the procedure's code.

Anyway, my procedure has significant pedagogic value for teaching this fundamental graph algorithm (often the first algorithm taught in a graph theory course). It does three things simultaneously: It determines whether the sequence is graphical, it generates the required graph, and it maintains the vertex order.

@Markiyan Hirnyk 

Answer edited. Actually, I edited it while you were replying.

By the way, you mean ?fracdiff rather than ?fdiff.

@Markiyan Hirnyk Sure, here's an example.

 

N:= 17:

G:= GraphTheory:-RandomGraphs:-RandomGraph(17,.5);

GRAPHLN(undirected, unweighted, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], Array(%id = 18446744074200383230), `GRAPHLN/table/14`, 0)

DS:= GraphTheory:-DegreeSequence(G);

[6, 10, 10, 4, 9, 8, 7, 10, 7, 11, 5, 5, 7, 8, 7, 8, 10]

V:= combinat:-randperm([a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z])[1..N];

[n, m, c, x, w, r, i, e, j, h, b, l, d, u, z, k, a]

G:= GraphTheory:-SequenceGraph(DS);

GRAPHLN(undirected, unweighted, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], Array(%id = 18446744074200383350), `GRAPHLN/table/15`, 0)

GraphTheory:-DrawGraph(G);

 


Now your job is to relabel the vertices using the original correspondence. That is, must have degree 6, m must have degree 10, c must have degree 10, x must have degree 4, etc. You may do it programmatically or "by hand". Of course, I'll allow you to regenerate the random selections, in which case the actual correspondences will differ.

Download degree_sequence.mw

@Markiyan Hirnyk It would be difficult to do that while maintaining the original correspondence between the degrees and the labels, especially for a large graph. To do it automatically would require a procedure about as long as the one that I just gave.

@Mac Dude 

Fourteen years ago I wrote a program to convert plots to logarithmic form (along 1, 2, or 3 axes). This was long before the option axis[n]= [mode= log] existed. IIRC, it worked on any plot structure except the ISOSURFACE (the structure used by implicitplot3d). I have no idea what it'll do with dual-axis plots (I don't know whether you're using those). It has options that give you a lot more control over the tickmarks than even with the modern tickmarks options. It's in the Maple Applications Center under the name "Improved logarithmic plotting in 2 and 3 dimensions".

If you can't figure it out, send me your program that generates the non-logarithmic plot, and I'll see if I can adapt it.

@Mac Dude 

Simply showstat(`plots/display`);

There's no need to fear overwriting your Maple installation. Just save any changed procedures to your own directory.

@tomleslie 

At first I considered suggesting DynamicSystems:-BodePlot, but I can't see how to make it work with explicit data, which I think is what the OP has.

@Axel Vogt 

Good procedure, Axel. It may go a long way towards an algorithmic solution to the problem. I replaced your floor with ceil, and it made no difference in any example that I tried. But I wonder if there is any example where it makes the difference between an answer and no answer.

Kitonum: Your example h(n) shows a limitation in Maple's product, not really in limit. Of course, all infinite products and sums are limits of sequences, but the areas of Maple that are used are very different.

@Kitonum Yes, I know that the actual sequence is increasing. I am saying that your sequence of floating-point approximations produced at Digits = 10 is not monotonic, so that you can't say that the "accuracy falls". Actually, the accuracy varies erratically. 

@lham Sorry, I counted wrong. The equation has five variables (or one variable and four parameters), not four. So your question isn't as ridiculous as I first thought. The command to solve such equations is

solve(..., parametric);

But I wouldn't call it a "parametric equation"; I'd call it an "equation with parameters". Unfortunately, the above command only works for polynomial equations. See ?solve,parametric.

If you want help with MapleSim, it sure would be helpful if you selected MapleSim from the pull-down list in the editor. For the vast majority of us here who know Maple but know nothing of MapleSim, and who automatically try to interpret Questions in a Maple context, your question probably appears as utter jibberish. For example, the first thing that I think of seeing "CAD" is "Cylindrical Algebraic Decomposition". I only know to suspect MapleSim because I recognize your name as someone who often asks Questions about MapleSim.

@Kitonum 

Your sequence is not monotonic. It is just random floating-point effects because you have Digits set to 10, which isn't sufficient to accurately deal with your 11-digit integers.

@Kitonum 

That's fairly impressive considering that Maple's numeric summation capability is very weak. But that's no algorithm. I hope that that's not the way that Mathematica does it. The technique could be used to make a good guess at the answer, and a correct guess could be a substantial part of an analytic solution.

@lham 

So, you have one equation with four variables and no other conditions and you want to know what four-tuples satisfy the equation. Nothing can be said other than that they satisfy the equation; there's no other information. Perhaps the equation can be simplified a bit, and obviously it can be solved for phi[0], but that's all.

@Kanellopoulos 

No, to me it is not at all "obvious what will happen". It doesn't help that you don't show your Maple code for the above plots.

You say that you checked that the splines are solutions to the PDE system. How is it possible to do that without any variation in the t dimension? In other words, how did you approximate the derivatives with respect to t?

You say the orange curve is Maple and the blue curve is Mathematica. I admit to not knowing much about waves and PDEs, but the blue curve looks highly suspicious to me, and the orange curve looks reasonable. Why does the blue curve look more accurate to you?

First 479 480 481 482 483 484 485 Last Page 481 of 709