lec28 - Binary Tries (continued) split(k). Similar to split...

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

View Full Document Right Arrow Icon
Binary Tries (continued) split(k) . Similar to split algorithm for unbalanced binary search trees. Construct S and B on way down the trie. Follow with a backward cleanup pass over the constructed S and B .
Background image of page 1

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

View Full DocumentRight Arrow Icon
Forward Pass Suppose you are at node x , which is at level j of the input trie. a x b If bit j of k is 1 , move to root of b and add a to level j of S and to level j of B .
Background image of page 2
Forward Pass If bit j of k is 0 , move to root of a and add and b to level j of B to level j of S . a x b
Background image of page 3

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

View Full DocumentRight Arrow Icon
Forward Pass Example b a c d e f g S = null B = null k = g.key = 101011
Background image of page 4
Forward Pass Example b c d e f g a S B k = g.key = 101011
Background image of page 5

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

View Full DocumentRight Arrow Icon
Forward Pass Example c d e f g B b a S k = g.key = 101011
Background image of page 6
Forward Pass Example d e f g a S c b B k = g.key = 101011
Background image of page 7

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

View Full DocumentRight Arrow Icon
Forward Pass Example c a S d b B e f g k = g.key = 101011
Background image of page 8
Forward Pass Example f g c a S e d b B k = g.key = 101011
Background image of page 9

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

View Full DocumentRight Arrow Icon
k = g.key = 101011 Forward Pass Example d b B e c a S f
Background image of page 10
Retrace path from current nodes in S and B toward roots of respective tries. Eliminate branch nodes that are roots of
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2010 for the course COT 5536 taught by Professor Sartajsahani during the Spring '10 term at University of Florida.

Page1 / 36

lec28 - Binary Tries (continued) split(k). Similar to split...

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

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