Kill Time With Recreational Math - Blow Your Mind With Tupper's Self-Referential Formula

in #steemstem6 years ago (edited)

Tupper's self-referential formula is a formula that is able to represent itself in an x,y plot when you plug in the right parameter.

The formula is given as:


Wikipedia link CC BY-SA 3.0 license

The formula represents an x,y grid. You iterate through x and y values, if the inequality holds true for that x,y pair then you shade in that pixel in the bitmap. If the inequality does not hold true then you do not shade in that pixel. (the funny 'L' symbol in the above equation means the floor function)

For instance when you plug in:

k =
858450636189713423582095962494202044581400587983244549483093085061934704708809928450644769865524364849997247024915119110411605739177407856919754326571855442057210445735883681829823754139634338225199452191651284348332905131193199953502413758765239264874613394906870130562295813219481113685339535565290850023875092856892694555974281546386510730049106723058933586052544096664351265349363643957125565695936815184334857605266940161251266951421550539554519153785457525756590740540157929001765967965480064427829131488548259914721248506352686630476300

which means starting at a value of y equal to the above value of k.

You then iterate the equation through an x,y grid with x in the range 0 to 106 and y in the range k to k - 17. At each pixel you use the formula and test if the inequality holds. Doing so, you will get an image of the same equation:


Larske linkCC BY-SA 3.0 license

Nifty.

This equation can be encoded into a Python program so that the iteration and image generation is done for you automatically as follows:

# ----------------------------------------------------------
# Tupper's Self-Referential Formula
# ----------------------------------------------------------
# Released under CC BY-SA 4.0 license by Procrastilearner
# ----------------------------------------------------------
# Code adapted from these sources:
# https://en.wikipedia.org/wiki/Tupper%27s_self-referential_formula
# http://tuppers-formula.tk/
# http://pythonexample.com/snippet/tupperpy_puttichai_python
# ----------------------------------------------------------
import math

