Borges' narrator describes how his universe consists of an enormous expanse of adjacent hexagonal rooms, each of which contains the bare necessities for human survival—and four walls of bookshelves. Though the order and content of the books is random and apparently completely meaningless, the inhabitants believe that the books contain every possible ordering of just 25 basic characters (22 letters, the period, the comma, and the space). Though the vast majority of the books in this universe are pure gibberish, the library also must contain, somewhere, every coherent book ever written, or that might ever be written, and every possible permutation or slightly erroneous version of every one of those books. The narrator notes that the library must contain all useful information, including predictions of the future, biographies of any person, and translations of every book in all languages. Conversely, for many of the texts some language could be devised that would make it readable with any of a vast number of different contents.
Despite — indeed, because of — this glut of information, all books are totally useless to the reader, leaving the librarians in a state of suicidal despair. This leads some librarians to superstitions and cult-like behaviours, such as the "Purifiers", who arbitrarily destroy books they deem nonsense as they scour through the library seeking the "Crimson Hexagon" and its illustrated, magical books. Others believe that since all books exist in the library, somewhere one of the books must be a perfect index of the library's contents; some even believe that a messianic figure known as the "Man of the Book" has read it, and they travel through the library seeking him.
The Math:
The Library contains at least
books.[2] (The average large library on Earth at the present time typically contains only several million volumes, i.e., on the order of about
books. The world's largest library, the Library of Congress,[3] has
books.)
Just one "authentic" volume, together with all those variants containing only a handful of misprints, would occupy so much space that they would fill the known universe. Each volume is 410 pages by 40 lines by 80 characters, or 410 x 40 x 80 = 1,312,000 characters. There are 25 different characters (including punctuation), so 24 ways of misprinting each of the 1,312,000 characters in a volume, ignoring the possibility of swapping two adjacent characters. Therefore, for each "authentic" volume:

= 31,488,000
= 495,746,694,144,000
= 5,203,349,369,788,317,696,000
= 40,960,672,578,684,980,713,193,472,000The number of different ways in which the books could be arranged in the library is
, the factorial of the number of books, and a number which is so unimaginably huge that when written down it would have more than
digits in its decimal expansion. In other words, even writing down the length of this number would take millions of digits to do.
