Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this...

123
Two-Process Systems Companion slides for Distributed Computing Through Combinatorial Topology Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum Distributed Computing through Combinatorial Topology

Transcript of Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this...

Page 1: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Two-Process Systems

Companion slides forDistributed Computing

Through Combinatorial TopologyMaurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum

Distributed Computing through Combinatorial Topology

Page 2: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Two-Process Systems

Two-process systems can be captured by elementary

graph theorygentle introduction to more general structures needed

later for larger systemsDistributed Computing through

Combinatorial Topology2

Page 3: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Road MapElementary Graph Theory

Tasks

Models of Computation

Approximate Agreement

Task Solvability

Distributed Computing through Combinatorial Topology

3

Page 4: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Road MapElementary Graph Theory

Tasks

Models of Computation

Approximate Agreement

Task Solvability

Distributed Computing through Combinatorial Topology

4

Page 5: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A Vertex

Distributed Computing through Combinatorial Topology

5

Page 6: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A VertexCombinatorial: an element of a set.

Distributed Computing through Combinatorial Topology

6

Page 7: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A VertexCombinatorial: an element of a set.

Geometric: a point in Euclidean Space

Distributed Computing through Combinatorial Topology

7

Page 8: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

An Edge

8

Page 9: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

An EdgeCombinatorial: a set of two vertexes.

9

Page 10: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

An EdgeCombinatorial: a set of two vertexes.

Geometric: line segment joining two points

10

Page 11: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A Graph

Distributed Computing through Combinatorial Topology

11

Page 12: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A GraphCombinatorial: a set of sets of vertices.

Distributed Computing through Combinatorial Topology

12

Page 13: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A GraphCombinatorial: a set of sets of vertices.

Geometric: points joined by line segments

Distributed Computing through Combinatorial Topology

13

Page 14: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graphs

finite set V with a collection G of subsets of V,

Distributed Computing through Combinatorial Topology

14

Page 15: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graphs

simplices(singular: simplex)

finite set V with a collection G of subsets of V,

vertices

Distributed Computing through Combinatorial Topology

15

Page 16: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graphs

Distributed Computing through Combinatorial Topology

(1) If X 2 G, then |X| · 2

finite set V with a collection G of subsets of V,

16

Page 17: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graphs

Distributed Computing through Combinatorial Topology

(1) If X 2 G, then |X| · 2

finite set V with a collection G of subsets of V,

vertex: |X| = 1 edge: |X|= 2

17

Page 18: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graphs

(1) If X 2 G, then |X| · 2(2) for all v 2 V, {v} 2 G

finite set V with a collection G of subsets of V,

18

Page 19: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graphs

(1) If X 2 G, then |X| · 2(2) for all v 2 V, {v} 2 G

(3) for all X 2 G, and Y ½ X, Y 2 G

finite set V with a collection G of subsets of V,

19

Page 20: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Dimension

dim(X) = |X|-1.

dimension 0

dimension 1

Distributed Computing through Combinatorial Topology

20

Page 21: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Pure Graphs

pure of dim 0

pure of dim 1

Distributed Computing through Combinatorial Topology

21

Page 22: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Coloring

Distributed Computing through Combinatorial Topology

22

Page 23: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Coloring

Â: G ! C

Distributed Computing through Combinatorial Topology

23

Page 24: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Coloring

Â: G ! Cfor each edge (s0, s1) 2 G, Â(s0) Â(s1).

Distributed Computing through Combinatorial Topology

24

Page 25: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Coloring

Â: G ! Cfor each edge (s0, s1) 2 G, Â(s0) Â(s1).

usually process nameschromatic graphs

Distributed Computing through Combinatorial Topology

25

Page 26: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Labeling

1 0

0

1

Distributed Computing through Combinatorial Topology

26

Page 27: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Labeling

1 0

0

1f: G ! L

Distributed Computing through Combinatorial Topology

27

Page 28: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Graph Labeling

1 0

0

1f: G ! Lusually values from some domain

Distributed Computing through Combinatorial Topology

28

Page 29: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Labeled Chromatic Graph

0 1

1

0

name(s) = Â(s) view(s) = f(s)

