Plot Tupper’s Self-Referential Formula

This page will plot Tupper’s formula right inside the browser! Before you press the button, please close any windows and applications you may have running. It can take 20 second ≤ t ≤ 40 second, and what you see and how well you see it will depend upon many factors such as your computer specification.

Compatibility

The JavaScript in this page relies on the canvas element for plotting. It may not work on Microsoft Internet Explorer. I have tested this code on the latest versions of Firefox running on Windows XP and Windows 2000 computers and it works fine.

Actual Code Running On This Page

 1: function Plot_Tupper() {
 2: with (Math) {
 3: var ys=80;
 4: var xs=0;
 5: var raster=document.getElementById("Plot_Tupper");
 6: var ctx=raster.getContext("2d");
 7:  
 8: for (x=0;x<=105;x++){
 9: ys=80;
 10:  
 11: y=BigInteger("960939379918958884971672962127852754715
0043396601293066515055192717028023952664246896428421743507
1812126715378277062335599323728087414430789132596394133772
3487857735749823926629715517173716995165232890538221612403
2388558661840132355851360488286933379024914542292886670810
9618449609170518345406782773155170540538162738096760256562
5016981482083418783163849115590225610003652351370343874461
8483787372381982248498634650331594100549747005931383392264
9724946175154572836670236974546101465599793379853748314378
6841806593422227898388722980000748404719");
 12:
 13:  for (v=0;v<=16;v++){
 14:  a = y;
 15:  b = BigInteger.remainder(a, 17);
 16:  c = x;
 17:  d = (17*c)+(b*1);
 18:  e = BigInteger.pow(2,d);
 19:  f = BigInteger.divide(y, 17);
 20:  g = f;
 21:  h = BigInteger.divide(g, e);
 22:  i = BigInteger.remainder(h, 2);
 23:  j = i;
 24:  if (j > 0.5){
 25:  ctx.fillStyle="#FF0000";ctx.fillRect(xs,ys,4,4);
 26:  }
 27:  y = BigInteger.add(y, 1);
 28:  ys=ys-5;
 29:  }
 30:  xs=xs+5;
 31: }
 32: }}

To handle large integers I am using the BigInteger library to process the math functions. At this point, I decided to short-circuit the floor functions to save resources and time in processing the plot. Therefore in my processing block, a = y, c = x, g = f, j = i, which is the software equivalent of short-circuiting stages of a circuit. As you can see, without the floor functions, the decoding still operates fine.

Probing the Variables and Hacking

I created a "pipeline" style algorithm so that one could probe different variables to see the output at different stages. This is the equivalent of using an oscilloscope to see how a signal changes within a circuit. By studying the output of each variable in the pipeline, you can figure out how Tupper’s formula works. This knowledge is vital if you want to learn how formulas work by hacking them...

Variable Option
None (default) 0
a 1
b 2
c 3
d 4
e 5
f 6
g 7
h 8
i 9

If you want to see the output of any particular variable then just enter its associated number in the text box before pressing the plot button. The variable definitions are on the main page with the deconstruction of the formula. The program will feed the contents of the chosen variable to a small pop-up page; therefore make sure your browser allows pop-ups. A line to mark out successive loops separates each number in the output.

This method is the equivalent of electronic hacking where you can get an output on an oscilloscope of the various stages of the circuit to figure out how the circuit works. As you can see, many sophisticated codes can be broken using similar techniques. The Tupper’s formula is the easiest to solve though. This article might be useful for university students who want to learn about coding and decoding in binary. Then of course, you can get yourself a job with NSA. Unfortunately, I went to an extremely poor quality local college (Croydon College) and now I only have a woodwork report for a qualification! :-)

Tupper’s Formula Solved

The output of variable d counts from 0 to 1801 as suspected. Result! :-) This is the most interesting variable, and if you understood the formula, you would have figured it out, because it is the nth bit number within the bitmap.

As you can see, variable e is 2 d and therefore k is being divided by powers of 2, which means decimal to binary conversion process occurring as I suspected. If you look at the output of this variable then you can see that it is binary at this stage. Hence, there is no need for a floor function!

This Article Continues...

Tupper’s Self-Referential Formula Explained
Simplification of Tupper’s Formula for Graphing
How to graph Tupper’s self-referential formula
Graphing Raster Used for Tupper’s Formula
Plot Tupper’s Self-Referential Formula
How to Convert Binary (Base 2) to Decimal (Base 10)
Self-Referential Formula Plot 1
Self-Referential Formula Plot 2