Cell Probe Complexity - An Invitation

54
1 Cell Probe Complexity - An Invitation Peter Bro Miltersen University of Aarhus

description

Cell Probe Complexity - An Invitation. Peter Bro Miltersen University of Aarhus. The “Were-you-last?” Game. m players wait in separate cubicles. One by one, they are taken to a game room . - PowerPoint PPT Presentation

Transcript of Cell Probe Complexity - An Invitation

Page 1: Cell Probe Complexity  -  An Invitation

1

Cell Probe Complexity - An Invitation

Peter Bro Miltersen

University of Aarhus

Page 2: Cell Probe Complexity  -  An Invitation

2

The “Were-you-last?” Game

• m players wait in separate cubicles.• One by one, they are taken to a game room.• When a player leaves the game room, he is asked if he

was the last of the m players to go there and must answer correctly.

Page 3: Cell Probe Complexity  -  An Invitation

3

Inside the Game Room

0 1 2

3 4

6 810

9

11

Page 4: Cell Probe Complexity  -  An Invitation

4

Inside the Game Room, II

• The player can open at most t boxes

• He can put a pebble in an empty box or remove the pebble from a full box

• He must close a box before opening the next one

Page 5: Cell Probe Complexity  -  An Invitation

5

Winning the Game

• The players win if all players answer correctly.

• How small can t be as a function of m to ensure that the players have a winning strategy?

Page 6: Cell Probe Complexity  -  An Invitation

6

A Counter

• The players make boxes 0,1,..,t-1 represent the number of players having already been in the room

• The counter can be incremented and read opening at most t boxes

131101

:log mt

Page 7: Cell Probe Complexity  -  An Invitation

7

Can we do much better?

Page 8: Cell Probe Complexity  -  An Invitation

8

YES! t = 5 log log m.

Page 9: Cell Probe Complexity  -  An Invitation

9

Alternative Counter I

