Carl Love

Carl Love

28045 Reputation

25 Badges

12 years, 334 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@sursumCorda It seems to me that the term "lexical scoping" on the help pages that you linked is being used with a different meaning than the dichotomy "lexical scoping" versus "dynamic scoping" that we're discussing here. I think that that help page is actually talking about lexical variables (not as a dichotomy) rather than lexical scoping. As the test code that I posted above shows, even Maple's lexical variables are dynamically scoped.

Although those help-page examples still work perfectly as presented, it should be noted that they're about 23 years old and were written before the existence of modules or any formal mechanism for object-oriented programming. 

I'm not sure about this, but it seems that you may be conflating external compiled code with evalhf'able code.

@hojat Please post the exact error message, or upload a worksheet showing it. While the words "could not store" may appear in the new error, I doubt that the mathematical expression shown is the same.

The three most likely causes of this error are

  1. A misspelled variable name which Maple cannot convert to a numeric value.
  2. A variable that you intended to assign a numeric value to, but you forgot to.
  3. The presence of small nonzero imaginary parts due to decimal round-off error in a context (such as minimization) where real numbers are required. 

All of these are usually easy to correct.

I think that acer's Answer is better than mine, and had I seen it before I wrote mine, I wouldn't have answered.

@lcz The paper that I referred to above is one that you posted a link to in a previous thread:

  1. Marthe Bonamy, Oscar Defrain, Marc Heinrich, Michał Pilipczuk, and Jean-Florent Raymond. Enumerating minimal dominating sets in Kt-free graphs and variantsarXiv 1810.00789

@mmcdara Yes, that is why I knew that example off the top of my head.

Regarding your question from your last paragraph: The first argument of Eval can be anything:

Eval(A, x= b);

The could be replaced by any expression. There is nothing worth documenting about the case where A is a expression.

You need to choose as integers that can be represented in multiple ways as a sum of two 4th powers of integers. Those are rare. For context, the smallest integer that can be represented in two distinct ways as a sum of two 3rd powers of positive integers is 1729.

I think that the smallest possible c is

635318657 = 59^4 + 158^4 = 133^4 + 134^4,

which I found by brute-force search of all sums of 4th powers of distinct positive integers <= 200:

select[flatten](
    x-> nops(x)>1, 
    ListTools:-Classify(`+`@op, combinat:-choose([$200]^~4, 2))
);

And I'm not saying that this c will work, just that it's the smallest c for which there's even a chance.

Your update from today, with significant bug-producing examples, is quite important. I totally missed it when I reread this thread some hours ago. Note that MaplePrimes does not change the date in the top right corner of any post. You should repost that as a new Reply to the Question so that it gets its own date and hopefully wider readership.

Is there some good reason why your code is nearly identical to the code in the current basins-of-attraction Question thread initiated by @Danish Toheed?

Sorry, my previous title "6, or possibly 5" was wrong. It was based on a two-day-old memory of having played around with this graph. It should actually be "7, or possibly 6". Specifically,

  • I can easily show that the bondage number is <= 7 by removing all 7 edges from vertex 1 (and it probably would work for any vertex). Then it only takes miiliseconds (using my MinDominatingSets procedure) to show that the domination number is 5 instead of 4.
  • Using the technique that I described in the Answer above, it takes an average of only 54 microseconds to remove a subset of edges and check whether the domination number is still 4. Using this, I've checked all 31 million 5-subsets of edges, and they all leave the domination number at 4. Thus, the bondage number is > 5.
  • There are 406 million 6-subsets of edges. To check them all would take a little over 6 hours.
  • I am working on a heuristic search method to look for an "unbinding set" of size 6. The idea is to use the edges that individually give the greatest reduction to the set of 300 dominating sets. Since many reduce it by 56, and 6*56 > 300, I have some hope for this.

Although the numeric BVP solver does provide the feature that I mentioned above, it might not be a good idea to use it in this particular case. Two reasons:

  1. In this case, it is trivial to compute those three values after the system is otherwise solved. If sol is the solution returned by dsolve, they can be read off directly from sol(0).
  2. I'm not sure about this, but it's possible that including the symbolic variables significantly increases the computational burden and increases the chance of that most-dreaded of BVP errors "Newton iteration is not converging".

Regarding the label=  "dontexpand": At ?RootOf, it's explained that its last argument can be label= (almost anything). My guess is that some part of the solving process added this to your RootOf to convey some information to some other part of the process. Although I'm not sure, I don't think that this has anything to do with the error. It just happened to be inside the RootOf at the time the error occurred.

@tomleslie Maple's numeric BVP solver will solve for symbolic scalar variables in the system if you provide one extra boundary condition for each such variable. The OP wants a[1]a[2], and a[3] to be those variables. Thus 10 is the correct number of boundary conditions.

@lcz It's not specific to graphs. If L is any list, and is any permutation of its indices, then L[P] is the corresponding permutation of the elements. 

Thanks for catching the stray {My eyesight can't distinguish it from [ at the default type size.

First 49 50 51 52 53 54 55 Last Page 51 of 709