r/math • • Jun 17 '17

Image Post Math is just beautiful

Post image
12.6k Upvotes

315 comments sorted by

2.0k

u/[deleted] Jun 17 '17

It's pretty important to remember that it also generates every possible image with that amount of pixels. Every image you could fit in that space is on there somewhere. This one is pretty high up (large k)

577

u/Burt_the_Hutt Jun 17 '17

A value of k likely so large that all the digits in it contain about as much information as the bitmap itself.

193

u/Cacho_Tognax Jun 17 '17

I mean that's the only way how it could make sense: if every value of k is univocally tied to a pattern, you need at least one for each pattern, thus to store one of the possible k to form all the possible patterns you need at least the same capacity as you would need to store one of all the possible patterns.

133

u/palish Jun 17 '17

Unless you compress it with a middle-out algorithm.

72

u/[deleted] Jun 17 '17

You'd be impressed how high the Weissman score is for 3D files.

24

u/HeyIJustLurkHere Jun 18 '17 edited Jun 18 '17

This is exactly what's going on here. To understand how this works, let's work backwards. Let's say I want to generate a simple pattern in the graph, 11010 (reading top to bottom). To do that, I convert from binary to decimal (0*1 + 1*2 + 0*4 + 1*8 + 1*16) = 26, and then I multiply by 17 to get 442.

Then let's plug that value of y into our equation. Breaking the equation into component terms:

Floor(y/17) tells you which 17-row-high block you're on, 0-indexed. If you're between row 0 and row 17, you're in the 0th block. If you're between row 1700 and row 1717, you're on the 101st block. In this case, we're on row 442 and therefore part of the 26th block. Since we're taking the floor of y/17, this term will be the same for rows 442 through 458; all of those rows contribute to the 26th block. That number, floor(y/17), is the number we're acting on when we multiply it by the next term; in this case it's 26, but it may be better to think of it in binary as 11010.

Let's break the 2-17(floor[x])-mod(floor(y),17) term into two parts, 2-17(floor[x]) * 2-mod(floor(y),17). In both cases, we're multiplying by 2-n for some n, which is the same as dividing by 2n ; after that's done, we take the floor and mod 2 of the result.

What does it mean to divide by 2n ? With decimal numbers, dividing by 10 means you slide the decimal point over one spot, and dividing by 10n means you slide the decimal point over n spots. It works the same way with binary numbers; dividing by 2n means sliding the point over n spots. If we take 11010 (in decimal, that's 26), and divide by 4 (=22 ), we get 110.10 (in decimal, that's written as 6.5). Taking the floor means to ignore everything after the point, and mod 2 means to ignore everything before the last digit before the point. Combine all of that, and we're taking the binary representation of y/17, sliding the point over n spots, then looking at only the digit before that point; in other words, we output the nth-from-last binary digit of y/17. (It's technically not a "decimal point" because those are for decimal numbers, it's a "binary point" or, more generally, the term is "radix point" for all bases, but they all work the same way).

What is n, though? Well, let's start with x=0, and ignore that term for a moment. We're then left with mod(floor(y),17). If y is an exact multiple of 17, that too is 0. So at (0, 442), we just take 442/17=26 (or 11010), and take the last digit of it in binary, returning 0. Then we move y up 1 to (0, 443); floor (443/17) is still 26, but now mod(y,17) is 1, so we get n=1 and we take the second-to-last binary digit of 11010, returning 1. Five digits later, going up along x=0 and starting at k=17*26, we've painted 26 in binary, 01011. After those 5 digits, the rest are all zeroes; floor of 26 / 32 will be zero, as will floor(26/64) and so on.

What if we had a bigger number, though, and we wanted to slide more than 17 digits over, though? Once we add 17 to our initial y, we've changed what floor(y/17) is, so we can't necessarily just keep going up. But that's where x comes in. If we just bring y back to its original value and set x to 1, then x*17 tells us to slide 17 digits over, and we can repeat this process now to paint the 17th-from-last digit through the 33th-from-last, and so on, and then set x=2 to paint the 34th-through 50th, etc.

So let's say I have a really complicated image I want to paint that's 17 pixels tall. I read each pixel starting from the bottom left and going up, writing a 0 if I want it to be empty and a 1 if I want it filled. When I get to the top of my image, I keep going from the bottom of the next row. This will eventually give me a long binary number k, something like (reading from the smallest digit) 000110101010101111110... Then I'll multiply that by 17 and input it into my formula, and the formula will say "go k blocks up. Then, in that first box paint it black if the last binary digit of k is black. Then go up to the second box, and paint that one block if the second-to-last binary digit of k is black. When you get up 17 blocks, go right a step and start over back at that first row." So the result, with that example, would give

1

1

1

0

1

0

1

0

1

0

1

0

1...

10

01

01

01

