Tuesday, May 29, 2018

A library containing all books

Yes, you've read well. This incredible idea was first evoked by Jorge Luis Borges in his novel "The Library of Babel". In this novel, he describes a library containing all the books ever written, and all the books that will ever be written. He explains that the library contains all the possible combinations of the 26 letters, commas, periods, and spaces, and all the books are exactly 410 pages long. Of course, these books are in the middle of billions of books filled by randomly and illogically put letters, period, commas, and spaces. 


There is also a clear structure to this universal library:
- each room is a perfect hexagon
- each room is connected to two other rooms
- only 4 walls contain book
- these books are on five different shells
- each shell contains 32 books


an idea of how a room could be.
Each book is 410 pages long, each page contains 40 lines and each line contains 80 characters. Each book is thus filled with 1312000 characters. This means that this library contains not less than 29 multiplied 1321000 times by himself. Just so you have an idea, if we were to write this number, it would take approximately 500 pages to do so, or 3,5 km in a straight line. If we consider that the observable universe is approximately 46 light-years long (which we will do even if it's not totally true, for the sake of simplicity), it would take 10^1918316 universes to stock all these books. 

You may think that such a thing is purely impossible to create or even to simulate. And you're partially true. Indeed, even if it's not (yet) as huge, the writer Jonathan Bazile created an algorithm that recreates the library of Babel, with the difference that he does not create all the books possible, but "only" all the pages that are possible with 3200 characters (the same number of characters on a page as in Borges's library). These pages are split into 10^4677 books (of 410 pages each still). It is very hard to explain how it works, but basically, each page has its own number, which enables the algorithm to identify the page in the "library". Then, the algorithm uses this number to create a unique pseudo-random number, which is then converted to base-29 (a text using the 29 characters mentioned sooner). I truly invite you to go to this website, and to search whatever you want. It can be your birthday, a page from your favourite book, or even some of your personal writings.

Some may wonder what would happen if someone found a new masterpiece on this website, and decided to publish it. Well, don't worry, it has very few chances to happen. Simply because even if all the texts exist in this library, we only have 1 chance out of  10^4677 to find each. Moreover, the chance of a specific word of n letters being randomly generated is of 1 out of 29^n. I let you imagine for a 500000 word text!

Finally, I know that some of you are sceptical concerning this website. However, know that it is not impossible to create this algorithm, that each page is always at the position in the library, and that by searching something and then browsing the page you found, you are in front of the exact same page (this wouldn't be possible if the algorithm didn't work as I explained, because of the very high amount of storage a false library of Babel would take). If you're still not convinced, I invite you to look at this page (an explanation of the creator himself).

I hope that all these incredibly high numbers didn't scare you, because if you want to walk in this "total library" it is possible. You can download Library of Babel 3D here, which is basically a representation of The Library of Babel. It uses Jonathan Bazile's algorithm, and even features a cool music to follow you in your infinite search in this library.
Good luck searching, and I hope you'll find.

12 comments:

  1. Glad you made this article (I already told you this but whatever), kinda great how you manage to explain the concept this easily ! I'm pretty sure I will go back to the website, just to get lost in all the texts there are..

    ReplyDelete
  2. I've just downloaded the 3D model, it's great!

    ReplyDelete
  3. pretty good tag, I mean, I AM mindblown
    pretty good article too

    ReplyDelete
  4. Wow ! I'm impressed by this concept but I must admit that I have troubles imagining this library, it's so incredible ! You managed very well to explain easily the concept , Thanks a lot !

    ReplyDelete
  5. wow what a great article ! very interesting as well , i might say i'm very sceptical about this library it seems impossible but i will do some research . thank you for this well explained article .

    ReplyDelete
  6. Wow, great explanations! I'm still going to need some time to wrap my mind around this concept 💥

    ReplyDelete
  7. By a remarkable coincidence I've just read the Borges short story which can be found in "Fictions". I recommend the book, although the first story was tough. Thanks for the interesting article !

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. What an intriguing topic. I'm still having a hard time wrapping my head around this concept but it was honestly very well explained.

    ReplyDelete
  10. Wow. Thanks for your article, very weird concept. I honestly kind of got lost in the middle of all the numbers, I wonder what went through the head of Jorge Luis Borges to imagine something as crazy as that, I cant say I'm not glad though. It sounds very cool. I hope one day we'll be able to make one. :)

    ReplyDelete