Presentation is loading. Please wait.

Presentation is loading. Please wait.

Combinatorial Topology and Distributed Computing

Similar presentations


Presentation on theme: "Combinatorial Topology and Distributed Computing"— Presentation transcript:

1 Combinatorial Topology and Distributed Computing
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA

2 Part Four Connectivity
29-Nov-18

3 Previously Used Sperner’s Lemma to show k-set agreement impossible when protocol complex is a manifold. But in most models, protocol complexes are not manifolds … 29-Nov-18

4 Road Map Consensus Impossibility General theorem
Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 29-Nov-18

5 Road Map Consensus Impossibility General theorem
Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 29-Nov-18

6 A Path simplicial complex vertex edge edge edge edge vertex vertex
29-Nov-18

7 Any two vertexes can be linked by a path
Path Connected Any two vertexes can be linked by a path 29-Nov-18

8 Theorem If … 29-Nov-18

9 Theorem If … For every n-simplex ¾n, P(¾n) is path-connected …
29-Nov-18

10 Theorem If … For every n-simplex ¾n, P(¾n) is path-connected …
(If no process fails) 29-Nov-18

11 Theorem If … For every n-simplex ¾n, P(¾n) is path-connected …
P (¾n-1) is non-empty … Then … (If one process fails) 29-Nov-18

12 Theorem P (¢) cannot solve consensus. If … For every n-simplex ¾n,
P(¾n) is path-connected … For every (n-1)-simplex ¾n-1, P (¾n-1) is non-empty … Then … P (¢) cannot solve consensus. 29-Nov-18

13 Model Independence Holds for message-passing or shared memory ….
Synchronous, asynchronous, or in-between … Any adversarial scheduler … As long as one failure is possible. 29-Nov-18

14 Proof 29-Nov-18

15 Proof 29-Nov-18

16 Proof WLOG, P is winner 29-Nov-18

17 Proof WLOG, R is winner WLOG, P is winner 29-Nov-18

18 Complex is Path-Connected
29-Nov-18

19 One-dimensional Sperner’s Lemma
Some edge has two “colors” An execution that decides two distinct values QED 29-Nov-18

20 Road Map Consensus Impossibility General theorem
Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 29-Nov-18

21 Application We now show that consensus is impossible in wait-free read-write memory For every n-simplex ¾n, P(¾n) is path-connected … For every (n-1)-simplex ¾n-1, P(¾n-1) is non-empty. 29-Nov-18

22 Reasoning about Path Connectivity
If each component is path-connected ... 29-Nov-18

23 Reasoning about Path Connectivity
If each component is path-connected ... and each pair-wise intersection is non-empty ... 29-Nov-18

24 Reasoning about Path Connectivity
If each component is path-connected ... then their union is path-connected. And each pair-wise intersection is non-empty ... 29-Nov-18

25 Reachable Complexes Reachable part of protocol complex
B moves A moves It suffices to prove the claim for two threads. Here is how we model computation histories. Reachable part of protocol complex

26 At the end, single simplex reachable entire protocol complex
Reachable Complexes At the end, single simplex reachable Initially, entire protocol complex reachable

27 Eventual Property Satisfied by simplexes

28 Suppose it does not hold at start
Eventual Property Suppose it does not hold at start

29 Critical States critical
A critical state is one where the property does not hold, but it does hold in all successor states.

30 Critical States Exist Non-satisfying critical
Why must there be such a critical state? Start from a non-satisfying state. If it is not critical, run A until about to make the state satisfying. If not a critical state, that is, if B’s step will not take the state to a satisfying state, then run B until in is about to take system to a satisfying state. If this state is not critical, run A again, then B, and so on. Since this is a finite execution, within a finite number of steps each will reach a satisfying final state, so somewhere before they must reach a critical state. critical

31 Lowest non-satisfying states in tree
Eventual Property Critical states Lowest non-satisfying states in tree

32 Path-Connectivity is an Eventual Property
Path-connectivity has a critical state c P R Q 29-Nov-18

33 Critical State Where P(c) is not path-connected
But each Pi is path-connected R P Q Will show each pair-wise intersection is non-empty … Implying that P(c) is path-connected after all! 29-Nov-18

