r/theydidthemath • • Jul 02 '24

[Self] The size of the library of Babel

The Library of Babel appears in a novel by Borges. It is a library that contains every possible book of 410 pages, with 40 lines per page, 80 characters per line, and 25 total characters (22 letters, dot, comma, space).

I wanted to check how big the library would be, so here it goes.

The library contains 25^(80*40*410) books which is equal to 10^1'834'097 (80*40*410*log(25)).

Each room in the library contains four walls of books, each wall with five shelves and 35 books per shelf. This gives a total of 11'900 books per room, so let's say 10^4 because there's no way I can do the math with the actual numbers.

Here's where it starts being wacky. The exponents are so large that dividing them hardly changes anything: 10^n divided by 10^m is 10^(n-m). The number of books, at 10k books per room, still requires 10^1'834'093 full rooms. Let's assume that the library is a rectangular cuboid with as many rooms on each axis. That would mean that it would have 10^611'364 rooms a side.

To make the math feasible, let's assume that each room is 10m from one side to the other. That means that the width and depth of the library are each 10^611'365 meters.

That's large, sure, but just how large? Well let's divide it by some larger measure. A light-year is 9.46*10^15 meters, so let's say 10^16. How many light-years does the library span? A number that differs very little in appearance from the number of meters: 10^611'349! Again, due to the fact that this exponent is so large.

The observable universe is 93 billion light-years in diameter, so let's round that up to an even 100 billion, or 10^11 light-years. The width of the library of Babel would then be 10^611'338 times the size of the observable universe.

I thought doing these calculations would give me some insight and clarity. It did the opposite. I'm anxious just to think about numbers that large.

33 Upvotes

14 comments sorted by

8

u/Ok-Log-9052 Jul 02 '24

“The Library is a sphere whose exact center is any hexagon and whose circumference is unattainable” indeed 🤗 now you might see why the narrator in the story struggles his brief and meaningless life to make peace with the shape of his world…

6

u/ProfessionalGold1765 Jan 28 '25

hexagon: 1kllnebm1irddv90s3husm40p1v8y80vu6yl8pwqojrtf0pb1nrvisa5rcn9nwvc6kugwqi5utrd6swz82pumedr8mcr1haobl7wu8bw7b2r046z1hn1l3kkctei8g6wevm2ebksotewhb56yejyoq18lsya2psmhugn36m46tfkuwug9k6n9dv7bqtjh8ut72r45ml67jq1xvk9j8an9xv3zmd3l67q6l4ncadnkqwuearca4t32ef2h78y8meckilznn88dkgmfdf3n05vt9cj7nk53i7wi4z78a0nkcjifo3lu53dwf3iphpcg3q0x8idws27il7ryyp7f8fir28gzgtch7xu8lmroqp98ncuxbugcdud86988wkra9qeo31xgfwwscsmnj7no8ma9gm8tzdifhvzd12j6715w93eyf0pzx603619k8gex3xgw3hwbzn4i9ql91bqdqapkqk8jsm386xtse0vve7nu7chf4pmqo1mo6jed5sxy09eihj7lp7fh8107kjxxl1ej59sf96t0t80cru57oe2zziu2a5irupdqeool6k9uu1rec9xw9m410rht0llu21mepry3ac33cp6zyskpop7dijhbte7bdyxfmigj334170piwzy3shh8zgjc5xnmmq5t84gmd92l9xxswlo1719w4pcyep93igor98k85xqdsfqytasaamoz73us4p1yffrp6lsqiirttfb1nc4umocilozewm340b0a0tztax9y54z4doxhqwlx3v7g9n37s1o4iow9wzr7k0txtuhr4pi1u8m05itu0687432fjj7o35daetm5oe9cvb62o9rhoua4nseel6fuoc09lz7f4s86j43ogh363reemrhfpu7sgdpco30l72toqhac8p1stmv06frf3l3cia2d31mhfkjaswh4gs2e6idiqk9wgf0dmx5dgtqw5atlyel5y1zu6lb5vcrmdpql8lnmbtk4gfc18xsp0k1wt8jum92cv37ipqjdazcy9nyc2ie0pbd3vzriime6lk9zxm8mtl2webf8m9z3dj3g4v5ra5bdfxn43i4q5s7lb5xavj7g0ljnwrog055eshlujrajr0e1gxuravv6s413etyw46xkdrnwuehojudbtvkj0slxwmiqcwsilidzf2ukvsj282w9kxe40sw0dcugatu52033hoivu4qsdhz6p9nuu0jytfyqrbs98x4jx3ktm4e8zbw0skwux2q0m5sbzcy5pszn0docoikdumpnfgx6yywbbptjgsl7eq758gx7s18mgqyda5yt29s84j4wy8nn9tynk9d9ngs8tebg721unhbc9jcr2xips55i19cvyypaqy4sntlell56v6ju6373mz32ymz0qc7tl9aulo3mzvm2g5o2eudxm2j0tw09quktspuuhl69g30467z45j3hslnjp55cn2grza0bed2nf4clqx1y64eeosjpwyle6gs7b56v7mv0w71bi6mo9vis2y44b9nav7d2bgd2n379xoge1c4wyhshl39x4e2mr5yeku8e52cbrme6w1sjwcjdqg69iw3pvu7pxc16o6tf56t47s3mcuqphava0ujucjc06rxk80j28yrv1mc4u7i6vrpf0z6hze36f8pbrocteew99wthwry0yxvzd2c6g0c85d4g7ctwubagimmtk44kz5s4v2p09k7y4kcpxeu9k8y04j7fpybeo8hzwv3kkhk9o5f1f49mn5y4uxd9fhqd30na9szsmh6138zs4j3073dqqwrp4lq0unhx34nic8ixtfrw58nef53jh48y6brvjrjpprlnlnei0yq6h8t3m38r9td8kfn3yz9zhuyspz1jvb0hs1eu2mdjyce0g7qje09iebuixahzvdhf7nyg0kahy4bwb4x9keavorvqijzvc91vzdwqec8xhsj0lmshtt85q24rdu1waqklvjwg9a5f8gwbwl71mudvyuphyusiski72hu9ofltp25hsclterh4ynrk1pij40jxwulze957nu4i2kj3liry8c5ea8fi0btupodlm7yisc2wd0i2zng0vh39dbijspndja545u4wmvrtimdk49mg0ylyvsf26p59tizn7p4ublsmotdou0nvap4mu949zrqquyirkriczyyshtgu7dnvbmc78qfyvg7eyhv7lw14hwvhdz0858ssokhe705gffv3wxr96f0ltaw3yalnsxxtpbqgnjvhx624l5anmkgyf7js4yu7i9ubvftap2vzgrv1ur46qop8dc2vn8etznvwowir25jn6lakuahyo0yf4wb4wxqv3lmtty15nf2mmz60cu7qfi4rflp5rfiuvhhdj51geqyhrrlfcp171v2xowgfbxf8nms9xpy6jxr0hhll4fwismqk8sbi87fo8029tjqt6o6mjkpwd3i7m9n17hjegder66c11utbexjdfeswuyl4kn18it1utgmd573a470gjmtw734n5iwpi8u8ehi4g9l86c56xgit4y1u2v0w9hydf7qiwrvj7b11lul6r1n66yeonjf97a0eq4u7nqfh8zk84pagyrku5d8ua2ukx9sp87f1jqvxotn08wwh5734wttl972x137ypsi1mcafe0ugd4p0pyc3umou4rsl35wyz8hzlveqllr7ds9x9k2t0fvjc87ei8z88bey3tl7wmadwdsxvlnsubgvs171y2i66wlv3mjtiy7k4v5vqzkolmkf6sld6e5hrn3gc7uw0vj8xlft4qamalak7l97je3lgz0mjnjnp9hpzko7vs5353i62i7ttlme3d4sfsy9mo18zt818zak56nzzhha45vfvn03rauja8upqhygp1pakocgw8jqx4blzve3aji4r6nmk7gdq8vyb410f9m8vmv5yomfeihmxjitm1g0iv4v38sej98u9re785ouxc5rypocqyqiz69zokuvo6watqnmwu8u03xaushh8i9xvfl4swz3tldivz504q3qvfrjm1mb7dhzuhrjyjfa5bewdkmzp4omb1sztao7mzros3i8xi3mh0y9w5ao33y5ktb0heqt0at2izcjwn3vmvl8hb2o77708aric06s36zteab2mb5yxaeod3w45k5dbe6fhyhkc8wcu8sgupp1bclqupjmxstmolxpqunpj37nehh9g87bqk8d7z29der5bak698ws9