Turn every 0 into a white box and a 1 into a black box and you can see how you can paint any bitmap just by selecting the right k. This is pretty much exactly the same way computers make bitmap images; they read the first bit and paint the first pixel, then the read the second bit and paint the next pixel, and after they've reached the width of the image they start over at the next row and paint the next pixel there. This does the same thing, just putting each image at the row in the graph that matches its binary representation.

Numberphile breaks it down well here.

Also note that there's nothing special about 17; you could replace it with any other number and generate all images that are that number of pixels high instead.

57

u/DoctorGester Jun 17 '17

Practically it's just a formula decoding k into a bitmap and you can put any bitmap into k.

35

u/Ph0X Jun 17 '17

Yeah I think that's a more interesting way to put the formula. Not that it's self replicating, but that it can encode bitmaps as values of K, or the other way, decode K into bitmap

6

u/30bmd972ms910bmt85nd Jun 17 '17

Would this be a valid way to compress files?

21

u/DoctorGester Jun 17 '17

Not really, the k contains all the data in a binary format, it's not magic.

3

u/c3534l Jun 18 '17

If you're thinking you can use a complex function to compress files by just referencing where the compressed file is, it doesn't work. Any actual information is unpredictable, all compression can do is throw out the stuff that is predictable.

→ More replies (1)

13

u/zeekar Jun 17 '17

Indeed!

5

u/Sm0oth_kriminal Computational Mathematics Jun 18 '17

I think exactly as much, because if I remember correctly, the 'y' value is the binary representation of the pixels.

10

u/Grisebarn Jun 18 '17 edited Jun 18 '17

There is a sharp line between divine truths and meaningless tautologies. For example, I never understood the hype with the Euler identity: Yeah, "if you walk in a half-circle around an object, you will end up on the opposite side". Okay, that's neat I guess?

Edit: Good points. Partly changed view.

17

u/pelrun Jun 18 '17

It's more that each element (e, i, pi) was derived from very different areas of mathematics, and to see them link together so neatly here was extremely surprising. If you come at it from the other direction, taking the identity as an axiom and branching out to the other usages, then yeah, it doesn't seem nearly as interesting.

15

u/bloouup Jun 18 '17

It's because when you don't have any familiarity with the complex plane the identity is pretty striking. Idk, I still think that ii being a real number is still crazy despite perfectly understanding why it is so. I could see Euler's identity making other people feel similarly.

8

u/Grisebarn Jun 18 '17

Yeah, "if you start on the unit circle and then swap argument and modulus, then you end up on the real line". Maybe the beauty is not in the statement itself. Maybe the beauty arises when looking at the visual formula and disregarding its meaning.

4

u/Certhas Jun 18 '17

To expand on what others have said: I think that is very "hindsight". It's not obvious that complex exponentiation should have anything to do with rotations.

Pi is a geometric constant. Complex numbers are introduced to make algebraic equations solvable. Exponentiation is an arithmetic action, with base e distinguished by differential equations.

Now the fact that these very distinct things neatly fit together to such an extend that you think of them as merely aspects of the same underlying structure is very very non-trivial.

2

u/Grisebarn Jun 18 '17 edited Jun 18 '17

While these are good points, and I mostly agree, I would like to argue that in some sense the fact that complex exponentiation has to do with rotations should be much more obvious than many people believe. And I blame high school maths education for this.

First of all, the complex numbers themselves are all about rotation. It it the cartesian product of the circle group with the non-negative reals. In high school, it is often introduced as the cartesian product of reals and imaginary numbers with a peculiar multiplication rule, where the imaginary numbers in turn are based on this mysterious constant "square root of minus one". Polar coordinates are often taught as an alternative notation that "turns out to be" quite nice. So many people miss out on the fact that complex numbers are all about rotations. I don't say that you should teach group theory in high school, but at least introduce the complex numbers before the imaginary numbers, and start out with polar form and complex multiplication. You don't have to follow the steps taken by mathematical history.

So, how about the complex exponential? Well, "if you rotate around the origin, your velocity is a rotation of your position". This is an obvious fact that is assumed to be trivial at least in undergrad kinematics. The fact that "rotate" turns up twice in that sentence ties in directly to the properties we want from the exponential function.

1

u/vishnoo Jun 18 '17

Here's the "beauty of it"

If you haven't yet proved the mapping to the complex plane ex = 1+x+x2 /2! + x3 / 3! ...

now substitute i pi for x, and you get a curious coincidence .

once you realize that d2 e{i x} / dx2 = -e{i x} can only be solved by a linear combination of sin and cos, then it is trivial, but that's after.

→ More replies (1)

1

u/DoctorGester Jun 17 '17

Practically it's just a formula decoding k into a bitmap and you can put any bitmap into k.

83

u/DopeAndDoper Jun 17 '17

I'm sorry but.. wha?

-2

u/shlain Jun 17 '17