Distributed Computing through Combinatorial Topology

29

Page 30: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Simplicial Maps

Vertex-to-vertex map …

that also sends edges to edges.

Distributed Computing through Combinatorial Topology

30

Page 31: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Rigid Simplicial Maps

A simplicial map can send an edge to a vertex …

Distributed Computing through Combinatorial Topology

31

Page 32: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Rigid Simplicial Maps

A simplicial map can send an edge to a vertex …

A simplicial map that sends distinct vertices to distinct vertices is rigid.

Distributed Computing through Combinatorial Topology

32

Page 33: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A Path Between two Vertices

Distributed Computing through Combinatorial Topology

33

Page 34: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

A Path Between two Vertices

A graph is connected if there is a path between every pair of vertices

Distributed Computing through Combinatorial Topology

34

Page 35: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Not Connected

A graph is connected if there is a path between every pair of vertices

Distributed Computing through Combinatorial Topology

35

Page 36: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Theorem

Distributed Computing through Combinatorial Topology

Theorem

Á

The image of a connected graph under a simplicial map is connected.

36

Page 37: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Carrier Maps

Distributed Computing through Combinatorial Topology

©: G ! 2H

For graphs G, H, a carrier map

Carries each simplex of G to a subgraph of H …

©

37

Page 38: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Carrier Maps

Distributed Computing through Combinatorial Topology

©: G ! 2H

For graphs G, H, a carrier map

Carries each simplex of G to a subgraph of H …

©

satisfying monotonicity:for all ¾,¿2G, if ¾µ¿, then ©(¾)µ©(¿).

38

Page 39: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Monotonicity

Strict Carrier Maps

Distributed Computing through Combinatorial Topology

For all ¾,¿2G, if ¾µ¿, then ©(¾)µ©(¿).

39

Page 40: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Monotonicity

Strict Carrier Maps

Distributed Computing through Combinatorial Topology

For all ¾,¿2G, if ¾µ¿, then ©(¾)µ©(¿).

Equivalent to …©(¾Å¿) µ ©(¾) Å ©(¿)

40

Page 41: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Monotonicity

Strict Carrier Maps

Distributed Computing through Combinatorial Topology

For all ¾,¿2G, if ¾µ¿, then ©(¾)µ©(¿).

Equivalent to …©(¾Å¿) µ ©(¾) Å ©(¿)

Definition© is strict if ©(¾Å¿) = ©(¾) Å ©(¿)

41

Page 42: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Road MapElementary Graph Theory

Tasks

Models of Computation

Approximate Agreement

Task Solvability

Distributed Computing through Combinatorial Topology

42

Page 43: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Two Processes

Distributed Computing through Combinatorial Topology

Hello! I’m

AliceHello! I’m

Bob

43

Page 44: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Informal Task Definition

Distributed Computing through Combinatorial Topology

Processes start with input values …

They communicate …

They halt with output values …

legal for those inputs.

44

Page 45: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Formal Task Definition

Distributed Computing through Combinatorial Topology

Input graph Iall possible assignments of input values

45

Page 46: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Formal Task Definition

Distributed Computing through Combinatorial Topology

Input graph Iall possible assignments of input values

Output graph Oall possible assignments of output values

46

Page 47: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Formal Task Definition

Distributed Computing through Combinatorial Topology

Input graph Iall possible assignments of input values

Output graph Oall possible assignments of output values

Carrier map ¢: I ! 2O

all possible assignments of output values for each input

47

Page 48: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Input Graph: Consensus

Distributed Computing through Combinatorial Topology

1

10

0

I

48

Page 49: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Input Graph

Distributed Computing through Combinatorial Topology

0 1

10

I

49

Page 50: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Input Graph

Distributed Computing through Combinatorial Topology

1 1

00

Pure

Colored by process names

Labeled by input values

50

Page 51: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Output Graph

Distributed Computing through Combinatorial Topology

1 1

00

O

51

Page 52: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Carrier Map

Distributed Computing through Combinatorial Topology

1 1

00

1 1

00

¢: I ! 2OI O

52

Page 53: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Carrier Map

Distributed Computing through Combinatorial Topology

