R/W Reductions

22
R/W Reductions Eli Gafni UCLA ICDCN06 12/30

description

R/W Reductions. Eli Gafni UCLA ICDCN06 12/30. Outline. Tasks and r/w impossible task: 2 cons 3 cons NP-completeness R/W reduction “Weakest Unsolvable Task” Thesis Reductions Conclusions/Speculations. 2-cons. Two procs P0 P1 P0 alone output 0 P1 alone output 1 - PowerPoint PPT Presentation

Transcript of R/W Reductions

Page 1: R/W Reductions

R/W Reductions

Eli GafniUCLA

ICDCN06 12/30

Page 2: R/W Reductions

Outline

• Tasks and r/w impossible task:– 2 cons– 3 cons

• NP-completeness• R/W reduction• “Weakest Unsolvable Task” Thesis• Reductions• Conclusions/Speculations

Page 3: R/W Reductions

2-cons

• Two procs P0 P1• P0 alone output 0• P1 alone output 1• P1 and P2 both output either 0 or 1

Page 4: R/W Reductions

2-cons impossible in r/w

• The protocol complex is a line

• The output is disconnected

Page 5: R/W Reductions

3-cons (election)

• Procs P0 P1 P2• Pi alone output i• All procs output same i

Page 6: R/W Reductions

3-cons impossible in r/w

• If 3-cons was possible than 2-cons would be possible, contradiction.

• We proved 3-cons impossible by reduction FROM 2-cons

Page 7: R/W Reductions

Analogy with NP-completeness

• In my Algorithm class students just get the fact that SAT is NP-complete.

• Showing that a problem is NP-complete does not require understanding TMs

• Showing a Task is r/w impossible should not require knowing Algebraic Topology!

Page 8: R/W Reductions

The Quest: An Analog of SAT

• In our case it should be the Weakest (W) impossible task

• In some sense topology implies no such Weakest exists (upcoming paper: it does for any class of real interest)

Page 9: R/W Reductions

R/W reducibility Cont’ed

Reducibilty induces a directed graph over tasks

• A strongly connected component are tasks which are r/w equivalent

• Wishful “Weakest-Thesis:”– There exist a task WEAKEST(n):

•WEAKEST(n) is r/w unsolvable.•WEAKEST(n) is reducible to any task which is unsolvable when restricted to participating set of at most n procs.

Page 10: R/W Reductions

R/W reducibility Cont’ed

• If Weakest-Thesis hold then – “all Maurice can do, we can do better.”– Can think Java and not worry about not knowing Basic.

– Can go back to thinking “distributed” rather than “topology.”

• PlausibiltyAll known unsolvable tasks are reducible to SB(n,2n-1) (Symmetry Breaking)

SB(n,2n-1): p0,…,p2n-2

procs output 0 or 1|P|=n not all 0’s and not all 1’s

Page 11: R/W Reductions

Have to talk about Task Implementation

• 4 procs P0 P1 P2 P4 of which I’ll wake at most 2

• If alone can output any 0 or 1• If both same parity, one of them output 0 and the other 1, if different parity, then both output same.

• (Vassos,Lo) Cannot do anything above r/w

Page 12: R/W Reductions

But any implementation will do

• If implementable by r/w then a processor in solo execution is apriori decided whether will output 0 or 1.

• 2 out of the 3 have same solo say 0– If same parity, 0 then win (since the other changes to 1)

– If no same parity, then there is one parity 0 and other parity 1, the one that changes wins

Page 13: R/W Reductions

Instead of Task, any implementation that

solves the Task

• If the task is on n-procs then commit to some r/w protocol for the max size participating set for which is solvable

• For n get the output from the ``oracle.’’

Page 14: R/W Reductions

SB(n,2n-1) equivalent to ``comparison’’

• If SB(n,2n-1) know how to rename n ``comparison’’ into 1 to 2n-1

• If ``comparison’’ then can glue together, I.e. the algorithm for 1,2,3 and 1,2,4 when 1,2 work alone no need to worry whether they are going to work with 3 or 4. Invoke object only in ``middle’’ (show example with SB11)

Page 15: R/W Reductions

A weakest task for 3 procs

Page 16: R/W Reductions

Family of weakest

• No task with 0,1 mapping symmetric on the boundary can be r/w colored to avoid all 0’s or all 1’s

Page 17: R/W Reductions

R/W Reducibility Between Tasks

Task A r/w reducible to B:

A

R/W R/WB

Page 18: R/W Reductions

Reductions:

• (3,2) -tst = always at least one proc outsputs 0, not all output 0.

• Impossible: Will solve SB11– Do IS– At level 3 invoke tst, loser goes down

– If remain at level 3 do 2-IS to get 0 if alone or 1 if see another

Page 19: R/W Reductions

(3,2)-TST=(3,2)-ELECTION

• TST implies election:Register in SMApply to tstIf 0 elect yourselfIf 1, write ``I got 1’’ in SMScan, elect registerd proc who has not announced 1

The proc who wrote ``got 1’’ first will not be chosen

Page 20: R/W Reductions

Lemma: (3,2)-Election = (3,2) Strong

Election• Strong election = if elected by any then you elect yourself

• Election implies strong:– Phase 1: write (i, elected j)

• Scan, if someone elected you elect yourself, if choose else and see someone choose himself choose him

– Phase 2 (separate memory): write(I,elected j)• Scan, if someone elected you elect yourself, if choose else and see someone choose himself choose him

Page 21: R/W Reductions

Tst=Strong Election (cont’)

• Strong election implies TST:– If elect yourself output 0– Else 1

Page 22: R/W Reductions

Conclusions:

• Weakest Thesis has ``experimental’’ support.

• Not true if ``any’’ task is considered

• Find the ``family’’ for which it is the weakest

• Missing; Internal reduction 3 SB implies 4 SB