Engineering%20a%20Sorted%20List%20Data%20Structure%20for%2032%20Bit%20Keys - PowerPoint PPT Presentation

About This Presentation
Title:

Engineering%20a%20Sorted%20List%20Data%20Structure%20for%2032%20Bit%20Keys

Description:

Engineering a Sorted List Data Structure for 32 Bit Keys. Roman ... The power of integer keys helps in. Sorting (radix MSB,LSB) Priority queues (radix heaps) ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 15
Provided by: romande
Learn more at: http://algo2.iti.kit.edu
Category:

less

Transcript and Presenter's Notes

Title: Engineering%20a%20Sorted%20List%20Data%20Structure%20for%2032%20Bit%20Keys


1
Engineering a Sorted List Data Structure for 32
Bit Keys
  • Roman Dementiev
  • Lutz Kettner
  • Jens Mehnert
  • Peter Sanders
  • MPI für Informatik,
  • Saarbrücken

2
Introduction
  • The power of integer keys helps in
  • Sorting (radix MSB,LSB)
  • Priority queues (radix heaps)
  • Static search trees
  • Dictionaries (hash tables)
  • Faster both in theory and practice
  • What about dynamic search data structures?

3
Motivation
  • van Emde Boas (vEB) search trees van Emde
    Boas77,MehlhornNaeher90
  • Small K, large n ? vEB are faster ?
  • NO, their direct implementations are 2-8 times
    slower than comp. based trees Wenzel92,here
  • Here a tuned vEB data structure that outperforms
    comp. based implementations

operation comparison based van Emde Boas
insert, delete, search O(log n) O(log K)
range query O(c log n) O(c log K)
n number of elements K bit width of keys c
size of the output
4
Direct vEB Implementation
  • vEB tree maintains set
  • Recursive definition
  • M1 or K1 store directly,
  • otherwise let K K/2 store minM,maxM,
  • top store (top
    recursion)
  • boti store
  • (bottom recursion) use hash table

K bit vEB top
hash table
K bit vEB boti
5
Improvement 1
  • Replace top data structure with a bit pattern
    hierarchy

K bit vEB top
hash table
K bit vEB boti
6
Improvement 2
  • Break recursion
  • when K8
  • 3 levels max.

hash table
7
Improvement 3
63
0
  • Replace root hash table
  • with an array

31
32
63
0
4095




31
32
0
63
65535




8
Range Query Support
63
0
  • Link elements

31
32
63
0
4095




31
32
0
63
65535




Level 1 root Bits 31-16
Level 2 Bits 15-8
Level 2 Bits 15-8
Level 3 Bits 7-0
9
Example Locate Operation
  • return handle of
  • Function locate(yN)ElementHandle
  • if y gt maxM then return ? // no larger element
  • i y16..31 // index into root table top
  • if topinull or ygtmaxMi then return
    minMtop.locate(i) // look in the next L2 table
  • if Mix then return x // single element case
  • j y8..15 // key for L2 table at Mi
  • if rijnull or y gt maxMij then return
    minMi,top(i).locate(j) // look in the next L3
    table
  • if Mijx then return x // single element
    case
  • return rijtopij.locate(y0..7) // L3 table
    access
  • At most 9 comparisons for any input sizes

10
Locate Performance
11
Construction
12
Deletion
13
Hard Inputs
14
Conclusions and Future Work
  • Integer search trees can outperform comp. based
    search data struct.
  • Future work
  • Support multi-set functionality
  • Other key lengths (up to 38 bits)
  • Reduce space consumption
  • Find real inputs
  • Port it to the LEDA library
Write a Comment
User Comments (0)
About PowerShow.com