Thursday, September 5, 2019
The picture of everything
During my years as a nerdy teenage computer programmer in the 1980s, I once came up with an interesting concept, which I’ve since dubbed “The Picture of Everything”.
In the mid-1980s computer graphics were just beginning to evolve from very low resolutions with minimal colors. I had been fascinated by the way I could write bytes within the graphics memory of my computer and pixels would magically appear on the screen. It was at this time that I came up with the idea of The Picture of Everything. The idea is that since a graphics screen is just a piece of memory with values written into it, it must therefore be possible to set all the bytes in the graphics space to every possible combination of values simply by treating the graphics memory as one gigantic number, and counting from zero to the maximum value.
Back in those 1980s days, my TRS-80 computer had a maximum screen resolution of 640 x 480 pixels and at this “high” resolution it could only do black and white. If you went down to a lower resolution of 320 x 240 you could get 8 colors but they were primary colors and not much use for forming any kind of realistic image. So I decided to go with the 640 x 480 black and white. So if you consider how many bits were required for an image, it was 640 x 480 x 1 bit per pixel = 307,200 bits, or 38,400 bytes. So to go through every possible combination of values on the graphical screen meant using the graphics memory to count from 0 to 2^307,200. This counting to such gigantic numbers is actually a simple matter on a computer. You keep adding 1 to the value of a byte until it reaches 255, then it rolls over to zero and the next higher byte has a 1 added to it. When that next byte reaches 255, it rolls over to zero and a third byte has 1 added to it, and so on. In this way the tiny graphics screen of those old computers could be used to represent one huge number with 307,200 bits that could represent any integer number from zero to 2^307,200. By counting from zero to 2^307,200 it would be possible to make the screen show every number as a black and white array with dimensions of 640 x 480 pixels.
I wondered what images would be produced by this procedure. It turns out that the answer is something very amazing.
As the computer counted from zero to 2^307,200, it would cause the graphics screen to display every possible black & white image that could be represented at a resolution of 640 x 480 pixels. While the resolution was very low, the screen would nevertheless produce a picture of everything.
Everything?
Now let’s modernize my example. Today in the year 2016, some 30 years after my original idea, even modest image resolutions are at least 1600 x 1200 pixels and each pixel can have any one of 16 million colors. With this resolution and color space it is possible to produce some very nice images that accurately represent real life scenes. The amount of memory required for such a graphical screen is 1600 x 1200 x 3 bytes per pixel (256 possible values each of red, green, and blue). This means such a screen uses 5,760,000 bytes, or about 5.5 megabytes, which is 46,080,000 bits. So to transition through every possible combination of colors for every pixels would require counting from zero (all pixels zero, a black screen) to 2^46,080,000 (all pixels white, a white screen).
I wondered about what images would be produced by this process of counting to such a large number. Well as I said, each pixel on the graphics screen would progress through every possible color and brightness on the way from black to white, and every possible combination of different pixel colors would be represented, for a total of 2^46,080,000 possible images. This process would produce every possible image that could be represented in 1600 x 1200 pixels and 16 million colors. This seemed like a mind boggling amount and it wasn’t long before I realized just how mind boggling. The set of images created would contain a picture of everything. I thought about this for a while. Everything? EVERYTHING! The process would produce one image for each count on the way from zero to 2^46,080,000. It was pretty obvious that a lot of those images would be nonsense, just random noise and various other irrelevant patterns that no human would recognize as anything. But among them would be pictures of everything. Everything? I pondered this a little more. I figured this enormous set of images must have a picture of me in there somewhere. However, not only would it have a picture of me, but it would contain a picture of me as seen from very far away, and very close up, and everything in between. It would also have pictures of me at every possible angle. So, for example, it would contain pictures of me as seen from every possible angle and distance, or at least all that could be represented in a resolution of 1600 x 1200 x 16M colors. That seemed like a phenomenal number of images, but logic dictated that this is indeed what would be contained in the image set. I pondered further still. Not only would The Picture of Everything have a picture of me from every possible angle and distance that I could be viewed, but it would also have me in every possible color scheme - black and white, red and green, blue and yellow, and every other possible color scheme. I thought about this some more. The pictures generated by this process would also contain noise, generated by the various combinations of images that were close to the ones of me, but with various image noise consisting of dots, lines, haze, speckling, snow, and so on. So somewhere in the picture set generated by my procedure there would be a picture of me as seen from every possible angle and distance, in every possible color scheme, with every possible type and kind of noise.
My mind soared onward. The set of images from my procedure would also contain every illustration from every book ever written. It would also contain every written page of every book ever written, or at least what could be read at 1600 x 1200 resolution. The images would also contain the plans and diagrams of every device ever invented. It would contain a picture of every piece of art ever created. As if that wasn’t enough, it would also contain images of every piece of art and every diagram of every device that was ever to be invented in the future. This could be very useful for discovering new technologies! If only someone could sort through the images and find these new devices! My revelations about the all-encompassing nature of The Picture of Everything did not stop there however. Not only would it contain an image of every piece of art ever created and every piece of art that ever will be created, and a diagram of every device ever invented and ever will be invented, but it would also contain views of them from every possible angle and distance from which they could be viewed, in every possible color scheme, with every possible type and combination of noise. Wow, this was amazing! The picture of everything really was a picture of everything, and a whole lot more! What else might it contain?
I thought about all the possible images that could be produced. It wasn’t long before I realized that the image set would contain every frame of every movie and television show ever made. So somewhere in there would be every image from the movie Star Wars for example. Even more profound, there would be every frame as seen from every possible angle and distance, in every possible color scheme, with every possible type and combination of noise. This was getting ridiculous.
After some time I realized that the image set would not only contain a picture of everything in existence, but also everything that would never exist. For example, it would contain a picture of every piece of art that would ever be created, as well as every piece of art that would never be created. This seemed very strange. How can we have images of art that will never be created? Is the computer some sort of artistic genius? And not only would the image set would contain the plans for every device ever to be invented, but it would also contain the plans for devices that would never be invented. As if that wasn’t enough, it would also contain the plans for every device ever to be invited but with every possible mistake, error, and flaw in the design. And of course, it would also have all of these things as viewed from every possible angle and distance, in every possible color scheme, and with every possible type and combination of noise.
The picture of everything would contain the face of every person that has ever been born, or ever would be born, as well as the faces of people who would never be born, as seen from every possible angle and distance, in every possible color scheme, with every possible type and combination of noise.
The picture of everything would contain a picture of every single place in the universe, at every moment throughout all of time, and all the things that have ever been imagined or ever will be imaged, as well as all the things that would never be imagined. Huh? And it would have images of them as seen from every possible angle and distance, in every possible color scheme, with every possible type and combination of noise.
This was an amazing revelation. My procedure of treating the computer graphics screen as a giant number and counting from zero to some phenomenally large number would produce a picture of everything ever to exist, as well as everything that would never exist, plus it would have them as seen from every possible angle and distance, in every possible color scheme, with every possible type and combination of noise, and probably a lot of other transformations that I hadn’t considered. There would not be anything in the universe real or imagined or never-to-be-imagined that the procedure would not produce an image of. The procedure would produce a picture of ABSOLUTELY EVERYTHING!
Back at my TRS-80 computer in the 1980s I began doing some assembly language coding. I decided to go with the 640 x 480 resolution because it was the highest resolution, and because the 8 primary colors of the 320 x 240 resolution wasn’t much good for representing anything. Also the single bit black & white per pixel would reduce the number of generated images enormously. So now I had 640 x 480 x 1. Now I only had to count from zero to 2^307,200 and quickly came up with the simple program that would start from zero and repeatedly add one to the number until it reached 2^307,200. When I was done I would have a low resolution black & white image of everything that would ever exist in the universe, and all that would never exist, as well as a lot of junk images that could be discarded. I started the program running. It produced a dancing series of dots in a line along the bottom right of the computer screen. As the program ran, more and more pixels along this line began to light up, but as time went by the speed at which the line progressed got slower and slower, until eventually the progress was so slow that I gave up and stopped the program.
While my concept of The Picture of Everything was something ultra-grandiose, a picture of everything ever to exist as well as everything that would never exist, the practicalities of producing the image set were equally mind-boggling. Each new pixel that lit up would take twice as long to appear as the previous one. To put things in scale my black and white screen of 640 x 480 pixels has 2^307,200 possible images it can produce. How much is 2^307,200? Unfortunately there are no calculators I have access to that can handle such an extremely large number, so I’m not able to do a direct calculation. However we can get some idea. Converting to base 10 so we can perhaps understand it better, the calculator on my PC tells me that 2^30,000 is 7.94 x 10^9030. That’s about the biggest power of 2 that I can calculate, so I’ll work with that. So 2^307,200 would be 2^30,000 multiplied by itself just over 10 times, or (2^30,000)^10.24. So I can only assume that 2^307,200 is somewhere in the order of 10^92,467. That’s a 10 with 92,467 zeros after it. To put that in perspective, it’s guesstimated there are about 10^80 atoms in the observable universe, give or take a few orders of magnitude. My “Picture of Everything” was 92,387 orders of magnitude greater than that. It seemed that to store the image set produced by my program would require more memory storage than could be stuffed into the volume of the entire universe.
What about the amount of time it would take to calculate all the images? Even if each image only took 1 billionth of a second, one nanosecond, 10^-9 seconds, it would still take 10^92,458 seconds to calculate. A billion years is 3.15 x 10^16 seconds, so presumably the calculation of the images at one per nanosecond would still take almost 5.8 trillion years, or about 413 times the current age of the universe.
So even to calculate the full set of images with a low resolution of 640x480 and only one bit per pixel would take vastly longer than the age of the universe, and to store the images so they could be accessed in a useful way would require more storage than could fit into the universe. I won’t go into details on calculations for a more modern version of The Picture of Everything using a high definition screen with 1920 x 1080 pixels and 24 bit color, but the number of images produced is more than 49 million orders of magnitude greater than my 1980s example, and would take more than 49 million orders of magnitude longer to calculate at one image per nanosecond. That’s about 3.1 quadrillion years, or more than 222,000 times greater than the age of the universe.
Then of course there would be the problem of going through all the images to determine which ones are good and which aren’t, an insurmountable problem that I dare not even fathom.
So to create “The Picture of Everything”, the set of images that contains a picture of everything that exists, everything that ever has existed, and everything that ever will exist, as well as everything that doesn’t exist and never will exist, as seen from every possible angle and distance from which it can be viewed, in every possible color scheme, and with every possible type and combination of noise, it would require more vastly space and time than the universe has available.
Some years later I wrote a similar program on a newer computer that had a much faster processor. The little line at the bottom right of the screen merely progressed a little further along before it became so slow that I gave up.
The Picture of Everything turned out to be a monumental idea for a teenager to come up with,. It had had enormous potential for discovery of many new things. However the practical aspects of the problem meant that it was utterly impossible.
-Dave Bad Person
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment