Combinatorial Topology and Distributed Computing Part Four Connectivity
Combinatorial Topology and Distributed Computing
Part Four Connectivity 16 -Sep-21 2
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 … 16 -Sep-21 3
Road Map Consensus Impossibility General theorem Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 16 -Sep-21 4
Road Map Consensus Impossibility General theorem Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 16 -Sep-21 5
A Path simplicial complex vertex edge vertex 16 -Sep-21 vertex edge vertex 6
Path Connected Any two vertexes can be linked by a path 16 -Sep-21 7
Theorem If … 16 -Sep-21 8
Theorem If … For every n-simplex ¾n, P(¾n) is path-connected … 16 -Sep-21 9
Theorem If … For every n-simplex ¾n, P(¾n) is path-connected … (If no process fails) 16 -Sep-21 10
Theorem 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 … (If one process fails) 16 -Sep-21 11
Theorem 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. 16 -Sep-21 12
Model Independence Holds for message-passing or shared memory …. Synchronous, asynchronous, or in-between … Any adversarial scheduler … As long as one failure is possible. 16 -Sep-21 13
Proof 16 -Sep-21 14
Proof 16 -Sep-21 15
Proof WLOG, P is winner 16 -Sep-21 16
Proof WLOG, P is winner 16 -Sep-21 WLOG, R is winner 17
Complex is Path-Connected 16 -Sep-21 18
One-dimensional Sperner’s Lemma Some edge has two “colors” An execution that decides two distinct values QED 16 -Sep-21 19
Road Map Consensus Impossibility General theorem Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 16 -Sep-21 20
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. 16 -Sep-21 21
Reasoning about Path Connectivity If each component is path-connected. . . 16 -Sep-21 22
Reasoning about Path Connectivity If each component is path-connected. . . 16 -Sep-21 and each pair-wise intersection is non-empty. . . 23
Reasoning about Path Connectivity If each component is path-connected. . . then their union is And each pair-wise path-connected. intersection is non-empty. . . 16 -Sep-21 24
Reachable Complexes Reachable part of protocol complex Protocol complex A moves Reachable part of protocol complex 25 B moves
Reachable Complexes At the end, single simplex reachable 26 Initially, entire protocol complex reachable
Eventual Property Satisfied by simplexes 27
Eventual Property 28 Suppose it does not hold at start
Critical States critical 29
Critical States Exist Non-satisfying critical 30
Eventual Property Critical states Lowest nonsatisfying states in tree 31
Path-Connectivity is an Eventual Property Path-connectivity has a critical state c P 16 -Sep-21 Q R 32
Critical State Where P(c) is not path-connected But R P each Pi is path-connected Q Will show each pair-wise intersection is non-empty … 16 -Sep-21 Implying that P(c) is pathconnected after all! 33
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? 16 -Sep-21 34
Possible Interactions Q P Read x Read y Write x Write y Read x ? ? Read y ? ? Write x ? ? Write y ? ? 35
Q is about to Read c 36
Q is about to Read P runs solo c 37
Q is about to Read P runs solo c Q reads x 38
Q is about to Read P runs solo Same vertex! must lie in c Q reads x P runs solo PP Å PQ 39
Possible Interactions Q P Read x Read y Write x Write y Read x no no Read y no no Write x no no ? ? Write y no no ? ? 40
Writing Distinct Variables c 41
Writing Distinct Variables P writes x 42 c
Writing Distinct Variables P writes x Q writes y P runs solo 43 c
Writing Distinct Variables P writes x c Q writes y P runs solo 44 Q writes y P writes x Same vertex! must lie in PP Å PQ P runs solo
Possible Interactions Q P Read x Read y Write x Write y Read x no no Read y no no Write x no no ? no Write y no no no ? 45
Writing Same Variable P writes x c P runs solo 46
Writing Same Variable P writes x c P runs solo P writes x Same vertex! must lie in 47 Q writes x PP Å PQ P runs solo
Possible Interactions Q P Read x Read y Write x Write y Read x no no Read y no no Write x no QED no no no Write y no no 48
Road Map Consensus Impossibility General theorem Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 16 -Sep-21 49
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! 16 -Sep-21 50
Rethinking Path Connectivity 0 -sphere Let’s call this complex 0 -connected 1 -disc
1 -Connectivity 1 -sphere 2 -disc
This Complex is not 1 Connected ?
2 -Connectivity 2 -sphere 3 -disk
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 16 -Sep-21 (-1)-connected is non-empty 55
If … 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 … … For every (n-k)-simplex ¾n-k, P(¾n-k) is (-1)-connected … k Then P(¢) cannot solve k-set agreement. 16 -Sep-21 56
Combinatorial vs Geometric So far, definitions are combinatorial … Simplex is a set of vertexes {v 0, …, vn} Complex is set of simplexes {¾ 0, …, ¾n} 16 -Sep-21 57
A Geometric Vertex Point in high-dimensional Euclidean Space 16 -Sep-21
Geometric Simplexes 0 -simplex (vertex) 1 -simplex (edge) Convex hull of n+1 affinelyindependent points 16 -Sep-21 2 -simplex (solid triangle) 3 -simplex (solid tetrahedron)
Geometric Simplicial Complex 16 -Sep-21
Geometric Simplicial Complex Every pair of simplexes intersect either in a simplex, or not at all 16 -Sep-21
Geometric Simplicial Complex Every pair of simplexes intersect either in a simplex, or Polyhedron not at all |C| is the pointset occupied by a geometric complex C. 16 -Sep-21
Subdivisions 16 -Sep-21 63
B is a subdivision of A if … ¯ For each simplex ¯ of B there is a simplex ® of A such that |¯| µ |®|. ® For each simplex ® of A, |®| is the union of a finite set of geometric simplexes of B. 16 -Sep-21 64
Barycentric Subdivision ¾ Bary ¾ 16 -Sep-21 65
Barycentric Subdivision Each vertex of Bary ¾ is a face of ¾ Simplex = faces ordered by inclusion ¾ 16 -Sep-21 66
Barycentric Coordinates v 3 v 0 x = t 0 v 0 + t 1 v 1 + t 2 v 2 0 · t 0, t 1, t 2 · 1 x ti = 1 v 2 v 1 Every point of |C| has a unique representation using barycentric coordinates 16 -Sep-21 67
From Simplicial to Continuous simplicial continuous 16 -Sep-21 extend over barycentric coordinates (piece-wise linear map) 68
Maps simplicial continuous 16 -Sep-21 Simplicial Approximation Theorem 69
Simplicial Approximation simplicial continuous 16 -Sep-21 70
Simplicial Approximation 16 -Sep-21 71
Simplicial Approximation 16 -Sep-21 72
Simplicial Approximation star(Á(v)) 16 -Sep-21 73
Simplicial Approximation star(Á(v)) 16 -Sep-21 74
Simplicial Approximation star(Á(v)) 16 -Sep-21 star(v) 75
Simplicial Approximation star(Á(v)) 16 -Sep-21 star(v) 76
Simplicial Approximation star(v) f(star(v)) star(Á(v)) 16 -Sep-21 77
Simplicial Approximation Á is a simplicial approximation of f if … for every v in A … f(star(v)) µ star(Á(v)) 16 -Sep-21 f(star(v)) star(Á(v)) 78
Simplicial Approximation Theorem • Given a continuous map • there is an N such that f has a simplicial approximation 16 -Sep-21 Actually Holds for most other subdivisions…. 79
Barycentric Subdivision Each vertex of Bary ¾ is a face of ¾ Simplex = faces ordered by inclusion 16 -Sep-21 80
Truncated Barycentric Subdivision Discard vertexes for faces of dimension < n-k 16 -Sep-21 81
Truncated Barycentric Subdivision Discard vertexes for faces of dimension < n-k Subdivide … 16 -Sep-21 82
Truncated Barycentric Subdivision Discard vertexes for faces of dimension < n-k Subdivide … Color each vertex with color from carrier … 16 -Sep-21 83
Truncated Barycentric Subdivision Discard vertexes for faces of dimension < n-k Subdivide … Color each vertex with color from carrier … Claim: Some k-simplex has k+1 distinct colors 16 -Sep-21 84
Proof Replace discarded vertexes 16 -Sep-21 85
Proof Replace discarded vertexes Sperner’s Lemma: some nsimplex ¿ has n+1 colors 16 -Sep-21 86
Proof Replace discarded vertexes Sperner’s Lemma: some nsimplex ¿ has n+1 colors ¿ 16 -Sep-21 A k-face of ¿ lies in the truncated subdivision. QED 87
Proof of Theorem Build a continuous map: Such that For all ¿ µ ¾ 16 -Sep-21 truncated subdivision. 88
Skeleton C skel 1 C skel 0 C 16 -Sep-21 89
Inductively on Skeletons Example: n = 2, k = 1 P R Q 16 -Sep-21 90
Base Step is non-empty for d ¸ n-k P R Q 16 -Sep-21 91
Induction Step Assume map defined on (d-1)-skeleton is d-connected … P R Q 16 -Sep-21 can “fill in” each simplex in d-skeleton 92
Continuous Map P R Q 16 -Sep-21 93
Take Simplicial Approximation P R Q 16 -Sep-21 94
Color Vertex with Winning Process ID P R Q 16 -Sep-21 95
Some simplex has k+1 distinct colors! P R Q 16 -Sep-21 An execution that decides k+1 values!96
Model Independence Holds for message-passing or shared memory …. Synchronous, asynchronous, or in-between … Any adversarial scheduler … As long as k failures are possible. 16 -Sep-21 97
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. the protocol complex k-connected for time t … k-set agreement is impossible in less time. 16 -Sep-21 98
Road Map Consensus Impossibility General theorem Application to read-write models k-set agreement Impossibility General theorem Application to read-write models 16 -Sep-21 99
Application 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 … 16 -Sep-21 100
Covering Complex 16 -Sep-21 101
Covering Complex 16 -Sep-21 Covering 102
Vertex Simplex, if ÅCi non-empty 16 -Sep-21 103
Nerve Example: Sphere 16 -Sep-21 104
Reasoning About Connectivity Covering Nerve 16 -Sep-21 105
Nerve Lemma k-connected If … 16 -Sep-21 (k-|U|+1)-connected 106
…Then C is k-connected … if and only if. . N (C 0, …Cm) is k-connected. 16 -Sep-21 107
Nerve Example: Sphere 1 -connected … 16 -Sep-21 108
Reasoning About Connectivity Can apply Nerve Lemma! 0 -connected 16 -Sep-21 109
Reasoning About Connectivity 1 -connected … 16 -Sep-21 110
Reasoning About Connectivity 1 -connected ! QED implies 1 -connected ! 16 -Sep-21 111
Reasoning About Computation Protocol state (processes + environment) Reachable complex from s 16 -Sep-21 112
Reasoning About Computation New protocol state if Pi moves next from s Reachable complex if Pi moves next Compact notation 16 -Sep-21 113
Example P 0 about to read u from M[0] Three proceses, shared memory 16 -Sep-21 P 1 about to read u from M[0] P 2 about to write v to M[0] 114
Intersections of Readers P 01 P 0 moves first, reads u P 1 moves first, reads u Cannot tell which moved first 16 -Sep-21 115
Intersections of Readers P 01 s 01 is state after P 0 and P 1 both read 16 -Sep-21 P 01 = P(s 01) 116
P 0 Intersections of Readers and Cannot tell which Writers moves first, moved first reads u P 02 P 2 moves first, writes v 16 -Sep-21 117
Intersections of Readers and Writers P 02 = P 0(s) Protocol where P 016 -Sep-21 does not participate 118
Observation P 0 Å P 1 = protocol complex with fewer pending operations P 0 Å P 2 = protocol complex with fewer participating processes Suggests an inductive argument … 16 -Sep-21 119
Notation Reachable complex from s if Pi takes next step Ambiguous who in U moved first 16 -Sep-21 120
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 16 -Sep-21 121
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. 16 -Sep-21 122
Lemma 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) 16 -Sep-21 123
One Direction Show: 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) 16 -Sep-21 124
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) 16 -Sep-21 QED 125
Lemma Claim: PU(s) = PU-{i}(si) Pj(si) = Pi(s) Å Pj(s) PU-{i}(si) = PU(s) 16 -Sep-21 QED 126
Lemma If all operations in U are nonconflicting, PU(s) = P(s’), where s’ reachable from s We know that PU(s) = PU-{i}(si) 16 -Sep-21 Induct on number of operations QED 127
Lemma If Pi 2 U has a read ri conflicting with wj by Pj 2 U then … Claim: Pi(s) Å Pj(s) = Pij(s) 16 -Sep-21 128
Lemma Reachable complex from s if Pj goes first and Pi does If Pi 2 U has a read not ri conflicting participate with wj by Pj 2 U then … Claim: Pi(s) Å Pj(s) = Pij(s) 16 -Sep-21 129
One Direction Show: 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) 16 -Sep-21 130
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 P (s) i For every e 2 Pij(s) , e wj ¢ ri ¢ e’ So e 2 Pj(s) So: Pij(s) µ Pi(s) Å Pj(s) 16 -Sep-21 131
Lemma Claim: PU(s) = Pi. U-{i}(s) Pij(s) = Pi(s) Å Pj(s) Pi. U-{i}(s) = PU(s) 16 -Sep-21 132
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) = Pi. U-{i}(s) Induct on number of operations 16 -Sep-21 QED 133
Corollaries For all states s, PU(s) is non-empty. The nerve complex N (P 0, …, Pn) is an n-simplex 16 -Sep-21 134
Main Theorem If P is a wait-free read-write protocol, Claim: Pi(¾) is (dim ¾)connected 16 -Sep-21 135
n-Connectivity is an Eventual Property n-connectivity has a critical state c P 0 Pn … 16 -Sep-21 136
Proof Overview Where P(c) not n-connected … P 0 But each P is n-connected. Pn i Will show each PU is (n-|U|+1)-connected … 16 -Sep-21 Nerve Lemma: P(c) is n-connected. Contradiction! 137
(n-|U|+1)connected? Proof Induction on n … Base case: when n=0, P(¾) is single vertex 16 -Sep-21 138
(n-|U|+1)connected? Proof 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 16 -Sep-21 because c is critical. 139
(n-|U|+1)connected? Proof 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 16 -Sep-21 induction hypothesis for n. 140
Nerve Lemma Application Each PU is (n-|U|+1)-connected … So P(c) is n-connected if and only if … N (P 0, …, Pm) is n-connected. But N(P 0, …, Pm) is an n-simplex … So P(c) is n-connected! Contradiction 16 -Sep-21 141
Conclusions Model-independent topological properties that prevent … consensus k-set agreement path-connectivity k-connectivity Model-specific application to wait-free read-write memory 16 -Sep-21 142
This work is licensed under a Creative Commons Attribution. Noncommercial 3. 0 Unported License. 143
- Slides: 143