World Domination

Thoughts on the Library of Babel

Each book in the Library of Babel has 1312000 characters (22 letters, space, comma and period). This means that there are 251312000 ~= 1.956 * 101834097 books. This is a really really big number. There are only about 1080 atoms in the observable universe. If we wanted a set of unique books, each dedicated to an atom, each book would only have to be about 57 pages long.

Each hexagon contains 20 shelves of 35 books - that's 700 books. 251312000 / 700 ~= 251311997.964 hexagons. Borges describes them extending in all directions, and also conjectures that the Library is cyclical - keep going far enough in one direction, and you'll come around on the other side. Let us also assume that no matter which direction you go, you'll visit the same number of hexes before repeating (i.e. the space is roughly cubic). Each shelf has 35 books. If we assume that each book, plus the shelf ends, takes up between 1 and 2 inches (a 410 page book near me is about an inch thick, but that doesn't count shelf-ends, and its covers and pages may be thinner than the books here. On the other hand, they might be thicker; this is a divine library, after all.) This gives as a side length of between 35 and 70 inches, which means the distance from face to opposite face is between 59 and 121 inches - roughly five to ten feet. With the stair well in the center, it's no wonder that the inhabitants had to sleep upright in the closets.

The hallway between hexagons is described as narrow - indeed it would have to be! Assuming that both of the closets are roughly two feet wide, this leaves between -1 feet and 1.8 feet for the hallway. If they were only 1.5 feet wide, this leaves us with a hallway between 0 feet and 2.8 feet wide. While one might slide sideways into the sleeping closet, I can't think of any way I'd care to defecate in a room where one of the dimensions is less than a foot and a half.

If the space is roughly cubic, then each of the dimensions is roughly 25437332.6 hexagons in length. Assuming that each hex is only separated from the others by 7 feet, that's 25437333.4 feet in each direction. The universe is 93 billion light years across. That's only 2519.64 feet. The ratio between the diameter of a proton, and the observable universe, is 2530. The ratio between the universe and the Library is 25473313.7. I can think of no analogy to express how tiny the universe is in comparison to the Library.

Those searching for Vindications certainly have their work cut out for themselves.

Each book contains 1312000 characters. There are 25 possible characters. This translates to about 6.092 MB of information per book. If the information that you're looking for contains more than that amount of entropy, no one book is going to provide it for you. One option would be to have books point to other books. After providing a portion of the information, it would then have a pointer to the next piece of information. Would this be feasible, though? You'd need slightly over two characters to identify which book in a hex is important, leaving us 1311998 characters to identify which hex you need to find. If the hex is just the one next door, things are simple. Unfortunately, it might be +/- 25437332.4 hexes away, in three different directions. Assuming that we can magically know where each direction description begins and ends (thus avoiding the need for prefix-free which could save us space on smaller values, but cost us much more for larger ones) we would require 437332.6 characters per direction. Unfortunately, this means 1311997.96 characters to identify the hex. Add in that used to record which book in the hex it is, and we've filled the entire book, just telling us where to find the next one.

This is, of course, no surprise. If this was not the case, one could turn it into a perpetual compression system, by designing an algorithm for distributing the books (i.e. mapping a position in the library into the book held there), and then just providing the the first book. Even if each book only leaked a single bit, you could use a universal code to slowly get out an arbitrary message close 251312000 bits long, all encoded in a 6.1 MB file. This is, of course, impossible. In short, there exist books for which the shortest way of indicating how to read it is to simply provide the book itself.

What does this say for hopes of having a Catalogue (or even a catalogue of catalogues)? If one is to exist, the books it must be either be either multiple times longer than the books it references, or those other tomes must lie relatively close - remember that only 1/25 of the books in the Library lie close enough that only 1311999 characters are necessary to describe them, and in a standard sized book, that would only leave one character left. About one in 25656000 are close enough that you could fit the directions for two of them into a standard sized book.

This is, of course, assuming that The Catalogue is not the Book of Sand.

The real kicker, of course, is that ANY book could be a pointer to the catalogue, but it would take far longer than we can imagine to check even just one.
World Domination

(no subject)