1 1

00

1 1

00

¢: I ! 2OI O

If Bob runs alone with input 1 …

then he decides output 1.

53

Page 54: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Carrier Map

Distributed Computing through Combinatorial Topology

1 1

00

1 1

00

¢: I ! 2OI O

If Bob and Alice both have input 1 …

then they both decide output 1.

54

Page 55: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Task Carrier Map

Distributed Computing through Combinatorial Topology

1 1

00

1 1

00

¢: I ! 2OI O

If Bob has 1 and Alice 0 …

then they must agree, on either one.

55

Page 56: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

56

Example: Coordinated Attack

Alice and Bob winIf they both attack

together

Alice Bob

Distributed Computing through Combinatorial Topology

Enemy

Page 57: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Indifferent

Attack at dawn!

Attack at noon!

Input Graph

Distributed Computing through Combinatorial Topology

I

57

Page 58: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Output Graph

Distributed Computing through Combinatorial Topology

dawn!

noon!

failed!

O

58

Page 59: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Carrier Map

Distributed Computing through Combinatorial Topology

¢

I

O

59

Page 60: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Carrier Map

Distributed Computing through Combinatorial Topology

¢

dawn!

failed!

dawn! I

O

60

Page 61: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Carrier Map

Distributed Computing through Combinatorial Topology

¢

noon!

failed!

noon!I

O

61

Page 62: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Carrier Map

Distributed Computing through Combinatorial Topology

¢

dawn!

dawn! I

O

62

Page 63: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

63

Example: Coordinated AttackAlice Bob

Distributed Computing through Combinatorial Topology

Enemy

Page 64: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

64

Example: Coordinated AttackAlice Bob

Distributed Computing through Combinatorial Topology

Enemy

Alice and Bob realize that they do not need to agree

on an exact time …

Page 65: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

65

Example: Coordinated AttackAlice Bob

Distributed Computing through Combinatorial Topology

Enemy

Alice and Bob realize that they do not need to agree

on an exact time …they will win if attack times

are sufficiently close.

Page 66: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

0 1

0 1/5 2/5 3/5 4/5 1

Coordinated Attack Graphs

Distributed Computing through Combinatorial Topology

¢

I

O

66

Page 67: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

0 1

0 1/5 2/5 3/5 4/5 1

Coordinated Attack Graphs

Distributed Computing through Combinatorial Topology

¢

I

O

67

Page 68: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

0 1

0 1/5 2/5 3/5 4/5 1

Coordinated Attack Graphs

Distributed Computing through Combinatorial Topology

¢

I

O

68

Page 69: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

0 1

0 1/5 2/5 3/5 4/5 1

Coordinated Attack Graphs

Distributed Computing through Combinatorial Topology

¢

I

O

69

Page 70: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Road MapElementary Graph Theory

Tasks

Models of Computation

Approximate Agreement

Task Solvability

Distributed Computing through Combinatorial Topology

70

Page 71: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Protocols

Distributed Computing through Combinatorial Topology

Models of Computation

71

Page 72: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Alice’s Protocol

72

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[A] + mem[B];return δ(view)

Finite program

Bob’s protocol is symmetric

Distributed Computing through Combinatorial Topology

Page 73: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[B];return δ(view)

Alice’s Protocol

73Distributed Computing through Combinatorial Topology

shared two-element memory

Page 74: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[B];return δ(view)

Alice’s Protocol

74Distributed Computing through Combinatorial Topology

Start with input value

Page 75: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[B];return δ(view)

Alice’s Protocol

75Distributed Computing through Combinatorial Topology

Run for L layers

Page 76: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[B];return δ(view)

Alice’s Protocol

76Distributed Computing through Combinatorial Topology

Alice writes her value, read Bob’s value, and concatenate it to my view

Page 77: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[B];return δ(view)

Alice’s Protocol

77Distributed Computing through Combinatorial Topology

Alice writes her value, read Bob’s value, and concatenate it to my view

(full-information protocol)

Page 78: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1 of Valueview: Value := my input value;for i: int := 0 to L do mem[A] := view; view := view + mem[B];return δ(view)

Alice’s Protocol

