The Digital Library of Babel

Library of babel

 

Have you ever heard of the Library of Babel.

The Library of Babel is a (fictional) infinite library that consists of hexagonal adjacent rooms. Each room consists of books, in seemingly random order that make up all possible orderings of english characters, the period comma and space (TODO: cite wikipedia).

 

You walk from room to room and you see shelves upon shelves of books, most of which are complete gibberish. Like aaaba or bbeudh or sidheudiidjne repeating for 600 pages. but, every once in a while.. you might find books that have one or two.. comprehensible words?  
Heck, you might find comprehensible sentences, emotions or narratives. You might find works of shakespeare, excerpts from holy books, words that mimic exactly the contents of a forgotten letter written to a lover across the sea - Words never read by anyone else - but you - sitting rightthere in front of you in some dark corner of the library.

 
It has everything that's ever been, will, wanted to and will never be said. It has words that could've ended wars, saved lives. Somewhere there is a book detailing exactly what will happen in your future, talking to you directly in second person. Perhaps, a guide on how to land your dream job, and the numbers for the next bingo lottery.

Randomness is a hell of a thing. If you give a monkey a typewriter, with enough time he'll write shakespeare.

 
Now this is the library of babel, well known fictional story, nice to think about but lets bring it to the 21st century.

 
Enter the Digital Library of Babel. A seemingly never-ending collection of images, say 1000x1000 pixels, making up all orientations of all possible rgb color values in a 1000x1000 grid.

 
It's not a library of words anymore, it's pictures. Eyes on your past, present and future. Most pictures you willl find here will be pieces that barely resemble anything beyond abstract art. But, if your heart dares to look deep enough.. you'll find pictures of your birth.

 
Surely, however your birth looked like, you can imagine if you were to capture it with a 1mp camera would produce such an image, and that image is simply a certain orientation of rgb values in the right order. Oh boy, you think to yourself..

 
You will find pictures of every capturable snapshot of your life in this library. You'll find a snapshot of a marriage that hasn't happened yet, or an earthquake happening in exactly 7 years from now. But look more, and you'll oon come to see a picture that is the exact arrangement of pixels resembling a picture of yourself looking at that picture, looking at that picture, looking at that pict...

 
Surely some arrangement of 1000x1000 pixels looks like that at least, no?

 
If that's not crazy enough, for those who believe that life after death is capturable by the mere human eye, some right set of pixels approximate the after life.

 
Now you're probably thinking, why are we talking about this library that doesn't exist, but it's not about the library, it's about randomness and infinity. It's a realization of how astronomical exponentials are!

The first library is powerful, but expectedly so. Its contents are uncountably infinite, as it's isomorphic to the infinite set of all strings of infinite size. What about the digital library though?

  By discretizing reality into pixels, and limiting the size of each frame to 1000x1000, our set is not even infinite anymore! Lets assume each pixel is a standard 32bit rgba pixel. we have (2^32)^(1000*1000) pictures. That is still finite, but you might say it's still clearly (beyond) astronomically large. What if we play around with this a little bit?

  Let's say we're settling for grayscale 8bit pictures. size? 250x250 is enough for me to tell roughly what's going on... We're still talking about 2<sup>8<sup>(250*250)</sup></sup> possibles images, as much as we've cut down that is still a lot..

  Now usually when people try to describe how large exponentials like this are, they talk about the heat death of the universe, or stacking papers across from the earth to the moon or imagining if every atom had a universe inside of it nested billions of times. But knowing about the library now... It makes sense doesn't it... For how can an exponential like that be computable before the heat death of the universe if cycling through the search space, every image here, would reveal the secrets of the universe before they happen!

  Now this was a discussion about bruteforce and why it's infeasible, but what about probability? If you generate a random picture, in hopes it would reveal to you a guide on how to do nuclear fusion. Do you yet feel why the probability of that happening is so astronomically negligible? does this perhaps make you feel comfortable that it's astronomically unlikely that somebody mashes their keyboard randomly generating your password? Perhaps not, but it helps me sleep well better at night