University of RegensburgFaculty of Mathematics
Classification of Loop Agreement Tasks
Bachelor Thesisin Computational Science
Johannes Prem
Supervisor: Prof. Dr. Clara Löh
Version of
April 7, 2015
Contents
1 Introduction and Basics 41.1 Motivation and Notation . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Simplicial Complexes . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Distributed Computing via Combinatorial Topology 92.1 Mathematical Framework . . . . . . . . . . . . . . . . . . . . . . . 92.2 Interpretation of the Model . . . . . . . . . . . . . . . . . . . . . . 132.3 Examples: Set Agreement and Barycentric Agreement . . . . . . . 152.4 Implements-Relation on Tasks . . . . . . . . . . . . . . . . . . . . . 16
3 Loop Agreement Tasks 183.1 Definition and Examples . . . . . . . . . . . . . . . . . . . . . . . . 183.2 Topological Aspects . . . . . . . . . . . . . . . . . . . . . . . . . . 203.3 Classification and Consequences . . . . . . . . . . . . . . . . . . . . 24
4 Two-dimensional Pseudomanifolds 274.1 Classification of Finite Two-dimensional Pseudomanifolds . . . . . 274.2 Implementation in Haskell . . . . . . . . . . . . . . . . . . . . . . . 304.3 Loop Agreement Tasks on Two-dimensional Pseudomanifolds . . . 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 repu-tation of not being particularly useful in other fields than mathematics itself. In thisthesis, however, we use topological methods for a theoretical model of distributedcomputing, especially so called loop agreement tasks. Distributed computing is thestudy of writing programs that run simultaneously on multiple processing units,which communicate through a given network protocol. Often it is a complex prob-lem to decide whether a given task can be solved under certain preconditionsdepending on the hardware environment and the constrains imposed by the com-munication protocol. To answer this question for some cases, we define and employan abstract model of distributed computing in Chapter 2, using simplicial com-plexes 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 4of their book. Then we describe loop agreement tasks and establish a link to thefundamental group of a space. The corresponding classification result of Chapter 3is taken from Herlihy et al. [3, Ch. 15][4], but our approach and proof will be abit different. In the last chapter we investigate how the preceding material canbe 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 waitfor another process. It has to do its computation in a finite number of steps withwhatever information it got up to that point. Therefore, such programs are calledwait-free. This also includes the problem of “crashed processes” (processes thathalted prematurely, e. g. due to a hardware malfunction) because in a wait-freecomputation a process cannot know how many other processes are still running.Secondly, tasks are colorless, which means that it is irrelevant which process haswhich input (respectively output) value, only the set of input (respectively output)values is considered. And lastly, the communication between processes happensthrough shared memory, every outgoing communication of a process consists of“everything it knows” and reading the memory always happens as an atomic snap-shot. The method of communication does not actually affect our model, but Herlihyet 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 in-clude the latter to justify our use of so called barycentric agreement protocols inthe 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. Moreexplanations on those terms in the context of distributed computing and how theyrelate to the mathematical model can be found in the book by Herlihy et al. [3], apaper 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”.– For a set of sets A, the symbol
⋃A denotes the union over all elements
of A, also commonly written as⋃B∈AB.
– The natural numbers N include 0.– A “map” between topological spaces always means “continuous map”, un-
less stated otherwise.– We identify the 1-sphere S1 with the space [0, 1]/{0, 1}.
1.2 Simplicial Complexes
Since our mathematical model for distributed computing fundamentally relies onsimplicial complexes, the following contains a brief review of the basic definitionsand properties used in this thesis. We include it for the sake of completeness but notto replace an introduction on the topic by a good text book. References for furtherreading 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 isclosed under taking subsets (i. e. for all F ∈ K and F ′ ⊂ F we have F ′ ∈ 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. Anelement F of K is a simplex (of K), dim(F ) := |F | − 1 ∈ N ∪ {−1} is itsdimension, and each subset of F is called a face of F . A simplex of dimension nis also called an n-simplex.
– The dimension of (V,K) is
dim(K) := maxF∈K
dim(F ) ∈ N ∪ {−1,∞}
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 ′,K ′) such that V ′ ⊂ V andK ′ ⊂ 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) de-termined by F and its faces, i. e. K(F ) := (F, {F ′ | F ′ ⊂ F}). Similarly, for asubset A ⊂ K, we define K(A) := (
⋃A,⋃F∈AK(F )).
Convention 1.2. Instead of (V,K) we mostly speak of a simplicial complex Kwhere it is understood that V (K) := V =
⋃K.
Definition 1.3 (simplicial map). Let K,L be simplicial complexes. A simplicialmap f : K → L is a map f : V (K) → V (L) such that simplices of K are taken tosimplices of L, i. e. for F ∈ K we have f(F ) ∈ L.
Definition 1.4 (category of simplicial complexes). Simplicial complexes to-gether with simplicial maps (and usual function composition) form a category Simp.For n ∈ N ∪ {−1} we also denote its full subcategory of n-dimensional simplicialcomplexes by Simpn.
Example 1.5 (standard simplex (as a complex)). Let n ∈ N. The n-dimensionalstandard simplex is
∆n := {0, . . . , n}.
The standard simplex ∆n together with all subsets thereof forms a simplicial com-plex, which (by abuse of notation) we also denote by ∆n (the meaning will be clearfrom the context). We write ∂∆n for the (n−1)-skeleton of ∆n.
Definition 1.6 (geometric standard simplex). Let n ∈ N. The n-dimensionalgeometric standard simplex is the convex hull of the unit vectors in Rn+1 (with thesubspace topology):
∆ngeo
:= conv(e0, . . . , en) ⊂ Rn+1.
For J ⊂ {0, . . . , n} the subspace conv({ej | j ∈ J}) of ∆ngeo is called a face of ∆n
geo.We also set ∆−1
geo:= ∅ for convenience.
6
Definition 1.7 (geometric realization).– LetK be a simplicial complex. The geometric realization of K is the topological
space‖K‖ :=
∐F∈K
∆dim(F )geo
/∼,
where ∼ is the equivalence relation generated by the obvious gluing of facesthat is encoded in K. For a vertex v and a simplex F of K we denote by ‖v‖and ‖F‖ the corresponding point and subspace of ‖K‖, respectively (i. e. theimage (point) under the canonical inclusion followed by the quotient map).Consequently, for a subcomplex K ′ ⊂ K we write ‖K ′‖ for
⋃{‖F ′‖ | F ′ ∈
K ′} ⊂ ‖K‖. For x ∈ ‖K‖ the (unique) simplex F of K such that the “interior”of ‖F‖ contains x is supp(x) = F where by interior we mean the image in ‖F‖of the relative interior of ∆dim(F )
geo in Rdim(F )+1.
– Let K,L be simplicial complexes and let f : K → L be a simplicial map. Then
‖f‖ : ‖K‖ → ‖L‖
is the continuous map obtained from f by affine extension to each simplex.
More explicit definitions and explanations of geometric realizations can be foundin the references mentioned at the beginning of this section.
Definition 1.8 (triangulation). Let X be a topological space. Then X is trian-gulable if there exists a simplicial complex K and a homeomorphism f : ‖K‖ → X.Such a pair (K, f) is then called a triangulation of X and we say that X is trian-gulated 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
sdK :={{F1, . . . , Fk} ⊂ K
∣∣ k ∈ N, F1 ( · · · ( Fk}.
We set sd0K := K, sd1K := sdK and for N ∈ N>2 we define recursively sdNK :=sd(sdN−1K), the N -th barycentric subdivision of K.
Proposition 1.10 (geometric barycentric subdivision). Let K be a simplicialcomplex.– There exists a homeomorphism
βK : ‖sdK‖ → ‖K‖,
given by the affine extension to each geometric simplex of the following map‖(sdK)60‖ → ‖K‖: for a vertex v of sdK, which is a simplex of K, say v =F ∈ K, the point ‖v‖ ∈ ‖sdK‖ is mapped to the barycenter of ‖F‖ ⊂ ‖K‖.
7
– In particular, the above homeomorphism induces a homeomorphism
βNK : ‖sdNK‖ → ‖K‖
for all N ∈ N>1, and for convenience, we set β0K := id‖K‖.
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 complexesand let fgeo : ‖K‖ → ‖L‖ be continuous. A simplicial map f : K → L is a simplicialapproximation to fgeo if supp(‖f‖(x)) is a face of supp(fgeo(x)) for all x ∈ ‖K‖.
Theorem 1.12 (simplicial approximation theorem). LetK,L be finite simplicialcomplexes and let fgeo : ‖K‖ → ‖L‖ be continuous. Then there exists an N ∈ Nand a simplicial map f : sdNK → L such that f is a simplicial approximation tofgeo ◦ βNK : ‖sdNK‖ → ‖L‖.
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 simplicialcomplex and let K ′ be a subcomplex of K. Then ‖K ′‖ ↪→ ‖K‖ is a cofibration.
See, for example, Spanier [8, Ch. 3, Sec. 2, Corollary 5].
8
2 Distributed Computing viaCombinatorial Topology
Based on the combinatorial description of (sufficiently well-behaved) topologicalspaces by simplicial complexes we can define and (briefly) explain our model fordistributed tasks and protocols that solve tasks. We give the strict mathematicaldefinitions first and explain their interpretation in the context of distributed com-puting afterwards.
2.1 Mathematical Framework
The following definitions rely on an additional type of map that is operating onsimplicial 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 → {L′ | L′ ⊂ L is a subcomplex},
where both sets are partially ordered by inclusion. More explicitly: For sim-plices F ′ ⊂ F in K we require Φ(F ′) ⊂ Φ(F ) as subcomplexes of L.
– For the rest of this definition, let Φ: K → L be a carrier map. Then Φ is strictif it satisfies
Φ(F ∩ F ′) = Φ(F ) ∩ Φ(F ′)
for all simplices F, F ′ ∈ K.
– For A ⊂ K the subcomplex
Φ[A] :=⋃
Φ(A)
of L is the image complex of A under Φ and we call the complex Φ[K] simplythe image complex of Φ.
– Let Ψ: L → M be another carrier map. Then the composition of Φ and Ψ isdefined 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 notactually L (but the set of subcomplexes of the latter).
Examples 2.2. See Figure 2.1 for graphical representations of the followingexamples.
(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 S1 × S1. 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 itsimage complex is T .
10
0 1
23
Φ1
0 1
23
4K L
0 1
2
Φ2
0 1
2
∆2 ∆2
0 1
2
Φ3
1
1
2
2
3
3
1
1
5 5
9 9
∆2 T
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 composecarrier 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 mapf : K → L and a subcomplex K ′ of K we call the subcomplex
f [K ′] := {f(F ) | F ∈ K ′}
of L the image complex of K ′ under f .
Definition 2.4 (composition of carrier maps with simplicial maps). LetK1 toK4
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 ′) := g[Φ(F ′)]
for all F ∈ K1, F ′ ∈ K2.
We are now ready to define our main objects of interest, namely tasks andprotocols 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 outputcomplex, respectively.
– A protocol is a strict carrier map Ξ: I → P where P is the image complexof Ξ. We call I and P the input and protocol complex, respectively.
Convention 2.6 (the (−1)-simplex). Our definition of a simplicial complexensures that it always includes the (−1)-simplex (i. e. the empty simplex) wheneverthe 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)-simplexas 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 aproper simplicial complex. The effect of this rule is a clearer notation withoutany actual loss of information. (Note, that this is only a simplification in writingand 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 thereexists 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 inthe 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 wehave a system with a number of processes, each with an initial private “piece ofinformation” which we require to be an element ofX. (The input values need not bedistinct.) Now the processes may communicate (subject to certain constrains of theconsidered 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 haveto be the same (and additionally one of the input values). For obvious reasons, thistask is called p-consensus. Note that we are only interested in the set of assignedinput 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 simplexof I in this case if and only if F ⊂ X. (At this point, we should assume that thereare more processes than input values because an input configuration with morevalues than processes does not make much sense.) The output complex encodesevery allowed output configuration, that is, F ′ ∈ O if and only if F ′ ⊂ X is asingleton set. The carrier map Φ then encodes which input configurations may leadto which output configurations: If all processes start with x ∈ X, the only allowedoutput configuration is {x}, so Φ({x}) would be {{x}}. If the input configurationis {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. Observethat 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 encodesthe possible input configurations, O represents valid output configurations andΦ: I → O specifies the actual task, that is for each input configuration it specifiesthe set of output configurations that are considered a “successful completion of thetask” 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 processesrun some sort of (communication) algorithm whose possible output configurationsare captured by Ξ and P . That means if F ∈ I is an input configuration, Ξ(F ) ⊂ Pincludes every possible output configuration that may arise from the input config-uration 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 theexact output configuration) because the communication between processes intro-duces a degree of uncertainty. As mentioned in the introduction, this correspondsto 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 producea valid task output value”. The protocol output value represents “everything aprocess has learned” during the communication and the map δ “decides which taskoutput 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 wechose simplicial complexes as a mathematical basis. Simply put, those propertiesare related to the various assumptions about the underlying distributed system.For example, an input complex I has to be a simplicial complex because a processcould crash before communicating its input value to the other processes: An inputconfiguration F ∈ I should contain all values that are actually used by any ofthe processes to produce an output value. Now let F ′ ⊂ F and assume that theprocesses with input values in F \F ′ crash before sending their values to any of theother processes. Then the latter continue their execution with values from F ′ only,so the true input configuration has to be F ′ ⊂ F . Put another way, I must containall subsets of all elements F ∈ I, which is precisely the definition of a simplicialcomplex.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 “combinatorialmodel” and the “operational model” (which describes tasks and protocols from acomputer 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 theconsensus task (Example 2.8), one of which will play an important role in Sec-tion 3.3.
Example 2.9 (set agreement). Let X be a finite set of cardinality p and assumethere are n processes where n > p. The p-values k-set agreement task (or (p, k)-setagreement for short) is defined by the following task description: Each process’sinput value is an element of X (where different processes may be assigned the sameinput value) and each process’s output value is one of the assigned input valuessuch that the output configuration (set of all chosen output values) is a subsetof X of cardinality at most k. Put another way, the task requires the processes tochoose 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 con-figuration, skelk−1(F ) is the (k−1)-skeleton of the complex determined by F , thatis
skelk−1(F ) :=(∆p−1(F )
)6k−1,
which obviously defines a carrier map. (To keep the notation readable we writeonly 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 formaldefinition 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 inputvalue. Formally: Since p 6 k we have (∆p−1)6k−1 = ∆p−1 and the carriermap 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 thesame 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 statethem 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 ) := sdK(F )which is a subcomplex of sdK. Thus we obtain a carrier map sdK : K → sdK.Since we can compose sdK with sdsdK and so on, we also obtain a carrier mapK → sdNK for all N ∈ N which we denote by sdNK .
Example 2.10 (barycentric agreement). Let K be a simplicial complex andlet N ∈ N. The N -th barycentric agreement task for the input complex K is thetask sdNK : K → sdN 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 sdNK(F ), the N -th barycentricsubdivision of F (as a subcomplex of sdN K).
Also note that for all K ∈ Simp and all N ∈ N the carrier map sdNK is strict and“surjective” (in the sense of the image complex). Therefore sdNK is also a protocolwhich 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 rathercan be used to implement) another task. This section will make that intuitionformal 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 composeprotocols, we prove the following
Lemma 2.11 (composition of strict carrier maps). Let K,L,M be simplicialcomplexes and let Φ: K → L and Ψ: L → M be strict carrier maps. Then theircomposition Ψ ◦ Φ: K →M is strict as well.
Proof. Let F and F ′ be simplices of K. We have to show that
(Ψ ◦ Φ)(F ∩ F ′) = (Ψ ◦ Φ)(F ) ∩ (Ψ ◦ Φ)(F ′).
By definition of Ψ ◦ Φ, basic set theory and strictness of Ψ we obtain:
(Ψ ◦ Φ)(F ) ∩ (Ψ ◦ Φ)(F ′) =(⋃G∈Φ(F )
Ψ(G))∩(⋃G′∈Φ(F ′)
Ψ(G′))
=⋃
G∈Φ(F )
⋃G′∈Φ(F ′)
Ψ(G ∩G′).
Since Φ(F ) and Φ(F ′) are both subcomplexes of L, they contain every face ofG ∈ Φ(F ) and G′ ∈ Φ(F ′), respectively. In particular, G ∩G′ is already a simplexof Φ(F ) ∩ Φ(F ′), which shows the non-trivial inclusion of the following equality:
16
⋃G∈Φ(F )
⋃G′∈Φ(F ′)
Ψ(G ∩G′) =⋃
G∈Φ(F )∩Φ(F ′)
Ψ(G).
By strictness of Φ and the definition of Ψ ◦ Φ the right hand side is equal to(Ψ ◦ Φ)(F ∩ F ′).
�
Corollary 2.12 (composition of protocols). Let I, P, I ′, P ′ be simplicial com-plexes with P ⊂ I ′, and let Ξ: I → P and Ξ′ : I ′ → P ′ be protocols. Then thecomposition Ξ′ ◦ Ξ is again a protocol onto its image complex (Ξ′ ◦ Ξ)[I].
Proof. Immediate from Lemma 2.11.�
Generally, we want to formalize the following situation: suppose we are givena set of tasks T and for each Φ ∈ T a protocol that solves Φ, can we use theseprotocols to to solve another task Φ′? If this is the case, we say the tasks of Timplement Φ′.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 assumethat 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 casewhere 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 amountand order of protocols used. Put formally, this becomes:
Definition 2.13 (task implementing a task). Let I,O,O′ be simplicial com-plexes, let Φ: I → O and Φ′ : I → O′ 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 Φ′ if there exists an N ∈ N such that sdNO ◦Φ, the compositionof a barycentric agreement protocol sdNO : O → sdN O and Φ, solves Φ′.
This is enough for our purposes, as we shall see later. We also note that theassumption of available barycentric agreement protocols is not absurd, on the con-trary: Herlihy et al. [3, Corollary 4.2.10] show that our underlying computationalmodel permits an (operational) implementation of those protocols and even better,that they can be obtained directly from immediate snapshot protocols (mentionedin 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 arerelated 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 thefundamental groups of (the geometric realizations of) the involved complexes. Westart 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) forall j ∈ {0, . . . , n− 1}. If w is a walk in K as above, we denote by w := v0 andw := 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 K61 our terminology coincides with the typical defi-nitions found in an introduction to graph theory and, indeed, the above definitionis just a restatement of the classical terms in the simplicial setting.
Definition 3.2 (composition of walks). Let K be a simplicial complex, letk ∈ N>1 and let w1, . . . , wk be walks in K where wj = (vj,0, . . . , vj,nj ) for allj ∈ {1, . . . , k}. We say w1 ∗ · · · ∗ wk is a valid composition if wj = wj+1 for allj ∈ {1, . . . , k − 1} and in that case we define the composition of w1, . . . , wk as thewalk
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 thevertices 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 triangleloop in K is a triple κ = (p0, p1, p2) of paths in K such that p0 ∗ p1 ∗ p2 is avalid composition and a cycle in K. In that case we call p0, p1, p2 the distinguishedvertices and κ := p0 the base point of κ.
Given a triangle loop inK, this loop gives rise to a distributed task: the processesare assigned input values that correspond to the distinguished vertices of the loopand 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 introducesome useful conventions.
Convention 3.5.– Let K be a simplicial complex and let (p0, p1, p2) be a triangle loop in K. Forj ∈ {0, 1, 2} the subcomplex of K determined by pj is denoted K(pj); moreprecisely: K(pj) is the smallest subcomplex of K containing all edges of pj .
– Let Simpfin,c2 denote the full subcategory of Simp2 that has finite connected
2-dimensional simplicial complexes as its objects. A simplicial complex K isconnected if for every two vertices v, v′ ∈ V (K) there exists a walk w in Kwith w = v and w = v′. (This clearly implies that ‖K‖ is path connected inthe usual topological sense.)
Definition 3.6 (loop agreement task). Let K ∈ Simpfin,c2 and let κ = (p0, p1, p2)
be a triangle loop in K. The associated loop agreement task LK,κ : ∆2 → K isdefined as:
F 7→
K({pj}) if F = {j},K(p0) if F = {0, 1},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 inputconfiguration is, say, {0, 1} ∈ ∆2, the output configuration has to be a simplex ofK(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 agree-ment 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 butimportant 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).Let N ∈ N. Let p0 be the unique path from sdN∆2({0}) to sdN∆2({1}) in sdN∆2({0, 1})and let p1, p2 be defined analogously. Then the barycentric agreement task
sdN∆2 : ∆2 → sdN ∆2
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 basedon the fundamental group of its simplicial complex’s geometric realization. Wealso show that every homomorphism of fundamental groups where the domainspace is the geometric realization of a finite, 2-dimensional simplicial complex isin fact induced by a continuous map and how that affects maps between algebraicsignatures.
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) bea triangle loop in K.– For j ∈ {0, . . . , n − 1} let ij : ‖{vj , vj+1}‖ ↪→ ‖K‖ be the canonical inclusion.
The (topological) loop γc associated to c is the (well-defined) injective contin-uous map
S1 → ‖K‖, [t] 7→ ij(1− τ, τ) for τ = tn− j, if t ∈[ jn ,
j+1n
].
– The (topological) loop γκ associated to κ is
γκ := γp0∗p1∗p2 .
20
Convention 3.11 (fundamental group of a complex). Let K be a simplicialcomplex and let v be a vertex of K. We say fundamental group of K (based at v)for the fundamental group of ‖K‖ (based at ‖v‖) and write
π1(K, v) := π1(‖K‖, ‖v‖).
Definition 3.12 (algebraic signature). Let K,L ∈ Simpfin,c2 and let κ, λ be
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 elementof π1(K, κ).
– If ϕ : π1(K, κ)→ π1(L, λ) is a group homomorphism that maps [γκ]∗ to [γλ]∗,we call
ϕ :(π1(K, κ), [γκ]∗
)→(π1(L, λ), [γλ]∗
)a map of algebraic signatures.
In general, a group homomorphism between fundamental groups of topologicalspaces 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 fi-nite 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 agroup homomorphism. Then there exists a base point preserving continuous mapf : (‖K‖, ‖x‖)→ (Y, y0) such that π1(f) = ϕ.
Proof. Let K∗ be a spanning tree of the graph K61 and let x0 := ‖x‖ ∈ ‖K‖. Then‖K∗‖ ⊂ ‖K‖ is contractible and since the inclusion of a subcomplex is a cofibration(Lemma 1.13) this implies that the quotient map q : ‖K‖ → ‖K‖/‖K∗‖ =: X is ahomotopy equivalence. Let
ψ := ϕ ◦ π1(q)−1 : π1(X, [x0])→ π1(Y, y0)
and let X1 := q(‖K61‖). Clearly, since K∗ was a spanning tree, all vertices of Kare identified in X1 and therefore
X1 ∼=∨k
S1,
where k ∈ N is the number of 1-simplices of K not contained in K∗. For j ∈{1, . . . , k} let γj : S1 → X1 be the inclusion of the j-th loop into this wedge sum
21
and let [ηj ]∗ := ψ([γj ]∗). Then the loops ηj : (S1, [0])→ (Y, y0) combine to a map
g1 : X1 → Y
(because “∨” is the coproduct in the category of pointed spaces). Now we extendg1 to X. Since only parts of ‖K61‖ are identified to a point by q, we see that Xfits into a pushout diagram
∐`j=1 S
1
∐`j=1 ϕj
//
� _
��
X1
��∐`j=1D
2 // X,
where ` ∈ N is the number of 2-simplices of K. Fix j ∈ {1, . . . , `}. Then
[ϕj ]∗ = [γ]∗ · [γ′]∗ · [γ′′]∗ ∈ π1(X, [x0])
where γ, γ′, γ′′ correspond to the three 1-dimensional faces of the original 2-simplexof K, so each of those is either the constant loop at [x0] ∈ X or one of the loops γj′ .It is easy to see that ϕj is pointed contractible in X because it is the projectedboundary loop of a 2-simplex in ‖K‖. Furthermore,
[g1 ◦ γ]∗ = ψ([γ]∗)
(and likewise for γ′ and γ′′) clearly holds if γ is the constant loop and for γ = γj′
we have [g1 ◦ γj′ ]∗ = [ηj′ ]∗ = ψ([γj′ ]∗) by definition of g1 and ηj′ . Now the followingcalculation shows that g1 ◦ ϕj is pointed contractible in Y as well:
[g1 ◦ ϕj ]∗ = [g1 ◦ γ]∗ · [g1 ◦ γ′]∗ · [g1 ◦ γ′′]∗= ψ([γ]∗) · ψ([γ′]∗) · ψ([γ′′]∗)
= ψ([ϕj ]∗) = ψ(1) = 1 ∈ π1(Y, y0).
Thus g1 ◦ϕj : S1 → Y can be extended to a map g2j : D2 → Y for all j ∈ {1, . . . , `}.We obtain a commutative diagram
∐`j=1 S
1
∐`j=1 ϕj
//
� _
��
X1
��g1
��
∐`j=1D
2 //
∐`j=1 g2j
00
Xg
%%Y ,
22
and by virtue of the universal property of the pushout a map g : X → Y fittinginto the diagram. The composition
f := g ◦ q : ‖K‖ → Y
is the desired map because: the equivalence classes of the loops γ1, . . . , γk obviouslygenerate π1(X, [x0]) and g restricts to g1 on X1, 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
2 and let κ, λ be triangle loops in K and L, respectively. Then there existsa map of algebraic signatures
ϕ :(π1(K, κ), [γκ]∗
)→(π1(L, λ), [γλ]∗
)if and only if there exists a continuous map
f : ‖K‖ → ‖L‖ with f ◦ γκ = γλ.
Proof. If f is a map as above, the induced homomorphism π1(f) yields the mapof algebraic signatures as required. Conversely, let ϕ be such a map of algebraicsignatures. By Lemma 3.13 there exists a map f ′ : ‖K‖ → ‖L‖ with π1(f ′) = ϕ.Then the loop f ′ ◦ γκ is, by assumption, pointed homotopic to γλ; let the maph : S1 × [0, 1]→ ‖L‖ be such a pointed homotopy. By definition of γκ we see, thatγκ defines a homeomorphism between S1 and a (1-dimensional) subcomplex of ‖L‖,hence γκ is a (pointed) cofibration (Lemma 1.13). Therefore, we obtain a pointedhomotopy H : ‖K‖ × [0, 1]→ ‖L‖ such that the following diagram commutes:
S1 γκ //
(idS1 , const0)��
‖K‖
(id‖K‖, const0)
��f ′
��
S1 × [0, 1]γκ×id[0,1]
//
h //
‖K‖ × [0, 1]
H
((‖L‖.
Let f := H( · , 1) : ‖K‖ → ‖L‖, then
f ◦ γκ = H ◦ (γκ × const1) = h( · , 1) = γλ
and since f and f ′ are homotopic: π1(f) = π1(f ′) = ϕ.�
23
3.3 Classification and Consequences
Theorem 3.15 (classification of loop agreement tasks [3, Theorem 15.3.8]). LetK,L ∈ Simpfin,c
2 and let κ, λ be triangle loops in K and L, respectively. ThenLK,κ 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 imme-diate 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 : ‖K‖ → ‖L‖ such that fgeo ◦ γκ = γλ. By the simplicialapproximation theorem (Theorem 1.12), there exists an N ∈ N and a simplicialmap f : sdNK → L such that f is a simplicial approximation to fgeo ◦ βNK . Weclaim that sdNK ◦ LK,κ solves LL,λ with decision map f , that is we have to showthat f ◦ (sdNK ◦ LK,κ) is carried by LL,λ.
KsdNK // sdNK
f
��
∆2
LK,κ
OO
LL,λ// L
(?)
In the following, we identify the distinguished vertices of κ with the correspondingvertices of sdNK. Since f is a simplicial approximation to fgeo ◦βNK and fgeo(‖pj‖) =‖qj‖ for all j ∈ {0, 1, 2} by assumption on fgeo, we have
supp(‖f‖(‖pj‖)
)⊂ supp
((fgeo ◦ βNK )(‖pj‖)
)= supp(‖qj‖) = {qj}.
The case of the 2-simplex is trivial, so it remains to show that(f ◦ (sdNK ◦ LK,κ)
)(F ) ⊂ LL,λ(F )
for all 1-simplices F of ∆2. Let F ∈ ∆2 be a 1-simplex and let j ∈ {0, 1, 2} suchthat LK,κ(F ) = K(pj). Then, if F ′ is a simplex of K(pj) and F ′′ is a simplex ofsdNK(F ′), we must have f(F ′′) ∈ L(qj) because
(fgeo ◦ βNK )(‖F ′′‖) ⊂ fgeo(‖F ′‖) ⊂ fgeo(‖K(pj)‖
)⊂ ‖L(qj)‖
and f(F ′′) /∈ L(qj) would contradict the fact that f is a simplicial approximationto fgeo ◦ βNK . Therefore(
f ◦ (sdNK ◦ LK,κ))(F ) = f
[⋃sdNK
(K(pj)
)]⊂ L(qj),
which completes the first half of the proof.
24
Now assume that LK,κ implements LL,λ and that we are given N ∈ N and asimplicial map f : sdNK → L such that sdNK ◦ LK,κ solves LL,λ with decisionmap f (see (?)). Then we let
fgeo := ‖f‖ ◦ (βNK )−1 : ‖K‖ → ‖L‖
and claim that π1(fgeo) is a map of algebraic signatures as desired. To that end,let γsdNκ denote the loop S1 → ‖sdNK‖ that is defined like γκ (Definition 3.10)with the barycenters added to the cycle’s vertices in the only sensible way. Thenthe following diagram commutes
S1 γκ //
γsdNκ ##
‖K‖
‖sdNK‖
βNK
OO
(which can be seen by inspection of the definitions). Furthermore, since the carriermap f ◦ (sdNK ◦ LK,κ) is carried by LL,λ, every simplex of sdNK(K(pj)) is mappedinto L(qj) by f and likewise for the corresponding geometric simplices. It followsthat
‖f‖(∥∥sdNK [K(pj)]
∥∥) ⊂ ‖L(qj)‖,
which clearly implies that ‖f‖ ◦ γsdNκ wraps around im(γλ) ∼= S1 exactly once.Thus we have
fgeo ◦ γκ = ‖f‖ ◦ (βNK )−1 ◦ γκ = ‖f‖ ◦ γsdNκ '∗ γλ,
which completes the proof.�
Now we list some immediate consequences of the classification theorem. By thenotation (G, g) ∼= (H,h) we always mean that there exists an group isomorphismG→ H with g 7→ h.
Corollary 3.16 ((3, 2)-set agreement implements any loop agreement task). Re-call from Example 3.8, that (3, 2)-set agreement can be interpreted as the loopagreement task L∂∆2, κ where κ = ((0, 1), (1, 2), (2, 0)). Therefore the algebraicsignature of L∂∆2, κ is(
π1(∂∆2, 0), [γκ]∗)) ∼= (π1(S1, [0]), [idS1 ]∗
) ∼= (Z, 1).
For a groupG 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 agreementtask.
25
Corollary 3.17 (no (3, 2)-set agreement from barycentric agreement). LetL∂∆2,κ be the (3, 2)-set agreement task as in the previous corollary, let N ∈ N andrecall from Example 3.9 that 2-dimensional N -th barycentric agreement (on ∆2)is a loop agreement task which we denote by LsdNK,µ here. Then LsdNK,µ doesnot implement L∂∆2,κ because: sdNK is contractible, hence the algebraic signatureof LsdNK,µ is (
π1(sdNK, µ), [const‖µ‖]∗) ∼= ({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, ourassertion follows from the classification theorem (Theorem 3.15).
26
4 Two-dimensional Pseudomanifolds
4.1 Classification of Finite Two-dimensionalPseudomanifolds
Definition 4.1 ((weak) pseudomanifold). Let n ∈ N.– An n-dimensional weak pseudomanifold (without boundary) (or weak n-pseudo-manifold) is a simplicial complex K of dimension n satisfying the followingproperties:
∗ 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 thefollowing property:
∗ For all n-simplices F, F ′ of K there exists a k ∈ N and a finite sequenceF = F0, F1, . . . , Fk = F ′ 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 ∈ ‖K‖. Then the followingfact is obvious from the definition: if supp(x) is an n- or (n−1)-simplex of K, wecan 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. Thusthe geometric realization of K partially behaves like a manifold but may fail to belocally 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 weakpseudomanifold where the highlighted vertex does not have a euclideanneighborhood
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 withloop agreement tasks on 2-dimensional pseudomanifolds without boundary, butthe notion of pseudomanifolds with boundary plays an important role in so calledmanifold 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 pseudo-manifold with boundary for all F ∈ I (and Ξ commutes with taking boundaries inan appropriate way). For instance, it is easy to see that the barycentric agreementprotocol sdK (Example 2.10) is a manifold protocol for all K ∈ Simp.
We are now going to (topologically) classify finite weak 2-pseudomanifolds. (Itis well known that the finiteness condition corresponds to compactness on thetopological side of geometric realizations, but in our combinatorial context of sim-plicial complexes “finite” sounds more appropriately.) The above discussion alreadyshows that we only have to deal with 0-simplices in the 2-dimensional case, namelywith vertices that do not have a euclidean neighborhood. To identify those verticescombinatorially, we consider the star of a vertex:
Definition 4.3 (star of a vertex). Let K be a simplicial complex and letv ∈ V (K) be a vertex of K. The star of v (in K) is the subcomplex of K that isdetermined 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 weak2-pseudomanifold and let v ∈ V (K) be a vertex of K.– Then there exist k ∈ N and (up to order) unique subcomplexes K0, . . . ,Kk
ofK, which we call the wedge summands of st(v), with the following properties:
∗ st(v) =⋃kj=0Kj and {v} ∈
⋂kj=0Kj ,
∗ ∀ j, j′ ∈ {0, . . . , k}, j 6= j′ : Kj ∩Kj′ ={∅, {v}
},
∗ ∀ j ∈ {0, . . . , k} : (‖Kj‖, ‖v‖) ∼= (D2, 0).
– Especially, ‖st(v)‖ ⊂ ‖K‖ is homeomorphic to a finite wedge of 2-disks (D2, 0)where the base point corresponds to ‖v‖.
Proof. At first observe that the star of v is completely determined by the 2-sim-plices containing v because every 0- or 1-simplex is contained in some simplex ofdimension 2 by definition of a pseudomanifold. Let F0 = {v, x0, x1} ∈ K be a2-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 thatFj ∩ Fj+1 is a 1-simplex of which v is a vertex for all j ∈ {0, . . . , k}. Clearly,(‖K({F0, . . . , Fk})‖, ‖v‖) is pointed homeomorphic to (D2, 0). Proceeding in thesame fashion if there are more 2-simplices containing v, we obtain a finite numberof such wedge summands. Let F and F ′ be 2-simplices of two different wedgesummands. Then F ∩ F ′ cannot be a 1-simplex because that would contradictthe fact that every 1-simplex is the face of exactly two 2-simplices. It follows thatF ∩F ′ = {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 afinite weak 2-pseudomanifold. Then ‖K‖ is homeomorphic to a quotient∐k
j=1Sj
/∼ ,
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 ′ ⊂ V (K) be the set of vertices v where ‖v‖ does not have a euclideanneighborhood. By Proposition 4.4 and a standard connectedness argument, theseare exactly those vertices whose star consists of more than one wedge summand. Letv ∈ V ′ 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 addvertices 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, thestar of each vertex vj consists of a single wedge summand. By induction on |V ′| weobtain a complex K ′ such that every vertex of K ′ has that property. By definitionof pseudomanifolds and Proposition 4.4 we see that every point of ‖K ′‖ has aeuclidean neighborhood, thus ‖K ′‖ is a compact 2-manifold, that is a disjoint unionof closed surfaces. The simplicial projection map K ′ → K (which maps recentlyintroduced points vj to the point v they originated from) induces a surjectivecontinuous map ‖K ′‖ → ‖K‖, and since ‖K ′‖ is compact and ‖K‖ 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.5in Haskell.1 The complete software is included on a CD at the end of the printedcopies of this thesis, and in the near future the code can also be found on theauthor’s github page.2 See Table 4.1 at the end of the section for a correspondencebetween 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 shouldnot be much of a restriction). (Note that this declaration uses a GADT3 to enforcethat vertices can be tested for equality.) A “set” of vertices is a list in Haskell andlikewise for complexes. Of course, this allows “simplices with repeated vertices” orsimilar 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
that ‖K‖ ∼= (∐kj=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 algorithmfor identifying a vertex as a singularity and for resolving the latter. We test eachvertex, fix the singularity if necessary and finally obtain a complex K ′ such that‖K ′‖ is a compact 2-manifold. Then we isolate the connected components ofK ′ andfor each component L ⊂ K ′ we identify the surface ‖L‖. If we are only interestedin the closed surfaces Sj , we are done here, but if we also want to specify how theyare glued together, further examination of K ′ is required.
We get back to the gluing problem later and start with the identification of thesurfaces Sj . Assume that K is given as c :: Complex a and that v :: Vertex a is avertex of c. Then fixSingularity v c returns a complex with the singularity at (thevertex corresponding to) v resolved. This is the implementation of the functionfixSingularity :
fixSingularity :: (Eq a)⇒ Vertex a → Complex a → Complex (a, Int)fixSingularity v c = let f = id &&& const 0
c′ = complexMap f cv ′ = vMap f v
in fixSingularity ′ v ′ c′
1www.haskell.org2www.github.com/J0J0 (J-zero-J-zero)3generalised algebraic datatype, www.haskell.org/haskellwiki/Generalised_algebraic_datatype
30
fixSingularity ′ :: (Eq a)⇒Vertex (a, Int)→ Complex (a, Int)→ Complex (a, Int)
fixSingularity ′ v c =case starSummands v c of
: [ ]→ csSs → fixSingularity ′′ v sSs c
fixSingularity ′′ :: (type omitted for readability)fixSingularity ′′ v sSs c =let sSs ′ = map (parentSimplices [v ] ◦ generatedBy) sSs
oldSimplices = [v ] : concatMap (delete [v ]) sSs ′
newSimplices = concatMap (replaceStarSummand v) $ [1 . .] ‘zip‘ sSs ′
in (c \\ oldSimplices) ∪ newSimplices
starSummands :: Vertex a → Complex a → StarSummands astarSummands v c = findSummands $ star v c
findSummands :: Complex a → StarSummands afindSummands st =case filter (isNSimplex 2) st of
[ ] → [ ]s : _ → let
summand = dfsSimplices st sst ′ = st \\ summand
in summand : findSummands st ′
To be able to split a vertex into multiple copies (like in the proof of Theorem 4.5),we first transform c into c′ :: Complex (a, Int) where each vertex has the in-dex 0 attached. The function fixSingularity ′ obtains the wedge summands of st(v)and passes them to fixSingularity ′′ unless there is no singularity at v . The latterfunction then implements what is described in the proof of the theorem (whereparentSimplices s c1 returns all simplices of c1 of which s is a face). The computa-tion 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 traver-sal. In this case dfsSimplices c1 s1 starts at a simplex s1 ∈ c1 of dimension d andreturns all d-simplices of c1 that share a common (d−1)-dimensional face with s1 oranother simplex already visited. For instance, dfsSimplices c s for any 2-simplex sof 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 surfacecomplex. This is done by the function identifySurface which takes a complex andhas 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). Insteadof including the implementation of identifySurface here, we only explain how itworks. Basically, there are two approaches that come to mind:
– Determine the orientability type explicitly and calculate the genus from theEuler characteristic.
– Compute a fundamental polygon of the complex and analyse the labellingscheme.
Our implementation follows the latter strategy since we need its functionality inSection 4.3 anyway. To be a little bit more specific, we do the following: paste all 2-simplices together to obtain a polygon with edges to be identified in pairs; normalizethe resulting labelling scheme; determine the surface type from the normal form.The whole process, known as the classification of closed surfaces, can be found inthe 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 offixAllSingularities). It takes a complex and yields a list of surfaces, the Sj for theparticular complex. For instance, assume that tor is a complex that triangulatesthe torus, # denotes connected sum and \/ denotes wedge sum. Then we have:
baseSurfaces tor -- [OS.g=1]baseSurfaces $ (tor # tor) \/ tor -- [OS.g=2,OS.g=1]
where “OS.g=r” means “orientable surface of genus r”.Now we treat the gluing. Remember that we have ‖K‖ ∼= (
∐kj=1 Sj)/∼ where ∼
is an equivalence relation that identifies only finitely many points. Since the exactrelation ∼ is neither topologically relevant nor convenient to work with, we stripthe 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 toa particular gluing point.
32
Note that this defines a (bipartite) multigraph without self-loops (see Figure 4.2for an example). In our implementation we use the following types to store themultigraph (where M and LM are the modules Data.Map.Strict and .Lazy,respectively):
type GluingGraphD = M .Map (Int , Int) Inttype GluedObj o = LM .Map Int otype 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 whichis mapped by GluedVertices and GluedComplexes to the corresponding object.GlueD combines all gluing data that we work with. To extract that data from theweak pseudomanifold, we use the next two functions (with accompanying helpers):
gluingGraph :: (Eq a)⇒ Complex a → GluedD agluingGraph = gluingGraphFromFixed ◦ fixAllSingularities
gluingGraphFromFixed :: (Eq a)⇒ Complex (a, Int)→ GluedD agluingGraphFromFixed c =
GluedD {glGraphD = graph, glVertices = vsm, glComplexes = comps }where
comps = LM .fromDistinctAscList $ [0 . .] ‘zip‘ connectedComponents cvs = nub $ map (vMap fst) $ filter isGluedV $ vertices cvsi = vs ‘zip‘ [0 . .]vsm = LM .fromDistinctAscList $ map swap vsigraph = LM .foldrWithKey (addGluingData vsi) M .empty comps
isGluedV :: Vertex (a, Int)→ BoolisGluedV (Vertex ( , t)) = t 6= 0
addGluingData :: (type omitted for readability)addGluingData vsi j comp m =
foldr (λv → M .insertWith (+) (toId v , j ) 1) m gluedToVswhere
gluedVs = filter isGluedV $ vertices compgluedToVs = map (vMap fst) gluedVstoId v = fromJust $ lookup v vsi
Furthermore, we provide a utility function that calls gluingGraph and extractsthe most interesting parts from the GluedD , that is the actual multigraph (as aGluingGraphD) and the glued surfaces (identified as Surface):
33
OS.g=0
OS.g=1
OS.g=1
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 → GluedSurfacesidentifyGluedSurfaces = 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 anice figure of the gluing graph to a png file, respectively to draw the graph on thescreen (using an X11 windowing system). For example, let tor be as above and letptor be a complex that triangulates the pinched torus (i. e. (S1×S1)/({[0]}×S1)or, alternatively, a 2-sphere with two distinct points identified). Then
visualizeGluingGraph $ gluingGraphSurf $ (ptor # ptor) \/ (tor \/ tor)
draws the multigraph in Figure 4.2.
4projects.haskell.org/graphviz/5www.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-dimensionalPseudomanifolds
Lastly, we consider loop agreement tasks on finite weak 2-pseudomanifolds. Weshow that the word problem for fundamental groups of such 2-pseudomanifolds issolvable and use this fact in conjunction with Theorem 3.15 to formulate a resultabout loop agreement tasks.It is well known that the word problem for fundamental groups of closed sur-
faces is solved by Dehn’s Algorithm, see Stillwell [9, Sec. 6.1]. Then the followingproposition 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 pseudo-manifold (based at any vertex) is solvable.
Proof sketch. First, observe that for finite weak 2-pseudomanifolds K,K ′ and ver-tices v, v′ of K and K ′, respectively, we have
π1
((K, v) ∨ (K ′, v′)
) ∼= π1(K, v) ∗ π1(K ′, v′)
by the Seifert-van-Kampen theorem (where the wedge of complexes is defined inthe 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 ′ be the resulting complex afteridentifying v1 and v2 to a single vertex v′. Then we have
π1(K ′, v′) ∼= π1(K, v1) ∗ Z,
as can be seen by using the standard construction of the fundamental group of asimplicial 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 thatK is connected. By Theorem 4.5 and an inductive applicationof the above arguments we see that π1(K, v) is isomorphic to a free product of theform
π1(S1, x1) ∗ · · · ∗ π1(Sk, xk) ∗ 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 g1g2 . . . gr be a word in this freeproduct. We apply Dehn’s algorithm to each gj that is an element of one of thefundamental groups of the surfaces and freely reduce the resulting word. Then werepeat this steps until we either arrive at the empty word or the word cannot bereduced further. (This process must terminate because the word length decreaseswith every step.) In the first case the word g1g2 . . . gr is the identity element andin the second case it is non-trivial.
�
Corollary 4.7 (loop agreement tasks on finite weak 2-pseudomanifolds). LetK,L ∈ Simpfin,c
2 and let κ, λ be triangle loops in K and L, respectively. Further-more, let K and L be weak 2-pseudomanifolds.– It is decidable whether γκ and γλ are (pointed) contractible in ‖K‖ and ‖L‖,
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 factthat 1 must be mapped to the identity element of π1(L, λ) by any group homo-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 theoreticalCorollary 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 firstand last vertex. (Note that we also permit repeated vertices in this case.) The maindifficulty in implementing isTrivial is that we have to find a representation of theloop in terms of generators and relations in order to apply the algorithm for solvingthe word problem. Therefore, the function has to trace the given loop through theprocess of building the fundamental polygon and normalizing it afterwards (asmentioned in the previous section). Since this is a rather complex procedure, wemake no attempt to explain the corresponding functions schemesWL and normalizein 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 storesthe schemes for our surfaces Sj (of Theorem 4.5) and a LoopS is a representationof 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 wouldcontain the labelling schemes aba−1b−1 and cdc−1d−1 and the second componentwould be any word in the letters {a, b, c, d} and their formal inverses. For instance,abcdc−1d−1a−1b−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 theempty word (in which case the input loop is in fact contractible) or a word thatcannot be further simplified. Depending on the involved surfaces simplifyLoop usesthe functions simplifyOnX (with X one of {Sphere,Torus,PrPlane,KleinB}) anddehnAlg 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 inTwoDimPseudoManifold.Loop.
37
Bibliography
[1] G. Bredon. Topology and Geometry. Springer, 1993.
[2] R. Fritsch and R. Piccinini. Cellular structures in topology. Cambridge Uni-versity Press, 1990.
[3] M. Herlihy, D. Kozlov, and S. Rajsbaum. Distributed Computing ThroughCombinatorial Topology. Morgan Kaufmann, 2013.
[4] M. Herlihy and S. Rajsbaum. “A classification of wait-free loop agreementtasks”. In: Theoretical Computer Science 291.1 (2003), pp. 55–77.
[5] M. Herlihy and N. Shavit. “The topological structure of asynchronous com-putability”. 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 Edi-tion. Springer, 1993.
39