# Function that calculates each pixel in the array
# If the inequality is true, return true, else return false
def tupper(x, y):
    if(0.5 < ((y//height) // 2**(height*x + y%height))%2):
        return True

# SOME SAMPLE k values
# The k-value for "Hello World"
k = 6895012387840102960388800743894691567293526614761878642159640988616960284258152903423295931078577411543056825272799563668088759906595961294278079388993821512035371286454709644959294705611546094554253224016967805673085721584321270726262538346847807843609441547596309727955904597937730262222254756555331138330873040704125272064
# The k-value for "Procrastilearner"
k = 1257207296383494646703023598434160575137490746702534441757072689941766221602727175208840403652199681214324572656773878416048505048633019109745998303045266915861672082074917455720141231497328597830059545324215574172164730384408647876045884551930141062182904864830805458006663012338916118931073881261055036525439972614491926697852430498750347917539198432496557009531578613760
# The k-value for a few physics equations
k = 4858469169982102675034934808781748508003572112379646247622560977076844776175752264899208043994400178877245148793266857575289610148341600494559213269022467754482055169773330701394013033886691116347691418631043332585052517720470762413424840798846473144595870770808120340614109438263512781134374817923844043421527510710589906239503196397694563703314539975366381883086655204974954415714080143433194612867495286916801031830123462241542179129723844877540271987203913560667320644950648327789848377849132928150892008357196373505098565642629201912922095
# The k-value for Tupper's Formula
k = 4858450636189713423582095962494202044581400587983244549483093085061934704708809928450644769865524364849997247024915119110411605739177407856919754326571855442057210445735883681829823754139634338225199452191651284348332905131193199953502413758765239264874613394906870130562295813219481113685339535565290850023875092856892694555974281546386510730049106723058933586052544096664351265349363643957125565695936815184334857605266940161251266951421550539554519153785457525756590740540157929001765967965480064427829131488548259914721248506352686630476300
# The k-value for "Steemstem"
k = 2654044308296309547457150492313809537420160213020295370709418257552130058155321648802859416355507827097368276804584924482159968988151893402697100830686964497423743697385632204990972120530190126635301153367575150631421523877488213303631896923252422160626682458400874311387432363769183366004108586830808320850808769090865258315934129725337145096932646298478705208899880501779566787913842688

height = 17
width = 106

for y in range(height-1,height-18,-1):
    line = ""
    for x in range(0,width+1):
        j=1
        if tupper(x, k + y):
            line += "■"
        else:
            line += " "
    print(line)

# Here are some alternate ASCII characters for use in printing out the grid (one of these symbols might look better than the original)
# ≡ ■ ° Θ #

If you use k =
2654044308296309547457150492313809537420160213020295370709418257552130058155321648802859416355507827097368276804584924482159968988151893402697100830686964497423743697385632204990972120530190126635301153367575150631421523877488213303631896923252422160626682458400874311387432363769183366004108586830808320850808769090865258315934129725337145096932646298478705208899880501779566787913842688

and run the above program then you will get an image for the text "Steemstem":

If you use k =

1257207296383494646703023598434160575137490746702534441757072689941766221602727175208840403652199681214324572656773878416048505048633019109745998303045266915861672082074917455720141231497328597830059545324215574172164730384408647876045884551930141062182904864830805458006663012338916118931073881261055036525439972614491926697852430498750347917539198432496557009531578613760

and run the above program then you will get an image for the text "Procrastilearner":

How It Works

The formula generates a bitmap that is 106 pixels wide by 17 pixels tall. It starts at y = 0 and goes on up to infinity.

Basically every pattern that could be generated in this 106 x 17 bitmap can be found somewhere in that very tall bitmap strip.

The trick is finding the k value that corresponds to your bitmap.

A Useful Tupper Equation Website

The following fun website lets you create your own bitmap and it will locate the k value needed to generate that image:

http://tuppers-formula.tk/

This is a handy resource and it saves you a lot of time trying to calculate the k value for yourself.

The Mind-Blowing Implications Part 1

Since this equation can replicate any 17 x 106 bitmap it means that your name, address, social security number and all of your account passwords are buried somewhere inside it.

It also means that the nuclear launch code to the US, Russian and Chinese nuclear missile systems are also buried somewhere inside it. The trick is finding the correct value of k corresponding to this information.

Good luck with that.

The Mind-Blowing Implications Part 2

So the Tupper equation basically describes every 106 x 17 bitmap that could ever exist in one relatively simple formula.

Now, imagine if there was a corresponding 4 dimensional equation that represented 3 space dimensions and 1 time dimension like the one that we live in.

Let us say that the size of the bitmap space it represented was the same number of atoms wide as you, the same number of atoms deep as you and the same number of atoms tall as you.

Would there be a corresponding 'k' value that represents you at this moment in time? Could we find a value of k that described you as you moved through space and time?

Would there be an equation and values of 'k' that represented the Universe from the Big Bang to the Heat Death or the Big Crunch?

That would be some formula indeed.

Closing Words

Tupper's self-referential formula is an interesting mathematical find.

It is a formula that can reproduce its own image in a bitmap as well as any other 17 x 106 bitmap that you can think of. All you need to do is find the location in the very tall bitmap space which is usually a very very large number indeed.

Aside:
A 17 x 106 bitmap contains 1802 pixels which means that there are 21802 different bitmaps that could be represented. In base 10 this is about 10542 different bitmaps.

This is a very large space indeed and it also means that your passwords and the nuclear launch codes are also very safe.

Thank you for reading my post.

Other Posts In My Recreational Math Series

  1. Testing the excel random function.
  2. Make Your Own Bell Curve.
  3. Strange Attractors.
  4. Let's Travel To Alpha Centauri.
  5. Calculate Sunset and Sunrise Times.
  6. Conway's Game of Life.
  7. Caffeine Half-Life.
  8. Let's Simulate a Radioactive Sample.
  9. A Slow Boat to "π-na".
  10. Journey Through the Centre of Psyche.
  11. Star Trek Into Darkness.
  12. Calculate Sunrise and Sunset Times Using Python.
  13. Two Weird Ways to Calculate Pi (Using Python)

Post Sources

http://www.dgp.toronto.edu/people/mooncake/papers/SIGGRAPH2001_Tupper.pdf
http://tuppers-formula.tk/
https://en.wikipedia.org/wiki/Tupper's_self-referential_formula
http://www.pypedia.com/index.php/Tupper_self_referential_formula
http://pythonexample.com/snippet/tupperpy_puttichai_python

Sort:  



This post has been voted on by the steemstem curation team and voting trail.

There is more to SteemSTEM than just writing posts, check here for some more tips on being a community member. You can also join our discord here to get to know the rest of the community!

I really like post with formulas and when the main topics is math, but sometimes I find some difficoulties to understand something, in particolar when it is in Enghlish. At the same time I understand that you make a great job.
Congratulations!!

Weird!

Hi @procrastilearner!

Your post was upvoted by utopian.io in cooperation with steemstem - supporting knowledge, innovation and technological advancement on the Steem Blockchain.

Contribute to Open Source with utopian.io

Learn how to contribute on our website and join the new open source economy.

Want to chat? Join the Utopian Community on Discord https://discord.gg/h52nFrV

Hi

This is an interesting formula indeed. By the way, did you mean, by implication, that either USA, Russia or China can find the password of a belligerent country's nuclear weapon by using Tuppers formula?

If no, the any real life application?

Thanks

@sciencetech from @stemng/@steemstem

There is no way that you can root out anybody's passwords. That was just a joke.

The bitmap is so large that it contains everything that can be represented (to a certain resolution of course) and so it is impossible to find anything, and if you do you have no way of knowing whose passwords it would belong to.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 63799.64
ETH 3130.40
USDT 1.00
SBD 3.97