Wednesday, February 04, 2004

Hey... So, upon recommendation of my politically minded roommate, I have taken the "who fits [inside] you best" presidential candidate survey. The results were quite surprising. Apparently each candidate only thinks people need to take responsibility for their actions part of the time. Since I think it's important for people to be responsible all of the time, I got very high ratings with each of the candidates. Here are the specific results:
* Kucinich - 100%
* Kerry - 100%
* Edwards - 99%
* Dean - 95%
* Clark - 89%
* Sharpton - 89%
* Lieberman - 87%
* Bush - 81%
I have to admit, I am quite disturbed. I thought Clark was most awesome. He was an Army Ranger and a General! (And he ain't too shabby lookin' either ) But no.... he has to have not-as good ideas. And to think - the man with the worst smile in the world, damn dean. And then there is Kerry. He could be the next Leno. He's so damn ugly though. Oh well. He did get three purple hearts during his military career. I really wish I could be as irresponsible as normal people and vote for the pretty people. But hey, we can't have Al be our first black president. Oh well, Edwards is pretty attractive, thinks quite a bit like I do, and he announced his candidacy on The Daily Show. How awesome is that?

"But while it was their opportunities that made these men fortunate, it was their own merit that enabled them to recognize these opportunities and turn them to account, to the glory and prosperity of their country." - Machiavelli, The Prince

Tuesday, February 03, 2004

Warning: the average reader will not enjoy this post. It's quite geeky and may be mildly disturbing to all who find school un-orgasmic. (And maybe even those who do.)

I just thought I needed to tell you all about the orgas-tastic (what? It's a city in West Virginia) data structure we covered today. It's called a binomial queue. It counts in binary. Yay. Insert, FindMin, DeleteMin, and Merge are all in Theta(log N) time. The structure is not just one tree (ordered as a heap, ie each node has only smaller nodes below it), but many, making it called a forest. Hehe. Each tree, or block, is a multi-way tree, meaning it can have an unspecified number of nodes. B0 has 20=1 nodes in it. B1 has 21=2 nodes in it. Each Bi consists of two blocks of Bi-1. To maintain the heap structure, the block with the smaller root has its root become parent of the other block. Each Bi is a composition of Bi-1s. The number of nodes is represented as a binary number in where Bi is the ith digit. To merge another binomial queue, one simply adds the Bis together, as one would a binary number, making sure to carry when appropriate. So DeleteMin simply finds the smallest by checking each root, deletes it, and then merges the remainder of its block as a new queue into the remaining structure.
I think this is my favorite basic data type ever. Um.... binary....
For the extra-studious of you, you can look at my teacher's slides here.

"There are 10 types of people in this world: those who understand binary, and those who don't."

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]