Compressed Data Structures for Heegaard Splitting
Abstract
Heegaard splittings provide a natural representation of closed 3-manifolds by gluing handlebodies along a common surface. These splittings can be equivalently given by two finite sets of meridians lying on the surface, which define a Heegaard diagram. We present a data structure to effectively represent Heegaard diagrams as normal curves with respect to triangulations of a surface of complexity measured by the space required to express the normal coordinates’ vectors in binary. This structure can be significantly more compressed than triangulations of 3-manifolds, giving exponential gains for some families. Even with this succinct definition of complexity, we establish polynomial-time algorithms for comparing and manipulating diagrams, performing stabilizations, detecting trivial stabilizations and reductions, and computing topological invariants of the underlying manifolds, such as their fundamental and homology groups. We also contrast early implementations of our techniques with standard software programs for 3-manifolds, achieving faster algorithms for the average cases and exponential gains in speed for some particular presentations of the inputs.
Keywords and phrases:
3-manifold, Heegaard splitting, curves on surfaces, surface theory, data structure, computational topologyFunding:
Henrique Ennes: The PhD thesis, which this work is a part of, has been supported by the French government, through the France 2030 investment plan managed by the Agence Nationale de la Recherche, as part of the “UCA DS4H” project, reference ANR-17-EURE-0004.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometry ; Mathematics of computing Geometric topology ; Theory of computation Data structures design and analysisFunding:
This work has been partially supported by the ANR project ANR-20-CE48-0007 (AlgoKnot) and the project ANR-15-IDEX-0001 (UCA JEDI).Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Since the early days of computational topology, 3-manifolds have attracted researchers’ keen interest [27, 31, 40] for lying exactly midway between the well-understood surfaces and the wildly behaved 4-manifolds. For example, several 3-manifold problems were related to important questions in complexity theory: recognition was proved by Schleimer to be in NP [50], whereas approximations of some quantum invariants are firmly tied to quantum computing and are known to be -hard [1, 2]. Similarly, the problems of classifying [17, 39] and manipulating the geometry and topology of these spaces [8, 42] have also received significant theoretical and practical attention, with implementations of different methods publicly available in the most important software in the field, Regina [12] and SnapPy [18].
The algorithmic point of view is particularly relevant for the construction of censuses of homomorphism classes of 3-manifolds [7, 9, 10, 13]. Drawing inspiration from the related problem of knot classification (this time, up to ambient isotopies), where the cumulative work of researchers [11, 15, 21] has culminated in the widely accessible census of prime knot diagrams, computational methods are expected to foster the elaboration of tables of 3-manifolds, particularly valuable assets in the proposition and verification of conjectures, as well as in the discovery of counterexamples.
Abstracting modern approaches [6, 9, 11, 13] of the construction of censuses of topological spaces, one requires (1) compact data structures to represent massive amounts of (candidate) spaces and the iterative construction of all spaces up to a maximum complexity; (2) efficient operations to disqualify inputs (such as composite knots, links, non-prime 3-manifolds) and simplify the representation combinatorics (Reidemeister moves, Pachner moves, etc); and, (3) methods for discriminating spaces, such as invariants. For 3-manifolds, these steps are usually addressed through triangulations – homeomorphic copies described by a finite set of tetrahedra and gluing rules among their faces – of complexity often measured by the number of tetrahedra. On the other hand, theoretical bounds on the minimal number of tetrahedra to represent some spaces [19, 33, 34, 44] and the difficulty of generating particular structures, such as hyperbolicity [44], can limit the effectiveness of triangulation-based censuses.
Heegaard splittings emerge as an alternative to triangulations. They depict a closed 3-manifold as the result of gluing two better-behaved pieces called handlebodies along a common boundary. Splittings can also be combinatorially described by Heegaard diagrams, two sets of curves in a surface whose intersection pattern conveys a lot of topological information about . We suggest here a new data structure to represent Heegaard diagrams based on normal coordinates, of a size as large as binary of the number of intersections between the two sets of curves. The gain in measuring the complexity of 3-manifolds through this notion is not to be overlooked: we present in Section 5 families of manifolds whose diagrams’ complexity grows linearly with the size of the input, but whose triangulations necessarily use exponentially many tetrahedra. However, what is more important is that due to the proliferation of efficient operations in normal coordinates [24, 41, 48, 49, 53], we can establish polynomial-time algorithms even in this compressed notion of complexity, leading to basic manipulations of Heegaard splittings and the computation of simple 3-manifold invariants such as the fundamental and homology groups. Moreover, as we point out in Remark 9, some important complexity results about 3-manifolds – such as sphere (co-)recognition – are still preserved if we assume compressed inputs, which tells us much about the inherent difficulty of these problems. We hope that these techniques are useful for the study and classification of topological spaces that are beyond the reach of efficiency when represented by other methods.
The paper begins with a background section on both low-dimensional and computational topology (Section 2), where we review some of the concepts and results that will be needed in the later parts. Our contribution starts in Section 3, where we formally present our data structure for Heegaard splittings. Section 4 establishes basic algorithms in this structure, which are further expanded the paper’s full version. We compare early implementations of these algorithms with triangulation-dependent methods in Section 5.
Before we close this introduction, we draw the reader’s attention to two subtleties of the current work. First, although most of our tools apply to generalized Heegaard splittings defined for orientable compact 3-manifolds, potentially with boundary [37, 51], we will focus solely on closed 3-manifolds. Therefore, all 3-manifolds here will be assumed orientable and closed, unless explicitly stated otherwise. Second, we assume throughout a unit-cost RAM model with some bit-size [26]. This means that the four integer operations and integer comparison can be executed in constant time, provided that the numbers involved have binary representations of size at most .
2 Background material
2.1 Background on low-dimensional topology
We assume the reader is acquainted with the basic notions of surface theory at the level of [25], referring to the paper’s full version for details. We use to denote a general surface and the (unique) closed surface of genus . Whenever possible, we reserve Greek letters for multicurves and Latin letters for curves and arcs. All (multi)curves are assumed simple. As usual, we do not differentiate (multi)curves from their isotopy classes if no confusion arises.
The mapping class group of the surface , , is the group of orientation-preserving homeomorphisms up to isotopy. For each , is finitely generated as a group by an alphabet , consisting of Dehn twists about (isotopy classes of) canonically defined essential curves [43]. Formally, a Dehn twist about is given by cutting out a cylindrical regular neighborhood around the curve, applying a left-twist to one of the cylinder’s boundaries, and gluing the cylinder back into the surface. We call the curves the surface’s Lickorish generators. Hopefully without confusion, we also call the Dehn twists in the alphabet Lickorish generators.
An essential multicurve in is a system if cut along , , is a punctured sphere. A system in can be used to construct the genus handlebody where we attach 2-handles along the curves in and fill any spherical boundary component with 3-handles. Note that and that is homeomorphic to the direct sum of solid tori. Components of are meridians of in the sense that they bound disks in the handlebody’s interior. Two systems and in will be called equivalent if is a set of meridians in (which implies that is a set of meridians in ).
Let be two components of a system and an arc from a puncture corresponding to to a puncture corresponding to in . The band sum of and is the curve in obtained by the surgery of Figure 1. One can show that is a meridian in [22, 37], so is a system equivalent to . We call this whole operation a disk slide. With finitely many applications of disk slides and isotopies, a system can be transformed into any equivalent system [37].
A genus Heegaard splitting is the closed 3-manifold resulting from the gluing of two handlebodies with boundaries homeomorphic to through a gluing map . In fact, one might assume that is given by a composed with some canonical orientation-reversing homeomorphism. This means that a Heegaard splitting can be represented by a pair where is a word on Lickorish generators. We call this pair the Heegaard word for the splitting. Every closed 3-manifold has a Heegaard splitting [46, 47].
Note that if we fix a system of meridians on one of the two handlebodies, , then is a system of meridians of the other handlebody, . We call the tuple a Heegaard diagram. Heegaard diagrams are algorithmically independent of words: any two systems and will define the same splitting, provided that the curves are meridians in their respective handlebodies. Diagrams are therefore not unique for a given splitting. For example, if and are isotopic diagrams on – that is, and are isotopic multicurves in – then and define the same manifold. Similarly, if is equivalent to , we say that the diagrams are equivalent and and also define the same 3-manifold. In this sense, disk slides play for Heegaard diagrams a role similar to the Reidemeister moves for knots.
A splitting is reducible if there is a curve in that is a meridian of both and . We call a diagram reducible if either (1) there is a component and a component that are isotopic in ; or (2) there is a separating curve , disjoint from both and , and such that defines a connected sum of two Heegaard splittings of smaller genera. The uniqueness of fundamental group decomposition [3] and [51][Theorem 6.3.5] imply that a reducible diagram represents a reducible splitting. A reducible splitting can always be written as the connected sum of sub-splittings [3, 37].
A presentation of the fundamental group can be obtained as follows [30, 37]: label the curves and and give them an orientation; then traverse each curve along the assumed orientation and, whenever it intersects some , we append to the relation if the index of the intersection is positive, otherwise we append to it. Because the first (integral) homology group of , is the abelianization of [28], we can present as , where each can be computed by commuting the generators in the relations . Note that equals the algebraic intersection number and we store this information in a presentation matrix for , whose Smith normal form carries all the necessary information of the homology group.
2.2 Background on computational topology
Heegaard diagrams consist of three essential components that any candidate data structure must encode: a surface, , and two multicurves, and . Starting with the surface, a graph embedded in is a cellular embedding if the manifold defined by cutting along , , is homeomorphic to a collection of disks. We call each component of a face of . A cellular embedding in the surface is said to be oriented if we assign to each face an ordered list of its vertices, consistent with the orientation of as in the right-hand rule. We assume every cellular embedding to be oriented. A cellular embedding is a (generalized) triangulation of if exactly three edges of bound each face. We define the size of a triangulation, , as the number of faces; note that where is the number of vertices of the triangulation and is the number of edges. Surface triangulations are not to be confused with the similar concept of 3-manifold triangulations.
Every oriented surface can be described as a data structure by a triangulation. For the triangulations themselves, we assume that they are given as a set of vertices, edges, and triangles, with bidirectional pointers between vertices and edges, and between edges and the triangles, therefore requiring a total space of . In particular, determining whether two triangles are adjacent, getting the incident vertices and edges of a triangle, and finding triangles bounded by a specific edge take constant time. Other, more compact data structures for triangulation, such as CGAL’s [20], can be converted into our structure in time and at a similar cost to memory. More general cellular embeddings are treated similarly.
A curve is edged with respect to if it is disjoint from its faces. We represent an edged curve as a data structure by the list , assumed to be ordered according to an implicit traversing orientation of . Similarly, a multicurve can be represented by a set of edge lists, one for each component, which we denote as . We assume that no two components can share an edge, nor can the same component be incident to a vertex more than once; nevertheless, two distinct components can share a vertex. The complexity of is .
On the other hand, a multicurve is called standard in if it intersects the graph only at the edges and transversely. If is standard, we represent it as a collection of words in a finite alphabet: arbitrarily orient the edges and take for the letters. Then for each component of , the word in is given by traversing along some arbitrary direction and, whenever we intersect an edge , we append to where is the index of the intersection. An intersection sequence representation for , , is the set . While is well defined at the multicurve level, intersection sequences are defined only up to isotopies inside the cellular embedding’s faces. Moreover, cyclic permutations and taking inverses of the words in define the same isotopy classes.
Instead of working with explicit intersection sequences, we will often assume straight line programs (SLPs) to express . Formally, an SLP on the alphabet is a finite sequence of equations , where the left-hand side, , are symbols not in called variables, and the expressions on the right-hand side, , are called assignments. Each assignment is assumed to be a symbol from , in which case the assignment is called simple, or of the form , where , in which case we say the assignment is proper. In particular, the SLP represents a word in if recursively substituting the appropriate in each proper assignment, gives equal to . We call the length of the SLP and define its complexity , where is the number of variables and symbols in the assignment . Given any word in , one can trivially build an SLP of complexity , but there are instances in which SLPs can be used to give exponential gains over uncompressed representation of words [49]. Nonetheless, even in extremely compressed cases, several useful operations can still be efficiently performed, as stated in the following lemma, proved in the paper’s full version. Here and throughout, we assume that is the number of bits necessary to represent the potentially signed integer ; in particular, if is signed and if unsigned.
Lemma 1.
Let be an SLP of complexity representing a word . In a unit-cost RAM model of bit-size , for a fixed , one can compute
-
(a)
an SLP of in time ;
-
(b)
an SLP of in time ;
-
(c)
the number of occurrences of a symbol in , , in time .
We will assume that every intersection sequence is given by an SLP of complexity and let .
Now, suppose that is a triangulation. A standard (multi)curve is normal if it intersects each face of in elementary arcs that connect distinct sides of the triangle in which they are contained. Equivalently, is normal if each (uncompressed) intersection sequence in is cyclic reduced, that is, if there are no substrings of type or in any of the cyclic permutations of the components’ sequences. When the curve is normal for a triangulation, its isotopy class is fixed by the number of times it intersects each labeled edge [48], implying that we can describe it through a vector in in . We call the curve’s normal coordinates, whose complexity, , is the number of bits necessary to store this vector, i.e., . Naturally, we define as the set .
Remark 2.
We could represent a normal multicurve with a single vector . Similarly, it is possible (and common) to extend the notion of SLPs to encode more than one uncompressed word, which, in our case, implies giving all components of as a single SLP. Although these approaches are more parsimonious, they are less useful for our needs. Moreover, Lemma 5.1 of [24] gives an algorithm to transform, in time , the normal coordinates of a multicurve given by a sum of its components’ coordinates to our expected form.
Any normal (multi)curve partitions the edges of into segments called ports. The overlay graph of is defined by having as vertices the union of and the intersections , and as edges the union of the ports and the elementary arcs of (see Figure 2). The overlay graph splits each triangle of the original triangulation into two types of regions: junctions, which are adjacent to three edges of , and blocks, which are adjacent to only two. A port of the overlay graph is called redundant if it separates blocks. Following Erickson and Nayyeri [24], we define the street complex of , , by deleting redundant ports and their endpoints from the overlay graph. In practice, the street complex merges blocks into longer faces called streets; naturally, is a cellular embedding in the surface triangulated by , see Figure 2. We define the crossing sequence of a street in as the intersection sequence of a curve that crosses the street from one end to the other with respect to the original triangulation . For simplicity, we assume that any port that separates two junctions is a degenerate street with a crossing sequence of length 1. The street complexes of all multicurves in this paper will have complexity [24].
3 Data structure for Heegaard diagrams
Normal coordinates suggest a very natural encoding of Heegaard diagrams and, consequently, of closed 3-manifolds. Explicitly, we propose representing by a tuple , where is a triangulation, is an edge representation of , and is a normal coordinate representation of . We will often refer to the pair as a marked triangulation of , in which context will be called the diagram itself. The complexity of the diagram is
| (1) |
We note that , that is, for complexity purposes, only the last term of (1) matters. However, for the sake of clarity, we will still refer to the terms of equation (1) arising from the marked triangulation in our analyses. All complexities will be reported under the assumption that , as otherwise there are some faster trivial algorithms.
Our choices of data structures for and allow us to represent curves of exponentially many intersection points with respect to the complexity of the diagram. Referring to the discussion at the end of Section 2.1, more intersections may lead to more complicated fundamental groups and, consequently [44][Proposition 2.6.6], more complicated 3-manifolds. In this sense, our structure is significantly more compressed than representations of Heegaard diagrams with both and edged, which can have, at most, intersections.
Complexity gains are also noticeable if we compare our structure with triangulations of 3-manifolds. The usual algorithm to triangulate Heegaard diagrams [29] takes polynomial-time in . Moreover, as we empirically verify in Section 5, converting a Heegaard word to a diagram can be exponentially faster than converting the word to a triangulation for some choices of input and at least as fast for the general case. On the downside, it is unclear how to obtain and manipulate geometric information (such as hyperbolicity) or to compute certain quantum invariants directly from Heegaard diagrams, making triangulations still preferable for these kinds of problems.Refer to Section 6 of the paper’s full version.
As stated in the introduction, our goal is to establish basic efficient algorithms even in this very compressed setting. For such a purpose, we will make extensive use of the next two results. The first of them is (almost) fully established by Erickson and Nayyeri [23].
Theorem 3.
Suppose that is a genus Heegaard diagram of complexity . In a unit-cost RAM model of bit-size , one may compute
-
(a)
the street complex in time ;
-
(b)
SLPs of total complexity of the crossing sequence of all streets of in time ;
-
(c)
SLPs of complexity , in time .
For the next theorem, we might assume that a Heegaard word is given in a power-notation form, that is, , for , and with each in signed binary. A fully uncompressed Heegaard word , with some potentially equal to , can be put in power-notation form in time with a unit-cost RAM model of bit-size . For convenience, we shall also assume that the Lickorish generators are given as edged curves with respect to . Nevertheless, even if we suppose that is given by normal coordinates or intersection sequences, the theorem still holds with similar complexity bounds by multiple applications of Theorem 4.9 of the full version.
Theorem 4.
Suppose , for , is a Heegaard word in and let be a triangulation of with edged and Lickorish generators. There is an algorithm to compute intersection sequences in time in a unit-cost RAM model of bit-size where . Moreover, the Heegaard diagram of complexity can be computed in time .
Proof.
For each , denote its edge list by , where for , and define as (an SLP of) the intersection sequence of a normal curve isotopic to starting at a face adjacent to . We can compute for each in time (Lemma 3.4 in the full version). We also compute for each ; in total, this initial step takes time .
Let . Assuming , we recursively construct , for , by replacing any occurrence of an edge in the SLPs with an SLP of , that is,
where is the word with each occurrence of substituted by and each occurrence of substituted by . The case of is treated similarly. By Lemma 1, we note that this can be done in time in the assumed model of computation. In particular, is an intersection sequence representation of and has complexity
where in the second line we recursively applied the equation of the first. The total time to compute is bounded by , and, in the case for all , this becomes .
Although is, by construction, standard in , it might not be normal. We can use the main algorithm of [45] to deterministically compute, in time , cyclic reduced SLPs for with complexity . Alternatively, this can be done with a randomized algorithm in time with probability of error at most and in a unit-cost RAM model of bit-size [53]. Part (c) of Lemma 1 finishes the proof.
4 Algorithms on Heegaard diagrams
We now describe some polynomial-time algorithms and operations on a genus Heegaard diagram with complexity and representing a closed 3-manifold . We choose here to highlight algorithms that refer back to the discussion on censuses from the introduction, giving examples on how to simplify the underlying combinatorics of splittings (Theorem 5), disqualify inputs (Theorem 6), and compute invariants (Theorems 7 and 8). For the complexities reported, we assume a unit-cost RAM model of bit-size .
Theorem 5 (DO A DISK SLIDE).
A diagram , where is the result of applying a disk slide on any two components of , can be computed in time .
Proof.
Compute the street complex ; recall that it has complexity of . Using breadth-first in the dual graph of , find, in time , the shortest arc that connects faces adjacent to and and that does not cross any component of , which can be avoided by adding infinite weights to the edges of not in . Note that such an arc must exist because no component of can be separating in the surface. Moreover, because is shortest and therefore intersects at most streets in , we can compute using Part (b) of Theorem 3, an SLP of complexity of an intersection sequence of with respect to , call it .
Suppose that is not trivial, that is, it is not just a single point. By Theorem 6.2 of [24], find, in time , SLPs of the intersection sequences of and with respect to starting at edges adjacent to the endpoint faces of , call them and . Finally, let . Note that already is an intersection sequence of a normal curve in . For, since is a shortest path, it is normal in , which implies that it is also normal in . Moreover, has junctions as endpoints; if it had streets as endpoints, there would be a shorter arc connecting to starting at one of the ends of the street. Therefore, any other reduction in would necessarily arise by entering a junction of through a non-redundant port that is also intersected by either or . But then, the other triangle in adjacent to is adjacent to either or , implying that is not shortest. By repeated applications of Part (c) of Lemma 1, one can compute, in time , the number of (unsigned) occurrences of each edge of in the SLP of , resulting in .
If is trivial, then and bound the same face in . Nonetheless, because the curves are not isotopic, there exists at least one face bounded by and not bounded by . We call such a face good. Choose, in time , a non-good face that is adjacent to a good face through an edge , see Figure 3. Note that is the endpoint of a street of sides in and . Look for the other end of this street, – again, because and are not isotopic, the street has another end. Let be the face (in fact, a junction) not equal to , but also adjacent to . Compute, again through [24][Theorem 6.2], the sequence of faces adjacent to starting at and going all the way up to without crossing , call this sequence . Compute the related sequence for , this time starting in , call it . Let , note that it is also normal in as and are normal and it enters and through distinct edges. Part (c) of Lemma 1 finishes this case.
Theorem 6 (DETECT REDUCTION).
There is an algorithm that runs in time and detects whether a diagram is reducible. Moreover, if the diagram is reducible, it returns either an isotopic pair of and , or a separating curve .
Proof.
We divide the algorithm into two parts, corresponding to the two hypotheses of reducibility of diagrams, namely the existence of an isotopic pair of meridians and , or of an essential separating curve that splits into subdiagrams. For the first case, apply [41][Theorem 6.3] to find, in polynomial-time on the input, an isotopic diagram in efficient position. This procedure increases the complexity of to We note that although this subroutine is polynomial-time on the input, the author of [41] does not provide an estimation of the polynomial degree, and any attempt on our part to give one would be out of the scope of this paper. Because we made the diagram efficient, there can only be a component isotopic to some if for all . If that is the case, we trace . Since , the curve is still fully in the edges of the street complex. Nonetheless, is isotopic to if and only if they cobound a cylinder [25], a case that can be determined in time . Checking this for every pair of curves and that do not intersect – there can be at most of these pairs – gives a test for the first hypothesis.
If the above test returns no clear reduction pair, we look for a separating curve, , disjoint from and , which exists if and only if is non-contractable in . Because is a puncture sphere, is a union of (potentially one) punctured spheres, and it embeds a non-contractable curve if and only if one of its components is not a disk. This means that we only need to compute a cellular embedding of and check its topological type. We start computing a triangulation for as in the proof of Theorem 5 by tracing and disconnecting from the gluing rules the edges of . We then want to further cut along . But, because is edged with respect to , each segment of will be a port in the overlay graph of (with respect to ). Each such a port will either be non-redundant – in which case it will still be an edge of ) – or it will be redundant – in which case it will be in the crossing sequence of some non-degenerate street and will be deleted to form (left side of Figure 4). Therefore, for each street in (degenerate or not), we can use Part (c) of Lemma 1 and Part (b) of Theorem 3 to determine, in time , if there is an occurrence of an edge in in a street’s crossing sequence and delete from the complex (the interior of) any such a street. Because the streets are disks in , bounded by one or two segments of , we note that, topologically, deleting the full interior of the streets that are transverse to some edge in is equivalent to puncturing a hole corresponding to a redundant port of the overlay graph by simply “enlarging” the hole (right side of Figure 4). This means that we have a cellular embedding of which can be queried, in polynomial-time, for its topological type. Assuming that has a component that is not a disk: we can use the techniques of [23] (refer to Section 2.3 of [14] for details) to find, in time a non-contractable curve in expressed as an SLP of complexity . We finally compute , in time , to check whether a diagram is defined on each component of . For such, we need only to find 1. the number of and components on each side of ; and, 2. whether is not isotopic to an or curve by again looking for bounded cylinders.
Theorem 7 (GET ).
The Smith normal form of the presentation matrix of can be found in time , where indicates some hidden polylogarithmic factors.
Proof.
We first compute the presentation matrix of the homology group whose coefficients are algebraic intersection numbers between the diagram’s curves. Because we assume that each is a list of edges , given an SLP ,
which, by Lemma 1, can be computed in time . Therefore, referring to Theorem 3 to compute , the total computational time of this procedure is . Finally, we reduce the matrix to its Smith normal form in time by the Kannan-Bachem algorithm [52].
Theorem 8 (GET ).
A presentation of can be computed in time .
Proof.
Given delete, in linear time on the complexity of the SLPs, all references to edges and substitute each edge of by the symbol that represents its associated component , here seen as a generator . This gives distinct SLPs whose complexities add up to and describe the relations of the presentation of . A presentation of can then be defined with generators and relators (this corresponds to repeated applications of a Tietze move [36] to the presentation of computed using the method described at the end of Section 2.1). The output is a balanced presentation of with -many generators and relators. The total time is dictated by Theorem 3.
Remark 9.
Because the outputted presentation of in Theorem 8 has linear size on the input, most complexity results about uncompressed presentations of 3-manifolds (such as triangulations) that appeal to the fundamental groups still hold in our compressed data structure. This is the case, for example, of Zentner’s proof that sphere recognition lies in co-NP [55] (assuming the generalized Riemann hypothesis). Similarly, the usual bounds on the volume [16] and diameter [54] of hyperbolic 3-manifolds can be naturally translated to our notion of complexity.
5 Examples and experiments
Given a Heegaard word presentation of a closed 3-manifold , there exist algorithms to compute, in linear time on the length of , a triangulation of with as many tetrahedra [1, 2, 5, 38]. This implies, for example, that the first homology group of , , can be computed in polynomial-time on . These algorithms should be contrasted with Theorem 4, which says that SLPs of the intersection sequence can be computed in linear time on the complexity of measured in power-notation form. Because the fundamental group of depends only on , algebraic information on splittings with significantly complicated gluing maps can be retrieved by Theorems 7 and 8.
Here, we explore the gains from the compressed data structure by comparing an early implementation of our methods with SnapPy’s [18] Twister [4] module, commonly used to compute triangulations from Heegaard words. Since experiments are limited to Heegaard words as input, there is no need to use proper normal coordinates or even triangulations of ; instead, we may compute the SLPs of the induced diagram with respect to general cellular embeddings, therefore avoiding the high cost of cyclic reductions. This guarantees that, for the problems analyzed, our theoretical complexity is at least equal to Twister’s. Even without these simplifying assumptions, we are still exponentially faster in the worst cases, as we show in the following section about lens spaces.
5.1 Genus 1
Heegaard splittings over the genus 1 surface – i.e., the torus – form the well-known family of lens spaces. Every lens space is uniquely given by a pair of integers , which, for a Heegaard splitting , represents the algebraic intersection numbers of with the usual longitude and meridian of the torus (there is some ambiguity in the values of , see [47]). A Dehn twist about the meridian of the torus maps to , while about the longitude maps to . This gives a representation of in from which the homology of the Heegaard splitting can be exactly computed by matrix multiplications and one query on the final value of . We used this approach to benchmark the accuracy of our method, which returned the expected for input words of length up to 1000, the maximum size we tested.
Figure 5 compares the average computational time needed to find taken by our method and by Twister for four different families of indexed by an integer : (a) words of form ; (b) uniformly sampled words of length ; (c) words of form ; and (d) words of form , but this time, given in power-notation form. Averages were taken over 30 repetitions. In all cases, we compared our times with Twister’s with and without optimization (where, by optimization, the authors mean the greedy folding of tetrahedra; refer to their documentation for details111Available at https://snappy.computop.org.). Although optimization drastically reduces computational time, it seems to increase numerical error. In every instance, except for (d), we first transformed the words into a power-notation form before using them to compute ; in total, this can be done in linear time on .
Remark 10.
A direct application of the representation of implies that, for the family of case (a), where is the -th Fibonacci number (starting at 0). We used this relation to benchmark the accuracy of the methods for different values of . While our technique always agrees with the expected value for up to , Twister (with optimization both on and off) started deviating for values of . Interestingly, we did not observe divergences for higher genii splittings.
Case (a) is where our advantages compared to Twister are the worst. This is because the words do not admit a non-trivial power-notation form, which is mainly responsible for our gains in the other cases. Nevertheless, it is worth highlighting that, while Twister is partially implemented in C++, our code is fully python. Case (b) represents the average case of computing the homology of lens spaces given a gluing map . We notice that we are now consistently faster for all values of tested. This happens exactly as we explore redundancies by first putting the word in power-notation form, with significant gains every time the same Dehn twist occurs in sequence (since has two generators, this will be the case quite often). The gains due to repetitions are further highlighted in (c): while Twister is bound to take , for some , to compute the homologies, our approach takes time , where the linear dependence comes solely from compressing the inputs to power-notation. In fact, if we assume the words already in power-notation, we are exponentially faster than Twister, as shown in case (d).
We can actually explore our structure’s usage of power-notation to compute invariants of families of 3-manifolds that would necessarily require exponentially many tetrahedra to be represented. The minimum number of tetrahedra in a layered triangulation of a lens space is , where is the continued fraction expansion of [34]. Moreover, [32, 35] discovered families of lens spaces – including the spaces defined by and – for which layered triangulations are minimal among all triangulations. So, for example, while the family necessarily requires exponentially many tetrahedra to be represented, it can be encoded in linear space in our data structure. It seems natural to expect that there are many other families of manifolds, with diagrams exponentially smaller than the minimum number of tetrahedra, for which our techniques can provide real computational gains compared to any existing method.
References
- [1] Gorjan Alagic and Edgar A. Bering. Quantum algorithms for invariants of triangulated manifolds. Quant. Inf. Comput., 12(9-10):0843–0863, 2012. doi:10.26421/QIC12.9-10-8.
- [2] Gorjan Alagic and Catharine Lo. Quantum invariants of 3-manifolds and NP vs #P. Quantum Info. Comput., 17(1–2):125–146, 2017.
- [3] M. Aschenbrenner, S. Friedl, and H. Wilton. 3-manifold Groups. EMS series of lectures in mathematics. European Mathematical Society, 2015. URL: https://books.google.ch/books?id=syEEkui2AkoC.
- [4] Mark Bell, Tracy Hall, and Saul Schleimer. Twister (computer software). https://bitbucket.org/Mark_Bell/twister/, 2008–2014. Version 2.4.1.
- [5] Peter Brinkmann and Saul Schleimer. Computing triangulations of mapping tori of surface homeomorphisms. Experimental Mathematics, 10(4):571–581, 2001. doi:10.1080/10586458.2001.10504677.
- [6] Rhuaidi Antonio Burke, Benjamin A. Burton, and Jonathan Spreer. Small Triangulations of 4-Manifolds and the 4-Manifold Census. In Oswin Aichholzer and Haitao Wang, editors, 41st International Symposium on Computational Geometry (SoCG 2025), volume 332 of Leibniz International Proceedings in Informatics (LIPIcs), pages 28:1–28:16, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2025.28.
- [7] Benjamin A. Burton. Efficient enumeration of 3-manifold triangulations. Australian Mathematical Society Gazette, 31(2):108–114, 2004.
- [8] Benjamin A. Burton. A new approach to crushing 3-manifold triangulations. In Proceedings of the twenty-ninth annual symposium on Computational geometry, pages 415–424, 2013. doi:10.1145/2462356.2462409.
- [9] Benjamin A. Burton. The cusped hyperbolic census is complete. arXiv preprint, 2014. arXiv:1405.2695.
- [10] Benjamin A. Burton. Tabulation of knots & 3-manifolds. Research Data Australia, University of Queensland, 2020. Dataset, https://researchdata.edu.au/tabulation-knots-3-manifolds/3370083.
- [11] Benjamin A. Burton. The Next 350 Million Knots. In Sergio Cabello and Danny Z. Chen, editors, 36th International Symposium on Computational Geometry (SoCG 2020), volume 164 of Leibniz International Proceedings in Informatics (LIPIcs), pages 25:1–25:17, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2020.25.
- [12] Benjamin A. Burton, Ryan Budney, William Pettersson, et al. Regina: Software for low-dimensional topology. http://regina-normal.github.io/, 1999–2023.
- [13] Benjamin A. Burton and William Pettersson. An edge-based framework for enumerating 3-manifold triangulations. In 31st International Symposium on Computational Geometry (SoCG 2015), pages 270–284. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2015. doi:10.4230/LIPIcs.SOCG.2015.270.
- [14] Erin W Chambers, Éric Colin De Verdière, Jeff Erickson, Francis Lazarus, and Kim Whittlesey. Splitting (complicated) surfaces is hard. In Proceedings of the twenty-second annual symposium on Computational geometry, pages 421–429, 2006. doi:10.1145/1137856.1137918.
- [15] John H Conway. An enumeration of knots and links, and some of their algebraic properties. In Computational problems in abstract algebra, pages 329–358. Elsevier, 1970.
- [16] Daryl Cooper. The volume of a closed hyperbolic 3-manifold is bounded by times the length of any presentation of its fundamental group. Proceedings of the American Mathematical Society, 127(3):941, 1999.
- [17] Francesco Costantino, Yang-Hui He, Elli Heyes, and Edward Hirst. Learning 3-manifold triangulations. Journal of Physics A: Mathematical and Theoretical, 2024.
- [18] Marc Culler, Nathan M. Dunfield, Matthias Goerner, and Jeffrey R. Weeks. SnapPy, a computer program for studying the geometry and topology of -manifolds. Available at http://snappy.computop.org (19/05/2025).
- [19] Basudeb Datta. Minimal triangulations of manifolds. arXiv preprint math/0701735, 2007.
- [20] Olivier Devillers, Jean-Daniel Boissonnat, Mariette Yvinec, and Monique Teillaud. Triangulations in CGAL. In Proceedings of the 16th Annual Symposium on Computational Geometry, pages 11–18. ACM, 2000.
- [21] Clifford H Dowker and Morwen B Thistlethwaite. Classification of knot projections. Topology and its Applications, 16(1):19–31, 1983.
- [22] Henrique Ennes and Clément Maria. Hardness of computation of quantum invariants on 3-manifolds with restricted topology, 2025. doi:10.48550/arXiv.2503.02814.
- [23] Jeff Erickson and Sariel Har-Peled. Optimally cutting a surface into a disk. In Proceedings of the eighteenth annual symposium on Computational geometry, pages 244–253, 2002. doi:10.1145/513400.513430.
- [24] Jeff Erickson and Amir Nayyeri. Tracing compressed curves in triangulated surfaces. Discrete Computational Geometry, 49(4):823–863, June 2013. doi:10.1007/s00454-013-9515-z.
- [25] Benson Farb and Dan Margalit. A primer on mapping class groups, volume 41. Princeton University Press, 2011.
- [26] Torben Hagerup. Sorting and searching on the word RAM. In STACS 98: 15th Annual Symposium on Theoretical Aspects of Computer Science Paris, France, February 25–27, 1998 Proceedings 15, pages 366–398. Springer, 1998. doi:10.1007/BFB0028575.
- [27] Wolfgang Haken. Über das homöomorphieproblem der 3-mannigfaltigkeiten. i. Mathematische Zeitschrift, 80(1):89–120, 1962.
- [28] Allen Hatcher. Algebraic Topology. Cambridge University Press, 2002.
- [29] Alexander He, James Morgan, and Em K Thompson. An algorithm to construct one-vertex triangulations of Heegaard splittings. arXiv preprint, 2023. arXiv:2312.17556.
- [30] John Hempel. 3-Manifolds, volume 349. American Mathematical Society, 2022.
- [31] William Jaco and Ulrich Oertel. An algorithm to decide if a 3-manifold is a Haken manifold. Topology, 23(2):195–209, 1984.
- [32] William Jaco, Hyam Rubinstein, and Stephan Tillmann. Minimal triangulations for an infinite family of lens spaces. Journal of Topology, 2(1):157–180, 2009.
- [33] William Jaco and J Hyam Rubinstein. 0-efficient triangulations of 3-manifolds. Journal of Differential Geometry, 65(1):61–168, 2003.
- [34] William Jaco and J Hyam Rubinstein. Layered-triangulations of 3-manifolds. arXiv preprint math/0603601, 2006.
- [35] William Jaco, J Hyam Rubinstein, and Stephan Tillmann. Coverings and minimal triangulations of 3–manifolds. Algebraic & Geometric Topology, 11(3):1257–1265, 2011.
- [36] David Lawrence Johnson. Presentations of groups. Cambridge university press, 1997.
- [37] Jesse Johnson. Notes on Heegaard splittings. preprint, 2006.
- [38] Robert Koenig, Greg Kuperberg, and Ben W Reichardt. Quantum computation with Turaev–Viro codes. Annals of Physics, 325(12):2707–2749, 2010.
- [39] Greg Kuperberg. Identifying lens spaces in polynomial time. Algebraic & Geometric Topology, 18(2):767–778, 2018.
- [40] Marc Lackenby. Algorithms in 3-manifold theory, 2020. arXiv:2002.02179.
- [41] Marc Lackenby. Some fast algorithms for curves in surfaces. arXiv preprint, 2024. doi:10.48550/arXiv.2401.16056.
- [42] Marc Lackenby and Jessica S Purcell. The triangulation complexity of elliptic and Sol 3-manifolds. Mathematische Annalen, 390(2):1623–1667, 2024.
- [43] William BR Lickorish. A finite set of generators for the homeotopy group of a 2-manifold. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 60, pages 769–778. Cambridge University Press, 1964.
- [44] Sergei Vladimirovich Matveev and SV Matveev. Algorithmic topology and classification of 3-manifolds, volume 9. Springer, 2007.
- [45] Masamichi Miyazaki, Ayumi Shinohara, and Masayuki Takeda. An improved pattern matching algorithm for strings in terms of straight-line programs. In Combinatorial Pattern Matching: 8th Annual Symposium, CPM 97 Aarhus, Denmark, June 30–July 2, 1997 Proceedings 8, pages 1–11. Springer, 1997. doi:10.1007/3-540-63220-4_45.
- [46] Edwin E Moise. Affine structures in 3-manifolds: V. the triangulation theorem and hauptvermutung. Annals of mathematics, 56(1):96–114, 1952.
- [47] Nikolai Saveliev. Lectures on the topology of 3-manifolds: an introduction to the Casson invariant. Walter de Gruyter, 2011.
- [48] Marcus Schaefer, Eric Sedgwick, and Daniel Štefankovič. Algorithms for normal curves and surfaces. In Computing and Combinatorics: 8th Annual International Conference, COCOON 2002 Singapore, August 15–17, 2002 Proceedings 8, pages 370–380. Springer, 2002. doi:10.1007/3-540-45655-4_40.
- [49] Marcus Schaefer, Eric Sedgwick, and Daniel Stefankovic. Computing Dehn twists and geometric intersection numbers in polynomial time. In CCCG, volume 20, pages 111–114, 2008.
- [50] Saul Schleimer. Sphere recognition lies in np. Low-dimensional and symplectic topology, 82:183–213, 2011.
- [51] Jennifer Schultens. Introduction to 3-manifolds, volume 151. American Mathematical Soc., 2014.
- [52] Francis Sergeraert. About the Kannan-Bachem algorithm, 2024. doi:10.48550/arXiv.2411.02422.
- [53] Daniel Štefankovič. Algorithms for simple curves on surfaces, string graphs, and crossing numbers. Phd thesis, University of Chicago, 2005. Available at http://people.cs.uchicago.edu/˜laci/students/stefankovic-phd.pdf.
- [54] Matthew E White. A diameter bound for closed, hyperbolic 3-manifolds. arXiv preprint, 2001. arXiv:math/0104192.
- [55] Raphael Zentner. Integer homology 3-spheres admit irreducible representations in sl(2,c). Duke Mathematical Journal, 167(9), June 2018. doi:10.1215/00127094-2018-0004.
