Library of Babel - Is this for realz!!???

I just found this mind blowing website called the library of babel.

Take a look at it here: https://libraryofbabel.info/

Apparently this library contains every single possible permutation of all the English letters plus the comma and space. Which means that anything you type in the search bar already exists in this library. Even things that have not been said or have not occurred already exist in this library. The whereabouts of Amelia Earhart are in this library.

Here's a good explanation of it: https://youtu.be/GDrBIKOR01c?t=17m10s


So what im wondering here is, how is such a website possible? More importantly, how does the site search for a match so quickly? The website apparently has more pages than the number of atoms in the universe, so what search algorithm could it possibly be using to find a match so quickly?





Last edited on
That video wrote:

Each page is given a unique, sequential page number in base 10. The text on each page is encased inside this number. An algorithm [the guy] created uses the page number as a seed to generate a unique big number. That output is then converted into base 29 so it can be represented using every letter of the English alphabet.


If this is really how the site works, then the site does not do what it claims.

The number of possible strings is limited to the number of pages you have. So unless there are 320029 unique page numbers, then it is missing some permutations. And if there are 320029 unique page numbers, then there's no need for the algorithm to expand the page number into a larger number.


This is a common problem in compression. It is not possible to create a lossless compression algorithm that is able to reduce file size 100% of the time, because there has to be a 1:1 correlation of compressed to uncompressed file. So sometimes, if you try to compress a file (typically one that has already been compressed), you will actually make the file bigger.

That might seem like a tangent, but it isn't. From what is described above, that's what this site is claiming to do. It's trying to compress all those different pages into a smaller page number. Which simply isn't possible. If you have 320029 unique pages, then you need 320029 unique page numbers to identify them. Period.


Now if the site DOES have that many page numbers then yeah, it could totally work. It could just be use the selected page to automatically generate the string on the fly. That's actually incredibly simple to do, and is not nearly as impressive as it sounds.

The algorithm that video talks about might not actually be expanding the page number (which is nonsense), but might merely be scrambling it so that the pages appear to be ordered more randomly. For example, without scrambling, page 0 would be "aaaaaa", and page 1 would be "aaaaab". But by scrambling it, it's like shuffling those pages up so they're not obviously ordered.



This is not a "truly eerie experience" as the guy in that video claimed. It's just an incredibly basic cypher.



EDIT:

in fact, I could probably whip up a program to do the exact same thing in under an hour.



EDIT 2:

Somewhat interestingly, the concept of having a base-10 page number might not be the best idea to begin with -- since it being base 10 means the page number will require more than 3200 digits. So rather than keeping track of the page number, you'd be better off just keeping track of the text on the page, as it'd be smaller.
Last edited on
Borge's story talked about a library that contained every possible book with (I'll just throw some figures because I don't remember the actual figures and it doesn't really matter anyway) 100 pages with 100 columns and 100 lines each, where every cell contains either a Latin letter, a comma, a period, or a space.
If you want to find any book that contains a specific phrase, all you need to do is generate a random string of a million characters and pick a random place to overwrite the phrase you're looking for. Or even just overwrite it at the start. Since the Library of Babel contains all possible strings of that length, the book you generated is guaranteed to be in there.
closed account (48T7M4Gy)
Well, if that's a bit much at least you can use the internet offline, trust me it works:

http://internet-download-manager.en.softonic.com/download
closed account (48T7M4Gy)
https://en.wikipedia.org/wiki/The_Library_of_Babel
closed account (48T7M4Gy)
Hardly rational. Still, if you run out of space on pi there's always e et al.
Topic archived. No new replies allowed.