HAKMEM: /hak´mem/, n.MIT AI Memo 239 (February 1972). A legendary collection of neat mathematical and programming hacks contributed by many people at MIT and elsewhere. (The title of the memo really is “HAKMEM”, which is a 6-letterism for ‘hacks memo’.) Some of them are very useful techniques, powerful theorems, or interesting unsolved problems, but most fall into the category of mathematical and computer trivia. Here is a sampling of the entries (with authors), slightly paraphrased: Item 41 (Gene Salamin): There are exactly 23,000 prime numbers less
than
Item 46 (Rich Schroeppel): The most Item 81 (Rich Schroeppel): Count the magic squares of order 5 (that is, all the 5-by-5 arrangements of the numbers from 1 to 25 such that all rows, columns, and diagonals add up to the same number). There are about 320 million, not counting those that differ only by rotation and reflection. Item 154 (Bill Gosper): The myth that any given programming language
is machine independent is easily exploded by computing the sum of powers of
2. If the result loops with period Item 174 (Bill Gosper and Stuart Nelson): 21963283741 is the only
number such that if you represent it on the Item 176 (Gosper): The “banana phenomenon” was
encountered when processing a character string by taking the last 3 letters
typed out, searching for a random occurrence of that sequence in the text,
taking the letter following that occurrence, typing it out, and iterating.
This ensures that every 4-letter string output occurs in the original. The
program typed BANANANANANANANA.... We note an ambiguity in the
phrase, “the Note: This last item refers to a
HAKMEM also contains some rather more complicated mathematical and technical items, but these examples show some of its fun flavor. An HTML transcription of the entire document is available at http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html. |