compilerbitch: That's me, that is! (Default)
compilerbitch ([personal profile] compilerbitch) wrote2006-11-21 04:15 pm

Burrows-Wheeler transforms

I think that the BWT (Burrows-Wheeler transform), and particularly its inverse, are one of the coolest things I've ever seen. It's easy enough to see how someone could have thought of the forward transform, but the reverse transform is one of the most counter-intuitive ideas I've ever seen.

Go take a look: http://en.wikipedia.org/wiki/Burrows-Wheeler_transform

(As a sad aside, I was in the CL on the day that David Wheeler died -- I regret never having got to know him. I'm told by an old friend (ex-PhD student) of his that we'd have got on) 



Edit: The original paper is here, but is much less readable than the Wikipedia article.

[identity profile] naranek.livejournal.com 2006-11-21 04:23 pm (UTC)(link)
Aha - thanks for that! That's quite the clearest explanation of the inverse transform I've seen :-).

[identity profile] caramel-betty.livejournal.com 2006-11-21 05:25 pm (UTC)(link)
I learned from http://www.cl.cam.ac.uk/Teaching/2003/DSAlgs/dsa.pdf - pages 64 to 68. Page 65 is the decompression - tag all the characters, so you know what's what, sort them so that you get them in order but use the tagged order to sort out ties, using end of file as the earliest character. Then start with the . (end of file) in the sorted version. Write that down. Find out what's in the same place as the . in the unsorted version. Write that character down. Find it in the sorted version, and find out what's in the same place in the unsorted version. Write that down. Repeat until done (when you find the . in the unsorted version). Tada. You've just re-ordered the file. Backwards.

It's somehow sad that Wikipedia articles can be more comprehensible than lecture notes.

[identity profile] borusa.livejournal.com 2006-11-21 05:13 pm (UTC)(link)
Eee! That's fun! *works it out with a pen and paper* And very clever!

[identity profile] the-local-echo.livejournal.com 2006-11-21 05:29 pm (UTC)(link)
He was a nice guy.

[identity profile] shevek.livejournal.com 2006-11-21 07:04 pm (UTC)(link)
I remember this! It is incredibly cool.