78Distributed Computing through Combinatorial Topology

finally, apply task-specific decision map to view

Page 79: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Formal Protocol Definition

Distributed Computing through Combinatorial Topology

Input graph Iall possible assignments of input values

79

Page 80: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Formal Protocol Definition

Distributed Computing through Combinatorial Topology

Input graph Iall possible assignments of input values

Protocol graph Pall possible process views after execution

80

Page 81: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Formal Protocol Definition

Distributed Computing through Combinatorial Topology

Input graph Iall possible assignments of input values

Protocol graph Pall possible process views after execution

Carrier map ¥: I ! 2P

all possible assignments of views

81

Page 82: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

10

0? 0101 ?1

¥

I

P

82

Page 83: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

0? 0101 ?1

Colored by process names

Labeled with final views

P

83

Page 84: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

0? 0101 ?1

Alice finishes before Bob starts, doesn’t see his value

P

84

Page 85: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

0? 0101 ?1

Alice and Bob run together,she sees his value.

P

85

Page 86: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

0? 0101 ?1

Alice finishes, then Bob starts

P

86

Page 87: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

0? 0101 ?1

Alice and Bob run together

P

87

Page 88: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Round Protocol Graph

Distributed Computing through Combinatorial Topology

0? 0101 ?1

Bob can’t tell whether Alice saw him

P

88

Page 89: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Execution Carrier Map

Distributed Computing through Combinatorial Topology

10

0? 0101 ?1

¥

I

P

89

Page 90: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Execution Carrier Map

Distributed Computing through Combinatorial Topology

10

0? 0101 ?1

¥

I

P

¥: I ! 2P

strict carrier map¥(¾) Å ¥(¿) = ¥(¾ Å ¿)90

Page 91: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Output graph0 2/31/3 1

0? 0101 ?1 Protocol graph

δ

The Decision Map

Distributed Computing through Combinatorial Topology

δ

91

Page 92: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

All Together

Distributed Computing through Combinatorial Topology

0 1

0 2/31/3 1

0? 0101 ?1¢

δ

I

P

O

¥

92

Page 93: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Definition

Distributed Computing through Combinatorial Topology

Decision map δ is carried by carrier map ¢ if

for each input vertex s,

for each input edge ¾,

δ(¥(s)) µ ¢(s)

δ(¥(¾)) µ ¢(¾).

93

Page 94: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Meaning

94

δ(¥(s)) µ ¢(s)

process strarts in state s

Page 95: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Meaning

95

δ(¥(s)) µ ¢(s)

runs the protocol to completion

Page 96: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Meaning

96

δ(¥(s)) µ ¢(s)

makes a decision …

Page 97: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Meaning

97

δ(¥(s)) µ ¢(s)

decision is permitted by task carrier map

Page 98: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Definition

Solving a Task

Distributed Computing through Combinatorial Topology

The protocol (I,P,¥) solves the task (I, O, ¢)

98

Page 99: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Definition

Solving a Task

Distributed Computing through Combinatorial Topology

The protocol (I,P,¥) solves the task (I, O, ¢)

if there is …

99

Page 100: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Definition

Solving a Task

Distributed Computing through Combinatorial Topology

The protocol (I,P,¥) solves the task (I, O, ¢)

if there is …

a simplicial decision mapδ:P ! O

100

Page 101: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Definition

Solving a Task

Distributed Computing through Combinatorial Topology

The protocol (I,P,¥) solves the task (I, O, ¢)

if there is …

a simplicial decision mapδ:P ! O

101

such that δ is carried by ¢.(δ agrees with ¢)

Page 102: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Layered Read-Write Model

102

Page 103: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Layered Read-Write Protocol

Distributed Computing through Combinatorial Topology

103

shared mem array 0..1,0..L of Valueview: Value := my input value;for i: int := 0 to L do mem[i][A] := view; view := view + mem[A] + mem[B];return δ(view)

Page 104: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1,0..L of Valueview: Value := my input value;for i: int := 0 to L do mem[i][A] := view; view := view + mem[A] + mem[B];return δ(view)

As before, run for L layers

Layered Read-Write Protocol

