View
222
Download
0
Category
Tags:
Preview:
Citation preview
Deriving an Algorithm for the Weak Symmetry Breaking Task
Armando Castañeda
Sergio Rajsbaum
Universidad Nacional Autónoma de México
This talk is about ...
0
00
1
112 2
2
1 0
2
Symmetric and chromatic subdivision
021
02 1
Chromatic and binary sphere
symmetric map that no mapno mapss on mono??
Symmetric: Faces same dim => same subdivision
All possible assignments of binary values
Symmetric map: Faces same dim => mapped
same binary colors
Exists subdivision s.t. map exists?
This talk is about ...
Impossible for dimension 1
0 1
0
0
1
1
w.l.o.g.
Since the map must be symmetric
The map does not exist for any subdivision
?
0
00
1
112 2
2
1 0
2
021
02 1
This talk is about ...
Impossible for dimension 2
Impossible for dimension 3, 4
Possible for dimension 5
Impossible for dimension 6, 7, 8
Possible for dimension 9
Possible for dim ndim n iff #faces#faces of nn-simple are
relatively prime
Does not exist for any subdivision
This talk is about ...
The relation with distributed computing:
If the subdivision exists for dimension nn then
There exists a distributed algorithm for n+1n+1 processors for the Weak Symmetry Breaking task
Does not exists for 2, 3, 4, 5 processors
Exists for 6 processors
MODEL OF COMPUTATION
• n+1 asynchronous processors with id’s 0, 1, ... n
. . .0 1 n
• n+1 asynchronous processors with id’s 0, 1, ... n
• shared memory with n+1 atomic registers
. . .
. . .0 1 n
writeatomic snapshot
• n+1 asynchronous processors with id’s 0, 1, ... n
• shared memory with n+1 atomic registers
• at most n processors can fail by crashing
. . .
. . .0 1 n
• n+1 asynchronous processors with id’s 0, 1, ... n
• shared memory with n+1 atomic registers
• at most n processors can fail by crashing
• wait-free algorithms: a correct processor cannot wait forever
. . .
. . .0 1 n
NO restriction on relative speeds
Many possible schedulings: order processes’ operations
WEAK SYMMETRY BREAKING (WSB)
WS B
output values: ,input values: id’s
WS B
output values: ,input values: id’s
WS B
output values: ,input values: id’s
Trivial algorithm: processors with even id decide and processors with odd id decide
Avoiding trivial solutions. Each processors can only do comparisons A > B? A = B? It does not know its id!!
This requirement implies symmetry on the outputs of executions with similar scheduling
Trivial algorithm: processors with even id decide and processors with odd id decide
Avoiding trivial solutions. Each processors can only do comparisons A > B? A = B? It does not know its id!!
This requirement implies symmetry on the outputs of executions with similar scheduling
0 1 2zzz???
Trivial algorithm: processors with even id decide and processors with odd id decide
Avoiding trivial solutions. Each processors can only do comparisons A > B? A = B? It does not know its id!!
This requirement implies symmetry on the outputs of executions with similar scheduling
0 1 2zzz ???
It has to decide the same!!
Results
• For some exceptional values of nn there is an algorithm for WSB for n+1n+1 processors
n+1
1...
n+1
2
n+1
nExceptional nn =
are relatively prime
• For the other values of nn there is no algorithm for WSB for n+1n+1 processors
nn = 5, 9, 11, 13, 14 ...
New upper and lower bounds
for renaming
TOPOLOGICAL REPRESENTATION ALGORITHM
FOR WSB
In 1993 it was discovered the deep relationship between topology and distributed computing
[Borowsky & Gafni 93][Herlihy & Shavit 93, 99]
[Saks & Zaharoglou 93, 00]
• Represent the global state of an execution of an algorithm as a simplex
• All executions are represented by a complex
Here we focus on WSB
0
00
0
1
11
1
2 2
2
2
The complex is a chromatic and binary colored subdivision of a proper colored simplex.
0
12
Initial state of the system
All possible executions
0
00
0
1
11
1
2 2
2
2
The complex is a chromatic and binary colored subdivision of a proper colored simplex. The more steps processors execute, the more fine the subdivision is
0
12
Initial state of the system
All possible executions
Simplex proper colored with id’s procs participate
Binary coloring = output value
solo executions
All processors participate
Two processors participate
0
00
0
1
11
1
2 2
2
2
The complex is a chromatic and binary colored subdivision of a proper colored simplex. The more steps processors execute, the more fine the subdivision is
0
12
0
00
0
1
11
1
2 2
2
2
The complex is a chromatic and binary colored subdivision of a proper colored simplex. The more steps processors execute, the more fine the subdivision is
0
12
Comparison requirement =>
symmetry on the boundary
For two i-faces s1, s2, there is a simplicial bijection from sub(s1) to sub(s2) that
preserves id coloring and binary coloring
0
00
0
1
11
1
2 2
2
2
The complex is a chromatic and binary colored subdivision of a proper colored simplex. The more steps processors execute, the more fine the subdivision is
0
12
NO monochromatic
simplexes of dimension n
Representation WSB algorithm: chromatic subdivision with a symmetric binary coloring
and no monochromatic n-simplexes
[Borowsky & Gafni 93, 97] [Herlihy & Shavit 93, 99] [Saks & Zaharoglou 93, 00] [Attiya & Rajsbaum 02]
If there exists an algorithm for WSB for n+1 processors then there exists a chromatic subdivision of dim n with a symmetric binary coloring and no monochromatic n-simplexes
Impossibility for WSB: for some n, symmetry => any such a subdivision contains monochromatic
If there exists a chromatic subdivision of dim n with a symmetric binary coloring and no monochromatic n-simplexes then there exists an algorithm for WSB for n+1 processors
Asynchronous Computability Theorem [Herlihy & Shavit 93, 99],Simplex Convergence Algorithm [Borowsky & Gafni 97]
Algorithm for WSB: for exceptional n, there are subdivision with symmetry and no monochromatic
DERIVING ALGORITHMS FOR WSB
Goal: For exceptional nn, construct a subdivision KK• chromatic • binary coloring• symmetric on the boundary• no monochromatic n-simplexes
n+1
1...
n+1
2
n+1
nExceptional nn =
are relatively prime
Key:
there exist integers ki‘s which satisfy the equation if and only if nn is exceptional
n+1
1+ ... +
n+1
2
n+1
n+ + 1 = 0k0 k1 kn-1
The construction in two steps:
1. Use these kkii’s to construct a symmetric subdivision KK with 0 monochromatic n-simplexes counted by orientation: x counted as +1 and x counted as –1
2. Cancel out the simplexes counted as +1 with the simplexes counted as –1 without modifying the boundary of KK
STEP 1: A SUBDIVISION WITH #mono#mono=0
The Chromatic Cone
1. Assume a symmetric boundary
2. Put a red monochromatic triangle at the center
3. Connect them
2
0
1
2 2 2
2
2
0
0
0
111
1
1
0
0
4. Each simplexes on bd with carrier of same dim, is connected to the face of the center that completes its id’s
Every corner produces a triangle
Every edge produces a triangle
If red monochromatic then red monochromatic
Only has red monochromatic n-simplexes
2
0
1
2 2 2
2
2
0
0
0
111
1
1
0
0
The Chromatic Cone
for i-faces s1, s2 => n-simplexes produced by isomorphic i-simplexes of sub(s1) and sub(s2) are counted in the same way (by orientation)
1. Construct KK by dimension: each proper i-face is appropriate subdivided such that it has kkii red-mono i-simplexes. All i-faces have the same subdivision (binary coloring is symmetric)
bd(bd(KK))
S
Step 1:
2. Once the boundary bd(bd(KK)) is done, do a chromatic cone with a red-mono simplex at the center
Not any subdivision with ki red mono i-simplexes worksEvery ki, it is possible to
construct the appropriate subdivision
There is a restriction for k0 but it is not a big problem
3. Orient KK such that simplex at the center is counted as +1
4. Count the number of monochromatic n-simplexes:
n-simplexes produced by one
sub(i-face)
# i-facessimplex at the
center
n+1
i +1i = 0
n - 1
#mono = 1 + sum ki = 0
By construction
The boundary induces the number of monochromatic simplexes!!Using Index Lemma => for any
pseudomanifold, the boundary induces #mono#monoFor a subdivision with a symmetric a binary coloring #mono #mono is
STEP 2: CANCELING SIMPLEXES +1 WITH –1
From step 1: symmetric subdivision K with #mono= 0#mono= 0 n-simplexes, counting by orientation
Goal: subdivision of K with NO mono n-simplexes andthe same boundary (to preserve symmetry)
Idea: algorithm to cancel out each mono counted as +1with a mono counted as –1
-1
-1
-1 +1
+1+1
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
-1
-1
-1 +1
+1+1
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
-1
-1 +1
+1
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
-1
-1 +1
+1
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
-1
+1
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
-1
+1
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
The algorithm works for any dimension n >= 2
Cancel out a simplex of KK counted as +1 with a simplex counted as –1 by subdividing a path which connects them
nn exceptional => subdivision K with no monochromatic => algorithm for WSB
The easiest case is when simplexes are adjacent
0 0
1
2
The easiest case is when simplexes are adjacent
0 0
1
2
2
1
The easiest case is when simplexes are adjacent
We did not modify the boundary
0 0
1
2
2
1
An example of a path of size 4
0
0
0
1 1
2
An example of a path of size 40
0
0
1 1
2
2
0
An example of a path of size 40
0
0
1 1
2
2
0
21
An example of a path of size 40
0
0
1 1
2
2
0
21
21
An example of a path of size 4
The boundary is the same
0
0
0
1 1
2
2
0
21
21
A path of size 6
A path of size 6
A path of size 6
A path of size 6
A path of size 6
A path of size 6
The algorithm takes the path and stretches it on the chromatic and binary sphere
The chromatic and binary sphere
Contains a proper colored n-simplex for every possible assignment of n+1n+1 binary values to the n+1n+1 colors
021
02 1
0
0
1
1
2
2
0
0
1
1
2
2
Example A
0 0
1
2
0
0
1
1
2
2
0 0
1
2
2
1
Example A
0 0
1
2
0
0
1
1
2
2
0 0
1
2
2
1
Example A
0 0
1
2
0 0
1
2
2
1
Example A
0 0
1
2 0
0
1
1
2
2
Example B
2
0
0
1
1 2
0 0
2
2 2
1
Example B
2
0
0
1
1 2
0 0
2
2 2
1
0 0
2
2 2
1
2
1
Example B
2
0
0
1
1 2
0 0
2
2 2
1
0 0
2
2 2
1
2
1
Example B
2
0
0
1
1 2
0 0
2
2 2
1
0 0
2
2 2
1
2
1
For a input path PP, #mono#mono is 0
The algorithm does not touch bd(P)bd(P), therefore #mono#mono ofsub(P)sub(P) is 0
Always exists a subdivision of PP that is mapped exactly0 times to the mono simplexes of the chromatic andbinary sphere BB
It makes a continuous transformation from PP to sub(P)sub(P)
The Algorithm:
+1
-1
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
+1
-1
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
The Algorithm:
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
+1
-1
-1 +1
The Algorithm:
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
3. Produce two paths of size smaller than or equal the size of original path
+1
-1
-1 +1
The Algorithm:
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
3. Produce two paths of size smaller than or equal the size of original path
4. Proceed recursively on resulting paths
+1
-1
-1 +1
The Algorithm:
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
3. Produce two paths of size smaller than or equal the size of original path
4. Proceed recursively on resulting paths
+1
-1
-1 +1 -1-1 +1+1
The Algorithm:
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
3. Produce two paths of size smaller than or equal the size of original path
4. Proceed recursively on resulting paths
-1
+1 -1 +1+1+1 -1
-1
The Algorithm:
1. Inspect shared (n-1)-faces from the beginning to find a subdividing point
2. Subdivide a shared (n-1)-face to produce two red-mono n-simplexes counted as +1 and –1
3. Produce two paths of size smaller than or equal the size of original path
4. Proceed recursively on resulting paths
The Algorithm:
Subdividing point:Notation for a path
S0 – S1 – S2 – ... – Sq-1 – Sq
Red-mono counted as +1 and -1
No mono
For Si – Si+1, Si,i+1 is the (n-1)-face shared by Si and Si+1
The subdividing point is the smallest m such that #red(Sm+1,m+2) >= n+1-m
The subdividing point m is like the middle of the path
+1
-1
P1
+1
P1
-1
P2Shortest path P2
that completes P1, | P1 | = | P2 |
In the middle we can produce paths of
size smaller than or equal original
• Once the algorithm finds the subdividing point, there are 6 cases
• Each case is tailor-made subdivided
• For 4 cases algorithm produces paths of size smaller than the original path
• For 2 cases algorithm produces a path of size equal than the original
• When a resulting paths is of size equal to the input, paths of size smaller on the next recursively invocation
Same size as the input
Conclusions
1. WSB task: processors decide red or blue. If all processors participate, not all decide the same value. Comparison based algorithms
2. Relation distributed computing and topology => there is a chromatic subdivision of an n-simplex with a symmetric binary coloring and no monochromatic n-simplexes iff there is an algorithm for WSB for n+1 processors
Conclusions
3. For non-exceptional nnon-exceptional n, there is no algorithm for WSB for n+1n+1 processors
4. For exceptional nexceptional n, there exists an algorithm for WSB for n+1n+1 processor
a) chromatic subdivision KK with a symmetric binary coloring and #mono#mono = 0
b) Subdivision of KK with the same boundary and no monochromatic n-simplexes
The end
Recommended