Last week I wrote my first real Haskell code. For that my matter, it was my first non-trivial purely functional code. Pattern matching is nice. Typing was less annoying than I was expecting, and I suspect there are parts of Haskell that make it even less annoying. I ended up with a simple (unbalanced) binary tree implementation storing key/value pairs. The bit that took longest (apart from beating my head against the wall until I noticed that I'd mispelled the name of one of my datatypes) was the deletion code.

Over the weekend, math_foo and I went up to Toronto to see the Evil Dead musical with eehee , her boyfriend, and sbranzei. It was fun, a lot less serious than the movies it was based on, although the Candarian demons seemed to have a slightly greater obsession with reproductive organs than I recalled.
World Domination

Patience Diff, a brief summary

Last night I went to a coding party at a friend's house. I was on my laptop, and so didn't have any of my regular projects with me, so instead I spent some time figuring out some code for another person at the party.

The code in question was the implementation of Patience Diff, a diffing algorithm written by Bram Cohen of Bittorrent fame, and used in (at least) the Bazaar version control system.

Collapse )
World Domination

(no subject)

Tonight was the Open Text Christmas party. After a slowish start, once people I knew started showing up, things started to improve. By the the time that dinner rolled around, a lot of people had gotten a few drinks in, and were starting to relax. I negotiated a trade for our table's bottle of red for a neighbouring table's bottle of white, and over the course of the evening, my boss bought our table three more bottles of wine. (The three employees at the table all worked for her.)

It was interesting meeting the SOs of some of my coworkers, and also just to meet them in a non-work setting. Overall, the evening was quite enjoyable.

My life has been otherwise ordinary. Last weekend I did a bit of bartending at hkarau's party. People seemed to enjoy my drinks, and I hope I introduced some people to things they'd never had before.

Last October, I graduated. I am now officially free from University, and don't feel like heading back to school for a while. math_foo and I also got a couch a few weeks ago. I should get around to converting random_dragon's old computer into a media station, so we can watch things on the TV.

Life has been otherwise quite uneventful. math_foo works on schoolwork, and I enjoy not having schoolwork any more.
World Domination

(no subject)

For some strange reason, X has decided that clicking my middle mouse button should cause it to restart. (Also, the delete key takes screen shots.) This has lead to a number of accidents while using Firefox.
World Domination

(no subject)

Exams are over (my last one was last Saturday.) Two went well, one went so-so, and the was blegh. I don't need the so-so one to graduate, and the blegh one was found blegh by a large number of other people in the class I talked to. It wasn't that the questions were difficult, but that a large number of them required you to remember a definition that was used in one question in one assignment, and never mentioned in class.

Right now I'm working on my project for Machine Learning. I've managed to piece together a program that clusters HTML documents based on LSA. It seems to work, so now I'm just writing up a report on it to submit as my project. Today is beautiful out, so I think I'm going to walk to the park and work on it there.
World Domination

Shop Smart! Shop S-Mart!

Yesterday, dualistic sent me the URL of the Zombie Infection Simulator. I'd seen it before, but this time I noticed that the source code was available, and so decided to try making my own variant.

The result is the Zombie Infection Simulator: Housewares Edition, where there are random chainsaws, cricket bats, sawn-off shotguns, etc. lying around for people to use to fight back against the hordes of the undead. With 10 weapons lying about at any given time, the humans tend to survive with some frequency, so I've dropped it down to 6 to see how it affects things.
Other changes include slightly improved survivor AI, although some of the improvements also improve the zombies.
World Domination

(no subject)

A couple of weeks ago I wrote a quick and dirty Python script that would scrape the local Zehrs flier and last night I tossed a GUI around it and hooked it up to a Bayesian classifier to have it filter between things I'm interested in and those that I'm not.

Unfortunately, it seems that the classifier is too unstable. Marking interest in a few things will drag over to the 'interested' side many other things, with no apparent relation. Telling it that I'm not actually interested in adult diapers will cause it to decide that I'm not interested in the items that I originally indicated interest in.

Can anybody who's more familiar with Bayesian classifiers explain why telling it I'm not interested in VEET IN-SHOWER HAIR REMOVER makes it think I'm less interested in MAPLE LEAF BACON, even though the two have no words in common?

I'm using a pair of classifiers, one for 'good' and the other for 'bad'. If one scores high and the other low, it gets marked interested or interested. Otherwise it's undecided.

Edit: Problem solved. Reason given in comments. Now it's working like a dream.
World Domination

(no subject)

Last night our TV gave up the ghost. When we turn it on, it makes an ugly discordant buzzing noise. It's likely that the transformer's busted (the TV used to whine for a while after it was switched off). Looking at reviews, it seems that people tend to be dissatisfied with this model, and that about 9 or 10 months on a refurb is better than some have gotten.

I don't know yet whether we're going to try to get it repaired, replace it, or just go without DDR and other assorted video games until summer when I'm earning again. Certainly, we're going to do a bit more research next time.