The Infinite Library of Babel

October 14th, 2019

In 1941, the Argentinian author Jorge Luis Borges wrote a story called ‘The Library of Babel’. It’s in the collection Fictions. (It’s one of my favourite books, but that’s by the by.) In it, Borges describes a library that contains all possible books.

Actually, more specifically, the books in Borges’s library are all 410 pages long, and written using 25 basic characters (22 letters, full stop, comma, space) and the library contains every possible 410-page permutation of those characters. That means the library contains every book that has ever been written, and every book that could ever be written. The library is so vast that people wander it endlessly. Some are seeking particular books (there are those who reason that one of the books in the library must necessarily be a perfect index book to the library itself.) Others go round destroying ‘nonsense’ books (the vast majority of the books are just gibberish), in an attempt to bring ‘order’ to the ‘chaos’.

It’s a brilliant thought experiment, and philosophers and scientists have used it since its publication to help ponder everything from protein sequencing to quantum mechanics to the shape of the universe. And then a year or so ago, a man called Jonathan Basile went and built the library for real. Not physically (obviously). Digitally. And not a library of books of 410 pages, but a library of books of 3200 characters (essentially, a library of single pages). But yes – every possible permutation. Every. Single. One. Apparently, that’s 10⁴⁶⁷⁷ books. To give you a sense of how big that number is, if you were to try and read every page, you’d still be chugging through them when the sun dies and our universe implodes.

If this doesn’t blow your mind, you’re not paying attention. Because once you start to think about that, things get weird.

So, Basile’s library contains all the ‘obvious’ things you think of in libraries: all the works of Shakespeare, all the poetry, reference books, essays, etc that have ever been written – and all the variations thereof (the opening page of Romeo and Juliet, say, but where the characters are called Brian and Angela; or the opening page of Brian and Angela but with question marks at the end of every sentence, or full stops after every word, or written backwards, in Latin…)

But keep thinking about it. And it gets weirder. If you’re, say, a copywriter – the library contains everything you’ve ever written, and everything you’ll ever be paid to write for the entire rest of your career. Let’s keep going. The library must also contain transcriptions of all of our lives. Every email we’ve ever written. Every single thing that we’ve ever said. Every single thing we ever wished we’d said.

Mind. Blown.

Because it’s one thing to contemplate this theoretically, in a short story. It’s quite another to be able to search the actual library, and see these things for real.

Here, for instance, is a page containing an extract of this very email I am writing now. It was already in the library before I’d written it. Already in existence:

Screenshot of an email containing sections of real words and other sections of indecipherable text.
Credit: Illustration above is from Andrew DeGraff’s Plotted: A Literary Atlas.

The experience of using the library is disorientating. Partly it feels like a hoax, a trick: perhaps when you search for something, the ‘library’ just generates the page there and then, filling in gibberish around the thing you’ve searched for? Basile insists not: ‘Every possible permutation of letters is accessible at this very moment in one of the library’s books, only waiting its discovery’.

Nevertheless, it’s tempting to get drawn into browsing, in the hopes of stumbling across something recognisable. A fragment of something familiar, so you can go ‘ah, yes!’ And then you remember the poor souls in Borges’s story, wandering the library for a lifetime. Just one more page. And another. And another… And I thought Twitter was a time-sucking rabbit hole…

Anyway. The library’s here. Go have a browse.