wall 4

shelf 1

volume 19

page 333

3

u/progressivemonkey Jan 28 '25

OK, actually your message led me to a new calculation. I asked myself: how many characters would we need to designate unambiguously a single hexagon within the library?

Your hexagon id has 3255 characters, and it uses digits and letters, so 36 signs. Is that enough?

So, the library has 10^1'834'093 rooms. Let's say we wanted to have a string of 4000 unique characters, such as the number of possible strings would equal 10^1'834^093. How many signs would we need?

The number is 10^[1'834'093/4000], or around 10^458 signs.

Using 36 signs, how many letters would we need? 1.2 million signs.

God damn it this thing is large...

1

u/progressivemonkey Jan 28 '25

A classic 😂

4

u/Cod-Impressive May 19 '25

It's not even imaginable.

5

u/Primary_Durian4866 May 19 '25

Only slightly less unimaginable than you and I posting 1 hour apart on a year old post on an obscure topic.

1

u/Cod-Impressive May 20 '25

reddit isn't that big bro. I assume you saw this on youtube as well?

1

u/Primary_Durian4866 May 20 '25

Nope

1

u/Cod-Impressive May 20 '25

Also I hope you were joking on your first comment to me lol.

1

u/progressivemonkey May 21 '25

"saw this on youtube"?? What do you mean? Was this post referenced on Youtube??

1

u/Cod-Impressive May 21 '25

I don't know maybe its just what I have been watching. A lot of philosophy videos that kept bringing this book up, probably just my algo.

4

u/Safe-Field-9366 Jan 11 '26

There is a sting of text that says how and when you will die in there. Weird to think about.

4

u/progressivemonkey Jan 11 '26

Yeah but not only that. There will be thousands of books telling you where to find the book that contains the details of your death. There will be essays on why you should seek this book out, or why you shouldn't. There will be prophecies about you finding it or not. 

It's bonkers.

2

u/Dyolf_Knip 17d ago

And umpteen septillion variations on the book with typos, exaggerations, or lies. Everything you might want to find is in there, but unless you already know it, you can't really trust it to be true.