Post Reply 
Is HP42 smarter than a kid on TV?
04-28-2018, 10:18 PM
Post: #3
RE: Is HP42 smarter than a kid on TV?
(04-28-2018 08:14 PM)pier4r Wrote:  If I have to guess, it is the 5x5 magic square, where the magic number is 65. Then one can scale the numbers and the condition of having a multiple of 5 helps redistributing the numbers.

But that's a guess. In any case the algorithms would be interesting.

Exactly. The kid just needs to remember *one* 5x5 magic square formed by the numbers 1 to 25 (which is very easy because of the symmetries, no need to remember the contents of the 25 locations), which thus has a magic sum of 65 for every row, column and both main diagonals, and then adds a constant to every number where the constant is simply the provided number less the magic constant and the result divided into 5 (which is why the provided number has to end in 0 or 5 lest the division into 5 would fail to give an integer result).

For instance, in the video he is given 265. He just subtracts from it the fixed magic constant 65, which gives 200, the divides this into 5, which is 40. He then adds 40 to every number from 1 to 25, which gives numbers from 41 to 65, and proceeds to very theatrically fill up the locations in some haphazard order, just for effect. He could actually fill them up in a few seconds left to right, top to bottom, without the theatrics and the "checks" but there you are.

In short, a lame theatrical act which doesn't require any mathematical skills whatsoever, let alone "genius", and a minimal amount of memory. As for the algorithm, it is anything but interesting: a few HP42S steps or about 2-3 lines of HP-71B code, at most. Execution time (one subtraction, one division, and 25 sums, all integer) is essentially 0.

Regards.
V.
.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Is HP42 smarter than a kid on TV? - Dol - 04-28-2018, 08:03 PM
RE: Is HP42 smarter than a kid on TV? - Valentin Albillo - 04-28-2018 10:18 PM



User(s) browsing this thread: 1 Guest(s)