The Labyrinthine Library of Babel

October 12, 2015 10
The Labyrinthine Library of Babel

“The Library of Babel” is a short story by Jorge Borges which was written in the 1940’s and translated to English in the 1960’s. It tells the story about a library that houses all the possible combinations of the letters of the alphabet, plus some punctuation, in 410 page long novels.  The librarians are incredibly excited about the endless possibilities the library presents to them. The tomes essentially contain every one’s death, birth, all written books, and all yet un-written books. The problem with all of this, however, is the enormity of the library.

Its scope is beyond human imagination. The books aren’t organized in any meaningful way, so one cannot simply move from one to another in the same stack and learn something else interesting about a topic. And, because of the vast size of the library, almost all of the books are complete gibberish.

For an idea of how large the library would be, the biggest libraries in the world have about 22 million books (2.18×10^6). The Library of Babel would contain at least 1.9×10^1834097 books. There’s only an estimated 1×10^80 atoms in the universe.

The librarians in the story grew suicidal and started to grow desperate. They start burning books they believe to be worthless, and believe very strongly in finding a book that would categorize the contents of the library into something that made sense. It would have to exist, after all.

The Library of Babel is a temptation of knowledge, the promise of foresight, but ultimately only acts as a morbid reflection of what a library is. Instead of a collection of work that serves to enlighten, it houses the impossible infinite and yields an abyss that consumes those who wander into it.

online digital library of babel

Recreating the Library in of Babel Digitally

An artist and programmer named Jonathan Basile woke up one morning after reading the original short story and wondered if someone had recreated the library, digitally. He found that no one had, outside of some concept work where random letters were generated.

He began work on forming his own approach. He ended up with the libraryofbabel.info, a website that contains all possible combinations of 3,200 characters, or essentially, all possible permutations of any page that could ever be written or has been written. The pages are organized into books of 410 pages, to fit the theme from the original story, but aren’t cohesive works in themselves. It currently contains 10^4,677 books.

Basile had originally designed the site to generate all the possible combinations of 3,200 character pages and then return them when a user requested it. The data requirements made this impossible, where a million books were taking up nearly two terabytes of information. Without more powerful computers to scan the data, it wasn’t very efficient at all.

He realized he could take advantage of random number generators to still generate the text, and make it reversible so the “seeds” used to generate the pages were always the exact same. This enabled him to shrink the footprint of the site down and enable better and more accurate searching more akin to traditional search engines or library catalogs. The previous iteration of the search could only pull short phrases of one or two word matches, and not very many at a time.

This doesn’t invalidate the work, because mechanically, the end result is the exact same. The seeds are already all generated and noted, when a user searches for a string of text or a passage, it simply runs the algorithm backwards to generate the page. The page was already there before it was searched, it just wouldn’t be… feasible to find through random page diving.




The digital Library of Babel contains all possible permutations that can exist in 3,200 characters in the English language.* Because of that, it contains all possible conversations you could have, have had, or will have, all possible scenarios of your death, and even this entire article, up to the asterisk in this paragraph.

The forum on libraryofbabel.info discusses some philosophical ideas and potential repercussions on the site. One user asks Basile if there are any issues with copyright or plagiarism violations, since an author’s entire work exist in one form or another on the site, as well as work that haven’t even been written yet. Basile claims the site most likely falls under fair use, since the work wasn’t penned there and wasn’t generated with intent for commercial use.

Basile assures users of the library that the text isn’t saved from search strings and then displayed to the user to give the simulation of an unlimited library. Since the locations are permanent and based on the seed created from a random number generator, they can be replicated endlessly without a need to save the original data. Saving the original data would be impossible, because of hard, physical space limitations of the physical universe.

Take a look at the site’s search function. Type in some personal journal entries you’ve written down elsewhere. Sections of your favorite book. A description of your death or birth.

If you’re feeling extra brave, jump through random loops and see if you can find anything decipherable. One philosophical issue with the search function is because it is “perfect”: you can only find what you’ve already written down.

With all written work already created, is there a difference between intent and execution? Is the fundamental idea behind a thought different than the end result? Get lost inside the stacks.

  • Dexter Douglas

    That calculation is utter nonsense, one cannot simply permutate over the combination of different languages.

  • __

    vsauce. michael here…

    • anders

      … Books!

    • Edwin Henry

      the vsauce episode did turn me onto this, hah

  • hhskandymon

    That’s cool.

  • mimran

    Good one.

  • SonicJumper

    “With all written work already created, is there a difference between intent and execution?”

    Sorry, but that is nonsense. All written work has not already been created. That website might have the capability to generate all possible texts within the mentioned limitations (3200 characters, English alphabet), but that does not mean that it has already done so. And before a text actually does get generated, it doesn’t exist, just like an apple pie doesn’t exist when I only write down the recipe (algorithm) for creating one.

    • Edwin Henry

      I see what you’re saying, but I think the recipe/apple pie comparison falls apart because you have to consume/convert ingredients to create the final result. You also can’t reverse the apple pie to generate the recipe (words on a page) or back into its ingredients. It’s more like an outline for a book versus the printed page.

      In practice, it might as well have already generated all the possibilities, since the physical universe wouldn’t allow the creation and storage of all possibilities. It would look exactly the same though: chaos and nonsense. It isn’t generated then stored, since it couldn’t store all of it.

      It’s the same idea behind a million monkeys with a million typewriters. Arguably, randomly pressing keys will generate all every possible combinations of written word, but if there is no reason or feeling behind it, what is the point? It paints an interesting picture for what art is and what it can mean anyway.

      • SonicJumper

        >> ” I think the recipe/apple pie comparison falls apart
        because you have to consume/convert ingredients to create the final
        result”

        You’re obviously unaware that algorithms also need to
        consume/convert resources to create the final result. Namely time and
        energy.

        >> “In practice, it might as well have already generated all the
        possibilities, since the physical universe wouldn’t allow the creation
        and storage of all possibilities.”

        What a silly thing to say. In practice, it can NOT generate all
        possibilities, precisely because of the physical limitations! Also,
        you’re too hooked up on the storage space. Let’s do a little thought
        experiment and imagine you have 10 billion computers running in
        parallel, generating all possible pages, taking only 1 nanosecond to
        calculate a new page (which is unrealistically fast). Well, 29^3200 is
        such a huge number that the universe would end before all pages could be
        generated! Not to mention the unfathomable amount of energy that this
        would require…

        >> “It’s the same idea behind a million monkeys with a million typewriters.
        Arguably, randomly pressing keys will generate all every possible
        combinations of written word”

        No, it’s not really the same idea. That library algorithm is guaranteed
        to create all possible variations of 3200 characters written in an
        alphabet of 29, because it basically iterates them. The monkeys however
        are NOT guaranteed to create all possible variations; they will do so
        “almost surely”, which is not the same as “definitely”. This is a
        weirdness resulting from randomness and infinity. See Wikipedia’s article on the infinity monkey theorem for an explanation.

  • Sampietri

    Borges, my preferred author.