lec36 - Priority Search Trees Keys are distinct ordered...

Info icon This preview shows pages 1–4. Sign up to view the full content.

Priority Search Trees Keys are distinct ordered pairs (x i , y i ) . Min tree on y . Search tree (almost) on x . Two varieties. Search tree is a balanced binary search tree such as a red-black tree. Red-black Priority Search Tree (RBPST) Search tree is a radix search tree. Radix Priority Search Tree (RPST)
Image of page 1

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

Radix Priority Search Tree All x values are different, integral, and in the range [0, k – 1] . Each node of the priority search tree has exactly one element. The y value of the element in node w is <= the y value of all elements in the subtree rooted at w ( y values define a min tree). Root interval is [0,k) . Interval for node w is [a,b) . Left child interval is [a, floor((a+b)/2)) . Right child interval is [floor((a+b)/2, b)) .
Image of page 2
Insert Start with empty RPST. k = 16 . Root interval is [0,16) . Insert (5,8) . Insert (6,9) . (5,8) remains in root, because 8 < 9 . (6,9) inserted in left subtree, because 6 is in the left child interval.
Image of page 3

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

Image of page 4
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '10
  • sartajsahani
  • yok yok, ynot OK yok, yok yok yok

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern