Tupper's self-referential formula

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Tupper's self-referential formula is a self-referential formula defined by Jeff Tupper that, when graphed in two dimensions, can visually reproduce the formula itself. It is used in various math and computer science courses as an exercise in graphing formulae.

The formula was first published in his 2001 SIGGRAPH paper that discusses methods related to the GrafEq formula-graphing program he developed.

The formula is an inequality defined by:

{1\over 2} < \left\lfloor \mathrm{mod}\left(\left\lfloor {y \over 17} \right\rfloor 2^{-17 \lfloor x \rfloor - \mathrm{mod}(\lfloor y\rfloor, 17)},2\right)\right\rfloor

where \lfloor\cdot \rfloor denotes the floor function and 'mod' is the modulo operation.

Let n equal the following:

960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174350
718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173716995
165232890538221612403238855866184013235585136048828693337902491454229288667081096184496091705183
454067827731551705405381627380967602565625016981482083418783163849115590225610003652351370343874
461848378737238198224849863465033159410054974700593138339226497249461751545728366702369745461014
655997933798537483143786841806593422227898388722980000748404719

If one graphs the set of points (x,yn) with 0 \le x \le 106 and n \le y \le n + 16 such that they satisfy the inequality given above, the resulting graph looks like this:

Image:Tupper's self referential formula plot.png

For every set of coordinates (x,y) where the inequality holds, a black pixel covers (x,yn).

The formula itself is a general purpose method of decoding a bitmap stored in the constant n, so it could actually be used to draw any other image, and does not in fact contain any reference to itself.

The constant n is a simple monochrome bitmap image of the formula treated as a binary number and multiplied by 17. If n is divided by 17, the least significant bit encodes the top right corner; the 17 least significant bits encode the rightmost column of pixels; the next 17 least significant bits encode the 2nd rightmost column, and so on.

[edit] See also

[edit] References

[edit] External links

Personal tools
Languages