As for your last remark, did you enter
?RealRange in Maple 10? I get a nice help page, more specific than the
?properties page in earlier versions.
As an aside, from Maple 9 on, you can use
LinearAlgebra[MatrixExponential] instead of
linalg[exponential]. This routine has been optimized considerably in Maple 10 for floating-point data. Please see
However, I have not yet modified your code (still running the original version)...
Right, my Maple worksheet is no longer brute force, as it uses a set to avoid unnecessary work - in contrast to the original BASIC program. I should have changed the title in my blog post.
And the problem can be done in your head, true. Back in the mid-80s, computers were not that widely spread among TV audience. ;-)
However, 84_pickmax.mpl does not solve the "Kopf um Kopf" challenge, where each digit may occur only once, and which has a unique solution.
Also, I have not yet figured out how to easily change 84_ponderthis.mw to accomplish that task. Can you give more hints?
That's right, Spectrum BASIC did not have recursion.
I don't recall the details of our implementation. Even if I find the backup (on audio tape or floppy disk), it won't be readable any more. AFAIR, we used a string to store the number.
Contrary to my intention, I've written a Maple worksheet, using a set of digits (the natural choice for such a brute force approach, IMHO).
Quick, but ugly. I'll post it in my blog.
Some 20 years ago, a restricted version of this challenge was posed in a science show on German public TV ("Kopf um Kopf"): arrange the digits 1,..,9 so that the number resulting from the first two digits (from the left) is divisible by 2, etc..
A friend of mine and me used a Sinclair Spectrum (8 bit home computer) and nested loops in BASIC to find the result... Just for fun, we didn't actually take part in the competition.
I still know the result, so I won't write a Maple proc, but maybe anyone else might be interested.