mar3 - Illinois Institute of Technology Department of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Illinois Institute of Technology Department of Computer Science Lecture 11: March 3, 2008 CS 330 Discrete Structures Spring Semester, 2008 1 Probabilistically Balanced Lexicographical Trees We can see computer application of Conditional Probability in probabilistically balanced lexicographical trees. A lexicographical tree is a data structure that embodies the idea of binary search. When you do a binary search, depending on the relative value of your current position and the value you are looking for, will descend either left or right. A lexicographical tree does the same: x Smaller items before Larger items after This rule is then applied recursively to each and every node in the tree. To search through the tree, when you visit a node you compare what you are looking for with the value store in the node. If your value is less, examine the left child, otherwise examine the right child. The maximum number of nodes examined will be the height of the tree. What we want is a tree that has a low height as opposed to a tree with a big height: root root
Background image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

mar3 - Illinois Institute of Technology Department of...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online