Lecture 20: 03/02/2012

I believe that wraps up the main lemma of Splay trees.

We went through the three cases and showed that 3(Mu(S)-M(x))+1 credits were enough to pay for the splay operation and maintain the credit invariant of the tree.

As we saw, the 1 is just for the case where there’s one last zig rotation.

At the end, we discussed a bit about why you do a zig-zig instead of a normal rotation and as we saw before, normal rotations don’t end up balancing the tree how we want.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s