34 Focus Show that PP Å PQ is non-empty
Executions where it is ambiguous whether P or Q moved first in c What could P and Q be doing in c? 29-Nov-18

35 Possible Interactions
Read x Read y Write x Write y ? P Q Tp prove that we cannot solve consensus using read-write registers, lets go over all the possible interactions among the threads and show that for each such execution they lead to a contradiction. 35 35

36 Q is about to Read c This is the case in which some thread reads (and the other either reads or writes). Two possible executions, one in which A runs solo and decides 0 and another in which A runs after B takes its critical read step. Leads to a contradiction since A cannot tell that B has read…so two executions lead to the same state but the system is supposed to have two different valencies for it, a contradiction.

37 Q is about to Read c P runs solo 37
This is the case in which some thread reads (and the other either reads or writes). Two possible executions, one in which A runs solo and decides 0 and another in which A runs after B takes its critical read step. Leads to a contradiction since A cannot tell that B has read…so two executions lead to the same state but the system is supposed to have two different valencies for it, a contradiction. 37 37

38 Q is about to Read c Q reads x P runs solo 38
This is the case in which some thread reads (and the other either reads or writes). Two possible executions, one in which A runs solo and decides 0 and another in which A runs after B takes its critical read step. Leads to a contradiction since A cannot tell that B has read…so two executions lead to the same state but the system is supposed to have two different valencies for it, a contradiction. 38 38

39 Q is about to Read c Q reads x P runs solo P runs solo
Same vertex! must lie in PP Å PQ This is the case in which some thread reads (and the other either reads or writes). Two possible executions, one in which A runs solo and decides 0 and another in which A runs after B takes its critical read step. Leads to a contradiction since A cannot tell that B has read…so two executions lead to the same state but the system is supposed to have two different valencies for it, a contradiction. 39 39

40 Possible Interactions
Read x Read y Write x Write y no ? P Q Tp prove that we cannot solve consensus using read-write registers, lets go over all the possible interactions among the threads and show that for each such execution they lead to a contradiction. 40 40

41 Writing Distinct Variables

42 Writing Distinct Variables
P writes x

43 Writing Distinct Variables
P writes x Q writes y P runs solo

44 Writing Distinct Variables
P writes x Q writes y Q writes y P writes x P runs solo Same vertex! must lie in PP Å PQ P runs solo

45 Possible Interactions
Read x Read y Write x Write y no ? P Q Tp prove that we cannot solve consensus using read-write registers, lets go over all the possible interactions among the threads and show that for each such execution they lead to a contradiction. 45 45

46 Writing Same Variable c P writes x P runs solo P runs solo

47 Writing Same Variable c PP Å PQ Q writes x P writes x P runs solo
Same vertex! must lie in PP Å PQ P runs solo

48 Possible Interactions
Read x Read y Write x Write y no P Q Tp prove that we cannot solve consensus using read-write registers, lets go over all the possible interactions among the threads and show that for each such execution they lead to a contradiction. QED 48 48

49 Road Map Consensus Impossibility General theorem
Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 29-Nov-18

50 So Far … Expressed solvability of consensus as a topological property of protocol complex … And applied the result to wait-free read-write memory. Next: do the same for k-set agreement! 29-Nov-18

51 Rethinking Path Connectivity
0-sphere Let’s call this complex 0-connected 1-disc

52 1-Connectivity 1-sphere 2-disc

53 This Complex is not 1-Connected
?

54 2-Connectivity 2-sphere 3-disk

55 n-connectivity C is n-connected, if, for m · n, every continuous map of the m-sphere can be extended to a continuous map of the (m+1)-disk (-1)-connected is non-empty 29-Nov-18

56 If … P(¾n) is (k-1)-connected … P(¾n-1) is (k-2)-connected …
For every n-simplex ¾n, P(¾n) is (k-1)-connected … For every (n-1)-simplex ¾n-1, P(¾n-1) is (k-2)-connected … k For every (n-k)-simplex ¾n-k, P(¾n-k) is (-1)-connected … Then P(¢) cannot solve k-set agreement. 29-Nov-18

