de dictionariis dynamicis pauco spatio utentibus
play

De Dictionariis Dynamicis Pauco Spatio Utentibus ( lat. On Dynamic - PowerPoint PPT Presentation

De Dictionariis Dynamicis Pauco Spatio Utentibus ( lat. On Dynamic Dictionaries Using Little Space) Erik D. Demaine 1 Friedhelm Meyer auf der Heide 2 Rasmus Pagh 3 cu 1 Mihai P atras 1 MIT 2 University of Paderborn 3 IT University of


  1. De Dictionariis Dynamicis Pauco Spatio Utentibus ( lat. On Dynamic Dictionaries Using Little Space) Erik D. Demaine 1 Friedhelm Meyer auf der Heide 2 Rasmus Pagh 3 ¸cu 1 Mihai Pˇ atras 1 MIT 2 University of Paderborn 3 IT University of Copenhagen LATIN, March 2006 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  2. Dictionaries Maintain S ⊂ [ u ] , | S | ≤ n under: INSERT ( x ) : S ← S ∪ { x } DELETE ( x ) : S ← S \ { x } MEMBER ( x ) : is x ∈ S ? OPUS CLASSICUM : [FKS’82] query: O ( 1 ) worst-case − → update: O ( 1 ) expected w.h.p. [DMadH’90] O ( n lg u space: O ( n lg u ) bits − → n ) bits [RR’03] We achieve both, through new techniques. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  3. Dictionaries Maintain S ⊂ [ u ] , | S | ≤ n under: INSERT ( x ) : S ← S ∪ { x } DELETE ( x ) : S ← S \ { x } MEMBER ( x ) : is x ∈ S ? OPUS CLASSICUM : [FKS’82] query: O ( 1 ) worst-case − → update: O ( 1 ) expected w.h.p. [DMadH’90] O ( n lg u space: O ( n lg u ) bits − → n ) bits [RR’03] We achieve both, through new techniques. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  4. Dictionaries Maintain S ⊂ [ u ] , | S | ≤ n under: INSERT ( x ) : S ← S ∪ { x } DELETE ( x ) : S ← S \ { x } MEMBER ( x ) : is x ∈ S ? OPUS CLASSICUM : [FKS’82] query: O ( 1 ) worst-case − → update: O ( 1 ) expected w.h.p. [DMadH’90] O ( n lg u space: O ( n lg u ) bits − → n ) bits [RR’03] We achieve both, through new techniques. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  5. Dictionaries Maintain S ⊂ [ u ] , | S | ≤ n under: INSERT ( x ) : S ← S ∪ { x } DELETE ( x ) : S ← S \ { x } MEMBER ( x ) : is x ∈ S ? OPUS CLASSICUM : [FKS’82] query: O ( 1 ) worst-case − → update: O ( 1 ) expected w.h.p. [DMadH’90] O ( n lg u space: O ( n lg u ) bits − → n ) bits [RR’03] We achieve both, through new techniques. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  6. Dictionaries Maintain S ⊂ [ u ] , | S | ≤ n under: INSERT ( x ) : S ← S ∪ { x } DELETE ( x ) : S ← S \ { x } MEMBER ( x ) : is x ∈ S ? OPUS CLASSICUM : [FKS’82] query: O ( 1 ) worst-case − → update: O ( 1 ) expected w.h.p. [DMadH’90] O ( n lg u space: O ( n lg u ) bits − → n ) bits [RR’03] We achieve both, through new techniques. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  7. Dictionaries Maintain S ⊂ [ u ] , | S | ≤ n under: INSERT ( x ) : S ← S ∪ { x } DELETE ( x ) : S ← S \ { x } MEMBER ( x ) : is x ∈ S ? OPUS CLASSICUM : [FKS’82] query: O ( 1 ) worst-case − → update: O ( 1 ) expected w.h.p. [DMadH’90] O ( n lg u space: O ( n lg u ) bits − → n ) bits [RR’03] We achieve both, through new techniques. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  8. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables permute universe randomly: π 1 distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  9. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables permute universe randomly: π 1 distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  10. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables x ∈ [ u ] permute universe randomly: π 1 π distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 hi lo · · · · · · · · · Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  11. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables x ∈ [ u ] permute universe randomly: π 1 π distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 hi lo · · · · · · · · · Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  12. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables x ∈ [ u ] permute universe randomly: π 1 π distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 hi lo · · · · · · · · · Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  13. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables x ∈ [ u ] permute universe randomly: π 1 π distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 hi lo · · · · · · · · · Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  14. Basic Idea How to get w.h.p. from expected bounds? independence Idea: √ n independent tables x ∈ [ u ] permute universe randomly: π 1 π distribute elements by hi ( π ( x )) 2 store lo ( π ( x )) in hash table 3 hi lo · · · · · · · · · Permutation needed! To be information-efficient, need to store just lo ( π ( x )) . Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  15. Highly Independent Permutations? We need k -independent permutations. Wait in line. . . Idea: construct permutations with good k th moment bounds. Tools: Siegel’s highly independent hash functions 1 many tricks for reusing randomness 2 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  16. Highly Independent Permutations? We need k -independent permutations. Wait in line. . . Idea: construct permutations with good k th moment bounds. Tools: Siegel’s highly independent hash functions 1 many tricks for reusing randomness 2 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  17. Highly Independent Permutations? We need k -independent permutations. Wait in line. . . Idea: construct permutations with good k th moment bounds. Tools: Siegel’s highly independent hash functions 1 many tricks for reusing randomness 2 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  18. Highly Independent Permutations? We need k -independent permutations. Wait in line. . . Idea: construct permutations with good k th moment bounds. Tools: Siegel’s highly independent hash functions 1 many tricks for reusing randomness 2 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  19. The Dictionary Structure break universe into n / lg n segments 1 minidictionary in each segment with capacity 2 lg n 2 fall back to high performance dictionary: 3 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  20. The Dictionary Structure break universe into n / lg n segments 1 minidictionary in each segment with capacity 2 lg n 2 fall back to high performance dictionary: 3 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  21. The Dictionary Structure break universe into n / lg n segments 1 minidictionary in each segment with capacity 2 lg n 2 fall back to high performance dictionary: 3 Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  22. The Dictionary Structure break universe into n / lg n segments 1 minidictionary in each segment with capacity 2 lg n 2 fall back to high performance dictionary: 3 elements overflowing capacity of minidictionary elements for which the minidictionary failed Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  23. The Dictionary Structure break universe into n / lg n segments 1 minidictionary in each segment with capacity 2 lg n 2 fall back to high performance dictionary: 3 exp. O ( 1 ) bad elements from each segment ⇒ O ( n / lg n ) total w.h.p. Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  24. Life is tough Minidictionary stores O ( lg n ) elements in arbitrary order ⇒ Ω( lg lg n ) bits per element! For small universes, need to do something crazy. . . � O ( lg lg n ) levels of filters all packed in a word! on disjoint segments of the universe Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

  25. Dictionary? What dictionary? What is the query? membership: is x ∈ S ? � u = Ω( n lg u � requires ≥ lg n ) bits n retrieval: return data ( x ) if x ∈ S very useful without membership (trust me) 1 membership lower bound does not apply! 2 optimal space Θ( n lg lg u n ) [sublinear!] perf hashing: return unique, immutable ID for any x ∈ S roughly same as retrieval Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

Recommend


More recommend