Thank you for visiting this site. This article covers “The Library of Babel.”
A certain library contains every book that can be written in a fixed format, without exception. Books already written, books yet to be written, books that will never be written — all are there.
Your exact biography is there, and so is the book that correctly states what you will do tomorrow. The cure for cancer and the truth about how the universe began are certainly on some shelf.
And the library is of no use whatever.
The short story the Argentine writer Jorge Luis Borges published in 1941 takes the form of fiction and presses one fact: having all the information and knowing anything are entirely different.
A Complete History of Philosophy and ReligionJapanese edition on Amazon →
Newton Special: The Labyrinth of ThoughtJapanese edition on Amazon →
The specification
Borges writes the structure out in detail. The concreteness of the numbers is what makes the story work as a thought experiment.
The library consists of innumerable hexagonal reading rooms running in all directions (the original title is La biblioteca de Babel). Bookshelves line the walls of each room, and every book has the same format.
| Item | Specification |
|---|---|
| Pages per book | 410 |
| Lines per page | 40 |
| Characters per line | 80 |
| Symbols used | 22 letters plus comma, period and space — 25 in all |
So one book is 1,312,000 symbols drawn from a set of 25. And the library holds every such arrangement, once each.
The number of volumes is 25 multiplied by itself 1,312,000 times — over 1.8 million digits long. (Saying “a 1 followed by 1.8 million zeros” does not help the intuition much.) The number of atoms in the observable universe has about 80 digits, so there is no comparison. This library does not fit in the universe.
What “everything” contains
What does it mean concretely that everything is there? Borges enumerates.
- Every book in every language, past and future
- The detailed history of the future, and the autobiographies of the archangels
- The true catalogue of the library, and a vast number of false catalogues
- The demonstration that those catalogues are false, and the demonstration that that demonstration is false
- A book giving the exact date of your death, and a book denying it
The library carries a nasty curse. That a true book exists means the lying books that cancel it exist in equal measure.
And the lies overwhelm. Count versions differing by one character, by two characters, and for every correct book there are astronomically many slightly wrong ones.
Almost all of it is gibberish
There is a more fundamental problem: the overwhelming majority of the collection is meaningless.
Consider the chance that 1,312,000 randomly placed symbols happen to form readable prose. Almost every book is a meaningless run from first page to last.
Borges’s story includes an episode in which the librarians searched for centuries and finally found a book containing one legible line: “O Time thy pyramids.” Several centuries of searching for one line that makes sense.
The proportion of meaningful books is indistinguishable from zero. The property of containing everything turned out to be the same property as finding nothing.
The history of the librarians
The story tells how the librarians who live there responded, and the account is superbly done.
Joy. Realising that the answer to every mystery is somewhere in the building, people were elated. Every problem is already solved; it only has to be found.
Pilgrimage. People set out in search of the book that states the meaning of their lives. And there is no clue whatever for narrowing down which shelf to search.
Destruction. Some, in despair, began burning meaningless books. The collection is so vast that no amount of burning reduces the total appreciably.
Despair and legend. In time people realised that nothing can be found here. What remained at the end was only the legend of a librarian who once read the one book that is a perfect summary of all the others.
Information is not meaning
The story is treated as a thought experiment because it shows one point vividly: information you have no means of locating is no different from information that does not exist.
Every truth is physically present in the library. And with no method for judging which is true, nobody can know anything.
Crucially, the judging cannot be done inside the library. Pull another book to check whether one is correct and you have no guarantee about the second. Without a standard outside the library, its contents are permanently unusable.
I take this to be the most compact lesson ever stated about information. What has value is not information itself but the machinery for selecting from it.
The modern library
Written more than eighty years ago, the fable feels far closer now.
The internet contains nearly every claim. Correct information, information that cancels it, and information denying both. Having achieved the state where anything can be found by searching, all that remains is the work of judging whether what you found is right.
The same structure appears with systems that generate text. Being able in principle to output any string means being able to output correct and incorrect sentences alike. Breadth of output guarantees nothing about correctness of output.
That was exactly the problem facing Borges’s librarians. They had no criterion, so they could know nothing.
Things people wonder about the library
Is the collection infinite?
It is finite. That is the cleverest part of the story. Because the format of a book is fixed exactly, the number of possible strings is a definite finite value.
It is simply a finite number too large for the universe. Not infinite, merely staggering. The setting makes this a concrete combinatorial problem rather than a mystical discourse on infinity.
In the story itself the library is described both as endless and as finite and periodic; Borges leaves it deliberately ambiguous.
Could it be built?
Not as a physical library, but generating any given page by computation certainly can be done. Websites exist that produce the page at a specified location on demand, complete with a search function.
The interesting part is that a phrase you search for is “found.” Whatever string you enter, a page containing it necessarily exists. But that is generation, not discovery. The device makes tangible what “everything is there” really means.
Is there a similar idea?
The one about monkeys typing at random eventually producing the complete works of Shakespeare. The structure is the same, pressing the point that exhausting the possibilities and obtaining something useful are different.
The difference is how time is handled. The monkeys are an argument about time — it will happen eventually. Borges’s library is an argument about space, with everything laid out from the start. That the difficulty is a search problem is far more blatant in the library.
Related thought experiments and paradoxes
Articles collecting the ways intuition goes wrong with infinity and enormous numbers.
Summary
This article covered “The Library of Babel.”
A library containing every book is also a library in which nothing can be known. The truth existing and the truth being reachable turned out to be entirely different. Borges makes the point complete using nothing but hexagonal rooms and 410-page books.
It is a superb story and an excellent instrument for thinking about information. Information with no means of selection is the same as none. Now that so much of it is available, the conclusion probably lands heavier than it once did.
The Complete Book of ParadoxesJapanese edition on Amazon →
One Puzzle a Day: Thought Experiments to Sharpen Your ThinkingJapanese edition on Amazon →
To return to the full list of thought experiments, follow the link below.
Thank you for reading. We hope to see you in the next article.
Also popular with readers
📚 Series: Famous Thought Experiments (45/60)


