HAKMEM Computer Encyclopedia Enterprise Resource Directory Complete Guide to Internet (via CobWeb/3.1 ...(Site not responding. Last check: 2007-10-10)
(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 2^18.
HAKMEM also contains some rather more complicated mathematical and technical items, but these examples show some of its fun flavour.
Probably a lot of people know about the tricks in HAKMEM for counting the number of nonzero bits in a machine word.
The HAKMEM trick is to realize that, as this doubling idea progresses, the numbers stored in each block are considerably smaller than the maximum value representable in the number of bits used by the block.
The actual HAKMEM code uses a division rather than a multiplication but the idea is similar.
Hakmem 175 is probably the most famous example of bit bashing.
In just nine PDP-10 instructions in calculates the next higher number with the same number of 1 bits.
Note that a renaming and reusing of variables in the original PDP-10 code yields a saving one of instruction (and one variable) over the Hakmem original:
All these coins tossed a million times, checkmate combinations, statistics and game theory stuff reminded me of something I used to read with much more passion (back when I could still summon some sort of enthusiasm for math-related stuff): MIT AI Lab Memo 239 aka HAKMEM.
The HAKMEM is a compilation of tips, tricks and riddles for the math and computer geek.
Some of them are very outmoded (unless PDP-10 programming is your thing), but most are still entirely relevant (notably a handful of small theorems and empirical results, some of which still haven’t been proven to this day, afaik).
Most of this memo, and all of the page 35 appears to have been printed with a Courier typeface Selectric (tm) typeball, with a few math and superscript symbols from a Symbol typeball.
One way to start is to see what the most common size of an enclosing box is: If we find that (statistical) mode of the width of a box is a reliable statistic, we can use that as an estimate of the width of a character.
For hakmem page35, the mode of the width is 22, the height is 23.
Citations: Technical Report HAKMEM Item 101B - Gosper, Arithmetic (ResearchIndex)(Site not responding. Last check: 2007-10-10)
The four most basic arithmetic operations can be represented as follows: T add (x; y) 0 1 1 0 0 0 0 1 (x; y) x y T sub (x; y) 0 1 Gamma1 0 0 0 0 1 (x; y)....
Consider a general 2 dimensional lft t a c e g b d f h (x; y) axy cx ey g bxy dx fy h (141) Clearly, we can define all four basic arithmetic operations by t 0 1 0 0 1 0 0 1 (x; y) x y....
In the early and mid 90 s Di Gianantonio [5, 6] and Escard o [12] studied extensions of the theoretical language PCF with a real number data type based....
In HAKMEM items 97-101, available at among other places, Bill Gosper talks about doing exact numerical computations with regular continued fractions.
I don't know if his methods are extensible to operations other than arithmetic, although I can't imagine why anyone would care about them if they weren't.
(Arithmetic can be done nicely with rational numbers, and the only normal way to get nonrational numbers is through non-arithmetic functions on rational numbers.) He says that Gosper used 2-dimensional Moebius transformations in the HAKMEM item, and describes what that means, at .
[No title](Site not responding. Last check: 2007-10-10)
Newsgroups: sci.math From: dtd@world.std.com (don davis) Subject: Re: Continued Fractions Date: Wed, 13 Jan 1999 22:49:13 GMT Keywords: HAKMEMAlgorithms for dealing with arithmetic with continued fractions In article
one of the contributors to HAKMEM (gosper himself?) presented a set of recursive algorithms for continued- fraction arithmetic.
HAKMEM is a mid-70's archive of a small intradepartmental mailing list at MIT's AI Lab.
After taking a course on programming in his second year with John McCarthy, Gosper became affiliated with the MIT AI Lab.
His contributions to computational mathematics include HAKMEM [1] and the MIT Maclisp system.
He also made major contributions to the Macsyma computer algebra system at MIT, later working with Symbolics and Macsyma, Inc. on the greatly improved commercial versions.
, FOLDOC/Jargon's entry for HAKMEM as well as their entries on PDP, PDP-10, and PDP-11.
From: gkn@ucsd.Edu (Gerard K. Newman) Newsgroups: alt.folklore.computers Subject: HAKMEM (well, the pieces I have anyway) Keywords: HAKMEM, PDP-10 Message-ID: <18495@ucsd.Edu> Date: 6 Sep 90 16:01:18 GMT Organization: San Diego Supercomputer Center
I got 8 requests for HAKMEM in a period of about 36 hours, so I decided to go ahead and post it.
Hello, Lately, after reading the messages from "Mr Terse" and last nights wonderful numeric anecdote, I was wondering if you all; Dan Ingals, Ted Kaehler, et al; had ever considered writing up a paper of just those kinds of tidbits for us less enlightened folks.
Sort of like the AI Lab's (in?)famous Hakmem?
Maybe include some of the historical bits that have been discussed recently, too?
It contained an amazing, and amazingly random, collection of stuff.
Articles in hakmem spanned an unbelievable range of topics from simple display hacks, to mathematical riddles, questions, theorems and games, to schematics for building RF receivers and transmitters.
online version of HAKMEM is now available (and be assured, it's vastly more interesting than my collection!)
It contains the fascinating observation that there should exist a dissection that combines pieces from a dodecahedron, icosahedron, and icosidodecahedron to form a single large cube.
Henry Baker's hypertext version of HAKMEM includes a dissection of square and hexagon, depicted below.
How many smaller cubes can one divide a cube into?