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

de dictionariis dynamicis pauco spatio utentibus
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

De Dictionariis Dynamicis Pauco Spatio Utentibus

(lat. On Dynamic Dictionaries Using Little Space)

Erik D. Demaine1 Friedhelm Meyer auf der Heide2 Rasmus Pagh3 Mihai Pˇ atras ¸cu1

1MIT 2University of Paderborn 3IT University of Copenhagen

LATIN, March 2006

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-2
SLIDE 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] space: O(n lg u) bits − → O(n lg u

n) bits

[RR’03] We achieve both, through new techniques.

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-3
SLIDE 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] space: O(n lg u) bits − → O(n lg u

n) bits

[RR’03] We achieve both, through new techniques.

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-4
SLIDE 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] space: O(n lg u) bits − → O(n lg u

n) bits

[RR’03] We achieve both, through new techniques.

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-5
SLIDE 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] space: O(n lg u) bits − → O(n lg u

n) bits

[RR’03] We achieve both, through new techniques.

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-6
SLIDE 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] space: O(n lg u) bits − → O(n lg u

n) bits

[RR’03] We achieve both, through new techniques.

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-7
SLIDE 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] space: O(n lg u) bits − → O(n lg u

n) bits

[RR’03] We achieve both, through new techniques.

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-8
SLIDE 8

Basic Idea

How to get w.h.p. from expected bounds? independence Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-9
SLIDE 9

Basic Idea

How to get w.h.p. from expected bounds? independence Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-10
SLIDE 10

Basic Idea

How to get w.h.p. from expected bounds? independence

x ∈ [u] π lo · · · · · · hi · · ·

Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-11
SLIDE 11

Basic Idea

How to get w.h.p. from expected bounds? independence

x ∈ [u] π lo · · · · · · hi · · ·

Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-12
SLIDE 12

Basic Idea

How to get w.h.p. from expected bounds? independence

x ∈ [u] π lo · · · · · · hi · · ·

Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-13
SLIDE 13

Basic Idea

How to get w.h.p. from expected bounds? independence

x ∈ [u] π lo · · · · · · hi · · ·

Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-14
SLIDE 14

Basic Idea

How to get w.h.p. from expected bounds? independence

x ∈ [u] π lo · · · · · · hi · · ·

Idea: √n independent tables

1

permute universe randomly: π

2

distribute elements by hi(π(x))

3

store lo(π(x)) in hash table Permutation needed! To be information-efficient, need to store just lo(π(x)).

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-15
SLIDE 15

Highly Independent Permutations?

We need k-independent permutations. Wait in line. . . Idea: construct permutations with good kth moment bounds. Tools:

1

Siegel’s highly independent hash functions

2

many tricks for reusing randomness

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-16
SLIDE 16

Highly Independent Permutations?

We need k-independent permutations. Wait in line. . . Idea: construct permutations with good kth moment bounds. Tools:

1

Siegel’s highly independent hash functions

2

many tricks for reusing randomness

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-17
SLIDE 17

Highly Independent Permutations?

We need k-independent permutations. Wait in line. . . Idea: construct permutations with good kth moment bounds. Tools:

1

Siegel’s highly independent hash functions

2

many tricks for reusing randomness

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-18
SLIDE 18

Highly Independent Permutations?

We need k-independent permutations. Wait in line. . . Idea: construct permutations with good kth moment bounds. Tools:

1

Siegel’s highly independent hash functions

2

many tricks for reusing randomness

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-19
SLIDE 19

The Dictionary Structure

1

break universe into n/ lg n segments

2

minidictionary in each segment with capacity 2 lg n

3

fall back to high performance dictionary:

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-20
SLIDE 20

The Dictionary Structure

1

break universe into n/ lg n segments

2

minidictionary in each segment with capacity 2 lg n

3

fall back to high performance dictionary:

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-21
SLIDE 21

The Dictionary Structure

1

break universe into n/ lg n segments

2

minidictionary in each segment with capacity 2 lg n

3

fall back to high performance dictionary:

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-22
SLIDE 22

The Dictionary Structure

1

break universe into n/ lg n segments

2

minidictionary in each segment with capacity 2 lg n

3

fall back to high performance dictionary:

elements overflowing capacity of minidictionary elements for which the minidictionary failed

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-23
SLIDE 23

The Dictionary Structure

1

break universe into n/ lg n segments

2

minidictionary in each segment with capacity 2 lg n

3

fall back to high performance dictionary:

  • 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

slide-24
SLIDE 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

  • n disjoint segments of the universe
  • all packed in a word!

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis

slide-25
SLIDE 25

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-26
SLIDE 26

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-27
SLIDE 27

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-28
SLIDE 28

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-29
SLIDE 29

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-30
SLIDE 30

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-31
SLIDE 31

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-32
SLIDE 32

Dictionary? What dictionary?

What is the query? membership: is x ∈ S? requires ≥ lg u

n

  • = Ω(n lg u

n) bits

retrieval: return data(x) if x ∈ S

1

very useful without membership (trust me)

2

membership lower bound does not apply!

  • ptimal 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

slide-33
SLIDE 33

Recapitulare

1

independence through permutation hashing

2

multilevel word-packed dictionaries

3

dictionaries without membership

FINIS

GRAT IAS AGO VOBIS

Demaine, Meyer auf der Heide, Pagh, Pˇ atras ¸cu Dictionariis Dynamicis