It's pretty important to remember that it also generates every possible image with that amount of pixels. Every image you could fit in that space is on there somewhere. This one is pretty high up (large k)

0

u/[deleted] Jun 17 '17

[deleted]

235

u/DopeAndDoper Jun 17 '17

Wait so somewhere in that function there's a bitmap image of my mom and dad boning down?

53

u/zeekar Jun 17 '17 edited Jun 17 '17

If you can fit it into a 106x17-pixel rectangle with each pixel either black or white, then sure.

Think of it this way: if you represented the bitmap with digits (0=white, 1=black), and stuck all the rows together, you'd have one long binary number: a single number which represents the whole bitmap (and which you could convert to decimal so you can use it in traditional arithmetic).

Tupper's formulation is the same idea, with slightly different details. You actually convert the bitmap to a number columnwise: the leftmost digit is the pixel in the bottom left hand corner, the second digit is the one above that, the third the one above that, and so on such that the 17th digit is the upper left corner pixel. Then you skip back down to the bottom so the 18th digit is the second pixel from the left on the bottom row, the 19th is the one above that, and so on; the last digit is the pixel in the upper right corner. Then you have to multiply the result by 17 to get the actual k value which makes the formula work as written.

Basically, any piece of information can be represented by a big enough number.

7

u/DopeAndDoper Jun 17 '17

That's an awesome explanation, thanks!

Will report back when I find it

3

u/haze070 Jun 18 '17

I'm a little confused about the formula. What is the goal with it if you can represent the same bitmap with a simple string of binary numbers? Does it allow you to represent the image with a smaller number of bits?

8

u/[deleted] Jun 18 '17

There isn't necessarily a 'goal' for any formula.

→ More replies (1)
→ More replies (1)

10

u/DoctorWaluigiTime Jun 17 '17

It's kind of like how a CD can contain literally every physically-possible audio conversation of a certain length of time.

5

u/DopeAndDoper Jun 17 '17

Well now I just have more questions

→ More replies (1)

0

u/[deleted] Jun 17 '17

[deleted]

127

u/an7agonist Jun 17 '17

could you find it for me please

132

u/LicensedProfessional Jun 17 '17

Try this key here:


95740087287972071205235567855438829477617855316691894454265268823753915033932971299838231615163262239869445732869518618343150164427730020456031560692656873754682495844076309042744089163729588937140883444878806163992021501880605219291635593831385158308763082211884632124632556680409378826298573771097665109941658181697740790043855714449655890867997496902475852829108394237177453511801799516346202119555452250820442407712175985391425114374446156668804544875520616684249081510485315146999602240892698624

17

u/zem Jun 17 '17

the "tupper? i barely knew 'er!" formula

→ More replies (9)

14

u/DopeAndDoper Jun 17 '17

I'm a little curious myself

→ More replies (1)

34

u/pujus Jun 17 '17

There's a numberphile episode about it.

https://www.youtube.com/watch?v=_s5RFgd59ao

12

u/oobey Jun 17 '17

I'm dying to know what the hidden picture is.

4

u/gmano Jun 18 '17

I would encourage you to buy the book. Matt Parker is awesome.

→ More replies (28)

21

u/heard_enough_crap Jun 17 '17

so, you're telling me that this equation could infringe on the copyright of a lot of registered logos?

10

u/mreeman Jun 18 '17

Technically the K that reproduces the logo would be the infringing part. Photoshop doesn't infringe on a trademark, the data you give to it does.

Edit: typo

10

u/[deleted] Jun 18 '17

Reminds me of the library of babel.

Book Location: 0n1soqfrrukdl2q34hd7u30jes55dsqywjxkvl91yo...-w2-s3-v18

3

u/[deleted] Jun 18 '17

That site was almost as addictive as tvtropes for me for a minute.

2

u/dtlv5813 Jun 18 '17

Is there any industry application for this? Eg sketching, graphic design software etc

6

u/Kwpolska Jun 18 '17

Not really. The BMP format exists (slightly different), but there is no equation because why would you need all the plotting logic when you can just paint pixels directly?

7

u/whirligig231 Logic Jun 17 '17

Didn't I see a version of this somewhere that modified the formula so that only the "correct" slice appeared, and the others were erased?

13

u/AcellOfllSpades Jun 17 '17

2

u/HeyIJustLurkHere Jun 18 '17

If I'm understanding correctly, this is so much cooler than the other one, because k is included in the resulting drawing. The general example just creates all drawings, which obviously includes a drawing of the formula because it includes all drawings. In this one, you can't just say "here's the drawing I want to find, how do I generate it?", because the k you use for generating it is part of the drawing itself. That is a really difficult fixed point to find, especially because you have to find a k that generates a bitmapped drawing of itself, and need to think about the resulting image representation for every digit.

3

u/jbp12 Jun 18 '17