57 Combinatorial vs Geometric
So far, definitions are combinatorial … Simplex is a set of vertexes {v0, …, vn} Complex is set of simplexes {¾0, …, ¾n} 29-Nov-18

58 Point in high-dimensional Euclidean Space
A Geometric Vertex Point in high-dimensional Euclidean Space 29-Nov-18

59 Geometric Simplexes Convex hull of n+1 affinely-independent points
0-simplex (vertex) 1-simplex (edge) Convex hull of n+1 affinely-independent points 3-simplex (solid tetrahedron) 2-simplex (solid triangle) 29-Nov-18

60 Geometric Simplicial Complex
29-Nov-18

61 Geometric Simplicial Complex
Every pair of simplexes intersect either in a simplex, or not at all 29-Nov-18

62 Geometric Simplicial Complex
Every pair of simplexes intersect either in a simplex, or not at all Polyhedron |C| is the point-set occupied by a geometric complex C. 29-Nov-18

63 Subdivisions A geometric complex is subdivided by partitioning each of its simplexes into smaller simplexes without changing the complex's polyhedron. 29-Nov-18

64 B is a subdivision of A if …
For each simplex ¯ of B there is a simplex ® of A such that |¯| µ |®|. A geometric complex is subdivided by partitioning each of its simplexes into smaller simplexes without changing the complex's polyhedron. For each simplex ® of A, |®| is the union of a finite set of geometric simplexes of B. 29-Nov-18

65 Barycentric Subdivision
For our purposes, the most useful subdivision is the \emph{standard chromatic subdivision} defined as follows. Let $\cC$ be a chromatic complex. Bary ¾ 29-Nov-18

66 Barycentric Subdivision
Each vertex of Bary ¾ is a face of ¾ Simplex = faces ordered by inclusion For our purposes, the most useful subdivision is the \emph{standard chromatic subdivision} defined as follows. Let $\cC$ be a chromatic complex. 29-Nov-18

67 Barycentric Coordinates
v0 v3 x = t0 v0 + t1 v1 + t2 v2 0 · t0,t1,t2 · 1 x  ti = 1 v2 v1 Every point of |C| has a unique representation using barycentric coordinates 29-Nov-18

68 From Simplicial to Continuous
One direction is easy. Any simplicial map $\phi:\cA~\to~\cB$ can be turned into a piece-wise linear map $|\phi|:|\cA|~\to~|\cB|$ by extending over barycentric coordinates. extend over barycentric coordinates (piece-wise linear map) 29-Nov-18

69 Simplicial Approximation Theorem
Maps simplicial Simplicial Approximation Theorem continuous 29-Nov-18

70 Simplicial Approximation
continuous 29-Nov-18

71 Simplicial Approximation
29-Nov-18

72 Simplicial Approximation
29-Nov-18

73 Simplicial Approximation
star(Á(v)) 29-Nov-18

74 Simplicial Approximation
star(Á(v)) 29-Nov-18

75 Simplicial Approximation
star(Á(v)) star(v) 29-Nov-18

76 Simplicial Approximation
star(Á(v)) star(v) 29-Nov-18

77 Simplicial Approximation
f(star(v)) star(v) star(Á(v)) 29-Nov-18

78 Simplicial Approximation
Á is a simplicial approximation of f if … f(star(v)) for every v in A … star(Á(v)) f(star(v)) µ star(Á(v)) 29-Nov-18

79 Simplicial Approximation Theorem
Given a continuous map there is an N such that f has a simplicial approximation Not every continuous map $f:|\cA|~\to~|\cB|$ has a simplicial approximation mapping $\cA$ to $\cB$. The following theorem, however, states we can always find a simplicial approximation defined over a sufficiently refined subdivision of $\cA$. We won’t prove this theorem here, since the proof can be found in any elementary Topology textbook. Actually Holds for most other subdivisions…. 29-Nov-18

80 Barycentric Subdivision
Each vertex of Bary ¾ is a face of ¾ Simplex = faces ordered by inclusion Review: in the barycentric subdivision of a simplex, each vertex is a face of the simplex, and a set of faces forms a simplex of the subdivision if they are ordered by inclusion. 29-Nov-18

