Unformatted text preview: fference is that the subtree to move to is determined by a bit in the search key rather than by the result of the comparison of the search key and the key in the current node. Try to build the digital search Try to build the digital search tree A
10000 Digital Search Tree
C R H
M P X Practical
Practical When we dealing with very long keys, the cost of a key comparison is high. We can reduce the number of key comparisons to one by using a related structure called Patricia
We shall develop this structure in three steps. First, we introduce a structure called a binary trie. Then we transform binary tries into compressed binary tries.
Finally, from compressed binary tries we obtain Patricia. Binary Tries
Binary Tries A binary trie is a binary tree that has two kinds of nodes: branch nodes and element
A branch node has the two data members LeftChild and RightChild. It has no data member.
An element node has the single data member data.
Branch nodes are used to build a binary tree search structure similar to that of a digital search tree. This leads to element nodes A sixelement binary trie 1100 0010 0000 0001 1000 1001 Compressed binary trie The binary trie contains branch nodes whose degree is one. By adding another data member, BitNumber , to each branch node, we can eliminate all degreeone branch nodes from the trie. The...
View Full Document
This note was uploaded on 02/07/2014 for the course CSE 100 taught by Professor Staff during the Summer '08 term at UCSD.
- Summer '08
- Data Structures