Tupper's self-referential formula: Difference between revisions
No edit summary Tags: Mobile edit Mobile web edit |
Removed hardcoded wrapping of k so that it wraps properly on different screen sizesUndid revision 1191503740 by Artemetra (talk) |
||
(48 intermediate revisions by 34 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Formula that visually represents itself when graphed}} |
|||
y=sinx |
|||
{{missing information|truly self-referential (encodes and prints the large number) versions in Tupper 2007 "selfplot" and Jakob Trávnik 2011|date=October 2021}} |
|||
'''Tupper's self-referential formula''' is a [[formula]] that visually represents itself when graphed at a specific location in the (''x'', ''y'') plane. |
|||
== History == |
== History == |
||
⚫ | The formula was defined by Jeff Tupper and appears as an example in Tupper's 2001 [[SIGGRAPH]] paper on reliable two-dimensional computer graphing algorithms.<ref>* [http://www.dgp.toronto.edu/~mooncake/papers/SIGGRAPH2001_Tupper.pdf Tupper, Jeff. "Reliable Two-Dimensional Graphing Methods for Mathematical Formulae with Two Free Variables"] {{Webarchive|url=https://web.archive.org/web/20190713092613/http://www.dgp.toronto.edu/~mooncake/papers/SIGGRAPH2001_Tupper.pdf |date=2019-07-13 }}</ref> This paper discusses methods related to the GrafEq formula-graphing program developed by Tupper.<ref>{{Cite web|url=http://www.peda.com/grafeq/|title=Pedagoguery Software: GrafEq|website=www.peda.com|access-date=2007-09-09|archive-date=2021-02-24|archive-url=https://web.archive.org/web/20210224144419/http://www.peda.com/grafeq/|url-status=live}}</ref> |
||
The formula was defined by Jeff Tupper and appears as an example in Tupper's 2001 [[SIGGRAPH]] paper on reliable two-dimensional computer graphing algorithms. |
|||
⚫ | <ref>* [http://www.dgp.toronto.edu/ |
||
Although the formula is called "[[self-reference|self-referential]]", Tupper did not name it as such.<ref>{{cite web|last1=Narayanan |first1=Arvind |title= |
Although the formula is called "[[self-reference|self-referential]]", Tupper did not name it as such.<ref>{{cite web|last1=Narayanan |first1=Arvind |title=Tupper's Self-Referential Formula Debunked |url=http://arvindn.livejournal.com/132943.html |access-date=20 February 2015 |url-status=dead |archive-url=https://web.archive.org/web/20150424181239/http://arvindn.livejournal.com/132943.html |archive-date=24 April 2015 }}</ref> |
||
== Formula == |
== Formula == |
||
Line 12: | Line 13: | ||
The formula is an [[inequality (mathematics)|inequality]] defined as: |
The formula is an [[inequality (mathematics)|inequality]] defined as: |
||
<math display=block>\frac{1}{2} < \left\lfloor \mathrm{mod}\left(\left\lfloor \frac{y}{17} \right\rfloor 2^{-17 \lfloor x \rfloor - \mathrm{mod}\left(\lfloor y\rfloor, 17\right)},2\right)\right\rfloor</math> |
|||
⚫ | |||
or, as plaintext, |
|||
{{quotation|1/2 < floor(mod(floor(y/17)*2^(-17*floor(x)-mod(floor(y), 17)),2))}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
:960{{thinspace}}939{{thinspace}}379{{thinspace}}918{{thinspace}}958{{thinspace}}884{{thinspace}}971{{thinspace}}672{{thinspace}}962{{thinspace}}127{{thinspace}}852{{thinspace}}754{{thinspace}}715{{thinspace}}004{{thinspace}}339{{thinspace}}660{{thinspace}}129{{thinspace}}306{{thinspace}}651{{thinspace}}505{{thinspace}}519{{thinspace}}271{{thinspace}}702{{thinspace}}802{{thinspace}}395{{thinspace}}266{{thinspace}}424{{thinspace}}689{{thinspace}}642{{thinspace}}842{{thinspace}}174{{thinspace}}350{{thinspace}}718{{thinspace}}121{{thinspace}}267{{thinspace}}153{{thinspace}}782{{thinspace}}770{{thinspace}}623{{thinspace}}355{{thinspace}}993{{thinspace}}237{{thinspace}}280{{thinspace}}874{{thinspace}}144{{thinspace}}307{{thinspace}}891{{thinspace}}325{{thinspace}}963{{thinspace}}941{{thinspace}}337{{thinspace}}723{{thinspace}}487{{thinspace}}857{{thinspace}}735{{thinspace}}749{{thinspace}}823{{thinspace}}926{{thinspace}}629{{thinspace}}715{{thinspace}}517{{thinspace}}173{{thinspace}}716{{thinspace}}995{{thinspace}}165{{thinspace}}232{{thinspace}}890{{thinspace}}538{{thinspace}}221{{thinspace}}612{{thinspace}}403{{thinspace}}238{{thinspace}}855{{thinspace}}866{{thinspace}}184{{thinspace}}013{{thinspace}}235{{thinspace}}585{{thinspace}}136{{thinspace}}048{{thinspace}}828{{thinspace}}693{{thinspace}}337{{thinspace}}902{{thinspace}}491{{thinspace}}454{{thinspace}}229{{thinspace}}288{{thinspace}}667{{thinspace}}081{{thinspace}}096{{thinspace}}184{{thinspace}}496{{thinspace}}091{{thinspace}}705{{thinspace}}183{{thinspace}}454{{thinspace}}067{{thinspace}}827{{thinspace}}731{{thinspace}}551{{thinspace}}705{{thinspace}}405{{thinspace}}381{{thinspace}}627{{thinspace}}380{{thinspace}}967{{thinspace}}602{{thinspace}}565{{thinspace}}625{{thinspace}}016{{thinspace}}981{{thinspace}}482{{thinspace}}083{{thinspace}}418{{thinspace}}783{{thinspace}}163{{thinspace}}849{{thinspace}}115{{thinspace}}590{{thinspace}}225{{thinspace}}610{{thinspace}}003{{thinspace}}652{{thinspace}}351{{thinspace}}370{{thinspace}}343{{thinspace}}874{{thinspace}}461{{thinspace}}848{{thinspace}}378{{thinspace}}737{{thinspace}}238{{thinspace}}198{{thinspace}}224{{thinspace}}849{{thinspace}}863{{thinspace}}465{{thinspace}}033{{thinspace}}159{{thinspace}}410{{thinspace}}054{{thinspace}}974{{thinspace}}700{{thinspace}}593{{thinspace}}138{{thinspace}}339{{thinspace}}226{{thinspace}}497{{thinspace}}249{{thinspace}}461{{thinspace}}751{{thinspace}}545{{thinspace}}728{{thinspace}}366{{thinspace}}702{{thinspace}}369{{thinspace}}745{{thinspace}}461{{thinspace}}014{{thinspace}}655{{thinspace}}997{{thinspace}}933{{thinspace}}798{{thinspace}}537{{thinspace}}483{{thinspace}}143{{thinspace}}786{{thinspace}}841{{thinspace}}806{{thinspace}}593{{thinspace}}422{{thinspace}}227{{thinspace}}898{{thinspace}}388{{thinspace}}722{{thinspace}}980{{thinspace}}000{{thinspace}}748{{thinspace}}404{{thinspace}}719 |
|||
⚫ | |||
⚫ | |||
{{quotation|960 939 379 918 958 884 971 672 962 127 852 754 715 004 339 660 129 306 651 505 519 271 702 802 395 266 424 689 642 842 174 350 718 121 267 153 782 770 623 355 993 237 280 874 144 307 891 325 963 941 337 723 487 857 735 749 823 926 629 715 517 173 716 995 165 232 890 538 221 612 403 238 855 866 184 013 235 585 136 048 828 693 337 902 491 454 229 288 667 081 096 184 496 091 705 183 454 067 827 731 551 705 405 381 627 380 967 602 565 625 016 981 482 083 418 783 163 849 115 590 225 610 003 652 351 370 343 874 461 848 378 737 238 198 224 849 863 465 033 159 410 054 974 700 593 138 339 226 497 249 461 751 545 728 366 702 369 745 461 014 655 997 933 798 537 483 143 786 841 806 593 422 227 898 388 722 980 000 748 404 719}} |
|||
[[Graph of a function|Graphing]] the set of points <math>(x, y)</math> in <math>0 \le x < 106</math> and <math>k \le y < k + 17</math> which satisfy the formula, results in the following plot:{{NoteTag|1=The axes in this plot have been reversed, otherwise the picture would be upside-down and mirrored.}} |
|||
[[File:Tupper's self referential formula plot.svg]] |
[[File:Tupper's self referential formula plot.svg]] |
||
⚫ | |||
The formula is a general-purpose method of decoding a bitmap stored in the constant |
The formula is a general-purpose method of decoding a bitmap stored in the constant <math>k</math>, and it could be used to draw any other image. When applied to the unbounded positive range <math>0 \le y</math>, 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 created extended versions of his original formula that rule out all but one slice.<ref>{{Cite web |url=http://www.peda.com/selfplot/ |website=Pedagoguery Software |title=Selfplot directory |access-date=2022-01-15}}</ref> |
||
The constant |
The constant <math>k</math> is a simple [[1-bit color|monochrome]] [[bitmap|bitmap image]] of the formula treated as a binary number and multiplied by 17. If <math>k</math> is divided by 17, the [[least significant bit]] encodes the upper-right corner <math>(k, 0)</math>; 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. |
||
It fundamentally describes a way to plot points on a two-dimensional surface. The value of <math>k</math> is the number whose binary digits form the plot. The following plot demonstrates the addition of different values of <math>k</math>. In the fourth subplot, the k-value of "AFGP" and "Aesthetic Function Graph" is added to get the resultant graph, where both texts can be seen with some distortion due to the effects of binary addition. The information regarding the shape of the plot is stored within <math>k</math>.<ref>{{cite web |title=Tupper's-Function |date=2019-06-13 |url=https://github.com/AEFGP/Tupper-s-Function |publisher=Aesthetic Function Graphposting |access-date=2019-07-07 |website=Github}}</ref> |
|||
A video explaining this formula can be found [https://www.youtube.com/watch?v=_s5RFgd59ao here.] |
|||
[[File:Tuppers-formula-test.png|center|thumb|Addition of different values of k]] |
|||
⚫ | |||
* [[Bitmap]] |
|||
==See also== |
|||
⚫ | |||
* [[Recursion]] |
|||
* {{annotated link|Bitmap}} |
|||
⚫ | |||
* {{annotated link|Elementary function}} |
|||
⚫ | |||
* {{annotated link|Recursion}} |
|||
⚫ | |||
== References == |
== References == |
||
===Footnotes=== |
|||
{{notefoot}} |
|||
===Notes=== |
===Notes=== |
||
{{ |
{{Reflist}} |
||
===Sources=== |
===Sources=== |
||
{{ |
{{Refbegin}} |
||
* [http://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html Weisstein, Eric W. "Tupper's Self-Referential Formula." From MathWorld—A Wolfram Web Resource.] |
* [http://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html Weisstein, Eric W. "Tupper's Self-Referential Formula." From MathWorld—A Wolfram Web Resource.] {{Webarchive|url=https://web.archive.org/web/20210205114138/https://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html |date=2021-02-05 }} |
||
* [http://crd-legacy.lbl.gov/~dhbailey/dhbpapers/hpmpd.pdf 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-legacy.lbl.gov/~dhbailey/dhbpapers/hpmpd.pdf 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.] {{Webarchive|url=https://web.archive.org/web/20161221090129/http://crd-legacy.lbl.gov/~dhbailey/dhbpapers/hpmpd.pdf |date=2016-12-21 }} |
||
* "Self-Answering Problems." Math. Horizons 13, No. 4, 19, April 2006 |
* "Self-Answering Problems." Math. Horizons 13, No. 4, 19, April 2006 |
||
* [http://stanwagon.com/wagon/Misc/bestpuzzles.html Wagon, S. Problem 14 in stanwagon.com] |
* [http://stanwagon.com/wagon/Misc/bestpuzzles.html Wagon, S. Problem 14 in stanwagon.com] {{Webarchive|url=https://web.archive.org/web/20070202043013/http://stanwagon.com/wagon/Misc/bestpuzzles.html |date=2007-02-02 }} |
||
{{ |
{{Refend}} |
||
== External links == |
== External links == |
||
* {{official|http://www.dgp.toronto.edu/ |
* {{official|http://www.dgp.toronto.edu/~mooncake/|Jeff Tupper's official website}} |
||
* [http://www.peda.com/selfplot/ Extensions of Tupper's original self-referential formula] |
* [http://www.peda.com/selfplot/ Extensions of Tupper's original self-referential formula] |
||
* [https://rosettacode.org/wiki/Tupper%27s_self-referential_formula Tupper's self-referential formula in Rosetta Code], implementation in several programming languages |
|||
* [http://web.aanet.com.au/superseed/ajmcrae/TupperPlot/TupperPlot.html TupperPlot], an implementation in JavaScript |
|||
* [ |
* [https://amcrae.github.io/TupperPlot/TupperPlot.html TupperPlot], an implementation in JavaScript |
||
* [https://web.archive.org/web/20130319093833/http://www.pypedia.com/index.php/Tupper_self_referential_formula Tupper self referential formula], an implementation in Python |
|||
* [http://avitzur.hax.com/2007/01/the_library_of_babel_function.html The Library of Babel function], a detailed explanation of the workings of Tupper's self-referential formula |
* [http://avitzur.hax.com/2007/01/the_library_of_babel_function.html The Library of Babel function], a detailed explanation of the workings of Tupper's self-referential formula |
||
* [ |
* [https://tuppers-formula.ovh Tupper's Formula Tools], an implementation in JavaScript |
||
* [http://jtra.cz/stuff/essays/math-self-reference/index.html Trávník's formula that draws itself close to the origin] |
* [http://jtra.cz/stuff/essays/math-self-reference/index.html Trávník's formula that draws itself close to the origin] |
||
* [https://www.youtube.com/watch?v=_s5RFgd59ao A video explaining the formula] |
|||
[[Category:Inequalities]] |
[[Category:Inequalities]] |
||
[[Category:Self-reference]] |
[[Category:Self-reference]] |
Latest revision as of 11:14, 22 September 2024
This article is missing information about truly self-referential (encodes and prints the large number) versions in Tupper 2007 "selfplot" and Jakob Trávnik 2011.(October 2021) |
Tupper's self-referential formula is a formula that visually represents itself when graphed at a specific location in the (x, y) plane.
History
[edit]The formula was defined by Jeff Tupper and appears as an example in Tupper's 2001 SIGGRAPH paper on reliable two-dimensional computer graphing algorithms.[1] This paper discusses methods related to the GrafEq formula-graphing program developed by Tupper.[2]
Although the formula is called "self-referential", Tupper did not name it as such.[3]
Formula
[edit]The formula is an inequality defined as:
where denotes the floor function, and mod is the modulo operation.
Plots
[edit]Let equal the following 543-digit integer:
- 960 939 379 918 958 884 971 672 962 127 852 754 715 004 339 660 129 306 651 505 519 271 702 802 395 266 424 689 642 842 174 350 718 121 267 153 782 770 623 355 993 237 280 874 144 307 891 325 963 941 337 723 487 857 735 749 823 926 629 715 517 173 716 995 165 232 890 538 221 612 403 238 855 866 184 013 235 585 136 048 828 693 337 902 491 454 229 288 667 081 096 184 496 091 705 183 454 067 827 731 551 705 405 381 627 380 967 602 565 625 016 981 482 083 418 783 163 849 115 590 225 610 003 652 351 370 343 874 461 848 378 737 238 198 224 849 863 465 033 159 410 054 974 700 593 138 339 226 497 249 461 751 545 728 366 702 369 745 461 014 655 997 933 798 537 483 143 786 841 806 593 422 227 898 388 722 980 000 748 404 719
Graphing the set of points in and which satisfy the formula, results in the following plot:[note 1]
The formula is a general-purpose method of decoding a bitmap stored in the constant , and it could 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 created extended versions of his original formula that rule out all but one slice.[4]
The constant is a simple monochrome bitmap image of the formula treated as a binary number and multiplied by 17. If is divided by 17, the least significant bit encodes the upper-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.
It fundamentally describes a way to plot points on a two-dimensional surface. The value of is the number whose binary digits form the plot. The following plot demonstrates the addition of different values of . In the fourth subplot, the k-value of "AFGP" and "Aesthetic Function Graph" is added to get the resultant graph, where both texts can be seen with some distortion due to the effects of binary addition. The information regarding the shape of the plot is stored within .[5]
See also
[edit]- Bitmap – Computing term
- Elementary function – Mathematical function
- Quine (computing) – Self-replicating program
- Recursion – Process of repeating items in a self-similar way
- Strange loop – Cyclic structure that goes through several levels in a hierarchical system
References
[edit]Footnotes
[edit]- ^ The axes in this plot have been reversed, otherwise the picture would be upside-down and mirrored.
Notes
[edit]- ^ * Tupper, Jeff. "Reliable Two-Dimensional Graphing Methods for Mathematical Formulae with Two Free Variables" Archived 2019-07-13 at the Wayback Machine
- ^ "Pedagoguery Software: GrafEq". www.peda.com. Archived from the original on 2021-02-24. Retrieved 2007-09-09.
- ^ Narayanan, Arvind. "Tupper's Self-Referential Formula Debunked". Archived from the original on 24 April 2015. Retrieved 20 February 2015.
- ^ "Selfplot directory". Pedagoguery Software. Retrieved 2022-01-15.
- ^ "Tupper's-Function". Github. Aesthetic Function Graphposting. 2019-06-13. Retrieved 2019-07-07.
Sources
[edit]- Weisstein, Eric W. "Tupper's Self-Referential Formula." From MathWorld—A Wolfram Web Resource. Archived 2021-02-05 at the Wayback Machine
- 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. Archived 2016-12-21 at the Wayback Machine
- "Self-Answering Problems." Math. Horizons 13, No. 4, 19, April 2006
- Wagon, S. Problem 14 in stanwagon.com Archived 2007-02-02 at the Wayback Machine
External links
[edit]- Jeff Tupper's official website
- Extensions of Tupper's original self-referential formula
- Tupper's self-referential formula in Rosetta Code, implementation in several programming languages
- TupperPlot, an implementation in JavaScript
- Tupper self referential formula, an implementation in Python
- The Library of Babel function, a detailed explanation of the workings of Tupper's self-referential formula
- Tupper's Formula Tools, an implementation in JavaScript
- Trávník's formula that draws itself close to the origin
- A video explaining the formula