ps5 - Introduction to Algorithms Massachusetts Institute of...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Handout 16: Problem Set 5 Problem 5-1. Skip Lists and B-trees Intuitively, it is easier to ﬁnd an element that is nearby an element you’ve already seen. In a dynamic-set data structure, a ﬁnger search from x to y is the following query: given the node in the data structure that stores the element x , and given another element y , ﬁnd the node in the data structure that stores y . Skip lists support fast ﬁnger searches in the following sense. (a) Give an algorithm for ﬁnger searching from x to y in a skip list. Your algorithm should run in O (lg(2+ | rank ( x ) rank ( y ) | )) time with high probability, where rank ( x ) denotes the current rank of element x in the sorted order of the dynamic set. When
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 6

ps5 - Introduction to Algorithms Massachusetts Institute of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online