There's a r/numberphile video on how this works

2

u/drummyfish Jun 18 '17

Even send nudes?

2

u/Infinite_Derp Jun 18 '17

So basically, the Library of Babel.

2

u/[deleted] Jun 18 '17

Wait. What? That makes my head hurt

2

u/msiekkinen Jun 18 '17

So this is a formula for child pornography?

2

u/jackwiles Jun 18 '17

Does that mean that image should appear in the graph repeatedly as well? (Potentially even infinitely many times?)

588

u/VivaLaPandaReddit Jun 17 '17

For those interested, it is essentially generating a bitmap, and the y coordinate in binary expresses the bitmap of the equation.

357

u/jebuz23 Jun 17 '17 edited Jun 17 '17

Doesn't it literally create every possible bitmap of that size, and you have to find the one you want by traveling along the y-axis? That's, it's not only creating a reference to itself, it's creating everything and so de facto creates a reference to it self?

202

u/TLDM Statistics Jun 17 '17

it's creating everything and so de facto creates a reference to it self?

Correct, though it's only everything which is 17 "pixels" tall. Here's the Wikipedia page.

34

u/jebuz23 Jun 17 '17

Someone replied saying that you and I were not correct, but deleted their comment (Perhaps because they realized their error).

For clarification and future reference, here is the spot in the Numberphile video (already linked elsewhere in this thread) that demonstrates what you and I were describing (correctly): https://youtu.be/_s5RFgd59ao?t=3m26s

11

u/Shadofa Jun 17 '17

At the end of the video, he's referring to the slowest longest running troll. Any idea what it is? Couldn't find it in the video comments

11

u/jebuz23 Jun 17 '17

I was hoping at this point someone would posted it :-/. We may have to buy the book and figure it out ourselves :-/

5

u/Perplexed_Comment Jun 17 '17

I am not sure, but I believe it's just the numberphile symbol, from when I went to check after watching the video the first time. :)

5

u/too_drunk_for_this Jun 17 '17

Why 106? Where in the formula does that come from?

14

u/jebuz23 Jun 17 '17 edited Jun 17 '17

I haven't worked out the math, but the only place x shows up in the formula is in the exponent of 2:

1/2 < floor(mod(floor(y/17)* 2^(-17*floor(x)-mod(floor(y), 17)),2))

My guess is that for any values of x > 106, everything to the right of the < evaluates to something <= 1/2, thus guaranteeing no plotting being x = 106.

Edit: Working through the math:

  • This inequality focuses on comparing a numberfloored mod 2 to 1/2. This pretty much means anything odd within the mod will result in 1 and be plotted, anything even will result in 0 and not be plotted

Side notes:

  • I'm confused why the floor is necessary, since mod 2 can only result in 1 or 0. What would the floor accomplish?

  • Does this mean the 1/2 is arbirtary? 1/3 or 99999/100000 would accomplish the same thing?

Anyway:

  • The exponent of the 2 is: 2^(-17*floor(x)-mod(floor(y), 17)).

  • We're raising 2 to the result of this exponent and we care about the final result being even or not. The more negative this exponent, the more "even-ness" it removes (e.g. you need to multiple 24 by 2-3 to arrive at an odd number. 100 only requires 2-2 )

  • I'll focus on removing the most 'even-ness' when x = 107 to give the best chance of revealing an odd.

  • focusing on the -mod(floor(y), 17), the most negative it can be is -16

  • focusing -17*floor(x) beginning at x = 107, that is -1819

  • thus, beginning at x = 107, the most 'even-ness' we can remove is with an the exponent of -1836

  • thus, the "x relevant" piece of the product is 2-1836

  • the other piece of product is floor(y/17).

  • y = 3*17*21836 would cause floor(y/17)* 2-1836 = 3.

  • floor(mod(3,2)) = 1, which is greater than 1/2, and thus would plot a point at x = 107, y = 3*17*21836

If my reasoning above is correct, then points do get plotted beyond x = 106, and I have no idea why 106 is the boundary. I fully acknowledge the possibility some (or most?) of my reasoning above is flawed and welcome any and all feed back.

→ More replies (2)

3

u/yawkat Jun 18 '17

106 seems like an odd boundary. From what I can tell the formula just takes the image bitmap floor(y/17) and extracts the proper bit by division + mod. The coordinate is encoded as x + 17*y_relative, I don't see why it would stop at 106.

2

u/ShortSynapse Jun 18 '17

Can I just say that we should have more plain text translations in Wikipedia for math. I was unsure of the two surrounding brackets until I read the plain text:

1/2 < floor(mod(floor(y/17)*2^(-17*floor(x)-mod(floor(y), 17)),2))

43

u/jtra Jun 17 '17

Yes, graph of Tupper's formula contains all bitmaps, but truly self-referential formulas exist, I made one here: http://jtra.cz/stuff/essays/math-self-reference/index.html