111011100000

)2,5,3,1,1 ;5,1(

Type offirst block

Numberof blocks

Size of each block

Page 10: Cell Probe Complexity  -  An Invitation

10

Alternative Counter, II

• Each entry in (1,5; 1,1,3,5,2) can be specified using ≈ log log m bits.

• The Counter can be incremented touching only 4 entries ≈ 4 log log m bits.

Page 11: Cell Probe Complexity  -  An Invitation

11

Problem: How can a player tell if the value m has been reached?

Page 12: Cell Probe Complexity  -  An Invitation

12

Alternative Counter, III

• Test for 0: The vector should start (0,1; …).

• Start the counter at m – Each player decrements the counter.

Page 13: Cell Probe Complexity  -  An Invitation

13

Problem: The players can’t make the counter startat m – initially, all boxes must be empty!

Page 14: Cell Probe Complexity  -  An Invitation

14

Alternative Counter, IV

• The players would have liked boxes to contain pebbles initially.

• Patch: They follow their protocol, but maintain that boxes are in the opposite state of what they are supposed to.

Thus, the players win!

kiii ,..,, 21

kiii ,..,, 21

Page 15: Cell Probe Complexity  -  An Invitation

15

Can we do much better?

Page 16: Cell Probe Complexity  -  An Invitation

16

NO! If t = 0.4 log log m, the players lose.

Page 17: Cell Probe Complexity  -  An Invitation

17

Decision Assignment Tree

7

5

Open box 7 If it contains a pebble,Remove it, and go here1/00/1

0/0

Strategy for a player:

yes yesno no

1/0

Page 18: Cell Probe Complexity  -  An Invitation

18

Sunflower

1S

4S

2S

3S

ji SS is the same for all i,j

Sunflowercenter

Page 19: Cell Probe Complexity  -  An Invitation

19

Erdös-Rado Sunflower Lemma

Every large set system contains a large sunflower.

Page 20: Cell Probe Complexity  -  An Invitation

20

Why the players lose:

: The boxes appearing in the decision assignment tree of each player

: A big sunflower.

: The other sets

mSSS ,..,, 21

pmjjj SSS

,..,,21

piii SSS ,..,,21

Page 21: Cell Probe Complexity  -  An Invitation

21

Why the players lose, II

plkpm iiiijjj SSSSSSS ,..,,,..,,,..,,1121

piii SSS ,..,,21

Sequence:

Center states: 0C 1C 2C 1pC

Pigeon hole principle: for some k, l, .lk CC

pmjjj SSS

,..,,21

New sequence:

Page 22: Cell Probe Complexity  -  An Invitation

22

The Game = A Dynamic Problem

Maintain a subset S of {1,..,m} under

Insert(x): Insert x into S .

Full(): Is S={1,..,m}?

Page 23: Cell Probe Complexity  -  An Invitation

23

The Room = Cell Probe Model

• Boxes = memory cells.

• Pebble or no pebble = 0 or 1 (word size w=1)

• Opening a box = accessing a memory cell.

• Decision assignment tree for a player = implementation of an operation.

Page 24: Cell Probe Complexity  -  An Invitation

24

The Cell Probe Model

• An information theoretic model for solutions to dynamic data structure problems

• Only memory accesses are counted

• Each operation in the solution is assigned a decision assignment tree – the worst case complexity is the depth of the tree.

Page 25: Cell Probe Complexity  -  An Invitation

25

Why study cell probe complexity?

• Lower bounds in the cell probe model are valid for a unit cost random access machine with the same word size, independent of the instruction set.

• Fundamental combinatorial complexity measure.

Page 26: Cell Probe Complexity  -  An Invitation

26

This invitation to cell probe complexity

• Focuses on worst case time per operation (rather than amortized, and/or tradeoffs)

• Focuses on dynamic problems (rather than static ones)

• Focuses first on w = 1, i.e., on bit probe complexity

Page 27: Cell Probe Complexity  -  An Invitation

27

Why Study Bit Probe Complexity?

• Log cost RAM.

• Large lower bounds would be still be large if divided by w.

• Coding theoretic interpretation: Locally decodable source codes.

• All known results have easy proofs.

Page 28: Cell Probe Complexity  -  An Invitation

28

Dynamic Graph Problems

Dynamic Graph Connectivity:

Maintain G =({1,..,n},E) under

Insert(e): Insert e into E.

Delete(e): Delete e from E.

Connected(u,v): Are u and v connected?

Page 29: Cell Probe Complexity  -  An Invitation

29

DGC, best known boundsUpper bounds:• Worst case time bit

probes per operation [Henzinger and King]• Amortized time bit probes per

operation [Holm, de Lichtenberg, Thorup]Lower bound:• Ω(log n/log log n) bit probes per operation

[Fredman]

) (log 32 nnO

)(log3 nO

Page 30: Cell Probe Complexity  -  An Invitation

30

A lower bound for dynamic connectivity

State 0=(0,0,0,…,0)

State 1 State 2 State 3 State 4

Page 31: Cell Probe Complexity  -  An Invitation

31

Lower Bound For DGC, II

• State 1,2,..,n all have Hamming weight at most t.

• We can distinguish between the states using a decision tree of depth d=O(t log n).

Page 32: Cell Probe Complexity  -  An Invitation

32

Lower Bound For DGC, III

7

5

10

0

State 3

1

10

The sequence 001 is uniquefor State 3 and contains at most t zeros

Page 33: Cell Probe Complexity  -  An Invitation

33

Lower bound for DGC, IV

n ≤ # ways to arrange at most t ones in a sequence of length at most d

t = Ω(log n/log log n)

Page 34: Cell Probe Complexity  -  An Invitation

34

Dynamic Circuit Value

Maintain Boolean Circuit C under

Insert(g,h): Insert wire from output of gate g to input of gate h

Switch(g): Switch gate g between AND,OR

Evaluate(): Return value of circuit

Page 35: Cell Probe Complexity  -  An Invitation

35

Dynamic Circuit Value

Best known algorithm for DCV: Reevaluate from scratch.

Best known lower bound in bit probe model:

Ω(log n) bits must be touched in some operation.

Page 36: Cell Probe Complexity  -  An Invitation

36

Dynamic Language Membership Problems

Given Boolean language L. Maintain Boolean string x of length n under

Change(i,a): Set ith bit of x to a.

Member(): Is x a member of L?

Dynamic graph connectivity

Dynamic UGAP

Page 37: Cell Probe Complexity  -  An Invitation

37

Completeness of DCV

Dynamic circuit value needs Ω(log n) bit probes per operation

The dynamic language membership problem for some language in P needs Ω(log n) bit probes per operation.

Page 38: Cell Probe Complexity  -  An Invitation

38

Element distinctness

Element distinctness language: ED = binary strings x consisting of n blocks, each of length 2 log n, all different.

Dynamic ED needs Ω(log n) bit probes per operation.

Page 39: Cell Probe Complexity  -  An Invitation

39

Lower bound for dynamic ED

By fixing all blocks, except the first, we create a solution to a subproblem.

#decision assignment tree systems of depth t ≥

#subproblems

Dynamic ED needs Ω(log n) bit probes per operation.

Page 40: Cell Probe Complexity  -  An Invitation

40

A sad situation

• We don’t know any lower bounds for DCV better than Ω(log n) bit probes.

• Thus we don’t know any lower bound for any dynamic language membership problem in P better than Ω(log n) bit probes.

• We suspect many problems in P needs Ω(n) bit probes.

Page 41: Cell Probe Complexity  -  An Invitation

41

The transdichotomous model

Problem:• Problem over universe of size m.• Problem instance of size (i.e., #elements of

universe) n.

Cell probe solution:• Word size w = log m. • Time bound should be a function of n only.

Page 42: Cell Probe Complexity  -  An Invitation

42

Dynamic Search Problems

Maintain subset S of {1,..,m} under

Insert(x): Insert x into S.

Delete(x): Delete x from S.

and queries like

Member(x): Is x in S ?

Predecessor(x): What is max{y| y≤x, y in S} ?

HammingNeighbor(x): Return Hamming neighbor of x in S.

Page 43: Cell Probe Complexity  -  An Invitation

43

Transdichotomous upper bounds

Dynamic member and predecessor :• AVL trees: O(log n) cell probes per

operation.• Andersson/Thorup’99:

cell probes per operation.Dynamic Hamming neighbor:• Trivial bound: O(n) cell probes per

operation.

)loglog/log( nnO

Page 44: Cell Probe Complexity  -  An Invitation

44

Dynamic algebraic problems

Dynamic polynomial multiplication:

Maintain two polynomials f,g of degree at most n over GF(m) under

Change-f(i,a): Let ith coefficient of f be a.

Change-g(i,a): Let ith coefficient of g be a.

Query(j): What is the jth coefficient of fg?

Page 45: Cell Probe Complexity  -  An Invitation

45

Transdichotomous upper bound

Dynamic polynomial multiplication:

• cell probes per operation [Reif and Tate]

)(log nnO

Page 46: Cell Probe Complexity  -  An Invitation

46

Transdichotomous lower bounds

Lower bound of Ω(f(n))

No transdichotomous upper bound of o(f(n)).

There are c, , so that any solution with parameters uses at least cell probes.

),...,(),,(),,( 332211 mnmnmn),( ii mn

)( incf

Page 47: Cell Probe Complexity  -  An Invitation

47

Transdichotomous lower bounds, II

• We are free to choose the size of the universe as large as we want.

• This makes large lower bounds possible using current techniques.

• It also makes the lower bounds somewhat less interesting.

Page 48: Cell Probe Complexity  -  An Invitation

48

Transdichotomous lower bounds, III

• Dynamic predecessor: cell probes per operation is necessary [Beame and Fich]

• Dynamic Hamming neighbor: cell probes per operation is necessary [Barkol and Rabani]

• Dynamic polynomial multiplication: cell probes per operation is necessary [Frandsen,Hansen,Miltersen]

• Dynamic graph connectivity: cell probes per operation is necessary [Fredman and Saks]

)loglog/log( nn

)1(n

)( n

)loglog/(log nn

Page 49: Cell Probe Complexity  -  An Invitation

49

Two main techniques

• Communication complexity method [Ajtai]

• Time stamp method [Fredman and Saks]

Page 50: Cell Probe Complexity  -  An Invitation

50

Communication Complexity Technique

Given dynamic problem, construct two-party communication problem:

Alice gets state reachable within d operations from the initial state.

Bob gets a query operation.Upper bound for dynamic problem implies upper

bound for communication problemHence, lower bound for communication problem

implies lower bound for dynamic problem.

Page 51: Cell Probe Complexity  -  An Invitation

51

Transferring Upper Bounds

• Alice constructs data structure corresponding to her state.

• Alice sends Bob a perfect hash function of the memory cells that have changed since initial state.

• Bob simulates the query operation by asking Alice for values of memory cells: He sends her a hashed address, Alice sends back an address with this hash value that were changed and a new value.

Page 52: Cell Probe Complexity  -  An Invitation

52

Challenges for cell probe complexity, I

Show a lower bound for a dynamic language membership problem of the form

)(log nt

)loglog/(log nnt

(w = 1)

(w = log n)

Page 53: Cell Probe Complexity  -  An Invitation

53

Static problem

}1,0{: QDf

Set of possibledata

Set of questionsto data

Answers to questions

Page 54: Cell Probe Complexity  -  An Invitation

54

Challenges for cell probe complexity, II

}1,0{}1,0{}1,0{: nmf

probesbit )( Time bits )( Space ntmOs

Show a lower bound for a static problem

of the form :