81 Truncated Barycentric Subdivision
Discard vertexes for faces of dimension < n-k The truncated barycentric subdivision is constructed by discarding vertexes for faces of dimension less than n-k. Every facet has dimension exactly k. Here, n = 2, and k = 1, so we discard vertexes for faces of dimension less than 1 = 2-1. 29-Nov-18

82 Truncated Barycentric Subdivision
Discard vertexes for faces of dimension < n-k Subdivide … Next, subdivide arbitrarily. 29-Nov-18

83 Truncated Barycentric Subdivision
Discard vertexes for faces of dimension < n-k Subdivide … Color each simplex with a color taken from its carrier. If a vertex lies on an edge between red and green, color it either red or green. Vertexes in the middle can have any of the three colors. Color each vertex with color from carrier … 29-Nov-18

84 Truncated Barycentric Subdivision
Discard vertexes for faces of dimension < n-k Subdivide … No matter how you choose the coloring, some k-simplex will get k distinct colors! Color each vertex with color from carrier … Claim: Some k-simplex has k+1 distinct colors 29-Nov-18

85 Replace discarded vertexes
Proof Replace discarded vertexes No matter how you choose the coloring, some k-simplex will get k distinct colors! 29-Nov-18

86 Proof Replace discarded vertexes
Sperner’s Lemma: some n-simplex ¿ has n+1 colors No matter how you choose the coloring, some k-simplex will get k distinct colors! 29-Nov-18

87 Proof ¿ Replace discarded vertexes
Sperner’s Lemma: some n-simplex ¿ has n+1 colors No matter how you choose the coloring, some k-simplex will get k distinct colors! A k-face of ¿ lies in the truncated subdivision. QED 29-Nov-18

88 Proof of Theorem Build a continuous map: Such that For all ¿ µ ¾
truncated subdivision. 29-Nov-18

89 Skeleton C skel1 C skel0 C 29-Nov-18

90 Inductively on Skeletons
Example: n = 2, k = 1 P R Q 29-Nov-18

91 Base Step is non-empty for d ¸ n-k P R Q 29-Nov-18

92 Induction Step Assume map defined on (d-1)-skeleton is d-connected … P
R Q can “fill in” each simplex in d-skeleton 29-Nov-18

93 Continuous Map P R Q 29-Nov-18

94 Take Simplicial Approximation
Q 29-Nov-18

95 Color Vertex with Winning Process ID
Q 29-Nov-18

96 Some simplex has k+1 distinct colors!
Q An execution that decides k+1 values! 29-Nov-18

97 Model Independence Holds for message-passing or shared memory ….
Synchronous, asynchronous, or in-between … Any adversarial scheduler … As long as k failures are possible. 29-Nov-18

98 If Adversary can keep … the protocol complex k-connected forever …
k-set agreement is impossible. the protocol complex k-connected for r rounds … k-set agreement is impossible in fewer rounds. This result is model-independent, requiring only that the model permit k failures. When we apply this to specific models, we get three kinds of results. If the adversary can keep the protocol complex k-connected forever, then k-set agreement is impossible. If the adversary can keep the complex k-connected for r rounds, then k-set agreement is impossible in fewer rounds. If the adversary can keep the complex k-connected for time t, then k-seet agreement is impossible in less time. the protocol complex k-connected for time t … k-set agreement is impossible in less time. 29-Nov-18

99 Road Map Consensus Impossibility General theorem
Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 29-Nov-18

100 Application P(¾) is (dim ¾)-connected …
We now show that n-set agreement is impossible for n+1 processes in wait-free read-write memory For every input simplex ¾, P(¾) is (dim ¾)-connected … 29-Nov-18

101 Covering Complex 29-Nov-18 To compute the connectivity of a complex,
we would like to break it down into simpler components, compute the connectivity of each of the components, and then ``glue'' those components back together in a way that permits us to to deduce the connectivity of the original complex from the connectivity of the components. Complex 29-Nov-18