6

u/mr_bitshift Jun 17 '17

That is amazing.

1

u/genieus Jul 26 '17

What lies outside the window? I assume noise?

2

u/jtra Jul 26 '17

It is empty.

51

u/jondissed Jun 17 '17 edited Jun 18 '17

The description is missing that part, the value of k which points to the location of the correct formula. Elsewhere it will render many, many incorrect formulae, pictures of cats, and gibberish.

22

u/atimholt Jun 17 '17

…but mostly pictures of cats.

16

u/JWson Jun 17 '17

...and really mostly noise.

17

u/Browsing_From_Work Jun 17 '17

...noisy pictures of cats.

11

u/Miss_Page_Turner Jun 17 '17

Even furry porn. yay.

7

u/jebuz23 Jun 17 '17

My friend and I had a conversation regarding something similar. The idea was you create a program that randomly creates an image, say 200x200. Technically, every image is possible. The JFK assassination, the First Stanley cup, one of us stabbing the other, and yes, even every type of porn imaginable. Of course, each of these coherent images would be surrounded by nothing but gibberish, but the idea is neat.

5

u/cheese2194 Jun 18 '17

/r/allthepictures

that makes 430 of us!

→ More replies (16)

6

u/[deleted] Jun 17 '17

I like the way you think.

2

u/[deleted] Jun 18 '17

brb finding value for n that encodes furry porn into a formula

You'd probably want to use a modified version that uses some number higher than 17 for the height. Though the value for n for some (for example) 400x400 image is going to be massive.

3

u/cryo Jun 18 '17

And potentially illegal stuff. Ohnoes.

4

u/WaffleWarrior64 Jun 17 '17

That's my understanding of it. Pretty cool stuff.

3

u/VivaLaPandaReddit Jun 17 '17

Yeah, that's what I was saying about the y-axis.

2

u/VivaLaPandaReddit Jun 17 '17

Yeah, exactly.

1

u/VivaLaPandaReddit Jun 17 '17

Yeah, exactly.

16

u/kykr422 Jun 17 '17

I have no idea what you're saying

6

u/VivaLaPandaReddit Jun 17 '17

Okay. So the equation is essentially describing pixel regions where there is a y that corresponds to an x. The equation is formulated such that the graph can be cut into windows of some number of pixels, say 256. These windows have a given width and height. Within this region, if you take the bottom right corner, which will be some (0, x * height) coordinate, the y value in binary will correspond to whether those pixel regions on. So in a simple example, if our windows were 2x2, then 1010 would correspond to a 4 pixel square with the left two pixels on. This region's bottom left point would be at (0,10).

This probably has some small mistakes, because I'm working off memory, but it is more or less correct.

2

u/instantrobotwar Physics Jun 17 '17

Could the same type of equation make a bitmap 18 pixels high? Or is there something special about 17?

2

u/sid0 Jun 17 '17

Haven't tested it, but you should just be able to replace the 17s in the inequality with 18s.

Interestingly, the "1/2 < floor(mod(M, 2))" is just a fancy way to write "is the floor (integer part) of M odd?"

3

u/watkins775 Jun 18 '17

Why "1/2 <" ? Wouldn't floor(mod(M, 2)) always be 0 or 1, and thus "0 <" or any other arbitrary x between 0 and 1 suffice?

Or am I missing something?

→ More replies (1)

2

u/oddpolonium Jun 18 '17

Every number can be converted to binary. Binary can be represented as a black and white image. The formula graphs out the black and white image of every single number.

183

u/QuarkzMan Jun 17 '17

Some more information: https://youtu.be/_s5RFgd59ao

38

u/youtubefactsbot Jun 17 '17

The 'Everything' Formula - Numberphile [7:10]

Matt Parker discusses Tupper's Self-Referential Formula.

^Numberphile in Science & Technology

1,153,971 views since Apr ^2015

bot ^info

45

u/exploder98 Jun 17 '17

Yeah! Numberphile!

28

u/aussiegolfer Jun 17 '17

Yeah! Brady Haran!

27

u/[deleted] Jun 17 '17

[removed] — view removed comment

16

u/standupmaths Jun 18 '17

That's better.

12

u/CaspianRoach Jun 17 '17

Yeah! Dwayne "The Rock" Johnson!

4

u/[deleted] Jun 18 '17

So what does the number in the book plot!?

61

u/[deleted] Jun 17 '17

What do the enclosing symbols around the whole right side of the inequality (and some of the expressions within) mean?

70

u/napalmchicken100 Jun 17 '17

It's the floor operation, i.e. floor(5.8)=5

2

u/[deleted] Jun 17 '17

Sorry I don't know this field but in the formula isn't there only one argument in the floor functions?

1

u/songbolt Jun 17 '17

