1 / 9

Skip Lists

Skip Lists. Nov. 2, 2006. Midterm #2. Nov. 9 Thu 7pm. Pseudorandom number generator. Middle-square method (John von Neumann, 1946) Take any number, square it, remove the middle digits of the resulting number as your "random number", then use that number as the seed for the next iteration

Download Presentation

Skip Lists

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Skip Lists Nov. 2, 2006

  2. Midterm #2 • Nov. 9 Thu 7pm

  3. Pseudorandom number generator • Middle-square method (John von Neumann, 1946) • Take any number, square it, remove the middle digits of the resulting number as your "random number", then use that number as the seed for the next iteration • 111101234321 2343 05489649 4896…

  4. Pseudorandom number generator • Mersenne twister (Makoto Matsumoto and Takuji Nishimura, 1997) • Has the colossal period of 219937-1 iterations • Its output is predictable

  5. Pseudorandom number generator • Cryptographically secure pseudorandom number generator • Blum-Blum-Shub • (Lenore Blum, Manuel Blum and Michael Shub, 1986)

  6. Skip Lists • The main advantage of using randomization in data structure and algorithm design is that the structures and functions that result are usually simple and efficient.

  7. Skip Lists • Page 396 Searching  • Page 398 Insertion  • Page 399 Removal 

  8. Skip Lists • We do not actually need to store pointers to items at the levels of the skip list above 0. • We do not actually need the above() method. In fact, we do not need the before() function either.

  9. Maintaining the Top-most Level • Top-level capping • h = max {10, 2 } • h = 3 • Top-level freedom

More Related