102 Covering Covering Complex 29-Nov-18
To compute the connectivity of a complex, we would like to break it down into simpler components, compute the connectivity of each of the components, and then ``glue'' those components back together in a way that permits us to to deduce the connectivity of the original complex from the connectivity of the components. Complex Covering 29-Nov-18

103 Simplex, if ÅCi non-empty
Vertex Informally, the nerve of a covering describes how the elements of the covering ``fit together'' to form the original complex. Note that the nerve is determined by the covering, not just the complex. Simplex, if ÅCi non-empty 29-Nov-18

104 Nerve Example: Sphere 29-Nov-18

105 Reasoning About Connectivity
Covering Nerve 29-Nov-18

106 Nerve Lemma k-connected If … (k-|U|+1)-connected 29-Nov-18

107 N (C0, …Cm) is k-connected.
…Then C is k-connected … if and only if .. N (C0, …Cm) is k-connected. 29-Nov-18

108 Nerve Example: Sphere 1-connected … 29-Nov-18

109 Reasoning About Connectivity
Can apply Nerve Lemma! 0-connected 29-Nov-18

110 Reasoning About Connectivity
1-connected … 29-Nov-18

111 Reasoning About Connectivity
1-connected ! QED implies 1-connected ! 29-Nov-18

112 Reasoning About Computation
Protocol state (processes + environment) Reachable complex from s 29-Nov-18

113 Reasoning About Computation
New protocol state if Pi moves next from s Reachable complex if Pi moves next Compact notation 29-Nov-18

114 Example P1 about to read u from M[0] P0 about to read u from M[0]
Three proceses, shared memory P2 about to write v to M[0] 29-Nov-18

115 Intersections of Readers
P01 P0 moves first, reads u P1 moves first, reads u Cannot tell which moved first 29-Nov-18

116 Intersections of Readers
P01 s01 is state after P0 and P1 both read P01 = P(s01) 29-Nov-18

117 Intersections of Readers and Writers
Cannot tell which moved first P0 moves first, reads u P02 P2 moves first, writes v 29-Nov-18

118 Intersections of Readers and Writers
P02 P02 = P0(s) Protocol where P0 does not participate 29-Nov-18

119 Observation P0 Å P1 = protocol complex with fewer pending operations
P0 Å P2 = protocol complex with fewer participating processes Suggests an inductive argument … 29-Nov-18

120 Notation Reachable complex from s if Pi takes next step
Ambiguous who in U moved first 29-Nov-18

121 Notation An execution e is a sequence of process steps (reads & writes) … Views of non-faulty processes determine simplex of protocol complex e  e’ if they determine same simplex 29-Nov-18

122 Definitions A read by Pi 2 U is non-conflicting if no Pj 2 U writes to same location. A write by Pi 2 U is non-conflicting if no Pj 2 U reads from same location. Assume multi-reader single-writer memory Otherwise, operation is conflicting. 29-Nov-18

123 Lemma Claim: Pi(s) Å Pj(s) = Pj(si)
Suppose Pi 2 U has a non-conflicting operation xi pending in s … and Pj 2 U has a pending operation xj … Claim: Pi(s) Å Pj(s) = Pj(si) 29-Nov-18

124 One Direction Show: Pi(s) Å Pj(s) µ Pj(si) So: Pi(s) Å Pj(s) µ Pj(si)
For every e 2 Pj(s) , e  xj ¢ e’ For every e 2 Pi(s) Å Pj(s), xi commutes with every earlier operation, so e  xi ¢ xj ¢ e’’ So: Pi(s) Å Pj(s) µ Pj(si) 29-Nov-18

125 Other Direction Show: Pj(si) µ Pi(s) Å Pj(s)
For every e 2 Pj(si), e  xi ¢ xj ¢ e’ So e 2 Pi(s) For every e 2 Pj(si), e  xj ¢ xi ¢ e’ So e 2 Pj(s) So: Pj(si) µ Pi(s) Å Pj(s) QED 29-Nov-18

126 Claim: PU(s) = PU-{i}(si)
Lemma Claim: PU(s) = PU-{i}(si) Pj(si) = Pi(s) Å Pj(s) PU-{i}(si) = PU(s) QED 29-Nov-18

