manifold protocols texpoint fonts used in emf. read the texpoint manual before you delete this box.:...
TRANSCRIPT
Manifold Protocols
Companion slides forDistributed Computing
Through Combinatorial TopologyMaurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum
2
Kinds of Results
Impossibility
Separation
Task T cannot be solvedin model M
Task T can be solved by a protocol for T’, but not vice-versa
Distributed Computing Through Combinatorial Topology
3
Road MapManifolds
Sperner’s Lemma and k-Set Agreement
Immediate Snapshot Model
Weak Symmetry-Breaking
Separation results
Distributed Computing Through Combinatorial Topology
4
Road MapManifolds
Sperner’s Lemma and k-Set Agreement
Immediate Snapshot Model
Weak Symmetry-Breaking
Separation results
Distributed Computing Through Combinatorial Topology
5
Simplicial Complex
Distributed Computing Through Combinatorial Topology
6
Manifolds
Every (n-1)-simplex aface of two n-simplexes
Distributed Computing Through Combinatorial Topology
7
Manifolds
Every (n-1)-simplex aface of two n-simplexes
technically, a pseudo-manifold
Distributed Computing Through Combinatorial Topology
8Distributed Computing Through Combinatorial Topology
Manifold with BoundaryInternal (n-1)-simplex aface of two n-simplexes
Boundary (n-1)-simplex aface of one n-simplex
Boundary C
Distributed Computing Through Combinatorial Topology
9
Why Manifolds?
Nice combinatorial properties
Many useful theorems
Easy to prove certain claims
True, most complexes are not manifolds ….
Still a good place to start.
10
Road MapManifolds
Sperner’s Lemma and k-Set Agreement
Immediate Snapshot Model
Weak Symmetry-Breaking
Separation results
Distributed Computing Through Combinatorial Topology
Distributed Computing Through Combinatorial Topology
11
Immediate Snapshot Executions
Restricted form of Read-Write memory
Protocol complexes are manifolds
(Equivalent to regular R-W memory)But we will not prove it yet.
Distributed Computing Through Combinatorial Topology
0 0 0
1
Write
Single-writer, multi-reader variables12
Distributed Computing Through Combinatorial Topology
1 0 0
100Snapshot
Single-writer, multi-reader variables13
Distributed Computing Through Combinatorial Topology
14
Immediate Snapshot Executions
Pick a set of processes
write together
snapshot together
Repeat with another set
Example Executions
P Q R
write
snap
write
snap
write
snap
P?? PQ? PQR
15
Each process writes, then takes snapshot
Each process has a view
time
Distributed Computing Through Combinatorial Topology
Example Executions
P Q R
write
snap
write write
snap snap
write
snap
P?? PQR PQR
16
Moving last processone round earlier,
Changes this view from PQ? to PQR
P Q R
write
snap
write
snap
write
snap
P?? PQ? PQR
Distributed Computing Through Combinatorial Topology
P Q R
write write write
snap snap snap
write write
snap snap
PQR PQR PQR
P Q R
write write write
snap snap snap
write write
snap snap
PQR PQR PQR
P Q R
write
snap
write write
snap snap
write
snap
P?? PQR PQR
Example Executions
17
Moving last processesone round earlier,
Changes this view from P?? to PQRDistributed Computing Through
Combinatorial Topology
Distributed Computing Through Combinatorial Topology
18
Protocol ComplexProcess (color)
& view
Distributed Computing Through Combinatorial Topology
19
Protocol ComplexP Q R
write
snap
write
snap
write
snap
P Q R
write write write
snap snap snap
P Q R
write
snap
write write
snap snap
20
Standard Chromatic Subdivision
Distributed Computing Through Combinatorial Topology
Distributed Computing Through Combinatorial Topology
21
Vertex (Pi, ¾i)
Combinatorial Definition (I)
Process name view ¾i µ ¾
Input simplex ¾
Protocol complex Ch(¾)
Distributed Computing Through Combinatorial Topology
22
Combinatorial Definition (II)
Each process's write appears in its own view
Pi 2 names(¾i).
Snapshots are ordered
¾i µ ¾j or vice-versa
Each snapshot ordered immediately after writeif Pi 2 names(¾j), then ¾i µ ¾j.
If Pj saw Pi write … then Pj‘s snapshot not later than Pj‘s.
Distributed Computing Through Combinatorial Topology
23
Manifold Theorem
If the input complex I is a manifold …
Distributed Computing Through Combinatorial Topology
24
Manifold Theorem
… so is the immediate snapshot protocol complex Ch(I).
Distributed Computing Through Combinatorial Topology
25
Proof of Manifold Theorem
Let ¿n-1 be an (n-1)-simplex of Ch(I).
Must prove that ¿n-1 is a face of exactly one or two n-simplexes of Ch(I).
Distributed Computing Through Combinatorial Topology
26
Without Loss of Generality …
¿n¡ 1 = fhP0;¾0i ; : : :;hPn¡ 1;¾n¡ 1ig
Simplex of I seen by last process
Where ¾i µ ¾i+1 for 0 · i < n
Re-index processes in execution order(ignoring ties)
Distributed Computing Through Combinatorial Topology
27
Proof Strategy
Count the ways we can extend…
Where ¾n is an n-simplex of Ch(¾)
¿n-1 = {(P0, ¾0), …, (Pn-1, ¾n-1)}
¿n = {(P0, ¾0), …, (Pn-1, ¾n-1i, (Pn, ¾n)}
Distributed Computing Through Combinatorial Topology
28
Cases
¿n¡ 1 = fhP0;¾0i ; : : :;hPn¡ 1;¾n¡ 1ig
dim n-1 or dim n
Boundary or internal
3 cases
Distributed Computing Through Combinatorial Topology
29
¿ n-
1
¾n-
1
¿n¡ 1 = fhP0;¾0i ; : : :;hPn¡ 1;¾n¡ 1ig Boundary(n-1)-simplex
Case One
Distributed Computing Through Combinatorial Topology
30
Exactly one n-simplex ¾ of I contains ¾n-1
¾
¾n-
1
¿n-1
Case One
Distributed Computing Through Combinatorial Topology
31
Exactly one n-simplex ¿n of Ch(I) contains ¿n-1
¿n = ¿n-1 [ hPn, ¾i
¾
Case One
Distributed Computing Through Combinatorial Topology
32
¿n-1
¾n-1
¿n¡ 1 = fhP0;¾0i ; : : :;hPn¡ 1;¾n¡ 1ig Internal(n-1)-simplex
Case Two
Distributed Computing Through Combinatorial Topology
33
Exactly two n-simplexes ¾0 & ¾1 of I contain
¾n-1
¾0
¾1
Case Two
Distributed Computing Through Combinatorial Topology
34
Exactly 2 n-simplexes ¿0n & ¿1
n of Ch(I) contain ¿n-1
¿n0 = ¿n-1 [ hPn, ¾0i
¿n1 = ¿n-1 [ hPn, ¾1i
¾0
¾1
Case Three
Distributed Computing Through Combinatorial Topology
35
¿n-1
¾n-1
¿n¡ 1 = fhP0;¾0i ; : : :;hPn¡ 1;¾n¡ 1ig n-simplexCase Three
36
Suppose
Pn 2 names(¾k)(Pk saw Pn’s write)
Pn names(¾k-1)(Pk-1 did not see Pn’s write)
Special case: k=0, ¾-1 = ;
¾n µ ¾k)
¾k-1 ½ ¾n)
Either ¾k-1 ½ ¾n ½ ¾k or ¾k-1 ½ ¾n = ¾k
Case Three
Distributed Computing Through Combinatorial Topology
37
Pk-1 did not see Pn
Pk did see Pn
Pn between Pk-1 & Pk
Pn with Pk
This completes the proof.
Case Three
Distributed Computing Through Combinatorial Topology
38
Manifold Protocols
A protocol M(I) is a manifold protocol if
If I is a manifold, so is M(I)
M(I) = M(I).
Example: immediate snapshot
Important: closed under composition
39
Road MapManifolds
Sperner’s Lemma and k-Set Agreement
Immediate Snapshot Model
Weak Symmetry-Breaking
Separation results
Distributed Computing Through Combinatorial Topology
40
k-set Agreement: before
32 19
21
40
19 19
21
41
k-set Agreement: after
k = 2Distributed Computing Through
Combinatorial Topology
Distributed Computing Through Combinatorial Topology
42
Theorem
No Manifold Protocol can solve n-set agreement
Including Immediate SnapshotIncluding read-write memory
43
Sperner Coloring
Distributed Computing Through Combinatorial Topology
44
Sperner Coloring
Distributed Computing Through Combinatorial Topology
“Corners” have distinct colors
45
Sperner Coloring
Distributed Computing Through Combinatorial Topology
Edge vertexes have corner colors
“Corners” have distinct colors
46
Sperner Coloring
Distributed Computing Through Combinatorial Topology
Edge vertexes have corner colors
“Corners” have distinct colors
Every vertex has face boundary colors
47
Sperner’s Lemma
Distributed Computing Through Combinatorial Topology
In any Sperner coloring, at least one n-simplex has all n+1 colors
48
Sperner Coloring for Manifolds with Boundary (base)
One color hereOther color here
Only those colors in interior
Distributed Computing Through Combinatorial Topology
49
Sperner Coloring for Manifolds with Boundary (inductive)
M is n-manifold colored with ¦
M = [i Mi
Where Mi is non-empty (n-1)-manifold Sperner-colored with ¦ n {i }
Distributed Computing Through Combinatorial Topology
50
Sperner’s Lemma for Manifolds
Distributed Computing Through Combinatorial Topology
M
Odd number of n-simplexes have all
n+1 colors
Sperner Coloring on Manifold
M
51
Proof of Sperner’s Lemma
Induction on nBase
One color hereOther color here
Odd number of changesDistributed Computing Through
Combinatorial Topology
52
Induction Step
Distributed Computing Through Combinatorial Topology
53
Dual Graph
One vertex per n-simplex …
Distributed Computing Through Combinatorial Topology
54
Dual Graph
One vertex per n-simplex …
One “external” vertex
Distributed Computing Through Combinatorial Topology
55
Discard One Color
n+1 colors
“restricted”n colors
Distributed Computing Through Combinatorial Topology
56
Edges
If two n-simplexes share an (n-1)-face …with restricted n colors …
add an edge.
Distributed Computing Through Combinatorial Topology
57
Edges
Same for external vertex
Distributed Computing Through Combinatorial Topology
58
Some Vertexes have Degree Zero
Even degreeDistributed Computing Through
Combinatorial Topology
59
Some Vertexes have Degree Two
Even degree
Only n restricted colors
Distributed Computing Through Combinatorial Topology
60
All n+1 Colors ) Degree 1
Odd degreeDistributed Computing Through
Combinatorial Topology
61
Induction Hypothesis
Odd number of n-colored simplexes
Distributed Computing Through Combinatorial Topology
62
Induction Hypothesis
External vertex has odd degree
Distributed Computing Through Combinatorial Topology
63
OddDegrees
One external vertex
Even
n-simplexes with n+1 colors?
All the rest
Distributed Computing Through Combinatorial Topology
64
OddDegrees
One external vertex
Even
n-simplexes with n+1 colors?
All the rest
Every graph
Even number of odd degree vertexes
sum of degrees is even…each edge contributes 2
Distributed Computing Through Combinatorial Topology
65
OddDegrees
One external vertex
Even
n-simplexes with n+1 colors?
All the rest
Even number of odd degree vertexes
Distributed Computing Through Combinatorial Topology
66
Parity
One external vertex
Even number of odd degree vertexes
n-simplexes with n+1 colors?Even
Odd
Odd
Distributed Computing Through Combinatorial Topology
67
Parity
One external vertex
Even number of odd degree vertexes
n-simplexes with n+1 colors?Even
Odd
Odd
QEDDistributed Computing Through
Combinatorial Topology
68
No Manifold Task can solve n-Set Agreement
Assume protocol exists: Run manifold task protocol
Choose value based on vertex
Idea:Color vertex with “winning”
process name …
Distributed Computing Through Combinatorial Topology
69Distributed Computing Through Combinatorial Topology
Manifold Task for n-Set Agreement
manifold
Only P wins
Only Q and R win
Sperner coloring
70
Manifold Task for n-Set Agreement
manifold
Sperner coloring
Distributed Computing Through Combinatorial Topology
71
Manifold Task for n-Set Agreement
manifold
Sperner coloring
n+1 colors
Contradiction: at most n can win
Execution with n+1 winners
Distributed Computing Through Combinatorial Topology
72
Road MapManifolds
Sperner’s Lemma and k-Set Agreement
Immediate Snapshot Model
Weak Symmetry-Breaking
Separation results
Distributed Computing Through Combinatorial Topology
Distributed Computing Through Combinatorial Topology
73
Weak Symmetry-Breaking
Group 0 Group 1
If all processes participate …
At least one process in each group
Distributed Computing Through Combinatorial Topology
74
Weak Symmetry-Breaking
Group 0 Group 1
If fewer participate …
we don’t care.
75
Anonymous Protocols
Trivial solution: choose name parity
WSB protocol should be anonymous
Output depends on …Input …Interleaving …
But not name
Restriction on protocol, not task!
76
Road MapManifolds
Sperner’s Lemma and k-Set Agreement
Immediate Snapshot Model
Weak Symmetry-Breaking
Separation results
77
Next Step
Construct manifold task that solves weak-symmetry-breaking
Because it is a manifold, it cannot solve n-set agreement
Separation: n-set agreement is harder than WSB
Distributed Computing Through Combinatorial Topology
78
A Simplex
Distributed Computing Through Combinatorial Topology
79
Standard Chromatic Subdivision
Distributed Computing Through Combinatorial Topology
80
Glue Three Copies Together
Distributed Computing Through Combinatorial Topology
81
Glue Opposite Edges
Distributed Computing Through Combinatorial Topology
82
The Moebius Task
Distributed Computing Through Combinatorial Topology
83
Defines a Manifold Task
Distributed Computing Through Combinatorial Topology
boundary boundary
boundary
84
Manifold Task
Distributed Computing Through Combinatorial Topology
Note Sperner coloring on boundary
boundary boundary
boundary
85
Terminology
Distributed Computing Through Combinatorial Topology
Each face has a central simplex
1-dim
2-dim
86
Subdivided Faces
Distributed Computing Through Combinatorial Topology
external
internalinternal
87
Black-and-White Coloring (I)
Distributed Computing Through Combinatorial Topology
Central 2-simplex:
White near external face
Black elsewhere
88
Black-and-White Coloring (II)
Distributed Computing Through Combinatorial Topology
Black
Central simplexof external face:
89
Black-and-White Coloring (III)
Distributed Computing Through Combinatorial Topology
All others
White
90
Moebius Solves WSB
Distributed Computing Through Combinatorial Topology
91
Moebius Solves WSB
Distributed Computing Through Combinatorial Topology
92
Moebius Solves WSB
Distributed Computing Through Combinatorial Topology
Every n-simplex has both black & white colors.
Boundary coloring is symmetric!
93
General Construction
n+1 “copies” »0, … »n of Ch(¾)
»0 »n…
»1
(picture not exact!)
n = 2N
Distributed Computing Through Combinatorial Topology
94
General Construction
»0 »i-1…
n = 2N»i
»i+1
Face i is external
»k… …
»n
Distributed Computing Through Combinatorial Topology
95Distributed Computing Through Combinatorial Topology
General Construction
»0 »i-1…
n = 2N»i
»i+1
Face i is external
»k… …
»n
2N others
96Distributed Computing Through Combinatorial Topology
General Construction
»0 »i-1…
n = 2N»i
»i+1 »k… …
»n
Identify Faces j
Rank j+N out of 2N
Face i is external
97Distributed Computing Through Combinatorial Topology
General Construction
»0 »i-1…
n = 2N»i
»i+1 »k… …
»n
Symmetric!
Rank j+N out of 2N
Face i is external
Why it’s a(non-orientable)
manifold Why it works only for even dimensions
98
Open Problem
Generalize to odd dimensions …
or find counterexample.
Distributed Computing Through Combinatorial Topology
99
Black-and-White Coloring (I)
Distributed Computing Through Combinatorial Topology
Central n-simplex:
White near external face
Black elsewhere
100
Black-and-White Coloring (II)
Distributed Computing Through Combinatorial Topology
Black
Central m-simplexes
of external face for m > 0
101
Black-and-White Coloring (III)
Distributed Computing Through Combinatorial Topology
All others
White
102
No Monochromaticn-simplexes
Distributed Computing Through Combinatorial Topology
Central n-simplexBy construction
103
No Monochromaticn-simplexes
Distributed Computing Through Combinatorial Topology
Intersects internal face Black at n-center
White at edge
104
No Monochromaticn-simplexes
Distributed Computing Through Combinatorial Topology
Intersects external face White at n-center
Black at m-center, 0 < m < n
105
Progress
Distributed Computing Through Combinatorial Topology
Weak Symmetry-Breaking
Moebius Taskno
yes
Set Agreement
106
Next Step
Distributed Computing Through Combinatorial Topology
Weak Symmetry-Breaking
Moebius Taskno
yes
Anonymous Set Agreement
Distributed Computing Through Combinatorial Topology
107
Group 1
Choose name with anonymous
n-Set agreement
My namewritten? Group 0
no
· n+1
Write name
Read names
yes
Set Agreement WSB
Distributed Computing Through Combinatorial Topology
108
Choose name with anonymous
n-Set agreement
Proof
Group 1
My namewritten? Group 0
no
· n+1
Write name
Read names
yes
Set Agreement WSB
If all n+1 participate …First name written
joins Group 0Some name not chosen, it joins
Group 1
Distributed Computing Through Combinatorial Topology
109
Choose name with anonymous
n-Set agreement
Proof
Group 1
My namewritten? Group 0
no
· n+1
Write name
Read names
yes
Set Agreement WSB
Protocol is anonymous …Because we use anonymous
set agreement “black box”(Any set agreement protocol can be
made anonymous)
110
Conclusions
Some tasks harder than others …
n-set agreement solves weak-symmetry breaking
But not vice-versa
Distributed Computing Through Combinatorial Topology
111
Remarks
Combinatorial and algorithmic arguments complement one
anotherCombinatorial: what we can’t do
Algorithmic: what we can do
Distributed Computing Through Combinatorial Topology
112
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