Classification of Loop Agreement Tasks

University of Regensburg
Faculty of Mathematics
Classification of Loop Agreement Tasks
Bachelor Thesis
in Computational Science
Johannes Prem
Supervisor: Prof. Dr. Clara Löh
Version of
April 7, 2015
Contents
1 Introduction and Basics
1.1 Motivation and Notation . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Simplicial Complexes . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Distributed Computing via Combinatorial Topology
2.1 Mathematical Framework . . . . . . . . . . . . . . . .
2.2 Interpretation of the Model . . . . . . . . . . . . . . .
2.3 Examples: Set Agreement and Barycentric Agreement
2.4 Implements-Relation on Tasks . . . . . . . . . . . . . .
4
4
5
.
.
.
.
9
9
13
15
16
3 Loop Agreement Tasks
3.1 Definition and Examples . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Topological Aspects . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Classification and Consequences . . . . . . . . . . . . . . . . . . . .
18
18
20
24
4 Two-dimensional Pseudomanifolds
4.1 Classification of Finite Two-dimensional Pseudomanifolds . . . . .
4.2 Implementation in Haskell . . . . . . . . . . . . . . . . . . . . . . .
4.3 Loop Agreement Tasks on Two-dimensional Pseudomanifolds . . .
27
27
30
35
Bibliography
39
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
1 Introduction and Basics
1.1 Motivation and Notation
Usually, topology is considered a branch of “pure mathematics” which has the reputation of not being particularly useful in other fields than mathematics itself. In this
thesis, however, we use topological methods for a theoretical model of distributed
computing, especially so called loop agreement tasks. Distributed computing is the
study of writing programs that run simultaneously on multiple processing units,
which communicate through a given network protocol. Often it is a complex problem to decide whether a given task can be solved under certain preconditions
depending on the hardware environment and the constrains imposed by the communication protocol. To answer this question for some cases, we define and employ
an abstract model of distributed computing in Chapter 2, using simplicial complexes and so called carrier maps (which are a generalization of simplicial maps).
Here we follow Herlihy et al. [3] and adopt their definitions found in Chapter 4
of their book. Then we describe loop agreement tasks and establish a link to the
fundamental group of a space. The corresponding classification result of Chapter 3
is taken from Herlihy et al. [3, Ch. 15][4], but our approach and proof will be a
bit different. In the last chapter we investigate how the preceding material can
be applied to loop agreement tasks living on (two-dimensional) pseudomanifolds,
accompanied by an implementation in Haskell.
The tasks and protocols (i. e. distributed programs) captured by our simplicial
complex model are subject to the following real world conditions and properties:
Most importantly, the processes run asynchronously, that is, a process cannot wait
for another process. It has to do its computation in a finite number of steps with
whatever information it got up to that point. Therefore, such programs are called
wait-free. This also includes the problem of “crashed processes” (processes that
halted prematurely, e. g. due to a hardware malfunction) because in a wait-free
computation a process cannot know how many other processes are still running.
Secondly, tasks are colorless, which means that it is irrelevant which process has
which input (respectively output) value, only the set of input (respectively output)
values is considered. And lastly, the communication between processes happens
through shared memory, every outgoing communication of a process consists of
“everything it knows” and reading the memory always happens as an atomic snapshot. The method of communication does not actually affect our model, but Herlihy
et al. [3] develop their theory of colorless layered immediate snapshot protocols and
4
protocols that can be built from those around the above assumptions, so we include the latter to justify our use of so called barycentric agreement protocols in
the following.
We get back to the model and its interpretation in Chapter 2, but we will not
go into much more detail concerning the technical terms mentioned above. More
explanations on those terms in the context of distributed computing and how they
relate to the mathematical model can be found in the book by Herlihy et al. [3], a
paper by Herlihy and Shavit [5], and a paper by Herlihy and Rajsbaum [4].
Throughout this thesis, we use the following notation and conventions:
– We write ⊂ for “subset or equal” and ( for “proper subset”.
S
– For a set of sets A, the symbol S A denotes the union over all elements
of A, also commonly written as B∈A B.
– The natural numbers N include 0.
– A “map” between topological spaces always means “continuous map”, unless stated otherwise.
– We identify the 1-sphere S 1 with the space [0, 1]/{0, 1}.
1.2 Simplicial Complexes
Since our mathematical model for distributed computing fundamentally relies on
simplicial complexes, the following contains a brief review of the basic definitions
and properties used in this thesis. We include it for the sake of completeness but not
to replace an introduction on the topic by a good text book. References for further
reading are, for example, Munkres [6, §1 ff. and §14 ff.], Fritsch and Piccinini [2,
Ch. 3] or Spanier [8, Ch. 3].
Definition 1.1 ((abstract) simplicial complex).
– Let V be a set and let K be a subset of the powerset of V . The pair (V, K)
is an (abstract) simplicial complex if every element of K is a finite set, K is
closed under taking subsets (i. e. for all F ∈ K and F 0 ⊂ F we have F 0 ∈ K)
and K contains all singleton subsets of V (i. e. for all v ∈ V we have {v} ∈ K).
– Let (V, K) be a simplicial complex. An element v of V is a vertex of K. An
element F of K is a simplex (of K), dim(F ) := |F | − 1 ∈ N ∪ {−1} is its
dimension, and each subset of F is called a face of F . A simplex of dimension n
is also called an n-simplex.
– The dimension of (V, K) is
dim(K) := max dim(F ) ∈ N ∪ {−1, ∞}
F ∈K
whenever K 6= ∅ and −2 otherwise.
5
– The simplicial complex (V, K) is called finite if |K| is finite.
– A subcomplex of (V, K) is a simplicial complex (V 0 , K 0 ) such that V 0 ⊂ V and
K 0 ⊂ K. For k ∈ N the subcomplex
V, {F ∈ K | dim(F ) 6 k}
of (V, K) is the k-skeleton of (V, K), which we denote by (V, K)6k .
– Let F be a simplex of K. Then K(F ) denotes the subcomplex of (V, K) de0
0
:=
termined by F and its faces, i. e. K(F
S ) S (F, {F | F ⊂ F }). Similarly, for a
subset A ⊂ K, we define K(A) := ( A, F ∈A K(F )).
Convention 1.2.
Instead of (V, K) we S
mostly speak of a simplicial complex K
where it is understood that V (K) := V = K.
Definition 1.3 (simplicial map). Let K, L be simplicial complexes. A simplicial
map f : K → L is a map f : V (K) → V (L) such that simplices of K are taken to
simplices of L, i. e. for F ∈ K we have f (F ) ∈ L.
Definition 1.4 (category of simplicial complexes).
Simplicial complexes together with simplicial maps (and usual function composition) form a category Simp.
For n ∈ N ∪ {−1} we also denote its full subcategory of n-dimensional simplicial
complexes by Simpn .
Example 1.5 (standard simplex (as a complex)).
standard simplex is
∆n := {0, . . . , n}.
Let n ∈ N. The n-dimensional
The standard simplex ∆n together with all subsets thereof forms a simplicial complex, which (by abuse of notation) we also denote by ∆n (the meaning will be clear
from the context). We write ∂∆n for the (n−1)-skeleton of ∆n .
Definition 1.6 (geometric standard simplex).
Let n ∈ N. The n-dimensional
geometric standard simplex is the convex hull of the unit vectors in Rn+1 (with the
subspace topology):
∆ngeo := conv(e0 , . . . , en ) ⊂ Rn+1 .
For J ⊂ {0, . . . , n} the subspace conv({ej | j ∈ J}) of ∆ngeo is called a face of ∆ngeo .
:= ∅ for convenience.
We also set ∆−1
geo
6
Definition 1.7 (geometric realization).
– Let K be a simplicial complex. The geometric realization of K is the topological
space
a
)
kKk :=
∆dim(F
∼,
geo
F ∈K
where ∼ is the equivalence relation generated by the obvious gluing of faces
that is encoded in K. For a vertex v and a simplex F of K we denote by kvk
and kF k the corresponding point and subspace of kKk, respectively (i. e. the
image (point) under the canonical inclusion followed by the S
quotient map).
Consequently, for a subcomplex K 0 ⊂ K we write kK 0 k for {kF 0 k | F 0 ∈
K 0 } ⊂ kKk. For x ∈ kKk the (unique) simplex F of K such that the “interior”
of kF k contains x is supp(x) = F where by interior we mean the image in kF k
) in Rdim(F )+1 .
of the relative interior of ∆dim(F
geo
– Let K, L be simplicial complexes and let f : K → L be a simplicial map. Then
kf k : kKk → kLk
is the continuous map obtained from f by affine extension to each simplex.
More explicit definitions and explanations of geometric realizations can be found
in the references mentioned at the beginning of this section.
Definition 1.8 (triangulation). Let X be a topological space. Then X is triangulable if there exists a simplicial complex K and a homeomorphism f : kKk → X.
Such a pair (K, f ) is then called a triangulation of X and we say that X is triangulated by K or that K triangulates X.
Definition 1.9 (barycentric subdivision).
Let K be a simplicial complex. The
(first) barycentric subdivision of K is the simplicial complex
sd K := {F1 , . . . , Fk } ⊂ K k ∈ N, F1 ( · · · ( Fk .
We set sd0 K := K, sd1 K := sd K and for N ∈ N>2 we define recursively sdN K :=
sd(sdN −1 K), the N -th barycentric subdivision of K.
Proposition 1.10 (geometric barycentric subdivision).
complex.
– There exists a homeomorphism
Let K be a simplicial
βK : ksd Kk → kKk,
given by the affine extension to each geometric simplex of the following map
k(sd K)60 k → kKk: for a vertex v of sd K, which is a simplex of K, say v =
F ∈ K, the point kvk ∈ ksd Kk is mapped to the barycenter of kF k ⊂ kKk.
7
– In particular, the above homeomorphism induces a homeomorphism
N
βK
: ksdN Kk → kKk
0 := id
for all N ∈ N>1 , and for convenience, we set βK
kKk .
A proof can be found in the book by Fritsch and Piccinini [2, Proposition 3.3.16].
Definition 1.11 (simplicial approximation).
Let K, L be simplicial complexes
and let fgeo : kKk → kLk be continuous. A simplicial map f : K → L is a simplicial
approximation to fgeo if supp(kf k(x)) is a face of supp(fgeo (x)) for all x ∈ kKk.
Theorem 1.12 (simplicial approximation theorem). Let K, L be finite simplicial
complexes and let fgeo : kKk → kLk be continuous. Then there exists an N ∈ N
and a simplicial map f : sdN K → L such that f is a simplicial approximation to
N : ksdN Kk → kLk.
fgeo ◦ βK
See, for example, Munkres [6, Theorem 16.1] or Bredon [1, Theorem 22.10].
Lemma 1.13 (inclusion of subcomplex is cofibration).
Let K be a simplicial
complex and let K 0 be a subcomplex of K. Then kK 0 k ,→ kKk is a cofibration.
See, for example, Spanier [8, Ch. 3, Sec. 2, Corollary 5].
8
2 Distributed Computing via
Combinatorial Topology
Based on the combinatorial description of (sufficiently well-behaved) topological
spaces by simplicial complexes we can define and (briefly) explain our model for
distributed tasks and protocols that solve tasks. We give the strict mathematical
definitions first and explain their interpretation in the context of distributed computing afterwards.
2.1 Mathematical Framework
The following definitions rely on an additional type of map that is operating on
simplicial complexes and that is more flexible than simplicial maps:
Definition 2.1 (carrier map).
Let K, L be simplicial complexes.
– A carrier map Φ : K → L is a monotonic map
Φ : K → {L0 | L0 ⊂ L is a subcomplex},
where both sets are partially ordered by inclusion. More explicitly: For simplices F 0 ⊂ F in K we require Φ(F 0 ) ⊂ Φ(F ) as subcomplexes of L.
– For the rest of this definition, let Φ : K → L be a carrier map. Then Φ is strict
if it satisfies
Φ(F ∩ F 0 ) = Φ(F ) ∩ Φ(F 0 )
for all simplices F, F 0 ∈ K.
– For A ⊂ K the subcomplex
Φ[A] :=
[
Φ(A)
of L is the image complex of A under Φ and we call the complex Φ[K] simply
the image complex of Φ.
– Let Ψ : L → M be another carrier map. Then the composition of Φ and Ψ is
defined by
(Ψ ◦ Φ)(F ) := Ψ[Φ(F )]
for all F ∈ K (which is a carrier map K → M ).
9
Note: While we say “carrier map K → L”, the codomain of a carrier map is not
actually L (but the set of subcomplexes of the latter).
Examples 2.2.
examples.
See Figure 2.1 for graphical representations of the following
(a) Let
L := {0, 2, 3}, {0, 1}, {1, 2}, {0, 3}, {2, 3}, {2, 4},
{0}, {1}, {2}, {3}, {4}, ∅
and let
K := L
{0, 1}, {1, 2}, {0, 3}, {2, 3}
.
Let
Φ1 (F ) := L(F )
for all F ∈ K \ {0, 3} and let
Φ1 ({0, 3}) := L({0, 2, 3}).
Then Φ1 is a carrier map K → L. It is not strict because
Φ1 {0, 3} ∩ {2, 3} = L({3}) ( L({2, 3}) = Φ1 ({0, 3}) ∩ Φ1 ({2, 3}).
The image complex of Φ1 is
Φ1 [K] = L \ {2, 4}, {4} .
(b) Let
Φ2 (F ) := ∆2 (F )
for all F ∈ ∆2 \ {1} and let
Φ2 ({1}) := ∆2 .
Then Φ2 is not a carrier map ∆2 → ∆2 because is is not monotonic: we have
Φ2 ({1}) = ∆2 6⊂ ∆2 ({0, 1}) = Φ2 ({0, 1})
although {1} ⊂ {0, 1}.
(c) Let T be the complex from Figure 2.1; it is well known that it triangulates
the torus S 1 × S 1 . We define Φ3 : ∆2 → T as follows:
∅ 7→ {∅}
{0, 1} 7→ T ({3, 5})
{0} 7→ T ({3})
{1, 2} 7→ T ({{5, 9}, {9, 1}})
{1} 7→ T ({5})
{0, 2} 7→ T ({1, 3})
{2} 7→ T ({1})
{0, 1, 2} 7→ T .
It is easy to see that Φ3 is indeed a carrier map, that it is strict and that its
image complex is T .
10
3
2
3
2
Φ1
K
0
4
1
0
1
2
2
Φ2
∆2
0
L
∆2
1
0
1
1
2
3
1
2
Φ3
∆2
9
9
T
5
0
5
1
1
2
3
1
Figure 2.1: Examples of carrier maps, see also Examples 2.2
11
In addition to the composition of carrier maps we can also define how to compose
carrier maps with simplicial maps from both sides. To do that properly, we need
Definition 2.3 (image complex under a simplicial map).
For a simplicial map
0
f : K → L and a subcomplex K of K we call the subcomplex
f [K 0 ] := {f (F ) | F ∈ K 0 }
of L the image complex of K 0 under f .
Definition 2.4 (composition of carrier maps with simplicial maps). Let K1 to K4
be simplicial complexes, let Φ : K2 → K3 be a carrier map, and let f : K1 → K2
and g : K3 → K4 be simplicial maps. We define the carrier maps Φ ◦ f : K1 → K3
and g ◦ Φ : K2 → K4 as follows:
(Φ ◦ f )(F ) := Φ(f (F )) and (g ◦ Φ)(F 0 ) := g[Φ(F 0 )]
for all F ∈ K1 , F 0 ∈ K2 .
We are now ready to define our main objects of interest, namely tasks and
protocols as well as the concept of task solving.
Definition 2.5 (task and protocol).
Let I, O, P be simplicial complexes.
– A task is a carrier map Φ : I → O. We call I and O the input and output
complex, respectively.
– A protocol is a strict carrier map Ξ : I → P where P is the image complex
of Ξ. We call I and P the input and protocol complex, respectively.
Convention 2.6 (the (−1)-simplex).
Our definition of a simplicial complex
ensures that it always includes the (−1)-simplex (i. e. the empty simplex) whenever
the complex is not empty itself. In the context of tasks and protocols, however,
the empty simplex does not have a useful interpretation (see the next section).
Therefore, we employ the following rules for dealing with the (−1)-simplex.
– Unless mentioned otherwise, a task Φ : I → O always maps the empty simplex
to the subcomplex of O containing only the empty simplex (i. e. Φ(∅) = {∅}).
– The same rule applies mutatis mutandis to protocols.
– When we describe tasks or protocols, we occasionally ignore the (−1)-simplex
as part of some or all complexes. For instance, we might write something like
Φ(F ) = {{x}} whereas it had to be Φ(F ) = {∅, {x}} for the latter to be a
proper simplicial complex. The effect of this rule is a clearer notation without
any actual loss of information. (Note, that this is only a simplification in writing
and that the complexes, of course, still contain the (−1)-simplex.)
12
Definition 2.7 (task solving).
Let I, O and P be simplicial complexes, let
Φ : I → O be a task, and let Ξ : I → P be a protocol. Then Ξ solves Φ if there
exists a simplicial map
δ: P → O
such that δ ◦ Ξ is carried by Φ, which means that
(δ ◦ Ξ)(F ) ⊂ Φ(F )
as subcomplexes of O holds for all F ∈ I. Such a map δ is called a decision map.
2.2 Interpretation of the Model
It is about time that we explain some of the definitions of the previous section in
the context of our headline distributed computing. We start with an example:
Example 2.8 (consensus).
Let X be a finite set of cardinality p. Suppose we
have a system with a number of processes, each with an initial private “piece of
information” which we require to be an element of X. (The input values need not be
distinct.) Now the processes may communicate (subject to certain constrains of the
considered system) and finally have to “decide” on exactly one of the input values.
That is all processes halt with a private output value and all of these values have
to be the same (and additionally one of the input values). For obvious reasons, this
task is called p-consensus. Note that we are only interested in the set of assigned
input values and the (in this example singleton) set of private output values.
Now we explain what the corresponding input and output complexes are: The
input complex encodes every possible input configuration, that is, F is a simplex
of I in this case if and only if F ⊂ X. (At this point, we should assume that there
are more processes than input values because an input configuration with more
values than processes does not make much sense.) The output complex encodes
every allowed output configuration, that is, F 0 ∈ O if and only if F 0 ⊂ X is a
singleton set. The carrier map Φ then encodes which input configurations may lead
to which output configurations: If all processes start with x ∈ X, the only allowed
output configuration is {x}, so Φ({x}) would be {{x}}. If the input configuration
is {x, y} (with x 6= y), the processes may either choose x or y as their consensus,
so Φ({x, y}) is {{x}, {y}}. In general:
Φ(F ) = {t} t ∈ F .
It is readily verified that Φ : I → O is a task in the sense of Definition 2.5. Observe
that I is isomorphic to (the complex obtained from) the standard simplex ∆p−1
and O is its 0-skeleton.
13
This example easily generalizes to other tasks: the complex I always encodes
the possible input configurations, O represents valid output configurations and
Φ : I → O specifies the actual task, that is for each input configuration it specifies
the set of output configurations that are considered a “successful completion of the
task” according to the task’s description.
A protocol Ξ : I → P permits a similar interpretation: Again, every simplex in I
is a possible input configuration to the system of processes. Then these processes
run some sort of (communication) algorithm whose possible output configurations
are captured by Ξ and P . That means if F ∈ I is an input configuration, Ξ(F ) ⊂ P
includes every possible output configuration that may arise from the input configuration F and one execution of the specified algorithm. Note that in this case an
“algorithm” is not entirely deterministic (in the sense that we cannot predict the
exact output configuration) because the communication between processes introduces a degree of uncertainty. As mentioned in the introduction, this corresponds
to the fact that we model protocols that are wait-free.
Finally, if Ξ solves Φ and δ : P → O is a decision map, δ is, intuitively speaking,
the “function that gets applied to a process’s (protocol) output value to produce
a valid task output value”. The protocol output value represents “everything a
process has learned” during the communication and the map δ “decides which task
output value to choose based on that information”, hence the name decision map.
We should note that the simplicial properties of I, O, P or the maps Φ, Ξ, δ
were not used in our informal description so far, so it is natural to ask why we
chose simplicial complexes as a mathematical basis. Simply put, those properties
are related to the various assumptions about the underlying distributed system.
For example, an input complex I has to be a simplicial complex because a process
could crash before communicating its input value to the other processes: An input
configuration F ∈ I should contain all values that are actually used by any of
the processes to produce an output value. Now let F 0 ⊂ F and assume that the
processes with input values in F \ F 0 crash before sending their values to any of the
other processes. Then the latter continue their execution with values from F 0 only,
so the true input configuration has to be F 0 ⊂ F . Put another way, I must contain
all subsets of all elements F ∈ I, which is precisely the definition of a simplicial
complex.
There is much more that could be said about the “simplicial assumptions” of our
model but in this thesis we will not go into much more detail. There is, however,
an extensive discussion of the correspondence between the above “combinatorial
model” and the “operational model” (which describes tasks and protocols from a
computer scientist’s point of view) in the book by Herlihy et al. [3, Ch. 4].
14
2.3 Examples:
Set Agreement and Barycentric Agreement
Next, we are going to describe another class of examples, relaxed versions of the
consensus task (Example 2.8), one of which will play an important role in Section 3.3.
Example 2.9 (set agreement). Let X be a finite set of cardinality p and assume
there are n processes where n > p. The p-values k-set agreement task (or (p, k)-set
agreement for short) is defined by the following task description: Each process’s
input value is an element of X (where different processes may be assigned the same
input value) and each process’s output value is one of the assigned input values
such that the output configuration (set of all chosen output values) is a subset
of X of cardinality at most k. Put another way, the task requires the processes to
choose at most k distinct output values (from the set of input values).
An analogous analysis as in Example 2.8 shows that the formal task (in the
sense of Definition 2.5) is given by the input complex ∆p−1 , the output complex
(∆p−1 )6k−1 , and the following carrier map skelk−1 : if F ∈ ∆p−1 is an input configuration, skelk−1 (F ) is the (k−1)-skeleton of the complex determined by F , that
is
6k−1
skelk−1 (F ) := ∆p−1 (F )
,
which obviously defines a carrier map. (To keep the notation readable we write
only skelk−1 even though the carrier map, of course, also depends on p.)
A few notes:
– Whereas the task description assumes that sufficiently many processes are
involved, the number of processes n is completely irrelevant for the formal
definition of (p, k)-set agreement as the task skelk−1 : ∆p−1 → (∆p−1 )6k−1 .
– For k = 1, we see that (p, 1)-set agreement coincides with the p-consensus task
(Example 2.8).
– If p 6 k, the task is trivial because every process can simply choose its input
value. Formally: Since p 6 k we have (∆p−1 )6k−1 = ∆p−1 and the carrier
map skelk−1 assigns to a simplex the complex determined by all its faces.
Furthermore skelk−1 is strict, as one may easily check. (With essentially the
same arguments, the last assertion also holds in the general case where p > k.)
So the task skelk−1 : ∆p−1 → ∆p−1 is solved by skelk−1 (viewed as a protocol)
with the identity map on V (∆p−1 ) as decision map.
Another important class of examples are barycentric agreement tasks. To state
them formally, we first need to recognize sd (Definition 1.9) as a carrier map:
15
Let K be a simplicial complex. For a simplex F of K we define sdK (F ) := sd K(F )
which is a subcomplex of sd K. Thus we obtain a carrier map sdK : K → sd K.
Since we can compose sdK with sdsd K and so on, we also obtain a carrier map
K → sdN K for all N ∈ N which we denote by sdN
K.
Example 2.10 (barycentric agreement).
Let K be a simplicial complex and
let N ∈ N. The N -th barycentric agreement task for the input complex K is the
N
task sdN
K : K → sd K.
In other words, the processes are assigned vertices of some simplex F of K and
the task is to decide on vertices of a simplex of sdN
K (F ), the N -th barycentric
N
subdivision of F (as a subcomplex of sd K).
Also note that for all K ∈ Simp and all N ∈ N the carrier map sdN
K is strict and
“surjective” (in the sense of the image complex). Therefore sdN
is
also
a protocol
K
which we denote by the same symbol (there is no actual danger of confusion).
2.4 Implements-Relation on Tasks
Informally, it is relatively clear what it means that some tasks implement (or rather
can be used to implement) another task. This section will make that intuition
formal in an appropriate sense.
In Definition 2.1 we saw how to compose carrier maps, which naturally applies
to tasks (because a task is just a carrier map). As we would also like to compose
protocols, we prove the following
Lemma 2.11 (composition of strict carrier maps).
Let K, L, M be simplicial
complexes and let Φ : K → L and Ψ : L → M be strict carrier maps. Then their
composition Ψ ◦ Φ : K → M is strict as well.
Proof. Let F and F 0 be simplices of K. We have to show that
(Ψ ◦ Φ)(F ∩ F 0 ) = (Ψ ◦ Φ)(F ) ∩ (Ψ ◦ Φ)(F 0 ).
By definition of Ψ ◦ Φ, basic set theory and strictness of Ψ we obtain:
[
[
Ψ(G) ∩
Ψ(G0 )
(Ψ ◦ Φ)(F ) ∩ (Ψ ◦ Φ)(F 0 ) =
G0 ∈Φ(F 0 )
G∈Φ(F )
=
[
[
Ψ(G ∩ G0 ).
G∈Φ(F ) G0 ∈Φ(F 0 )
Since Φ(F ) and Φ(F 0 ) are both subcomplexes of L, they contain every face of
G ∈ Φ(F ) and G0 ∈ Φ(F 0 ), respectively. In particular, G ∩ G0 is already a simplex
of Φ(F ) ∩ Φ(F 0 ), which shows the non-trivial inclusion of the following equality:
16
[
[
Ψ(G ∩ G0 )
G∈Φ(F ) G0 ∈Φ(F 0 )
=
[
˜
Ψ(G).
˜
G∈Φ(F
)∩Φ(F 0 )
By strictness of Φ and the definition of Ψ ◦ Φ the right hand side is equal to
(Ψ ◦ Φ)(F ∩ F 0 ).
Corollary 2.12 (composition of protocols).
Let I, P, I 0 , P 0 be simplicial com0
0
plexes with P ⊂ I , and let Ξ : I → P and Ξ : I 0 → P 0 be protocols. Then the
composition Ξ0 ◦ Ξ is again a protocol onto its image complex (Ξ0 ◦ Ξ)[I].
Proof. Immediate from Lemma 2.11.
Generally, we want to formalize the following situation: suppose we are given
a set of tasks T and for each Φ ∈ T a protocol that solves Φ, can we use these
protocols to to solve another task Φ0 ? If this is the case, we say the tasks of T
implement Φ0 .
In this thesis, however, we only need a restricted version of this concept. First of
all, when we talk about whether some task implements another, we always assume
that the set of solved tasks includes the barycentric agreement tasks (Example 2.10)
for all N ∈ N and all occurring complexes. Secondly, we only consider the case
where the first task’s carrier map is strict, which means it “solves itself as a protocol”
(like in the (p6k)-case of Example 2.9). And lastly, we only allow a specific amount
and order of protocols used. Put formally, this becomes:
Definition 2.13 (task implementing a task).
Let I, O, O0 be simplicial complexes, let Φ : I → O and Φ0 : I → O0 be tasks, and let the carrier map of Φ be strict
(so that we can consider Φ as a protocol onto its image complex). Then the task Φ
implements the task Φ0 if there exists an N ∈ N such that sdN
O ◦ Φ, the composition
N
N
of a barycentric agreement protocol sdO : O → sd O and Φ, solves Φ0 .
This is enough for our purposes, as we shall see later. We also note that the
assumption of available barycentric agreement protocols is not absurd, on the contrary: Herlihy et al. [3, Corollary 4.2.10] show that our underlying computational
model permits an (operational) implementation of those protocols and even better,
that they can be obtained directly from immediate snapshot protocols (mentioned
in the introduction).
17
3 Loop Agreement Tasks
3.1 Definition and Examples
Loop agreement tasks form a class of tasks in the sense of Definition 2.5. They are
related to loops in topological spaces and in fact our main result in this chapter
(Theorem 3.15) connects the solvability of one such task through another with the
fundamental groups of (the geometric realizations of) the involved complexes. We
start with the definition of a combinatorial model of loops:
Definition 3.1 (walk, path, cycle).
Let K be a simplicial complex.
– A walk in K is a tuple w = (v0 , . . . , vn ) where n ∈ N and v0 , . . . , vn are
vertices of K such that {vj , vj+1 } is a 1-simplex of K (called an edge of w) for
all j ∈ {0, . . . , n − 1}. If w is a walk in K as above, we denote by w˙ := v0 and
w
¨ := vn the first and last vertex of w, respectively.
– A (simple) path in K is a walk in K such that its vertices are pairwise distinct.
– A cycle in K is a walk (v0 , . . . , vn ) in K such that n ∈ N>2 , v0 = vn and
(v0 , . . . , vn−1 ) is a path.
In the context of the graph K 61 our terminology coincides with the typical definitions found in an introduction to graph theory and, indeed, the above definition
is just a restatement of the classical terms in the simplicial setting.
Definition 3.2 (composition of walks).
Let K be a simplicial complex, let
k ∈ N>1 and let w1 , . . . , wk be walks in K where wj = (vj,0 , . . . , vj,nj ) for all
j ∈ {1, . . . , k}. We say w1 ∗ · · · ∗ wk is a valid composition if w
¨j = w˙ j+1 for all
j ∈ {1, . . . , k − 1} and in that case we define the composition of w1 , . . . , wk as the
walk
w1 ∗ · · · ∗ wk := (v1,0 , . . . , v1,n1 −1 , . . . , vk−1,0 , . . . , vk−1,nk−1 −1 , vk,0 , . . . , vk,nk ).
Example 3.3.
On the torus complex T from Figure 2.1 the following holds:
– w := (1, 3, 9) is a path (but not a cycle) with w˙ = 1 and w
¨ = 9.
– (3, 5, 9, 5, 3) is a (closed) walk but neither a path nor a cycle (because the
vertices 5 and 3 appear twice).
– (3, 5, 9, 1, 3) is a cycle.
18
– (1, 2) ∗ (2, 3, 1) = (1, 2, 3, 1).
– (2, 5, 1, 2) is not even a walk because {2, 5} is not a simplex of T .
Definition 3.4 (triangle loop).
Let K be a simplicial complex. A triangle
loop in K is a triple κ = (p0 , p1 , p2 ) of paths in K such that p0 ∗ p1 ∗ p2 is a
valid composition and a cycle in K. In that case we call p˙0 , p˙1 , p˙2 the distinguished
vertices and κ˙ := p˙0 the base point of κ.
Given a triangle loop in K, this loop gives rise to a distributed task: the processes
are assigned input values that correspond to the distinguished vertices of the loop
and the output configuration has to be a simplex of K that “lies (on the path)
between the input vertices”. We shall make this precise soon, but first we introduce
some useful conventions.
Convention 3.5.
– Let K be a simplicial complex and let (p0 , p1 , p2 ) be a triangle loop in K. For
j ∈ {0, 1, 2} the subcomplex of K determined by pj is denoted K(pj ); more
precisely: K(pj ) is the smallest subcomplex of K containing all edges of pj .
– Let Simpfin,c
denote the full subcategory of Simp2 that has finite connected
2
2-dimensional simplicial complexes as its objects. A simplicial complex K is
connected if for every two vertices v, v 0 ∈ V (K) there exists a walk w in K
with w˙ = v and w
¨ = v 0 . (This clearly implies that kKk is path connected in
the usual topological sense.)
Definition 3.6 (loop agreement task). Let K ∈ Simp2fin,c and let κ = (p0 , p1 , p2 )
be a triangle loop in K. The associated loop agreement task LK,κ : ∆2 → K is
defined as:


K({p˙j })
if F = {j},




K(p0 )
if F = {0, 1},

F 7→ K(p1 )
if F = {1, 2},



K(p2 )
if F = {0, 2},




K
if F = {0, 1, 2}.
Our informal description above has an exact interpretation now: if the input
configuration is, say, {0, 1} ∈ ∆2 , the output configuration has to be a simplex of
K(p0 ) ⊂ K, that is a vertex or edge of the given path p0 in K.
Example 3.7. The example (c) of Examples 2.2 actually describes a loop agreement task: the carrier map Φ3 coincides with LT,τ for τ = ((3, 5), (5, 9, 1), (1, 3)).
19
Example 3.8 ((3, 2)-set agreement as loop agreement task).
As a first but
important example, we observe that the (3, 2)-set agreement task (Example 2.9)
skel1 : ∆2 → ∂∆2
is the same as the loop agreement task
L∂∆2 , κ
for κ = (0, 1), (1, 2), (2, 0) .
Example 3.9 (2-dimensional barycentric agreement as loop agreement task).
N
N
Let N ∈ N. Let p0 be the unique path from sdN
∆2 ({0}) to sd∆2 ({1}) in sd∆2 ({0, 1})
and let p1 , p2 be defined analogously. Then the barycentric agreement task
2
N
2
sdN
∆2 : ∆ → sd ∆
is the same as the loop agreement task
LsdN ∆2 , (p0 ,p1 ,p2 ) .
Some more examples can be found in the book by Herlihy et al. [3, Sec. 5.6.3].
3.2 Topological Aspects
In this section we define an algebraic signature of a loop agreement task based
on the fundamental group of its simplicial complex’s geometric realization. We
also show that every homomorphism of fundamental groups where the domain
space is the geometric realization of a finite, 2-dimensional simplicial complex is
in fact induced by a continuous map and how that affects maps between algebraic
signatures.
Definition 3.10 (topological loop associated to a triangle loop).
Let K ∈ Simpfin,c
2 , let c = (v0 , . . . , vn ) be a cycle in K, and let κ = (p0 , p1 , p2 ) be
a triangle loop in K.
– For j ∈ {0, . . . , n − 1} let ij : k{vj , vj+1 }k ,→ kKk be the canonical inclusion.
The (topological) loop γc associated to c is the (well-defined) injective continuous map
S 1 → kKk, [t] 7→ ij (1 − τ, τ ) for τ = tn − j, if t ∈ nj , j+1
n .
– The (topological) loop γκ associated to κ is
γκ := γp0 ∗p1 ∗p2 .
20
Convention 3.11 (fundamental group of a complex).
Let K be a simplicial
complex and let v be a vertex of K. We say fundamental group of K (based at v)
for the fundamental group of kKk (based at kvk) and write
π1 (K, v) := π1 (kKk, kvk).
Definition 3.12 (algebraic signature).
Let K, L ∈ Simpfin,c
and let κ, λ be
2
triangle loops in K and L, respectively.
– The algebraic signature of the loop agreement task LK,κ is the pair
π1 (K, κ),
˙ [γκ ]∗
where the second element is the pointed homotopy class of γκ as an element
of π1 (K, κ).
˙
˙ is a group homomorphism that maps [γκ ]∗ to [γλ ]∗ ,
– If ϕ : π1 (K, κ)
˙ → π1 (L, λ)
we call
˙ [γλ ]∗
ϕ : π1 (K, κ),
˙ [γκ ]∗ → π1 (L, λ),
a map of algebraic signatures.
In general, a group homomorphism between fundamental groups of topological
spaces need not be induced by a continuous map. For finite simplicial complexes,
however, we have the following
Lemma 3.13 (continuous realization of homomorphism).
Let K be a finite connected simplicial complex with dim(K) 6 2, let x be a vertex of K,
let (Y, y0 ) be a pointed topological space, and let ϕ : π1 (K, x) → π1 (Y, y0 ) be a
group homomorphism. Then there exists a base point preserving continuous map
f : (kKk, kxk) → (Y, y0 ) such that π1 (f ) = ϕ.
Proof. Let K ∗ be a spanning tree of the graph K 61 and let x0 := kxk ∈ kKk. Then
kK ∗ k ⊂ kKk is contractible and since the inclusion of a subcomplex is a cofibration
(Lemma 1.13) this implies that the quotient map q : kKk → kKk/kK ∗ k =: X is a
homotopy equivalence. Let
ψ := ϕ ◦ π1 (q)−1 : π1 (X, [x0 ]) → π1 (Y, y0 )
and let X 1 := q(kK 61 k). Clearly, since K ∗ was a spanning tree, all vertices of K
are identified in X 1 and therefore
_k
X1 ∼
S1,
=
where k ∈ N is the number of 1-simplices of K not contained in K ∗ . For j ∈
{1, . . . , k} let γj : S 1 → X 1 be the inclusion of the j-th loop into this wedge sum
21
and let [ηj ]∗ := ψ([γj ]∗ ). Then the loops ηj : (S 1 , [0]) → (Y, y0 ) combine to a map
g1 : X 1 → Y
(because “∨” is the coproduct in the category of pointed spaces). Now we extend
g1 to X. Since only parts of kK 61 k are identified to a point by q, we see that X
fits into a pushout diagram
``
``
j=1
`` _
j=1
S1
ϕj
/ X1
/ X,
2
j=1 D
where ` ∈ N is the number of 2-simplices of K. Fix j ∈ {1, . . . , `}. Then
[ϕj ]∗ = [γ]∗ · [γ 0 ]∗ · [γ 00 ]∗ ∈ π1 (X, [x0 ])
where γ, γ 0 , γ 00 correspond to the three 1-dimensional faces of the original 2-simplex
of K, so each of those is either the constant loop at [x0 ] ∈ X or one of the loops γj 0 .
It is easy to see that ϕj is pointed contractible in X because it is the projected
boundary loop of a 2-simplex in kKk. Furthermore,
[g1 ◦ γ]∗ = ψ([γ]∗ )
(and likewise for γ 0 and γ 00 ) clearly holds if γ is the constant loop and for γ = γj 0
we have [g1 ◦ γj 0 ]∗ = [ηj 0 ]∗ = ψ([γj 0 ]∗ ) by definition of g1 and ηj 0 . Now the following
calculation shows that g1 ◦ ϕj is pointed contractible in Y as well:
[g1 ◦ ϕj ]∗ = [g1 ◦ γ]∗ · [g1 ◦ γ 0 ]∗ · [g1 ◦ γ 00 ]∗
= ψ([γ]∗ ) · ψ([γ 0 ]∗ ) · ψ([γ 00 ]∗ )
= ψ([ϕj ]∗ ) = ψ(1) = 1 ∈ π1 (Y, y0 ).
Thus g1 ◦ ϕj : S 1 → Y can be extended to a map g2j : D2 → Y for all j ∈ {1, . . . , `}.
We obtain a commutative diagram
``
``
1
j=1 S
`` j=1
_
ϕj
/ X1
/X
2
j=1 D
g
``
j=1 g2j
22
g1
0% Y ,
and by virtue of the universal property of the pushout a map g : X → Y fitting
into the diagram. The composition
f := g ◦ q : kKk → Y
is the desired map because: the equivalence classes of the loops γ1 , . . . , γk obviously
generate π1 (X, [x0 ]) and g restricts to g1 on X 1 , so π(g) = ψ; by functoriality of π1
and definition of ψ, it follows that π1 (f ) = ϕ.
Corollary 3.14 (algebraic signature map vs. continous map).
Let K, L ∈
Simpfin,c
and
let
κ,
λ
be
triangle
loops
in
K
and
L,
respectively.
Then
there exists
2
a map of algebraic signatures
˙ [γλ ]∗
ϕ : π1 (K, κ),
˙ [γκ ]∗ → π1 (L, λ),
if and only if there exists a continuous map
f : kKk → kLk with f ◦ γκ = γλ .
Proof. If f is a map as above, the induced homomorphism π1 (f ) yields the map
of algebraic signatures as required. Conversely, let ϕ be such a map of algebraic
signatures. By Lemma 3.13 there exists a map f 0 : kKk → kLk with π1 (f 0 ) = ϕ.
Then the loop f 0 ◦ γκ is, by assumption, pointed homotopic to γλ ; let the map
h : S 1 × [0, 1] → kLk be such a pointed homotopy. By definition of γκ we see, that
γκ defines a homeomorphism between S 1 and a (1-dimensional) subcomplex of kLk,
hence γκ is a (pointed) cofibration (Lemma 1.13). Therefore, we obtain a pointed
homotopy H : kKk × [0, 1] → kLk such that the following diagram commutes:
S1
(idS 1 , const0 )
S 1 × [0, 1]
γκ
/ kKk
(idkKk , const0 )
γκ ×id[0,1]
f0
/ kKk × [0, 1]
H
h
(/ kLk.
Let f := H( · , 1) : kKk → kLk, then
f ◦ γκ = H ◦ (γκ × const1 ) = h( · , 1) = γλ
and since f and f 0 are homotopic: π1 (f ) = π1 (f 0 ) = ϕ.
23
3.3 Classification and Consequences
Theorem 3.15 (classification of loop agreement tasks [3, Theorem 15.3.8]). Let
K, L ∈ Simpfin,c
and let κ, λ be triangle loops in K and L, respectively. Then
2
LK,κ implements LL,λ if and only if there exists a map of algebraic signatures
˙ [γλ ]∗ ).
(π1 (K, κ),
˙ [γκ ]∗ ) → (π1 (L, λ),
Note that loop agreement tasks always have strict carrier maps (which is immediate from the definition) and so the theorem makes sense as stated.
Proof of the theorem. For the whole proof let (p0 , p1 , p2 ) = κ and (q0 , q1 , q2 ) = λ.
First, let a map of algebraic signatures as above exist. Then, by Corollary 3.14,
there exists a map fgeo : kKk → kLk such that fgeo ◦ γκ = γλ . By the simplicial
approximation theorem (Theorem 1.12), there exists an N ∈ N and a simplicial
N . We
map f : sdN K → L such that f is a simplicial approximation to fgeo ◦ βK
N
claim that sdK ◦ LK,κ solves LL,λ with decision map f , that is we have to show
that f ◦ (sdN
K ◦ LK,κ ) is carried by LL,λ .
KO
sdN
K
LK,κ
∆2
/ sdN K
f
LL,λ
(?)
/L
In the following, we identify the distinguished vertices of κ with the corresponding
N and f (kp˙ k) =
vertices of sdN K. Since f is a simplicial approximation to fgeo ◦ βK
geo
j
kq˙j k for all j ∈ {0, 1, 2} by assumption on fgeo , we have
N
supp kf k(kp˙j k) ⊂ supp (fgeo ◦ βK
)(kp˙j k) = supp(kq˙j k) = {q˙j }.
The case of the 2-simplex is trivial, so it remains to show that
f ◦ (sdN
K ◦ LK,κ ) (F ) ⊂ LL,λ (F )
for all 1-simplices F of ∆2 . Let F ∈ ∆2 be a 1-simplex and let j ∈ {0, 1, 2} such
that LK,κ (F ) = K(pj ). Then, if F 0 is a simplex of K(pj ) and F 00 is a simplex of
0
00
sdN
K (F ), we must have f (F ) ∈ L(qj ) because
N
(fgeo ◦ βK
)(kF 00 k) ⊂ fgeo (kF 0 k) ⊂ fgeo kK(pj )k ⊂ kL(qj )k
and f (F 00 ) ∈
/ L(qj ) would contradict the fact that f is a simplicial approximation
N
to fgeo ◦ βK . Therefore
h[
i
N
f ◦ (sdN
◦
L
)
(F
)
=
f
sd
K(p
)
⊂ L(qj ),
j
K,κ
K
K
which completes the first half of the proof.
24
Now assume that LK,κ implements LL,λ and that we are given N ∈ N and a
simplicial map f : sdN K → L such that sdN
K ◦ LK,κ solves LL,λ with decision
map f (see (?)). Then we let
N −1
fgeo := kf k ◦ (βK
) : kKk → kLk
and claim that π1 (fgeo ) is a map of algebraic signatures as desired. To that end,
let γsdN κ denote the loop S 1 → ksdN Kk that is defined like γκ (Definition 3.10)
with the barycenters added to the cycle’s vertices in the only sensible way. Then
the following diagram commutes
S1
γκ
γsdN κ
/ kKk
O
N
βK
#
ksdN Kk
(which can be seen by inspection of the definitions). Furthermore, since the carrier
N
map f ◦ (sdN
K ◦ LK,κ ) is carried by LL,λ , every simplex of sdK (K(pj )) is mapped
into L(qj ) by f and likewise for the corresponding geometric simplices. It follows
that
⊂ kL(qj )k,
kf k sdN
K [K(pj )]
which clearly implies that kf k ◦ γ N wraps around im(γλ ) ∼
= S 1 exactly once.
sd κ
Thus we have
N −1
fgeo ◦ γκ = kf k ◦ (βK
) ◦ γκ = kf k ◦ γsdN κ '∗ γλ ,
which completes the proof.
Now we list some immediate consequences of the classification theorem. By the
notation (G, g) ∼
= (H, h) we always mean that there exists an group isomorphism
G → H with g 7→ h.
Corollary 3.16 ((3, 2)-set agreement implements any loop agreement task). Recall from Example 3.8, that (3, 2)-set agreement can be interpreted as the loop
agreement task L∂∆2 , κ where κ = ((0, 1), (1, 2), (2, 0)). Therefore the algebraic
signature of L∂∆2 , κ is
π1 (∂∆2 , 0), [γκ ]∗ ) ∼
= π1 (S 1 , [0]), [idS 1 ]∗ ∼
= (Z, 1).
For a group G and an element g ∈ G there is exactly one group homomorphism Z →
G that maps 1 to g, which implies, by the classification theorem (Theorem 3.15),
that the (3, 2)-set agreement task L∂∆2 ,κ implements any other loop agreement
task.
25
Corollary 3.17 (no (3, 2)-set agreement from barycentric agreement).
Let
L∂∆2 ,κ be the (3, 2)-set agreement task as in the previous corollary, let N ∈ N and
recall from Example 3.9 that 2-dimensional N -th barycentric agreement (on ∆2 )
is a loop agreement task which we denote by LsdN K, µ here. Then LsdN K, µ does
not implement L∂∆2 ,κ because: sdN K is contractible, hence the algebraic signature
of LsdN K, µ is
∼
π1 (sdN K, µ),
˙ [constkµk
˙ ]∗ = ({0}, 0)
and we already saw in Corollary 3.16 that the algebraic signature of L∂∆2 ,κ is
(isomorphic to) (Z, 1). Since there is only the trivial homomorphism 0 → Z, our
assertion follows from the classification theorem (Theorem 3.15).
26
4 Two-dimensional Pseudomanifolds
4.1 Classification of Finite Two-dimensional
Pseudomanifolds
Definition 4.1 ((weak) pseudomanifold).
Let n ∈ N.
– An n-dimensional weak pseudomanifold (without boundary) (or weak n-pseudomanifold ) is a simplicial complex K of dimension n satisfying the following
properties:
∗ Every simplex of K is a face of an n-simplex of K.
∗ Every (n−1)-simplex of K is the face of exactly two n-simplices of K.
– An n-dimensional pseudomanifold (without boundary) (or n-pseudomanifold )
is a weak n-pseudomanifold K that is strongly connected, that is it satisfies the
following property:
∗ For all n-simplices F, F 0 of K there exists a k ∈ N and a finite sequence
F = F0 , F1 , . . . , Fk = F 0 of n-simplices of K such that Fj ∩ Fj+1 is an
(n−1)-simplex of K for all j ∈ {0, . . . , k − 1}.
Suppose K is a weak n-pseudomanifold and let x ∈ kKk. Then the following
fact is obvious from the definition: if supp(x) is an n- or (n−1)-simplex of K, we
can find a neighborhood of x that is homeomorphic to Rn . On the other hand,
if the dimension of supp(x) is less than n−1, singularities can occur at x. Thus
the geometric realization of K partially behaves like a manifold but may fail to be
locally euclidean at some points, hence the name pseudomanifold (see Figure 4.1).
Figure 4.1: Example of a finite but not strongly connected 2-dimensional weak
pseudomanifold where the highlighted vertex does not have a euclidean
neighborhood
27
Remark 4.2 ((weak) pseudomanifolds with boundary and manifold protocols).
If we replace the second property in Definition 4.1 by
∗ Every (n−1)-simplex of K is the face of exactly one or two n-simplices of K,
we get pseudomanifolds with boundary. In this thesis we are only concerned with
loop agreement tasks on 2-dimensional pseudomanifolds without boundary, but
the notion of pseudomanifolds with boundary plays an important role in so called
manifold protocols, studied by Herlihy et al. in Chapter 9 of their book [3]. Briefly,
a protocol Ξ : I → P is a manifold protocol if the complex Ξ(F ) ⊂ P is a pseudomanifold with boundary for all F ∈ I (and Ξ commutes with taking boundaries in
an appropriate way). For instance, it is easy to see that the barycentric agreement
protocol sdK (Example 2.10) is a manifold protocol for all K ∈ Simp.
We are now going to (topologically) classify finite weak 2-pseudomanifolds. (It
is well known that the finiteness condition corresponds to compactness on the
topological side of geometric realizations, but in our combinatorial context of simplicial complexes “finite” sounds more appropriately.) The above discussion already
shows that we only have to deal with 0-simplices in the 2-dimensional case, namely
with vertices that do not have a euclidean neighborhood. To identify those vertices
combinatorially, we consider the star of a vertex:
Definition 4.3 (star of a vertex).
Let K be a simplicial complex and let
v ∈ V (K) be a vertex of K. The star of v (in K) is the subcomplex of K that is
determined by all simplices of K containing v, formally:
st(v) := K({F ∈ K | v ∈ F }).
Proposition 4.4 (stars in (weak) pseudomanifolds).
Let K be a finite weak
2-pseudomanifold and let v ∈ V (K) be a vertex of K.
– Then there exist k ∈ N and (up to order) unique subcomplexes K0 , . . . , Kk
of K, which we call the wedge summands of st(v), with the following properties:
T
S
∗ st(v) = kj=0 Kj and {v} ∈ kj=0 Kj ,
∗ ∀ j, j 0 ∈ {0, . . . , k}, j 6= j 0 : Kj ∩ Kj 0 = ∅, {v} ,
∗ ∀ j ∈ {0, . . . , k} : (kKj k, kvk) ∼
= (D2 , 0).
– Especially, kst(v)k ⊂ kKk is homeomorphic to a finite wedge of 2-disks (D2 , 0)
where the base point corresponds to kvk.
Proof. At first observe that the star of v is completely determined by the 2-simplices containing v because every 0- or 1-simplex is contained in some simplex of
dimension 2 by definition of a pseudomanifold. Let F0 = {v, x0 , x1 } ∈ K be a
2-simplex of which v is a vertex. Then the 1-simplex {v, x1 } is the face of another
28
2-simplex F1 = {v, x1 , x2 } and so on. Since there are only finitely many simplices,
this process must terminate, and since {v, x0 } is also the face of another 2-simplex,
we obtain a finite sequence F0 , F1 , . . . , Fk , Fk+1 = F0 of 2-simplices of K such that
Fj ∩ Fj+1 is a 1-simplex of which v is a vertex for all j ∈ {0, . . . , k}. Clearly,
(kK({F0 , . . . , Fk })k, kvk) is pointed homeomorphic to (D2 , 0). Proceeding in the
same fashion if there are more 2-simplices containing v, we obtain a finite number
of such wedge summands. Let F and F 0 be 2-simplices of two different wedge
summands. Then F ∩ F 0 cannot be a 1-simplex because that would contradict
the fact that every 1-simplex is the face of exactly two 2-simplices. It follows that
F ∩F 0 = {v}, and thus, st(v) is the “combinatorial wedge” of the wedge summands.
The second assertion follows by passing to the geometric realization.
Theorem 4.5 (classification of finite weak 2-pseudomanifolds).
Let K be a
finite weak 2-pseudomanifold. Then kKk is homeomorphic to a quotient
ak
j=1
Sj
.
∼ ,
where k ∈ N, each Sj is a closed surface and ∼ affects only finitely many points;
more precisely: |{x, y | x ∼ y, x 6= y}| < ∞.
Proof. Let V 0 ⊂ V (K) be the set of vertices v where kvk does not have a euclidean
neighborhood. By Proposition 4.4 and a standard connectedness argument, these
are exactly those vertices whose star consists of more than one wedge summand. Let
v ∈ V 0 and let K0 , . . . , Kk be the wedge summands of st(v) as in the proposition.
Then we form a new complex out of K in the following way: remove v and add
vertices v0 , . . . , vk ; then, for all j ∈ {0, . . . , k}, replace every v in a simplex of Kj
by vj . The result is a 2-dimensional pseudomanifold where, by construction, the
star of each vertex vj consists of a single wedge summand. By induction on |V 0 | we
obtain a complex K 0 such that every vertex of K 0 has that property. By definition
of pseudomanifolds and Proposition 4.4 we see that every point of kK 0 k has a
euclidean neighborhood, thus kK 0 k is a compact 2-manifold, that is a disjoint union
of closed surfaces. The simplicial projection map K 0 → K (which maps recently
introduced points vj to the point v they originated from) induces a surjective
continuous map kK 0 k → kKk, and since kK 0 k is compact and kKk is Hausdorff,
this map is the desired quotient map.
29
4.2 Implementation in Haskell
In this section, we present (some fragments of) an implementation of Theorem 4.5
in Haskell.1 The complete software is included on a CD at the end of the printed
copies of this thesis, and in the near future the code can also be found on the
author’s github page.2 See Table 4.1 at the end of the section for a correspondence
between the presented types/functions and the modules they are defined in.
Our basic types are Vertex , Simplex and Complex that are defined as follows:
data Vertex a where Vertex :: (Eq a) ⇒ a → Vertex a
type Simplex a = [Vertex a ]
type Complex a = [Simplex a ]
A Vertex can be basically anything but we require an Eq context (which should
not be much of a restriction). (Note that this declaration uses a GADT3 to enforce
that vertices can be tested for equality.) A “set” of vertices is a list in Haskell and
likewise for complexes. Of course, this allows “simplices with repeated vertices” or
similar anomalies, so it is the programer’s job to make sure that such (invalid)
complexes are not passed to the library.
Let K be a finite weak 2-pseudomanifold. To identify the closed surfaces Sj such
`k
that kKk ∼
= ( j=1 Sj )/∼ (which exist by Theorem 4.5) we proceed as follows: The
proof of Theorem 4.5 and the preceding proposition provide us with an algorithm
for identifying a vertex as a singularity and for resolving the latter. We test each
vertex, fix the singularity if necessary and finally obtain a complex K 0 such that
kK 0 k is a compact 2-manifold. Then we isolate the connected components of K 0 and
for each component L ⊂ K 0 we identify the surface kLk. If we are only interested
in the closed surfaces Sj , we are done here, but if we also want to specify how they
are glued together, further examination of K 0 is required.
We get back to the gluing problem later and start with the identification of the
surfaces Sj . Assume that K is given as c :: Complex a and that v :: Vertex a is a
vertex of c. Then fixSingularity v c returns a complex with the singularity at (the
vertex corresponding to) v resolved. This is the implementation of the function
fixSingularity:
fixSingularity :: (Eq a) ⇒ Vertex a → Complex a → Complex (a, Int)
fixSingularity v c = let f = id &&& const 0
c 0 = complexMap f c
v 0 = vMap f v
in fixSingularity 0 v 0 c 0
1
www.haskell.org
www.github.com/J0J0 (J-zero-J-zero)
3
generalised algebraic datatype, www.haskell.org/haskellwiki/Generalised_algebraic_datatype
2
30
fixSingularity 0 :: (Eq a) ⇒
Vertex (a, Int) → Complex (a, Int) → Complex (a, Int)
fixSingularity 0 v c =
case starSummands v c of
: [] → c
sSs → fixSingularity 00 v sSs c
fixSingularity 00 :: (type omitted for readability)
fixSingularity 00 v sSs c =
let sSs 0 = map (parentSimplices [v ] ◦ generatedBy) sSs
oldSimplices = [v ] : concatMap (delete [v ]) sSs 0
newSimplices = concatMap (replaceStarSummand v ) $ [1 . .] ‘zip‘ sSs 0
in (c \\ oldSimplices) ∪ newSimplices
starSummands :: Vertex a → Complex a → StarSummands a
starSummands v c = findSummands $ star v c
findSummands :: Complex a → StarSummands a
findSummands st =
case filter (isNSimplex 2) st of
[]
→ []
s : _ → let
summand = dfsSimplices st s
st 0 = st \\ summand
in summand : findSummands st 0
To be able to split a vertex into multiple copies (like in the proof of Theorem 4.5),
we first transform c into c 0 :: Complex (a, Int) where each vertex has the index 0 attached. The function fixSingularity 0 obtains the wedge summands of st(v)
and passes them to fixSingularity 00 unless there is no singularity at v . The latter
function then implements what is described in the proof of the theorem (where
parentSimplices s c1 returns all simplices of c1 of which s is a face). The computation of the star summands is quite clear once we explain what dfsSimplices does.
Dfs is an abbreviation for depth first search, a common algorithm for graph traversal. In this case dfsSimplices c1 s1 starts at a simplex s1 ∈ c1 of dimension d and
returns all d-simplices of c1 that share a common (d−1)-dimensional face with s1 or
another simplex already visited. For instance, dfsSimplices c s for any 2-simplex s
of c returns all 2-simplices of c if and only if c is strongly connected.
Now assume that we resolved all singularities and that we already called
connectedComponents :: Complex a → [Complex a ]
on the resulting complex. Thus we are left with the task to identify a surface
complex. This is done by the function identifySurface which takes a complex and
has the following return type:
31
data Surface = Surface {isOrientable :: Bool ,
genus
:: Integer } deriving (Eq, Ord )
(i. e. we uniquely identify a closed surface via orientability and its genus). Instead
of including the implementation of identifySurface here, we only explain how it
works. Basically, there are two approaches that come to mind:
– Determine the orientability type explicitly and calculate the genus from the
Euler characteristic.
– Compute a fundamental polygon of the complex and analyse the labelling
scheme.
Our implementation follows the latter strategy since we need its functionality in
Section 4.3 anyway. To be a little bit more specific, we do the following: paste all 2simplices together to obtain a polygon with edges to be identified in pairs; normalize
the resulting labelling scheme; determine the surface type from the normal form.
The whole process, known as the classification of closed surfaces, can be found in
the topology book by Munkres [7, Ch. 12].
Put together, the above discussion provides the desired identification of the
closed surfaces Sj . The function
baseSurfaces :: (Eq a) ⇒ Complex a → [Surface ]
baseSurfaces =
map identifySurface ◦ connectedComponents ◦ fixAllSingularities
composes the functions we met before (respectively a slight variation in case of
fixAllSingularities). It takes a complex and yields a list of surfaces, the Sj for the
particular complex. For instance, assume that tor is a complex that triangulates
the torus, # denotes connected sum and \/ denotes wedge sum. Then we have:
baseSurfaces tor
baseSurfaces $ (tor # tor ) \/ tor
-- [OS.g=1]
-- [OS.g=2,OS.g=1]
where “OS.g=r” means “orientable surface of genus r”.
`k
Now we treat the gluing. Remember that we have kKk ∼
= ( j=1 Sj )/∼ where ∼
is an equivalence relation that identifies only finitely many points. Since the exact
relation ∼ is neither topologically relevant nor convenient to work with, we strip
the gluing information down to a gluing graph, determined by the following data:
– a set Ng of (abstract) gluing nodes,
– the set Ns := {S1 , . . . , Sk } of surface nodes,
– and a function e : Ng × Ns → N that specifies how often a surface is glued to
a particular gluing point.
32
Note that this defines a (bipartite) multigraph without self-loops (see Figure 4.2
for an example). In our implementation we use the following types to store the
multigraph (where M and LM are the modules Data.Map.Strict and .Lazy,
respectively):
type GluingGraphD
= M .Map (Int, Int) Int
type GluedObj o
= LM .Map Int o
type GluedVertices a = GluedObj (Vertex a)
type GluedComplexes a = GluedObj (Complex (a, Int))
data GluedD a = GluedD {
glGraphD :: GluingGraphD
, glVertices :: GluedVertices a
, glComplexes :: GluedComplexes a }
GluingGraphD represents the function e; a node (of either type) is an Int which
is mapped by GluedVertices and GluedComplexes to the corresponding object.
GlueD combines all gluing data that we work with. To extract that data from the
weak pseudomanifold, we use the next two functions (with accompanying helpers):
gluingGraph :: (Eq a) ⇒ Complex a → GluedD a
gluingGraph = gluingGraphFromFixed ◦ fixAllSingularities
gluingGraphFromFixed :: (Eq a) ⇒ Complex (a, Int) → GluedD a
gluingGraphFromFixed c =
GluedD {glGraphD = graph, glVertices = vsm, glComplexes = comps }
where
comps = LM .fromDistinctAscList $ [0 . .] ‘zip‘ connectedComponents c
vs
= nub $ map (vMap fst) $ filter isGluedV $ vertices c
vsi
= vs ‘zip‘ [0 . .]
vsm = LM .fromDistinctAscList $ map swap vsi
graph = LM .foldrWithKey (addGluingData vsi ) M .empty comps
isGluedV :: Vertex (a, Int) → Bool
isGluedV (Vertex ( , t)) = t 6= 0
addGluingData :: (type omitted for readability)
addGluingData vsi j comp m =
foldr (λv → M .insertWith (+) (toId v , j ) 1) m gluedToVs
where
gluedVs
= filter isGluedV $ vertices comp
gluedToVs = map (vMap fst) gluedVs
toId v
= fromJust $ lookup v vsi
Furthermore, we provide a utility function that calls gluingGraph and extracts
the most interesting parts from the GluedD, that is the actual multigraph (as a
GluingGraphD) and the glued surfaces (identified as Surface):
33
OS.g=1
OS.g=1
OS.g=0
Figure 4.2: Example of a gluing graph
type GluedSurfaces = GluedObj Surface
gluingGraphSurf :: (Eq a) ⇒ Complex a → (GluingGraphD, GluedSurfaces)
gluingGraphSurf = (glGraphD &&& identifyGluedSurfaces) ◦ gluingGraph
identifyGluedSurfaces :: GluedD a → GluedSurfaces
identifyGluedSurfaces = LM .map identifySurface ◦ glComplexes
The functions
writeGluingGraph :: (GluingGraphD, GluedSurfaces) → FilePath → IO ()
visualizeGluingGraph :: (GluingGraphD, GluedSurfaces) → IO ()
even use the graphviz library4 (and the identically named software5 ) to export a
nice figure of the gluing graph to a png file, respectively to draw the graph on the
screen (using an X11 windowing system). For example, let tor be as above and let
ptor be a complex that triangulates the pinched torus (i. e. (S 1 × S 1 )/({[0]} × S 1 )
or, alternatively, a 2-sphere with two distinct points identified). Then
visualizeGluingGraph $ gluingGraphSurf $ (ptor # ptor ) \/ (tor \/ tor )
draws the multigraph in Figure 4.2.
4
5
projects.haskell.org/graphviz/
www.graphviz.org
34
module
types and functions
SimplicialComplex
Vertex , Simplex , Complex ,
connectedComponents,
dfsSimplices,
parentSimplices
TwoDimPseudoManifold
baseSurfaces,
fixSingularity etc.,
fixAllSingularities,
starSummands etc.
TwoDimManifold
identifySurface
Surface
Surface
TwoDimPseudoManifold.GluingGraph
GluedD etc.,
gluingGraph etc.
gluingGraphSurf etc.
TwoDimPseudoManifold.GraphViz
writeGluingGraph,
visualizeGluingGraph
Table 4.1: Correspondence between presented functions and modules
4.3 Loop Agreement Tasks on Two-dimensional
Pseudomanifolds
Lastly, we consider loop agreement tasks on finite weak 2-pseudomanifolds. We
show that the word problem for fundamental groups of such 2-pseudomanifolds is
solvable and use this fact in conjunction with Theorem 3.15 to formulate a result
about loop agreement tasks.
It is well known that the word problem for fundamental groups of closed surfaces is solved by Dehn’s Algorithm, see Stillwell [9, Sec. 6.1]. Then the following
proposition is a consequence of this fact and Theorem 4.5.
Proposition 4.6 (solvability of the word problem for finite weak 2-pseudomanifold).
The word problem for the fundamental group of a 2-dimensional finite weak pseudomanifold (based at any vertex) is solvable.
Proof sketch. First, observe that for finite weak 2-pseudomanifolds K, K 0 and vertices v, v 0 of K and K 0 , respectively, we have
π1 (K, v) ∨ (K 0 , v 0 ) ∼
= π1 (K, v) ∗ π1 (K 0 , v 0 )
by the Seifert-van-Kampen theorem (where the wedge of complexes is defined in
the obvious way). Secondly, let K be a finite weak 2-pseudomanifold and let v1 , v2
35
be vertices of K that have disjoint stars. Let K 0 be the resulting complex after
identifying v1 and v2 to a single vertex v 0 . Then we have
π1 (K 0 , v 0 ) ∼
= π1 (K, v1 ) ∗ Z,
as can be seen by using the standard construction of the fundamental group of a
simplicial complex in terms of generators and relations (see e. g. Herlihy et al. [3,
Subsec. 15.1.2] for the latter).
Now let K be a finite weak 2-pseudomanifold, let v ∈ V (K) and assume without
loss of generality that K is connected. By Theorem 4.5 and an inductive application
of the above arguments we see that π1 (K, v) is isomorphic to a free product of the
form
π1 (S1 , x1 ) ∗ · · · ∗ π1 (Sk , xk ) ∗ Z
· · ∗ Z}
| ∗ ·{z
` times
where S1 , . . . , Sk are the closed surfaces that can be glued to K (Theorem 4.5),
xj ∈ Sj for all j ∈ {1, . . . , k}, and ` ∈ N. Now let g1 g2 . . . gr be a word in this free
product. We apply Dehn’s algorithm to each gj that is an element of one of the
fundamental groups of the surfaces and freely reduce the resulting word. Then we
repeat this steps until we either arrive at the empty word or the word cannot be
reduced further. (This process must terminate because the word length decreases
with every step.) In the first case the word g1 g2 . . . gr is the identity element and
in the second case it is non-trivial.
Corollary 4.7 (loop agreement tasks on finite weak 2-pseudomanifolds).
Let
K, L ∈ Simpfin,c
and
let
κ,
λ
be
triangle
loops
in
K
and
L,
respectively.
Further2
more, let K and L be weak 2-pseudomanifolds.
– It is decidable whether γκ and γλ are (pointed) contractible in kKk and kLk,
respectively.
– If γκ is (pointed) contractible, it is decidable whether LK,κ implements LL,λ .
Proof. The first part is immediate from Proposition 4.6. For the second part let γκ
be pointed contractible. As a direct consequence, the algebraic signature of LK,κ
is
(π1 (K, κ),
˙ 1)
(where 1 ∈ π1 (K, κ)
˙ denotes the identity element). Then Theorem 3.15, the fact
˙ by any group homothat 1 must be mapped to the identity element of π1 (L, λ)
˙
morphism π1 (K, κ)
˙ → π1 (L, λ), and the first part imply the assertion.
Our Haskell library (see Section 4.2) also includes a counterpart to the theoretical
Corollary 4.7, that is we provide a function
36
isTrivial :: (Eq a) ⇒ Loop a → Complex a → Bool
that tests whether a given loop is contractible on a finite weak 2-pseudomanifold.
Here a loop is specified as a walk [Vertex a ] (Definition 3.1) with identical first
and last vertex. (Note that we also permit repeated vertices in this case.) The main
difficulty in implementing isTrivial is that we have to find a representation of the
loop in terms of generators and relations in order to apply the algorithm for solving
the word problem. Therefore, the function has to trace the given loop through the
process of building the fundamental polygon and normalizing it afterwards (as
mentioned in the previous section). Since this is a rather complex procedure, we
make no attempt to explain the corresponding functions schemesWL and normalize
in detail here. After applying those functions, we get an intermediate result of type
(GluedObj Scheme, LoopS )
where a Scheme is just a labelling scheme of a polygon, GluedObj Scheme stores
the schemes for our surfaces Sj (of Theorem 4.5) and a LoopS is a representation
of our input loop in terms of the symbols used in those schemes. As an example,
consider the wedge of two tori. Then the first component of the above tuple would
contain the labelling schemes aba−1 b−1 and cdc−1 d−1 and the second component
would be any word in the letters {a, b, c, d} and their formal inverses. For instance,
abcdc−1 d−1 a−1 b−1 would specify a contractible loop.
The last step is the implementation of Proposition 4.6. The function
simplifyLoop :: GluedObj Scheme → LoopS → LoopS
takes the data described in the last paragraph and reduces the loop to either the
empty word (in which case the input loop is in fact contractible) or a word that
cannot be further simplified. Depending on the involved surfaces simplifyLoop uses
the functions simplifyOnX (with X one of {Sphere, Torus, PrPlane, KleinB }) and
dehnAlg to solve the word problem.
The implementation of Dehn’s algorithm and the function dehnAlg can be found
in the module DehnAlgorithm and all other functions of this section are defined in
TwoDimPseudoManifold.Loop.
37
Bibliography
[1]
G. Bredon. Topology and Geometry. Springer, 1993.
[2]
R. Fritsch and R. Piccinini. Cellular structures in topology. Cambridge University Press, 1990.
[3]
M. Herlihy, D. Kozlov, and S. Rajsbaum. Distributed Computing Through
Combinatorial Topology. Morgan Kaufmann, 2013.
[4]
M. Herlihy and S. Rajsbaum. “A classification of wait-free loop agreement
tasks”. In: Theoretical Computer Science 291.1 (2003), pp. 55–77.
[5]
M. Herlihy and N. Shavit. “The topological structure of asynchronous computability”. In: J. ACM 46.6 (1999), pp. 858–923.
[6]
J. Munkres. Elements of Algebraic Topology. Addison-Wesley, 1984.
[7]
J. Munkres. Topology. Second Edition. Prentice Hall, 2000.
[8]
E. Spanier. Algebraic Topology. McGraw-Hill, 1966.
[9]
J. Stillwell. Classical Topology and Combinatorial Group Theory. Second Edition. Springer, 1993.
39