Thursday, August 4, 2011

Finite Infinity

It's common knowledge that infinity is, well, infinite. But it's not quite as infinite as it seems!

Not too long ago, I had an idea:

There are a multitude of languages out there, and an even greater number of characters associated with them (letters, numbers, punctuation, symbols). So what if I created a program that would make a copy of every possible character that would fit in a certain area? Let's say 10 x 10 pixels. Just black and white. The program would simply shift / add one pixel to the image at a time until it ended up drawing every possible combination of pixels. Now, most of the images that this program would produce would look nothing like anything. But every once in awhile, the pixels would line up just right to produce a recognizable character.

So I ran the numbers. Well, it turns out that a drawing area of 10 x 10 would create 2^100 or 1,267,650,600,228,229,401,496,703,205,376 unique images. The fastest supercomputer on the planet running 24/7 would take over 5 million years to complete the task.

Obviously, 10 x 10 was not going to happen. How about a 9 x 9? At a mere 2^81 or
2,417,851,639,229,258,349,412,352, it could be done in about a decade. Ah, the power of powers.

If you keep reducing the drawing area, eventually you can find one that can be done within a reasonable amount of time. The downside is, you can't draw nearly as much or as well in a smaller area.

That's when I stopped looking at the idea from a practical perspective, and started seeing it for what it was...

A standard definition TV has a screen resolution of 640 x 480. That's a high enough resolution to display anything, but that also means that it can display everything.

Take a look at this number: 32,000,000^307,200. It is the total number of unique images possible with 32 million colors at a resolution of 640 x 480. The total number of unique images possible. That's profound! What that means is that everything that you can ever see on a TV is contained somewhere within that insanely huge number.

Some examples: 
  • Every picture ever taken
  • Every frame from every videogame, movie, or TV show ever made
  • A childhood memory or a scene from your favorite book
  • Anything that you can possibly imagine

In fact, wherever you are, whatever you are doing, whatever is going on around you this very instant is captured in perfect detail by an image inside that number! There's an image of you and your surroundings from every angle. From what you are currently seeing with your eyes, to 1,000 feet above you, to 1000x magnification of your elbow.

That's not to say that it would be easy to find them. Just as with the 10 x 10 black and white, a vast majority of all of those images would just look like colorful white noise. 

But that's just what can be shown on a TV screen. How about we take that concept even further?

Your senses have limitations based on how many nerve endings, photo receptors, tastebuds, etc your body has. While I don't have the hard numbers to calculate, there is a distinct, finite number of combinations of senses your body is capable of having. That means that everything you could ever experience, whether possible or not, is contained within one astronomically huge number.

It's a finite number that contains what we thought was infinite.


  1. Hi.

    I can't believe there is someone out there who though exactly the same thing as I did. :D
    Seriously, when I read this post, I just thought "goddammit! someone had the very same thought as me... awesome" :D

    BTW I think it is not absolutely hopeless for example to sit a user in front of a generator program, and create something useful. First, the user thinks of an image he wants to visualize in - let's say - 640x640. Then he starts sketching something like that in 10x10 pixel. There are more light colors, there are dark ones, this is a little greenish there, etc. After that, he starts to twirl the pixels. At the point the 10x10 image roughly looks like the image in his mind, stops the twirl. Now, the program changes to 20x20, with some interpolation stuff. Now we concentrate on the lower left 10x10 pixels. After that's done, repeat it with the other three quarters. Ok, time to go 40x40. Than 80x80... Still quite tiring, but we just need some really smart ideas and optimizations, and this can be brought into reality. What do you think? :)

    Also, I just checked out your game 'Dread'. Same story again: you just thought of what I did. Although I make a different kind of game, but it's still top-down, the keyboard-mouse control interface just like yours (I could give you some idea about tweaking it if you need advice), the difference is that it's not a shooter, it will be a puzzle game. Though only started to code, and I won't have much time for some... time... to work on it, but eventually I will be able to work on it fulltime. In case you are curious: (project title only)

    Have a nice day :)

    1. Hello,

      I can't believe there is someone out there who read this!

      I've thought of several optimizations for the random image generator. Including using only a certain number of pixels that get randomized instead of every single one. The gaps in the images would be filled in by the observer. Which could make for some interesting interpretations of the same images!

      Thanks for checking out Dread too! I'll be sure to check out scotophobos myself

    2. Wow, good idea!
      What about picking an existing image, and manipulate that? Maybe using the same method:
      - shrink the image to a smaller one (call it 'image_A')
      - let the user change it with paint or twirl
      - shrink the original image to the double of 'image_A' (call it 'image_B'), but scale the modifications from 'image_A', and replace the shrinked original image with them
      - etc.

      I have to tell, the Dread demo level was harder then I thought. From the videos, I didn't expect the monsters to be so strong :P It was fun, though. (You did play way too much Doom 3, didn't you? XD)

      In the future, will monsters attack even if I don't see them? (Dunno if that would be a good or bad idea, though...)