The Library of Babel and the Information Explosion


The world has been transformed by the Internet. Google, founded just 20 years ago, is a major force in online information. The company name is a misspelt version of “googol”, the number one followed by one hundred zeros. This name echoes the vast quantities of information available through the search engines of the company [TM107 or search for “thatsmaths” at].


Artist’s impression of the Library of Babel [Image from Here].

Long before the Internet, the renowned Argentine writer, poet, translator and literary critic Jorge Luis Borges (1889 – 1986) envisaged the Universe as a vast information bank in the form of a library. The Library of Babel was imagined to contain every book that ever was or ever could be written.

Reflections on Infinity.

Mathematical concepts influenced the structure and style of many of Borges’ short stories. They included Cantor’s set theory, orders of infinity, paradoxes, logic and topology. His knowledge of mathematics corresponded approximately to basic first year university level, comparable perhaps to the mathematical understanding of James Joyce.


Jorge Luis Borges in Dublin on the occasion of the international Joyce Symposium in 1982 [Photo Eddie Kelly].

Borges’ short stories are infused with mathematical elements and concepts. In The Garden of Forking Paths, he considers the nature of time, and the innumerable branch points that determine our future. Treating all possible options at each branch-point leads us to the concept of a multi-verse, or the many-worlds interpretation of quantum mechanics. Borges’ story The Aleph speaks of a point in space that contains every other point. Viewing it, we can see everything in the universe from every possible angle.

Borges exploited the idea of repeated splitting or bifurcation, which is a ‘route to chaos’ in many dynamical systems. He made use of paradoxes of the infinite in which the whole is not greater than its parts, and universes in which every point is at the centre. He was intrigued with dense sets, like the set of all fractions: between any two fractions, no matter how close, there is always another one. He imagined books with an infinity of pages each with infinitesimal thickness and finite overall thickness.


Borges wrote a prologue to the Spanish edition of the excellent popular book Mathematics and the Imagination, by Edward Kasner and James R Newman, which was originally published in 1940. He was familiar with Cantor’s theory of sets and with many of the paradoxes arising when infinite sets are examined. But Kasner and Newman was published only in 1940, just a year before the Library of Babel, and it seems unlikely that this book could have been an inspiration for Borges story. Borges owned a copy of Bertrand Russell’s “Principles of Mathematics”. This was originally published in 1903, and Borges’ copy is dated 1939. It included discussions of Zeno’s Paradoxes, Cantor’s transfinite numbers. Borges was fascinated by the concept of infinity. It is probable that Russell’s book was an inspiration for Borges.

The Library

Borges’ Library of Babel comprises a gigantic collection of books, each having 410 pages, with 40 lines on each page and 80 characters on each line. Thus, there are 410 x 40 x 80 = 1,312,000 characters in each book. The library contains every possible book of this form, that is, one book with each of the possible orderings of the characters. Borges used an alphabet of 25 letters, so the total number of books is 25 raised to the power 1,312,000. This corresponds approximately to 2 followed by 1.8 million zeros, an unfathomable number. No matter if a book is lost: there are more than 30 million others that differ from it by only a single character.

The library is divided into hexagonal galleries, in each of which four walls are lined with books, the remaining two providing access to other rooms. Borges writes that the library is a sphere whose exact centre is any hexagon and whose circumference is unattainable. This leaves some ambiguity and scope for speculation about the “cosmology” or large-scale structure of the library.

Topology of the Library

Borges described the collection as unending but finite. Later he wrote that “the Library is unlimited but periodic”. This seems paradoxical, but if we consider the points on the surface of a sphere, they are finite but unbounded. The Library has a similar property of being finite but periodic and having no physical boundary.

In a commentary on Borges Library, mathematician William Goldbloom Bloch considers various possible “cosmologies” or large-scale geometries for the Library. Just as a 2-torus is the product of two circles, a 3-torus is the product of three. We can also envisage it as a periodization of R3, where each unit cube with corners at lattice-points is identical to all the others. The 3-torus is finite but unbounded. Goldbloom Bloch also considers the 3-Klein bottle as a possible “cosmology” for the Library.

The Library and the Internet

The story contains many of the signature themes of Borges: infinity, paradox, labyrinth, and self-referential reasoning. A library with all possible books arranged randomly is essentially useless, as valid information is swamped by multitudinous tomes of gibberish. The order of the books is random and a catalogue of the Library would be of complexity and extent comparable to the Library itself. The librarians have an unenviable – and essentially impossible – task.

The Internet has expanded by a factor of a thousand since the beginning of the millennium and more then half the world population is now online. As data volumes continue to grow, ever-smarter mathematical filtering algorithms are needed to prevent information overload or “data deluge” and to avoid the noisy nightmare imagined by Borges.


Borges, J. L., 1941: The Library of Babel. In “The Garden of Forking Paths” (Spanish). English translation in “Labyrinths” (1962), Ed. D. A. Yates and J. E. Irby.

William Goldbloom Bloch, 2008: The Unimaginable Mathematics of Borges’ Library of Babel. Oxford Univ. Press, 192pp. ISBN: 978-0-195-33457-9.

The Online Library of Babel:

Basile, Jonathan: Borges Universal Library as a Website:

*        *        *

The collection tm-cover-detail-thumbThat’s Maths, with 100 articles, has just been published by Gill Books. Available from

Last 50 Posts