Tupper's self-referential formula
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 maths 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 k equal the following:
4858450636189713423582095962494202044581400587983244549483093085061934704708809928450644769865524364849997247024915119110411605739177407 8569197543265718554420572104457358836818298237541396343382251994521916512843483329051311931999535024137587652392648746133949068701305622 9581321948111368533953556529085002387509285689269455597428154638651073004910672305893358605254409666435126534936364395712556569593681518 4334857605266940161251266951421550539554519153785457525756590740540157929001765967965480064427829131488548259914721248506352686630476300
If one graphs the set of points (x,y-k) with
and
such that they satisfy the inequality given above, the resulting graph looks like this:
The formula itself is a general purpose method of decoding a bitmap stored in the constant k, so it could actually be used to draw any other image. When applied to the unbounded positive range
, the formula tiles a vertical swath of the plane with a pattern that contains all possible 17 pixel tall bitmaps. One horizontal slice of that infinite bitmap depicts the drawing formula itself, but this is not remarkable since other slices depict all other possible formulae that might fit in a 17 pixel tall bitmap. Tupper has disseminated, via email, extended versions of his original formula that rule out all but one slice ([1], [2], [3]).
The constant k is a simple monochrome bitmap image of the formula treated as a binary number and multiplied by 17. If k 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
- 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] External links
- Jeff Tupper official site
- Extensions of Tupper's original self-referential formula
- TupperPlot, an implementation in JavaScript
- The Library of Babel function, a detailed explanation of the workings of Tupper's self-referential formula

