For centuries, humankind has sought to understand the mysteries of the universe, from the origins of life to the limits of knowledge. We have grappled with questions of existence and meaning, of creation and destruction, of possibility and impossibility. Our attempts to comprehend the limits of what is known and unknown have often led us to ponder the mysteries of the infinite.
The story which follows is a story about precisely that—the infinite. Primarily, it is a story of a vast, enormous library holding not just every book ever written, but also every book that ever will be written, and perhaps even such books that never will. But it is also a story of monkeys and atoms, of wonder and discovery, and of the maddening possibilities and threats that lurk in the depths of a seemingly limitless collection of books—and the internet too!
Émile Borel and his million monkeys
Émile Borel is not a name you hear about every day, but he is an incredibly important figure in the history of probability theory. Born to a protestant pastor in 1871, he was a child prodigy who won the concours général in mathematics—the most prestigious French academic competition—at the age of 17. About a decade later, he was appointed to the chair of theory of functions at the École normale supérieure in Paris, a position which he held for the next 44 years. During this time, he wrote many books and hundreds of research papers, some of which revolutionized the way we think about probability and uncertainty.
However, it’s likely we wouldn’t have mentioned him here had he not written, in his now-famous 1913 essay “Mécanique Statistique et Irréversibilité” (“Statistical Mechanics and Irreversibility”) the following passage:
Imagine that a million monkeys have been trained to type at random on the keys of a typewriter. Now, imagine that these typing monkeys work diligently for ten hours a day, using a million typewriters of various types. At the end of a year, their volumes would find themselves containing the exact copy of all the books of all kinds and all languages preserved in the all of the richest libraries in the world.
Even though Borel wrote the above merely as a rhetorical illustration of one of the inherent paradoxes of probability theory (namely, that given enough time and trial, random events can produce seemingly nonrandom results), much like another famous thought experiment—Schrödinger’s cat—it has since inspired real-world research, and quite a few works of speculative fiction. Okay, that’s not entirely accurate. For even though Borel does have first dibs on the “typing monkeys metaphor,” the idea behind it (now known as the infinite monkey theorem) has been around for quite some time—twenty five centuries to be exact!
That’s (not) ancient history: Democritus vs Cicero
In effect, the oldest known reference to the infinite monkey theorem dates back to the 5th century BC, when the Greek philosopher Democritus, burnishing the beliefs of his teacher Leucippus, proposed that the universe had originally been just a limitless void, filled with an infinite number of indivisible particles called “atoms,” which then collided with one another to fortuitously form everything that exists. By everything, Democritus meant not just the world we’re living in, but also many other worlds, some similar to ours and others quite different, and all of them constantly changing, all of them (to quote P. B. Shelley, via Bertrand Russell’s History of Western Philosophy) “rolling ever/ from creation to decay,/ like the bubbles on a river,/ sparkling, bursting, borne away.”
Not long after Democritus, that great Greek sage Aristotle laughed away his strikingly portentous theory into supercilious oblivion, but not before making it a bit clearer to his ardent followers. In the treatise On Generation and Corruption, in an attempt to elucidate the logic of Democritus’ atomism, Aristotle remarks that it is indeed conceivable that the same simple elements may produce widely different things for, as he wrote, “tragedy and comedy are both composed of the same letters of the alphabet.”
Three centuries later, Roman philosopher and statesman Cicero wasn’t as kind to Democritus’ atomism, arguing, in the second book of his philosophical dialogue On the Nature of the Gods, that such a theory can only be concocted by a lunatic. In his words,
Is it possible for any sane man to behold our beautiful world, and still believe that it was made by the fortuitous concourse of certain solid and individual bodies, moving by their natural force and gravitation? He who believes this may as well believe that if a great quantity of our 21 letters, composed either of gold or any other matter, were thrown upon the ground, they would fall into such order as legibly to form the Annals of Ennius! I doubt whether fortune could make a single verse of them!
Between randomness and determinism
Cicero’s “typographical image”—as Argentinian writer Jorge Luis Borges notes in his thought-provoking 1939 essay, “The Total Library“—made quite the impact on subsequent generations of authors, scholars, and readers, and especially during the European Enlightenment. Among others, John Locke—the British arche-empiricist and the father of liberalism—mentioned it explicitly near the end of his immensely influential 1689 Essay Concerning Human Understanding. Two decades later, master-satirist Jonathan Swift played around with the metaphor at the very beginning of his laugh-out-loud “Tritical Essay Upon the Faculties of Mind,” lightheartedly remarking that Alexander the Great should have never wept when his military successes left him with no more worlds to conquer because “the fortuitous concourse of atoms” would have surely created at least one more for him!
Before too long, Locke’s use of Cicero’s image was taken up by Christian apologists such as Joseph Addison and transformed into a neat ontological argument in favor of the existence of God. In a November 22, 1712 essay published by The Spectator—a daily magazine he had founded himself just a year before—Addison contended that it is only commonsensical to believe in a Supreme Creator for, to quote him, “It is much more probable that a hundred million of dice should be casually thrown a hundred million of times in the same number, than that the body of any single animal should be produced by the fortuitous concourse of matter.” Charles Darwin turned this notion on its head, of course, when he alleged in his seminal 1859 work On the Origin of Species that, with enough time, even the most complex of creatures could arise from the most simple of beginnings.
The appeal of Darwin’s idea proved irresistible. In retrospect, this meant it was Democritus who was always right, and not Aristotle, Cicero, or Addison. From the vantage point of infinity, sheer randomness can, indeed, beget order—and even beauty and meaning. In fact, as Borel inadvertently pointed out, it’s inevitable that this should happen: given enough time, a monkey hammering away at random on a typewriter would almost surely produce not just one verse of the Annals, but all of them, as well as all the works of Shakespeare, Hugo, and Dante—and pretty much everything possible to express in all languages that have ever existed! But it’d be reckless to confuse this universal library with a utopian dream, for it is certainly not that, and by any stretch of the imagination. As we’re about to see, an infinite library may be just as good as no library at all, for it has the frightening potential to consume all that is known, leaving us with nothing but an inescapable void of ignorance.
Entering Borges’ Library of Babel
Jorge Luis Borges wasn’t the first writer to turn Cicero’s thought experiment into a mind-bending short story—by his own admission, he merely borrowed the idea from a 1902 work by a now-forgotten German SF-pioneer, Kurd Lasswitz. Even so, it was his 1941 classic, “The Library of Babel,” that popularized the metaphor and turned it into a pinnacle of aesthetic achievement, becoming since a cornerstone not only of speculative fiction, but of highbrow literature too.
The story centers around a vast library, consisting of a large, possibly infinite, number of adjacent hexagonal rooms. Each wall of each hexagon is furnished with five bookshelves, and each of these bookshelves holds 32 books. They are all identical in format—each book contains 410 pages of exactly 40 lines of 80 characters. Some five centuries before the beginning of the story, “a librarian of genius” realized that all books, however different from one another, are made up of the same basic characters: the space, the period, the comma, and the twenty-two letters of the alphabet. He also posited that all of the books are different from each other, that is to say, that there are no two identical books anywhere in this seemingly infinite library!
From these two “incontrovertible premises,” this librarian of genius was able to deduce something rather exciting, something immensely hopeful—namely, that the Library of Babel contains every possible combination of the 25 orthographic symbols, which is to say, it contains every single book that has ever been written and may be written with their help. “When it was proclaimed that the Library contained all books,” Borges writes, “the first impression was one of extravagant happiness. All men felt themselves to be the masters of an intact and secret treasure. There was no personal or world problem whose eloquent solution did not exist in some hexagon. The universe was justified, the universe suddenly usurped the unlimited dimensions of hope.” This didn’t last long, though.
“Abandon all hope, ye who enter here”
As soon as it was discovered that the Library of Babel must hold within its walls everything ever expressible, the librarians rushed to explore its fascinating depths. For five centuries, they scoured the hexagons in search of catalogs and lost gospels, in search of such things as personalized vindications or detailed histories of the future. To no avail—there were just too many books, most of them pure gibberish, sprinkled with a few intimations of an intelligible phrase. “As was only natural,” writes Borges, “the inordinate hope was followed by an excessive depression. The certitude that some shelf in some hexagon held precious books and that these precious books were inaccessible, seemed almost intolerable. A blasphemous sect suggested that the searches should cease and that all men should just juggle letters and symbols until they constructed, by an improbable gift of chance, these canonical books.”
In other words, the Library of Babel had quickly become a prison, not an oasis of knowledge. It was just too vast, too convoluted, and too full of nonsense to be of any use to all but a few individuals. The librarians, who had once dreamed of uncovering the secrets of the universe, had been reduced to desperate magicians, their only hope for success a stroke of blind luck. In time, newer and newer sects began to appear. One of these, the “Purifiers”, sought to rescue the very notion of meaning inside the walls of the Library by eliminating all the nonsensical books from the shelves. Yet another one tried to make sense of the chaos by inventing their own personal god. “On some shelf in some hexagon,” the sect believed, “there must exist a book which is the formula and perfect compendium of all the rest.” Moreover, some librarian must have already read it. They call this librarian “The Man of the Book,” and futilely they go searching for Him, through the halls of the universal library.
“One of the habits of the mind is the invention of horrible imaginings,” wrote Borges in “The Total Library,” a few years before publishing his most famous story. In his opinion, the Library of Babel is one such imagining. Because, after all, what’s the use of holding all the knowledge in the universe if you are unable to access it? Even more frighteningly, what’s the use of knowledge itself when you can’t discern it from ignorance? Originally, Borges may have intended to use the Library of Babel as a profound metaphor for the universe, and the way our lives intertwine with it. In the few decades since its publication, it has morphed into a metaphor for something else, something just as pervasive—the internet.
The internet as the Library of Babel
In more ways than one, the internet can be thought of as a digital version of Borges’ Library of Babel. The connection was observed as early as 1999 by Spanish-French journalist Ignacio Ramonet, in a book titled The Tyranny of Communication. Shortly after the book first hit the shelves, in a promotional interview for the French newspaper Libération, Ramonet shared some of his fears regarding the then-fledgling internet industry, admonishing “the new ideology of continuous, real-time information.” “Just as in Borges’ Library of Babel,” he said, “vast amounts of information are there on the Net, with all their variants and approximations; nothing guarantees the reliability of the data; rumor and fact become as one.”
Say what you will, but Ramonet was on to something. Indeed, just like Borges’ library, the internet is a vast repository of information with no real authority curating its contents. As such, the potential for misinformation is high. With no one to provide guidance or arbitrate truth from fiction, it can often be difficult to determine which information is reliable and which is not. Furthermore, the sheer amount of information available can be overwhelming, not despite the convenience of finding it—but precisely because of it. In Borges, there were librarians dreaming of the elusive Catalogue of All Catalogues and of the man who can dip into it at will, the “Man of the Book.” In our world, we already have such a deity, and his name is—Google. Little did that Borgesian sect knew that even their god offers no salvation.
Because the Library of Babel—and, by analogy, the internet—is problematic by design. It was never a question of whether you can find something inside it or not, but of how to do anything with what you’ve found, that is, how to share that knowledge with someone else. Knowledge unshared is pretty much useless knowledge—as those Borgesian librarians will one day surely find out to their detriment. It’s likely there are thousands—and even millions—of them who have already read the best book ever written, and there are even some who have read “a detailed history of the future” too. But they are the only ones who can profit from that knowledge—if even that. At best, they might find, somewhere in the vastness of that library, someone to believe their truths, hoping that said someone will be interested enough to pass on the torch; at worst, their knowledge will die with them, and all the doomsday prophecies they had learnt will come true either way.
Digitizing Borges’ infinite library
Of course, the internet is not all bad. On the contrary: some of the things it offers are unprecedented and couldn’t have even been dreamt of by Borges himself. A good time as any to introduce Jonathan Basile, a 30-something Brooklyn writer and devoted Borgesian. One night, a few years ago, he was lying in his bed “when the idea of an online Library of Babel popped into his head.” His first thought was—it must exist already! He spend the next day browsing Google, the internet’s Man of the Book, but his catalogues offered nothing of interest. At first, Jonathan felt a bit disappointed, but a few moments later he felt a stream of excitement rushing through his body. In the blink of an eye, the online Library of Babel became “a reluctant destiny” for him.
In order to do build it, he spent the next six months studying programming, and scouring through books and essays such as Antonio Toca Fernandez’ “La Biblioteca de Babel: Una Modesta Propuesta.” And then, one not so very special day in 2015, at the unassuming URL https://libraryofbabel.info, there appeared one of the most enchanting and intriguing projects in the entire history of websites: Borges’ Library of Babel, digitized to the very last book. “At present,” the website says, “it contains all possible pages of 3200 characters, about 10^4677 books.” It also says that “any text you find in any location of the library will be in the same place in perpetuity.” In other words, “Every possible permutation of letters is accessible at this very moment in one of the library’s books, only awaiting its discovery.”
Unfortunately, much like those frenzied librarians in Borges, you can spend months, years or even your entire lifetime moving from one virtual hexagon to another, checking out the titles of the books on the shelves, leafing through each one of their pages—and chances are, you won’t find anything other than sheer gibberish and a few partly discernible English words. But spend some time to get to know the site better, study the instructions a bit more attentively, and sooner or later you’ll find yourself angling for verses from Hamlet, glimpses of Einstein’s most famous theory, and some optimistic or eerie divinations about the future. It’s all in there, everything, absolutely everything.
Including this very article.