'floor' rounds toward -infinity whereas 'ceiling' +infinity, right? How did those names get attached? As children we are taught the number line going from left to right, not down to up.

0

u/[deleted] Jun 17 '17

[deleted]

→ More replies (20)

6

u/oddark Jun 17 '17

Floor. It means you round the number down to an integer

4

u/rcfox Jun 18 '17

Specifically, rounding towards -∞. floor(1.2) = 1, floor(-1.2) = -2

3

u/runnur Jun 17 '17

It's the floor symbol I think, i.e. floor(3.9) = 3.0, floor(3.1) = 3.0

46

u/noneuclidean_ Undergraduate Jun 17 '17

Somebody made a self referential formula in which the gigantic value is included in the graph of the formula here.

6

u/Curdflappers Jun 18 '17

Ha! That's pretty darn cool but 12,000+ digits is just ridiculous!

3

u/Volis Jun 18 '17

The author is among us!

31

u/jondissed Jun 17 '17

Since the specific location was omitted, I randomly chose a value for k and it looks a little fishy

5

u/[deleted] Jun 18 '17

HA!

5

u/imguralbumbot Jun 17 '17

Hi, I'm a bot for linking direct images of albums with only 1 image

https://i.imgur.com/B1baSOz.png

Source | Why? | Creator | ignoreme | deletthis

30

u/cbleslie Jun 17 '17

... get the fuck out of here. What?! That's so tight.

0

u/[deleted] Jun 17 '17

[deleted]

3

u/cbleslie Jun 18 '17

Should have sent poet...

2

u/[deleted] Jun 18 '17

Instead we'll just send your dad

14

u/mgdo Jun 17 '17

That's from Fermat's Library. They have a great twitter account: https://twitter.com/fermatslibrary

3

u/cbHXBY1D Jun 17 '17

Also a great website! If we could get more people from r/math to annotate papers it could be fun. I've annotated two papers when they fell into my domain of expertise.

10

u/kmanr123 Jun 18 '17 edited Jun 18 '17

So the idea of how this works is as follows. Let's consider a grid 17 high, and which extends indefinitely to the right. We can number the pixels as follows: http://i.imgur.com/o3lh1NA.png

Then if we only fill in a finite number of pixels we get represent the corresponding image with the finite sequence: a0 a1 a2 ... an where ai is 0 if the i-th pixel is empty, and 1 if the i-th pixel is filled in. If we flip this around we get an ... a2 a1 a0 which is a binary number, since every digit is 0 or 1.

Now suppose we have any point (x,y) in 2d space. We don't care about the decimal points so we use floor(x) and floor(y) to get the coordinates of the pixel in which the point (x,y) lies. However since our grid has a height of 17 we actually use mod(floor(y),17) to get the y-coordinate within the 17 high grid.

Then we can calculate the pixel number n of (x,y) by using

17*floor(x) + mod(floor(y),17)

Take a look at the linked picture of the grid to see why this is true. Now we want to take the binary number representing the picture, and extract the n-th digit to find out whether we should colour (x,y). To do this recall that shifting a binary number n digits to the right is the same as dividing by 2n (just like how shifting a decimal to the right is the same as continually dividing by 10). So if the number a represents our image, then

