acer

32592 Reputation

29 Badges

20 years, 40 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

The enterprising student might also write a variant on this procedure, using methodology from Joe's first post above.

Instead of taking in the a,b pair for the modular affine map as parameters, the procedure might accept a list of transformation guesses, eg. ["a"="  ","e=" e"]. It could then find the numeric places of those letters, solve for a and b within the procedure, and output the result of using that en/decryption.

acer

The enterprising student might also write a variant on this procedure, using methodology from Joe's first post above.

Instead of taking in the a,b pair for the modular affine map as parameters, the procedure might accept a list of transformation guesses, eg. ["a"="  ","e=" e"]. It could then find the numeric places of those letters, solve for a and b within the procedure, and output the result of using that en/decryption.

acer

Usually, if it can be plotted numerically then it can also be maximized numerically as well, to get better accuracy. If the plot is successful, then it's quite likely that some form can be optimized as well.

As pointed out, there is some problem with unevaluated summations inside the objective expression, due to innappropriate recognition of the dummy index as if it were an independent variable. That bug may well affect products and limits as well.

If one knows that the general summation call will result in an unevaluated summation expression, then one may instead supply the objective to Maximize in operator form (so as to allow it to be computed using evalf@Sum).

> g:= x -> x*Sum(i^(-5/2)*exp(-i*x),i=1..infinity):

> Optimization:-Maximize(g,0..2);
                [0.397154744381517988, [0.915476581931277900]]

In any event, the OP asked for a solution using the plot, and that is what Robert replied with. Seems perfectly sensible to me.

acer

Usually, if it can be plotted numerically then it can also be maximized numerically as well, to get better accuracy. If the plot is successful, then it's quite likely that some form can be optimized as well.

As pointed out, there is some problem with unevaluated summations inside the objective expression, due to innappropriate recognition of the dummy index as if it were an independent variable. That bug may well affect products and limits as well.

If one knows that the general summation call will result in an unevaluated summation expression, then one may instead supply the objective to Maximize in operator form (so as to allow it to be computed using evalf@Sum).

> g:= x -> x*Sum(i^(-5/2)*exp(-i*x),i=1..infinity):

> Optimization:-Maximize(g,0..2);
                [0.397154744381517988, [0.915476581931277900]]

In any event, the OP asked for a solution using the plot, and that is what Robert replied with. Seems perfectly sensible to me.

acer

No, that's not true.

The OP did not specify whether the sequence should be split starting from the left or the right. It may have been what he meant (left to right, starting with most significant digits) or it may not. He really didn't say. His example was a multiple of 3 in length, so splitting by groups of 3 digits looks the same starting from either direction.

Even if the OP further clarifies, the original post still lacks the information about direction. In that absence, it's not true to say that either direction is incorrect.

I gave two methods. One works from left to right, and the other from right to left. (They also reverse the order of the results, but that's irrelevant since ListTools:-Reverse is easy to do.)

> f(1234567890);
                              [123, 456, 789, 0]

ListTools:-Reverse(g(1234567890));
                              [1, 234, 567, 890]

acer

No, that's not true.

The OP did not specify whether the sequence should be split starting from the left or the right. It may have been what he meant (left to right, starting with most significant digits) or it may not. He really didn't say. His example was a multiple of 3 in length, so splitting by groups of 3 digits looks the same starting from either direction.

Even if the OP further clarifies, the original post still lacks the information about direction. In that absence, it's not true to say that either direction is incorrect.

I gave two methods. One works from left to right, and the other from right to left. (They also reverse the order of the results, but that's irrelevant since ListTools:-Reverse is easy to do.)

> f(1234567890);
                              [123, 456, 789, 0]

ListTools:-Reverse(g(1234567890));
                              [1, 234, 567, 890]

acer

I can never tell whether members who post questions in the Student forums are trying to learn some quick way (single routine call, say) or are hoping to figure out "how it works". Hopefully they get good coverage of both here, in general.

acer

I can never tell whether members who post questions in the Student forums are trying to learn some quick way (single routine call, say) or are hoping to figure out "how it works". Hopefully they get good coverage of both here, in general.

acer

It really should be possible to change Maple's Standard GUI so that it will compress/decompress worksheets on the fly.

If this is already being done for ebooks then that serves as proof of concept. But even if on-the-fly compression/decompressiom has to be implemented technically differently for regular worksheets than for ebooks, it should still be possible.

acer

It really should be possible to change Maple's Standard GUI so that it will compress/decompress worksheets on the fly.

If this is already being done for ebooks then that serves as proof of concept. But even if on-the-fly compression/decompressiom has to be implemented technically differently for regular worksheets than for ebooks, it should still be possible.

acer

Is the problem that the contents of the Array are not right, or that it gives a Warning, or that you cannot see the contents?

Ie, did you try it after,

interface(rtablesize=100):

The numeric output seems fine for me in both 32bit and 64bit Linux, with no Warning, with 12.01.

acer

Is the problem that the contents of the Array are not right, or that it gives a Warning, or that you cannot see the contents?

Ie, did you try it after,

interface(rtablesize=100):

The numeric output seems fine for me in both 32bit and 64bit Linux, with no Warning, with 12.01.

acer

If you click on the user's handle (appearing underneath the title of the post) then it takes you to that user's profile-page. I see an entry (on that page, not in the sidebar, if I am logged in) named "Write private message" under the heading "Private messages".

acer

convert(...,`+`) is an old technique. I am not 100% sure, but I suspect that it may predate add.

acer

convert(...,`+`) is an old technique. I am not 100% sure, but I suspect that it may predate add.

acer

First 519 520 521 522 523 524 525 Last Page 521 of 596