Distributed Computing through Combinatorial Topology

104

Page 105: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

shared mem array 0..1,0..L of Valueview: Value := my input value;for i: int := 0 to L do mem[i][A] := view; view := view + mem[A] + mem[B];return δ(view)

Layered Read-Write Protocol

Distributed Computing through Combinatorial Topology

Each layer uses a distinct, “clean” memory

105

Page 106: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Layered R-W Protocol Graph

Distributed Computing through Combinatorial Topology

10

0? 0101 ?1

¥

I

P

106

Page 107: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Layered R-W Protocol Graph

Distributed Computing through Combinatorial Topology

¥

P is always a subdivision of I

I P

107

Page 108: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Road MapElementary Graph Theory

Tasks

Models of Computation

Approximate Agreement

Task Solvability

Distributed Computing through Combinatorial Topology

108

Page 109: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Alice’s 1/3-Agreement Protocol

Distributed Computing through Combinatorial Topology

mem[A] := 0other := mem[B]if other == ? then decide 0else decide 1/3

109

Page 110: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Alice’s 1/3-Agreement Protocol

Distributed Computing through Combinatorial Topology

mem[A] := 0if mem[B] == ? then decide 0else decide 1/3

Alice writes her value to memory

110

Page 111: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Alice’s 1/3-Agreement Protocol

Distributed Computing through Combinatorial Topology

mem[A] := 0if mem[B] == ? then decide 0else decide 1/3

If she doesn’t see Bob’s value, decide her own.

111

Page 112: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Alice’s 1/3-Agreement Protocol

Distributed Computing through Combinatorial Topology

mem[A] := 0if mem[B] == ? then decide 0else decide 1/3

If she see’s Bob’s value, jump to the middle

112

Page 113: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

0 2/31/3 1

0 2/31/3 1

0 2/31/3 1

Distributed Computing through Combinatorial Topology

113

Page 114: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

One-Layer 1/3-Agreement Protocol

Distributed Computing through Combinatorial Topology

0 1

0 2/31/3 1

0? 0101 ?1

δ

I

P

O

¥

114

Page 115: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

No 1-Layer 1/5-Agreement Protocol

Distributed Computing through Combinatorial Topology

0 1

1/5 3/52/5 4/5

0? 0101 ?1

δ

P

O

¥

10

(no map possible)

I

115

Page 116: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

10

0 1/5 2/5 3/5 4/5 1

¥

0? 0101 ?1

2-Layer 1/5-Agreement

Distributed Computing through Combinatorial Topology

¥

I

O

layer 1

layer 2

δ

116

Page 117: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Fact

Distributed Computing through Combinatorial Topology

In the layered read-write model,

The 1/K-Agreement Task

Has a dlog3 Ke–layer protocol

117

Page 118: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Road MapElementary Graph Theory

Tasks

Models of Computation

Approximate Agreement

Task Solvability

Distributed Computing through Combinatorial Topology

118

Page 119: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Fact

Distributed Computing through Combinatorial Topology

The protocol graph for any L-layer protocol with input graph I is a subdivision of I, where each edge is subdivided 3L times.

119

Page 120: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Main Theorem

Distributed Computing through Combinatorial Topology

The two-process task (I, O, ¢) is solvable in the layered read-write model if and only if there exists a connected carrier map ©: I ! 2O carried by ¢.

120

Page 121: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Corollary

Distributed Computing through Combinatorial Topology

The consensus task has no layered read-write protocol

121

Page 122: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

Corollary

Distributed Computing through Combinatorial Topology

Any ²–agreement task has a layered read-write protocol

122

Page 123: Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.

123

         This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

• You are free:– to Share — to copy, distribute and transmit the work – to Remix — to adapt the work

• Under the following conditions:– Attribution. You must attribute the work to “Distributed Computing through

Combinatorial Topology” (but not in any way that suggests that the authors endorse you or your use of the work).

– Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.

• For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to– http://creativecommons.org/licenses/by-sa/3.0/.

• Any of the above conditions can be waived if you get permission from the copyright holder.

• Nothing in this license impairs or restricts the author's moral rights.

Distributed Computing through Combinatorial Topology