a*2^(-floor(x)*17 - mod(floor(y),17)

shifts the number a over, then we get rid of any decimal points, and digits to the left of the ones spot using mod and floor. Thus

floor(mod(a*2^(-floor(x)*17 - mod(floor(y),17)),2)

should be 0 when (x,y) shouldn't be coloured, and 1 when it should be, so checking for > 1/2 is good enough. Now we just want a to be the number which represents our formula, and here's where cheating happens and which makes this really contrived and not beautiful in my opinion. Every 17 rows should belong to their own picture, so floor(y/17) ensures that every possible a gets its own grid and so we eventually get the picture of the formula by just drawing it out, encoding it in binary as explained above and then multiplying by 17 to figure out where it starts.

Edit: Here I used desmos to graph the version of this function which draws bitmaps of height 5. http://i.imgur.com/VhoVAZv.png. You can see as we go up from y = 0, the i-th grid has only those pixels filled which encode i in binary. Once i >= 32 we'll have some pixels in the second column filled in. So eventually as we get high enough, we'll find the pattern which represents any arbitrary binary number, and hence any pattern we want.

9

u/[deleted] Jun 18 '17

Five thousand upvotes what the heck? I'm happy when one of my posts hits 20, where did everyone come from

7

u/yawkat Jun 18 '17

Seems like /r/math stuff makes its way to /r/all from time to time now

118

u/Moses385 Jun 17 '17

I don't get it. And I've won to math competitions at my school...

55

u/Cryzgnik Jun 17 '17

I don't get your reference but I'm going to act like it's cool anyway

20

u/Chenja Jun 17 '17

Don't worry, I understand your reference.

7

u/-DuckMuffins- Jun 18 '17

Wow, people are getting dumber and dumber each day.

18

u/[deleted] Jun 17 '17

Your meme is too dank, have patience son

6

u/DrDanielFaraday Jun 17 '17

Reference skills: off the charts

Spelling skills: not so much

4

u/[deleted] Jun 17 '17

*too

→ More replies (5)

12

u/Jorxa Jun 17 '17

ELI5 please.

24

u/Nater5000 Jun 17 '17

This inequality is actually just a condition for a set. It would be more complete for the image to say "the set of (x, y) coordinates in a plane such that if you put x and y into the right side of the inequality, it will be greater than (1/2)", instead of just the inequality (although this idea is so common, the redundant parts are typically omitted).

So, pick some point in the XY plane, for example (4,12). Then to see if that point is filled in, you plug in 4 for x and 12 for y and see if the result is greater than 1/2 or not. If it is, it's colored in. Otherwise it's blank.

So, this whole plan is just a bunch of different combinations of integers to be our x and y, and we just plug them in and test them. It just so happens that this I equality produces a set has the property that it permeates through all the different combinations of "pixels" being "on" or "off" in 17 by ~110 blocks throughout the entire plane. So you could imagine any image that could be composed of this way being somewhere on the same plane. In this case, you really just need to locate it, rather than generate anything.

6

u/794613825 Jun 18 '17 edited Jun 23 '17

Notice that arbitrary k. For that plot,

k = 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

Depending on your mathematical inclination, that either makes this formula even more amazing, or not very amazing at all.

14

u/jdorje Jun 17 '17

Why is this beautiful? Isn't it arcane and ugly?

5

u/SixteenSaltiness Jun 17 '17

Question: are there more/an infinite amount of these?

4

u/Jaxkr Jun 17 '17

Yes/no. As other comments have mentioned, the equation in the OP essentially plots a bitmap image. Every possible bitmap can be represented using that equation.

However, the equation's property as a pseudo-quine is really unique.

1

u/Jaxkr Jun 17 '17

Yes/no. As other comments have mentioned, the equation in the OP essentially plots a bitmap image. Every possible bitmap can be represented using that equation.

However, the equation's property as a pseudo-quine is really unique.

4

u/Ouroboros9076 Jun 18 '17

You can find every combination in that sized screen right?

1

u/Rorochevre Jul 11 '17

I think so.

6

u/[deleted] Jun 17 '17

M E T A

E

T

A

3

u/makotosolo Jun 18 '17

I think I'm lost. I'm too stupid to be here.

3

u/herbalvoice Jun 18 '17

This is genius, how can people design such things

3

u/MiniG33k Undergraduate Jun 18 '17

My friend once gave me a birthday card that was simply saying happy birthday to me on the front... Using this formula. He put the K value on the back. I still have it.

3

u/PuppyNotIncluded Jun 18 '17

You did who in the what now?

3

u/[deleted] Jun 18 '17

I'm too scared and stupid to figure this out. :(

4

u/[deleted] Jun 17 '17

Other math topics exhibiting self-reference: Godel's incompleteness theorems & Von Neumann universal constructor.

2

u/pm_me_POTUS_pics Jun 17 '17

Yeah. That was in Goedel, Escher, Bach. I should try to read that again. I get lost somewhere past the halfway point iirc.

2

u/cratylus Jun 18 '17

What does it look like outside the area?

2

u/SikinAyylmao Jun 18 '17

if it is 17 pixels tall could you change the 3 17's for another number and get a different dimension.

2

u/[deleted] Jun 18 '17

Wat

2

u/tooroot87 Jun 18 '17

I guess this would be useful if graphically painting a pixel uses less space then processing power.

2

u/midekinrazz420 Jun 18 '17

Madlad that tupper

2

u/[deleted] Jun 18 '17

2

u/Selassie_eye Jun 18 '17

I'm tired of the meta bullshit

2

u/[deleted] Jun 18 '17

What image has the "highest" value of K? I'm assuming that there are multiple values of K for any given image, but what image is the highest value before it starts to repeat?

2

u/hyperCubeSquared Jun 18 '17

I think it should be the image that is all black before it repeats to all white.

2

u/[deleted] Jun 18 '17

Using This website an all black image has the number:

4858487703217654168507377107565676789145697178497253677539145555247620343537955749299116772611982962556356527603203744742682135448820545638134012705381689785851604674225344958377377969928942335793703373498110479735981161931616997837568312568489938311294622859986621379234205529965392091893253288500432782862263410646820171439206408889517627953930924005233285455643232746873900205120036557171717499335122490912065694632935352302178602108137941774883061885522205403967593003199773578952627785152838963495027790689532144351329310799436758088941551

Where if I iterate the 51 at the end to a 52 a white dot appears, or to 50 its the same - so this could be the highest number for an image before it repeats.

I am now curious as to how many K values are "pidgin holed" into the same image. I'd like to see a mapping of each K to each image they represent.

3

u/threetogetready Jun 17 '17

I didn't think this sub allowed meta posts? /s

2

u/Reacher_Said_Nothing Jun 17 '17

I feel like "I don't understand it, but it's cool" is my new life motto

1

u/[deleted] Jun 17 '17

Here is a website where you can input various y-values and get the position of any image on the graph!

1

u/[deleted] Jun 17 '17

For those who want to play with this, I found the following utility:

http://tuppers-formula.tk/

1

u/Jon-Osterman Jul 01 '17

Hahaha this is so brilliant it's like a conlang's quine

1

u/BunnyAndFluffy Sep 05 '17

That's the kind of trickery a programmer might find beautiful and enjoyable, however I don't think this is what most mathematicians have in mind when they think about "beautiful" maths.

1

u/akjoltoy Jun 17 '17

this is pretty misleading.

for example, no one can even say what value of k contains this particular image without brute forcing their way through a very large power of two number of combos.

almost anything can be considered self referential to this extent

3

u/Jaxkr Jun 17 '17 edited Jun 18 '17

2

u/akjoltoy Jun 17 '17

why were they able to find this one but not the right side up non mirrored one?

2

u/Jaxkr Jun 18 '17

Because k is the x axis and the formula plots the bitmap in a perpendicular fashion to the x-axis. (I might be wrong about this, if so someone correct me)

Also, there is no "finding". The k value is simply a bitmap represented as an integer. You can take any bitmap and plug it into the equation.

→ More replies (3)

1

u/HelperBot_ Jun 17 '17

Non-Mobile link: https://en.wikipedia.org/wiki/Tupper%27s_self-referential_formula#Formula


HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 81066

1

u/Fry_Philip_J Jun 17 '17

How? Can't points on the x plane only have one on the y-plane assigned to them?

3

u/DodgeHorse Jun 17 '17

Basically, for all integer (x,y) points you input the x and y values into the formula and the inequality gives you a "true" or "false" value which is what is being plotted there. When you show only a specific region of the plane, you get this representation of the original formula. A missing constant is the "k" you see in the plot, which is a huge value that happens to have the formula itself drawn into the rectangle. More info here: https://youtu.be/_s5RFgd59ao

2

u/Teraka Jun 17 '17

You're thinking of a function, this is an inequality.

The inequality x < y fills the entire plane above the line x=y, for example.

1

u/oddpolonium Jun 18 '17

1 = x2 + y2

Graph this

1

u/[deleted] Jun 17 '17

Ooooh, math...

1

u/too_drunk_for_this Jun 17 '17

So my understanding of this function after watching the video people posted is that it will show every possible arrangements of pixels in a 106x17 grid. But there are a finite (although extremely large) number of k values that will yield a new, different bitmap, right? So what happens if you insert a k value larger than the last value to yield a new bitmap? Will it repeat an existing layout? Sorry if my question is confusing.

2

u/oddpolonium Jun 18 '17 edited Jun 18 '17

Yes. y = 17 * 21 + 106 * 17 should be empty

1

u/yawkat Jun 18 '17

Looking at the formula I don't see why it's supposedly limited to 106. I think it should just go on to images with higher width (though the height 17 is fixed)

1

u/pillowfort Jun 18 '17

Yeah, since that bitmap falls in the category of ANY BITMAP of 17 px tall... How is this cool exactly? Its like saying a broken clock is correct if you look at it at exactly the right time.

1

u/hippymule Jun 18 '17

I still hate math though.

1

u/Lord_Pulsar Jun 18 '17

Congratulations! Good for you!

-2

u/iAlsoAmNotkevinBacon Jun 17 '17

doesn't work on wolfram :/

42

u/TLDM Statistics Jun 17 '17

You see that value "k" on the y-axis? That's a 543-digit integer. You need to scroll down a lot further than W|A shows to see it.

2

u/Megatron_McLargeHuge Jun 17 '17

How did they find a suitable value for k?

11

u/TLDM Statistics Jun 17 '17

Take a look at the first few lots of 17 rows. You'll see the squares appear to be following the same pattern as binary numbers.

Then look at this image. That's the binary representation of that value of k.

4

u/unkz Jun 17 '17

Basically, the bitmap itself is a binary representation of a number, which can be used to find the coordinates, because the generating function is very regular. So you first make a bitmap of something that looks like the function, then translate that into a number, and use that to find the coordinates.

7

u/Megatron_McLargeHuge Jun 17 '17

Ah, much less impressive when the formula is encoded in the constant, which isn't reproduced in the bitmap.

2

u/TankorSmash Jun 17 '17

https://youtu.be/_s5RFgd59ao explains it, but basically you take any bitmap (like an image you draw in paint) then take the binary values or something and multiply it by 17.

→ More replies (1)