Saturday, February 28, 2004

I haven't had a relaxing day in a long time. It's not that I'm so busy that each of my days is filled to the brim with activities--it's that I haven?ft had the chance to just sit back and do what I want with little agenda. But today was one of those days, and I thoroughly appreciated it. I got up around 9:30 (having slept about 8 1/2 hours or so) and cooked breakfast.

I did some reading up on search algorithms. Today was the Boyer-Moore algorithm. I bet it takes a lot of intelligence to write some of this stuff. It took me around half an hour just to read 7 pages, but it got much easier as I went along. Here's an excerpt from the book, stating the "strong good suffix rule":
Suppose for a given alignment of P and T, a substring t of T matches a suffix of P, but a mismatch occurs at the next comparison to the left. Then find, if it exists, the right-most copy t' of t in P such that t' is not a suffix of P and the character to the left of t' in P differs from the character to the left of t in P. Shift P to the right so that substring t' in P is below substring t in T. If t' does not exist then shift the left end of P past the left end of t in T by the least amount so that a prefix of the shifted pattern matches a suffix of t in T. If no such shift is possible, then shift P by n places to the right. If an occurrence of P is found, then shift P by the least amount so that a proper prefix of the shifted P matches a suffix of the occurrence of P in T. If no such shift is possible, then shift P by n places, that is, shift P past t in T.
I enjoyed it thoroughly, but it took a long time. And besides, the time didn't matter because today was supposed to be a relaxing day.

While doing several loads of laundry, I did some other reading--much less intense reading--and just sat back. I also figured out a way to work from home instead of the lab at school so I got some work done there too. It's nice to have everything available and in the comfort of my own apartment. It's probably just as distracting in the lab as it is working from home. I also watched a movie that I had downloaded. It was �����V�g ("Fallen Angels"). It's quite amazing to see just how much Hong Kong has changed in the last 10 years. The movie was released in 1995, yet it felt so much older. Hong Kong looked so grimy and obsolete. I suppose that was intended, though, to match the style of the movie. I still haven't figured out what the movie is about yet, but it was interesting to watch. It seemed kind of scatterbrained as there wasn't any central plot... a very odd movie indeed. Among its cast: a person who became a mute when he was five because he ate an expired can of pineapple, 2 crazed women in love with different men, and 2 assassins who are partners (at least I think). But then again, it didn't matter, because I just wanted to sit back and do nothing. Besides, it was nice to hear Cantonese again. (It also had a very cool soundtrack.)

But what's in store for the evening? I have not a clue. I might go skating, or head off to the gym to do something active. Or maybe I'll just go out for a walk or something. In any case, it's just been such a satisfying day. I wish every day could be like this: a little bit of this, a little bit of that. Life is so much more fun when there's no pressure.

No comments: