Tupper's self-referential formula
From Wikipedia, the free encyclopedia
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:
where 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,y) with 0 < x < 106 and n < y < n + 17 such that they satisfy the inequality given above, the resulting graph looks like this:
For every set of coordinates (x,y) where the inequality holds, a black pixel covers (x,y).
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. 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] References
- Tupper, Jeff. "Reliable Two-Dimensional Graphing Methods for Mathematical Formulae with Two Free Variables" http://www.dgp.toronto.edu/people/mooncake/papers/SIGGRAPH2001_Tupper.pdf
- Weisstein, Eric W. "Tupper's Self-Referential Formula." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html
- Bailey, D. H.; Borwein, J. M.; Calkin, N. J.; Girgensohn, R.; Luke, D. R.; and Moll, V. H. Experimental Mathematics in Action. Natick, MA: A. K. Peters, p. 289, 2006. http://crd.lbl.gov/~dhbailey/expmath/maa-course/hyper-ema.pdf
- "Self-Answering Problems." Math. Horizons 13, No. 4, 19, Apr. 2005
- Wagon, S. Problem 14 in http://stanwagon.com/wagon/Misc/bestpuzzles.html
[edit] See also
[edit] External links
- TupperPlot, an implementation in JavaScript