Carl Love

Carl Love

27214 Reputation

25 Badges

11 years, 344 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Samir Khan I appreciate the great use of video/animation that you made in your Post. Vote Up!

@vv If there's a standard definition of ODE, it should be modified so that things that can't be put in that form (or the equivalent form for higher derivatives) are no longer considered ODEs.

@Ronan You can change the prompt (yes, that means the > ) with

interface(prompt= "(**)")

This is not a method of commenting out code. It's purpose is so that prompts that are accidentally transfered into the code by copy-and-paste operations will not be syntax errors because they will be read as comments.

Using Windows, I've never had a situation where the prompts get copy-and-pasted.

My preference is no prompt:

interface(prompt= ""):

I think that this is a clue to what's happening: There are numerous solutions that are exact duplicates.

invsol:= solve(sol=x+b, y):
nops([invsol]);

                               
16
nops({invsol});
                               
2

@charlie_fcl Are there really any problems? Or do you just get that warning message? A warning is not an error, and it may be innocuous.

@janhardo I don't know the exact relationship between the value of kernelopts(level) and the value that printlevel needs to set to to print at the corresponding level. It would require some experimentation.

@Mathrookie94 @acer Is it possible that the output is being affected by interface(displayprecision) set in an initialization file?

You can check by giving the command

interface(displayprecision)

from a command line. The response should be -1 if it hasn't been altered.

@lcz Note the need for nolist pointed out by @dharr . My Answer should be corrected to

op~(
    1,
    {entries}(
        ListTools:-Classify(
            g-> [seq](op(4, GraphTheory:-CanonicalGraph(g))), graph_list
        ),
        'nolist'
    )
)

 

@dharr Sorry that I forgot the nolist; I often do. I wish it were the default! I will correct my Answer.

And I retract my claim that the help page is incorrect.

And a Vote Up for @dharr!

@dharr Thank you for that example. My procedure for the canonical representative was based on the following paragraph from help page ?CanonicalGraph plus the somewhat obvious fact that there's a bijective correspondence between adjacency matrices and op(4, ...):

  • Owing to graph symmetries, it is possible that CanonicalGraph may return distinct vertex orderings when invoked on two graphs G and H with identical vertex sets and edge sets. The representation is nevertheless canonical in the sense that if G and H are isomorphic, AdjacencyMatrix(CanonicalGraph(G))=AdjacencyMatrix(CanonicalGraph(H)).

Your example shows that this statement is wrong.
 

@dharr When there is a (reasonable) procedure to find a canonical equivalence-class representative, it is far more effcient to use ListTools:-Classify than to use ListTools:-Categorize. The former is O(n) and the latter is O(n^2), where is the number of items being classified,

@lcz To just get the non-isomorphic graphs, use

op~(
    1,
    ({entries}@ListTools:-Classify)(
        g-> [seq](op(4, GraphTheory:-CanonicalGraph(g))), graph_list
    )
)

Although this generates the equivalence classes and then discards all but the first element of each, it is far, far more efficient than your loop. This method is O(n) and the loop is O(n^2), where n = nops(graph_list).

If is a Graph, then V:= op(4,G) is a compact (and far more efficient) representation of G's adjacency matrix A. Specifically, 

  • A = Matrix(numelems(V)$2, (i,j)-> `if`(j in V[i], 1, 0))

Let me know if you understand this.

This vector---which I call the neighbor array---is already computed and stored in every Graph object, whereas adjaceny matrices are generated as needed.

 

 

@Hullzie16 The two-variable-function approach can achieve something much closer to what the OP wants by separating the two variables like this:

F:= a-> x-> a*x:
f:= F(3);

                      
f := x -> 3*x

To use a shooting method in this case, you need known values at the right boundary (x=100), which you try to achieve by guessing initial conditions (D@@2)(f)(0), D(phi)(0), and D(theta)(0). You seem to be guessing values for x=100 rather than x=0.

Also, the differential order of this system is 7, so you need three guesses, not 4.

This Reply is not an attempt to correct the numerous other errors you've made. I just need to know 3 actual values at x=100 or x=infinity to proceed.

Just guessing here: Is it possible that your phone version is licensed and your iPad version is a free download?

First 6 7 8 9 10 11 12 Last Page 8 of 698