127 Lemma If all operations in U are non-conflicting, PU(s) = P(s’), where s’ reachable from s We know that PU(s) = PU-{i}(si) Induct on number of operations QED 29-Nov-18

128 Lemma Claim: Pi(s) Å Pj(s) = Pij(s)
If Pi 2 U has a read ri conflicting with wj by Pj 2 U then … Claim: Pi(s) Å Pj(s) = Pij(s) Remember \cP^i_j(s) is the set of executions where P_j takes the first step, and P_i takes no steps. 29-Nov-18

129 Lemma Claim: Pi(s) Å Pj(s) = Pij(s)
Reachable complex from s if Pj goes first and Pi does not participate If Pi 2 U has a read ri conflicting with wj by Pj 2 U then … Claim: Pi(s) Å Pj(s) = Pij(s) Remember \cP^i_j(s) is the set of executions where P_j takes the first step, and P_i takes no steps. 29-Nov-18

130 One Direction Show: Pi(s) Å Pj(s) µ Pij(s) So: Pi(s) Å Pj(s) µ Pij(s)
For e 2 Pj(s), e  wj ¢ e’ so Pi reads v For e 2 Pi(s), e  ri ¢ e’’ so Pi reads u For e 2 Pj(s) Å Pj(s), Pi fails before writing So: Pi(s) Å Pj(s) µ Pij(s) 29-Nov-18

131 Other Direction Show: Pij(s) µ Pi(s) Å Pj(s)
For every e 2 Pij(s), e  ri ¢ e’ , where Pi fails before writing in e’ So e 2 Pi(s) For every e 2 Pij(s) , e  wj ¢ ri ¢ e’ So e 2 Pj(s) So: Pij(s) µ Pi(s) Å Pj(s) 29-Nov-18

132 Claim: PU(s) = PiU-{i}(s)
Lemma Claim: PU(s) = PiU-{i}(s) Pij(s) = Pi(s) Å Pj(s) PiU-{i}(s) = PU(s) 29-Nov-18

133 Lemma If operations in U are conflicting, PU(s) = P’(s’), where P’(¢) is an m-process protocol for n-|U|+1 · m < n+1 We know that PU(s) = PiU-{i}(s) Induct on number of operations QED 29-Nov-18

134 Corollaries For all states s, PU(s) is non-empty. The nerve complex
N (P0, …, Pn) is an n-simplex 29-Nov-18

135 Main Theorem If P is a wait-free read-write protocol,
Claim: Pi(¾) is (dim ¾)-connected 29-Nov-18

136 n-Connectivity is an Eventual Property
n-connectivity has a critical state c P0 Pn 29-Nov-18

137 Proof Overview … Where P(c) not n-connected … P0 Pn
But each Pi is n-connected. Will show each PU is (n-|U|+1)-connected Nerve Lemma: P(c) is n-connected. Contradiction! 29-Nov-18

138 Base case: when n=0, P(¾) is single vertex
(n-|U|+1)-connected? Proof Induction on n … Base case: when n=0, P(¾) is single vertex 29-Nov-18

139 Proof PU(c) is (n-|U|+1)-connected because c is critical.
If U is all non-conflicting operations… By Lemma: PU(c) = P(s) where s is reachable from c. PU(c) is (n-|U|+1)-connected because c is critical. 29-Nov-18

140 Proof PU(c) is (n-|U|+1)-connected by induction hypothesis for n.
If U has conflicting operations… By Lemma: PU(c) = P’(s), where P’ is an m-process protocol, for n-|U|+1 · m < n+1 PU(c) is (n-|U|+1)-connected by induction hypothesis for n. 29-Nov-18

141 Nerve Lemma Application
Each PU is (n-|U|+1)-connected … So P(c) is n-connected if and only if … N (P0, …,Pm) is n-connected. But N(P0, …,Pm) is an n-simplex … So P(c) is n-connected! Contradiction 29-Nov-18

142 Conclusions Model-independent topological properties that prevent …
consensus k-set agreement path-connectivity k-connectivity Model-specific application to wait-free read-write memory 29-Nov-18

143           This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.


Download ppt "Combinatorial Topology and Distributed Computing"

Similar presentations


Ads by Google