A Practical Algorithm for Knot Factorisation
Abstract
We present an algorithm for computing the prime factorisation of a knot, which is practical in the following sense: using Regina, we give an implementation that works well for inputs of reasonable size, including prime knots from the -crossing census. The main new ingredient in this work is an object that we call an “edge-ideal triangulation”, which is what our algorithm uses to represent knots. As other applications, we give an alternative proof that prime knot recognition is in , and present some new complexity results for triangulations. Beyond knots, our work showcases edge-ideal triangulations as a tool for potential applications in -manifold topology.
Keywords and phrases:
Prime and composite knots, (crushing) normal surfaces, edge-ideal triangulations, co-NP certificate, triangulation complexityFunding:
Alexander He: Supported by an Australian Government Research Training Program Scholarship for part of this project.Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Problems, reductions and completeness ; Mathematics of computing Combinatorial algorithms ; Mathematics of computing Geometric topologySupplementary Material:
Software (Source Code): https://github.com/AlexHe98/idealedge [19]archived at

Acknowledgements:
This work was inspired by discussions at the Dagstuhl workshop “Triangulations in Geometry and Topology” [7]. The authors would like to thank the participants for interesting conversations about knots and normal surfaces. Moreover, the authors thank Nathan Dunfield for suggesting a way to generate hard diagrams of composite knots on which to test our algorithm. We also thank the anonymous reviewers for their helpful comments.Editors:
Oswin Aichholzer and Haitao WangSeries and Publisher:

1 Introduction
Computational problems in -manifold topology often exhibit a gap between theory and practice. For example, consider the Unknot Recognition problem, which takes a knot as input, and asks whether is equivalent to the unknot (see Section 2 for a review of all technical terminology used in this introduction). Although Regina [12] offers an Unknot Recognition algorithm that experimentally exhibits polynomial-time behaviour [15], in theory this algorithm is exponential-time in the worst case. There are other theoretical upper bounds on the complexity of Unknot Recognition, but these often use very different (and in some cases, much more complicated) techniques: it is in both [17] and [25, 26], and Lackenby has announced a quasipolynomial-time algorithm [27]. It remains unknown whether there is a (deterministic) polynomial-time algorithm for Unknot Recognition.
We are interested in algorithmically recognising other types of knots as well. Baldwin and Sivek give some complexity results for such other recognition problems in [4]: they show that a range of natural problems are in and/or (some unconditionally, others conditional on the Generalised Riemann Hypothesis). Prior to the work in the present paper, none of these problems had algorithms with practical software implementations.
In this paper, we focus on the problem of deciding whether a knot is prime or composite, and in the composite case on computing its prime factorisation. This problem arises from the classical result of Schubert [30] that every knot has a unique prime factorisation. We study variants of this problem, in decreasing order of specificity:
Problem 1 (Knot Factorisation).
- INPUT:
-
A knot .
- OUTPUT:
-
A collection of knots giving the prime factorisation of .
Problem 2 (-Summands).
- INPUT:
-
A knot , and a positive integer .
- QUESTION:
-
Does the prime factorisation of have at least nontrivial summands?
Problem 3 (Composite Knot Recognition).
- INPUT:
-
A knot .
- QUESTION:
-
Is a composite knot?
Most commonly, the input knot is presented as a knot diagram. However, a diagram is difficult to work with in many settings, and the first step of many algorithms is to convert the diagram into a more useful form. Often, the conversion is to a triangulation of the knot exterior: the -manifold obtained by deleting a small open neighbourhood of from the ambient -sphere. This is fine for decision problems like Problems 2 and 3; however, for Knot Factorisation, if we require the output to be in the form of knot diagrams – rather than triangulations of knot exteriors – then we have the additional challenge of converting these triangulations to diagrams, which is itself a highly nontrivial problem [16].
Our approach is to encode knots as edge-ideal triangulations (H-triangulations in [3]). For a knot , an edge-ideal triangulation is a pair , where is a triangulation of the -sphere , and is an embedded loop (called an ideal loop) of edges (called ideal edges) in , such that is topologically equivalent to . This idea extends to triangulations of arbitrary compact -manifolds, and collections of loops in the -skeleton of .
Embedding a knot in the -skeleton of a triangulation is, on its own, not a new idea. For knots in -manifolds this is a common choice of combinatorial encoding; e.g., see [1, 26]. But even for knots in , this setting has been described and used in many publications with various backgrounds; e.g., see [3, 5, 6, 14, 20, 28] and the references therein.
The novelty of our approach is to view an ideal loop as representing a boundary component of a -manifold, loosely analogous to how an ideal triangulation (in the usual sense) has boundary components given by the ideal vertices. More precisely, given an edge-ideal triangulation of a knot , we consider a small open solid torus neighbourhood of , and we view as a combinatorial presentation of the -manifold given by deleting from . In this article, is a -sphere and hence is just the exterior of .
To see why this perspective is useful, consider a normal surface in . The intersection of with the solid torus is a disjoint union of meridian discs, with one such disc for each point in . After deleting , becomes a surface that intersects the torus boundary of in curves that all have the same slope (in our case, the slope of the meridian of the knot). Hence, the edge-ideal triangulation carries more information than just the topology of : it also prescribes a slope along which normal surfaces must intersect the boundary of .
We use this setting to factorise knots in the -sphere. However, we believe other applications for edge-ideal triangulations exist. For instance, consider the problem of recognising Seifert fibred spaces (SFS) with nonempty boundary. This was shown to be in by Jackson [22], but the techniques are not well-suited to practical implementation. SFS with boundary fit well into the framework of edge-ideal triangulations: any such SFS can be characterised using “vertical” essential annuli, which intersect components of in prescribed slopes. Exploring this idea is work in progress.
The utility of edge-ideal triangulations goes beyond the observation about boundary slopes of surfaces. It also allows us to apply the tool of crushing a normal surface, discussed in detail below. Crushing plays a central role in a number of practical -manifold algorithms provided by Regina [9, 10, 12], such as unknot recognition or -sphere recognition.
Our work extends this to give practical algorithms for Problems 1, 2, and 3. In Section 5.3, we give a straightforward linear-time procedure to convert a diagram of a knot into an edge-ideal triangulation of , so our techniques apply equally to either method of encoding the input knot. However, converting an edge-ideal triangulation back into a knot diagram is sufficiently difficult to be beyond the scope of this paper. Thus, we settle for the following:
Theorem 4.
There is an algorithm for Knot Factorisation that returns the prime factorisation of the input knot as a collection of edge-ideal triangulations.
The algorithm (see Algorithm 13) relies heavily on the tool of crushing normal surfaces. For our implementation, we use Regina’s [12] longstanding crushing functionality, which is already known to be effective in practice. As it turns out, this practicability extends to our implementation: we are able to run our algorithm on prime knots from the census up to crossings [11], as well as composite knots constructed by summing up to knots sampled from the census (hence, knots with up to crossings), including some “hard” diagrams of composite knots with up crossings. See Section 5.4 for details on these experiments.
In addition to the practical implications, we also adapt our techniques to obtain theoretical upper bounds on computational complexity. Specifically, we prove the following:
Theorem 5.
Problem 2 (-Summands) is in .
Since Problem 3 is a special case of Problem 2, this yields an alternative proof of one of Baldwin and Sivek’s results [4, Theorem 7.3]: Composite Knot Recognition is in .
The operation of crushing a normal surface is crucial to both the practicality of Algorithm 13 and the proof of Theorem 5, so we now elaborate on its role in our work.
Inspired by unpublished work of Casson, crushing was first studied in detail by Jaco and Rubinstein [23], and later reformulated into a more implementation-friendly framework by Burton [10]. To date, one limitation of crushing is that the theory remains relatively poorly developed for surfaces other than -spheres and discs (though see [13, 21]). At first glance, this is an obstacle for the applications we have mentioned. For a knot , testing whether is composite entails finding a certain essential annulus (in the exterior of ). The same applies to recognising SFS with boundary.
By working with an edge-ideal triangulation , we circumvent this issue: the annuli show up in as -spheres that intersect in two points. Thus, instead of crushing annuli, we are able to work in the better-understood setting of crushing -spheres. In Section 4, we develop the theory required to apply crushing in the presence of ideal loops.
The reason crushing is useful for practical computations is that it never increases the number of tetrahedra in a triangulation. This allows us to factor a knot efficiently: we can repeatedly crush surfaces to progressively “decompose” the knot, whilst simultaneously keeping tight control on the amount of data needed to encode the resulting factorisation.
Another feature of our work is that we work exclusively with quad vertex -spheres in our edge-ideal triangulations; we show that suitable -spheres exist in Section 3. Theoretically, this is necessary to control how crushing affects the ideal loop; see Section 4. But even if this theoretical challenge were not present, working with quad (instead of standard) coordinates is often crucial for improving the practical performance of algorithms involving normal surfaces.
We combine the aforementioned ideas to formulate our main algorithm (Algorithm 13) in Section 5; we prove correctness of the algorithm, discuss some implementation details, and summarise our experimental results. In Section 6, we show how our techniques also give a proof of Theorem 5. Finally, we discuss further applications in relation to triangulation complexity in Section 7.
2 Background
A knot is an embedding of a circle into -space. We sometimes embed knots into the -sphere , instead of ; since is the one-point compactification of , this has the benefit of making our topological space compact, but otherwise makes very little difference to the theory. Two knots are equivalent, or of the same type, if there is an ambient isotopy taking the image of one to the image of the other; intuitively, two knots are equivalent if one can be deformed into the other without passing the knot through itself. If a knot is equivalent to the trivial unknotted circle, we call it the unknot, or the trivial knot; otherwise, the knot is nontrivial.
We typically represent a knot by a diagram, obtained by generically projecting the knot into a plane, while keeping information about which strand goes over and which goes under at crossings of the projection. Given two knots and , we can construct a connected sum by cutting both and and gluing the ends together to form a new knot. A knot is composite if it is the connected sum of two nontrivial knots; otherwise, the knot is prime. Every nontrivial knot has a factorisation into nontrivial prime knots , , and this factorisation is unique up to re-ordering [30].
2.1 Triangulations of manifolds
A triangulation (of size ) is given by taking a finite set of disjoint tetrahedra , and gluing them together along their boundary triangles in pairs. Let denote the gluings. The quotient space forms a closed -manifold, in which case we call a -manifold triangulation, if and only if: (a) no edge is identified to itself in reverse; and (b) for each vertex of , the link of – i.e., the frontier of a small regular neighbourhood of – forms a -sphere.
As a result of the gluings, multiple lower-dimensional faces of become identified and we refer to the equivalence class of such faces as a single face of the triangulation . In fact, we often consider -vertex triangulations, where all vertices of are identified to a single vertex. Two -manifold triangulations are said to be combinatorially isomorphic if one of them can be turned into the other by a relabelling of its faces.
Let be a -manifold with non-empty boundary a collection of tori. An ideal triangulation of is a triangulation with one vertex per component of such that its vertex link triangulates the boundary component, and is homeomorphic to the underlying set of the triangulation with a neighbourhood of the vertices removed.
2.2 Normal surface theory and crushing
Consider a disc properly embedded in a tetrahedron so that its boundary is in general position – i.e., is disjoint from the vertices of , and intersects the edges of transversely. The weight of in is the number of points in which intersects the edges of .
A normal surface in a triangulation is a properly embedded surface such that:
-
is in general position: it is disjoint from the vertices of , and it intersects the edges and triangular faces of transversely.
-
For each tetrahedron of , the intersection consists of a (possibly empty) disjoint union of finitely many positive-weight discs, called elementary discs, such that the boundary of each elementary disc intersects each edge of at most once.
The combinatorics of a normal surface remains unchanged under a normal isotopy: an ambient isotopy that preserves each vertex, edge, face and tetrahedron of the triangulation. Up to normal isotopy, each tetrahedron admits seven types of elementary discs: four triangle types and three quadrilateral (or quad) types (see Figure 2).
The link of a vertex is an example of a normal surface. It is built entirely from elementary triangles (see Figure 3); conversely a normal surface consisting only of triangles must be a union of vertex-linking components. With this in mind, we call a normal surface trivial if it only has triangles, and nontrivial if it has at least one quad.
Normal surfaces can be described purely combinatorially by coordinates, counting the number of elementary disc types contained in them. These coordinates are subject to linear matching equations forcing the elementary discs to “match up” across triangular faces of . They must also have at most one quad type per tetrahedron, a condition called the quad constraint, to ensure that the surface is embedded. See [18, Section 2.3] for more details.
Using coordinates allows us to form sums of normal surfaces (subject to the quad constraints). More generally, it means that for an -tetrahedron triangulation , all normal surface coordinate vectors lie inside a polyhedral cone in , which can be described by providing one normal surface – called a (standard) vertex (normal) surface – per extremal ray of this cone. Vertex surfaces can be computed in finite time, and described efficiently [17]. Moreover, in all of this, it can be shown that it suffices to keep track of quadrilateral discs, and hence a polyhedral cone in , leading to a (smaller) set of quad vertex (normal) surfaces that still describes the space of all normal surfaces in . See [18, Section 2.4] for more details, as well as some useful characterisations of vertex surfaces.
Given a normal surface in a triangulation of a -manifold , we can cut along , shrink to a point, and collapse cells that are not simplices until we recover a (possibly disconnected) triangulation . This operation is called crushing ( in ) and, in general, destroys much valuable information about and . However, if done carefully, crushing provides an efficient way to “decompose” into a new triangulation that represents the manifold obtained from by cutting along and then shrinking to a point. Moreover, crushing has an extremely important algorithmic advantage: whenever is nontrivial, we have . See [18, Section 2.5] for more details about crushing.
3 Existence of suitable quad vertex normal spheres
In this section we prove that, in any edge-ideal triangulation of a composite knot, we can always find a normal -sphere that we can use to either reduce the size of our input, or to witness a (possibly trivial) decomposition of the knot. Crucially, we can ensure that these -spheres are quad vertex, which allows us to: (a) enumerate candidate -spheres efficiently, and (b) control the effect of crushing such -spheres.
Let be an edge-ideal triangulation of a knot . The ideal loop consists of a sequence of edges of , which we denote by . For any edge of and any normal surface in , let denote the edge-weight of at – i.e., the number of times intersects . Moreover, we define – i.e., the number of times intersects the loop . We have the following two lemmas (see [18, Section 3] for proofs):
Lemma 6.
Let be an edge-ideal triangulation of a knot . If is a composite knot, then contains a nontrivial normal -sphere with .
Lemma 7.
Let be an edge-ideal triangulation of a knot. Moreover, let denote the set of all nontrivial normal -spheres in such that either or . If is nonempty, then there must be a quad vertex normal surface in .
Corollary 8.
Let be an edge-ideal triangulation of a knot . If is composite, then contains a quad vertex -sphere such that either or .
Proof.
Corollary 9.
Let be an edge-ideal triangulation of a knot . If is composite, then contains a standard vertex -sphere such that either or .
Proof.
This follows from [8, Lemma 4.5]: any quad vertex surface is also standard vertex.
4 Tracking ideal edges under crushing
Consider an edge-ideal triangulation and a quad vertex -sphere intersecting twice. It is known that crushing only mildly changes the topology of [10]. In this section, we use a new characterisation of quad vertex -spheres to show that crushing also only mildly changes the ideal loop . Moreover, using work of Agol, Hass, and Thurston [1, Sections 4 and 6], we can track how changes in time polynomial in ; this is purely theoretical, and in practice a much simpler and more naive tracking method is efficient enough.
4.1 Orbits of segments
Let be a normal surface in an edge-ideal triangulation . We say that splits an (ideal) edge into (ideal) segments. After crushing , each segment either gets destroyed or gets identified with a surviving segment that becomes an edge of the new triangulation. To determine how crushing changes the ideal loop, we track how it causes ideal and surviving segments to be identified. Here, we outline how this can be done using the Agol-Hass-Thurston weighted orbit-counting algorithm from [1]; see [18, Section 4.1] for details.
We begin by defining the induced orbit of a segment to be a cell complex comprised of all the parts of that get collapsed and identified with as a result of crushing ; this is not a subcomplex of , but rather a subcomplex of the cell decomposition obtained by subdividing along . We say that a segment is type-, , if intersects exactly endpoints of the segment; all the segments in an induced orbit must have the same type, and hence we often say the orbit itself is type-, for some .
An induced orbit containing an ideal segment is called an ideal orbit, and is of particular interest to us. Indeed, our goal is to algorithmically determine which surviving segments belong to an ideal orbit. The challenge is that an induced orbit can be very large: the number of segments in a type- orbit can be of the same order as the size of the normal coordinates of ; this is exponential in if is quad vertex [17]. The Agol-Hass-Thurston machinery enables us to avoid the cost of explicitly tracing through such large orbits.
Abstractly, the Agol-Hass-Thurston weighted orbit-counting algorithm [1, Section 6] involves: pairings between sequences of consecutive integers in (i.e., bijections that either preserve or reverse the order between sequences); and a weight function . For each orbit in under the pairings, the algorithm computes the sum of the weights of the orbit’s elements.
To apply this to our setting, we take each triangular face of , and use to define three pairings between sequences of consecutive segments, as illustrated in Figure 4. Two segments then belong to the same orbit under these pairings if and only if they belong to the same induced orbit. For the weights, we assign a coordinate to each surviving or ideal segment, and essentially use the weight vectors as indicator functions. The upshot is that after using the Agol-Hass-Thurston algorithm to compute the total weight of each orbit, we can read off: (a) which orbits contain an ideal segment, and (b) which surviving segments belong to each ideal orbit. Moreover, if is a vertex surface, then plugging the bounds from [17] into the running time for the Agol-Hass-Thurston algorithm gives a polynomial in .
4.2 Quad vertex -spheres and trivial induced orbits
Call a type- induced orbit trivial if it forms a cone over a homotopically trivial subcomplex of built from normal arcs and triangles. Call a type- induced orbit trivial if it forms a homotopically trivial product -bundle. Our algorithm relies on the fact that quad vertex -spheres have trivial induced orbits. In fact, we can prove not just this, but also its converse:
Lemma 10.
A normal -sphere is quad vertex if and only if every type- and every type- segment has a trivial induced orbit.
Proof outline.
Jaco and Tollefson gave a characterisation of vertex -spheres in terms of an object called an exchange annulus [24, Theorem 4.1]. As hinted in Figure 5, exchange annuli are closely related to type- orbits; type- orbits come into play because we are working with quad vertex -spheres. We prove the lemma by adapting the techniques from [24] to deal with both types of induced orbit. See [18, Sections 4.2 and 4.3] for details.
4.3 The effect of crushing on ideal loops
Let be an edge-ideal triangulation of a (possibly trivial) knot . We now study the effect of crushing quad vertex -spheres that intersect the ideal loop in at most two points.
Lemma 11.
Let be an edge-ideal triangulation of a (possibly trivial) knot , and let be a quad vertex -sphere with .
Crushing yields a new triangulation consisting of either one or two -sphere components. Moreover, all the edges in are left untouched, and together form an embedded loop in a component of , and forms an edge-ideal triangulation of .
Proof outline.
Let denote the triangulation given by crushing . Because and are disjoint, crushing only changes parts of that are sufficiently “far away” from to ensure that survives untouched inside a component of ; in particular, is nonempty. Moreover, since is quad vertex, it is a consequence of Lemma 10 that has at most two components, each of which must be a -sphere. See [18, Lemma 21] for a complete proof.
Lemma 12.
Let be an edge-ideal triangulation of a (possibly trivial) knot , and let be a quad vertex -sphere with , so that cuts into two ideal arcs and , corresponding respectively to two (possibly trivial) knots and such that .
Crushing yields a new triangulation consisting of either one or two -sphere components. Moreover, for each new knot , , we have either:
-
1.
all the segments in survive the crushing to become an embedded loop in a component of , so that forms an edge-ideal triangulation of ;
-
2.
consists of two type- segments, and these two segments merge to form a single non-loop edge in a component of ; or
-
3.
is deleted.
Items 2 and 3 can only happen if is trivial. If and both fall under Item 1, then the corresponding components and are distinct.
Proof outline.
We give some intuition for the three cases. See [18, Lemma 22] for details.
Since is a quad vertex -sphere, it is a consequence of Lemma 10 that crushing gives a triangulation with at most two components, each of which is a -sphere. Moreover, since is a separating -sphere, the two ideal arcs and must end up in different components of . In the case where has fewer than two components, this simply means that the corresponding ideal arc was deleted entirely (this is Item 3); it can be shown that this only occurs if the corresponding knot is trivial.
It remains to consider what happens for an ideal arc that survives. Since crushing involves collapsing to a point, we know that the endpoints of become identified in . If these are the only points of that get identified, then the result is an ideal loop corresponding to the knot (this is Item 1). Otherwise, if crushing causes further identifications in , then it can be shown that falls under Item 2, and that is trivial.
To summarise, Lemmas 11 and 12 show that if we crush suitable quad vertex -spheres, then this changes the ideal loop in a topologically meaningful way. Moreover, as a consequence of the Agol-Hass-Thurston machinery described in Section 4.1, we can also efficiently keep track of how the ideal loop changes. These two pieces of machinery are, together, what allow us to give the algorithmic applications that follow in Sections 5 and 6.
5 Algorithm and implementation
The algorithm below takes a knot as input, and produces the prime factorisation of as a collection of edge-ideal triangulations. As stated, the input is a diagram of , but by skipping Item 1 the algorithm can also be seen as taking an edge-ideal triangulation as input.
Algorithm 13.
Given a diagram of a knot , compute the prime factorisation of (represented as edge-ideal triangulations) as follows:
-
1.
Build an edge-ideal triangulation of ; i.e., build a triangulation of such that is embedded in as an ideal loop . Section 5.3 describes how this can be done.
-
2.
Create an empty list (which will eventually contain all the prime summands). Also, create a list of edge-ideal triangulations to process, initially containing just .
-
3.
If is nonempty, then pick and remove one edge-ideal triangulation from and continue to Item 4. Otherwise, terminate with output .
-
4.
Search for a quad vertex normal -sphere in with either or .
-
If exists, crush it and keep track of the resulting ideal loops, as discussed in Section 4. Append all components of the resulting triangulation to that contain an ideal loop. Discard the others.
-
If does not exist, test whether forms a nontrivial knot. If so, add to .
In either case, return to Item 3.
-
5.1 Correctness of the algorithm
Theorem 14.
Algorithm 13 terminates and correctly factorises into prime knots.
Proof outline.
To see that the algorithm terminates, note that only Items 3 and 4 repeat. Together they replace (in ) a triangulation with (any of the nontrivial) triangulations obtained by crushing along a normal sphere. As crushing strictly reduces the number of tetrahedra, the total number of tetrahedra contained in decreases, and the number of iterations is at most the number of tetrahedra in the initial triangulation.
Each time before we execute Item 3 we verify that: (a) items in are edge-ideal triangulations of (possibly trivial or composite) knots; (b) items in are edge-ideal triangulations of nontrivial prime knots; and (c) is given by composing all knots in . This is true the first time we execute Item 3. For every other non-final iteration, we remove a summand from that is processed by Item 4. If a suitable sphere is found, it is crushed and any nontrivial subsummands (by Lemmas 11 and 12) are returned to . If no sphere is found, then by Corollary 8 the summand is prime and moved to . In either case, (a)–(c) continue to hold.
5.2 Optimisations and other implementation details
The most obvious optimisation is to simplify triangulations before attempting any other computations. For ideal triangulations of the knot complement, we can use the simplification tools available in Regina [12]. But for edge-ideal triangulations, we must instead use custom simplification tools to ensure that the ideal loop is preserved; see [18, Section 5.4] for details.
Furthermore, the algorithm has some potential bottlenecks that provide opportunity for optimisation. We found it effective to run multiple techniques in parallel to determine the best performing technique for any particular input.
-
1.
We use different techniques for turning a knot into an edge-ideal triangulation. The most reliable one directly constructs an edge-ideal triangulation with tetrahedra from an -crossing input diagram, before simplifying it; it is illustrated in Figure 6. Other heuristics may be faster, or produce smaller triangulations. See Section 5.3 for details.
Figure 6: The tetrahedron crossing gadget. Left: fully assembled gadget; red edges correspond to over- and under-crossing strands. Right: exploded view showing the individual tetrahedra. -
2.
In practice, the quad vertex surface enumeration in Item 4 usually terminates quickly. In the rare cases where the enumeration is not so quick, our remedy is to run the following in parallel with the enumeration: repeatedly randomise the triangulation, and attempt a (hopefully quick) enumeration on the new triangulation. See [18, Section 5.5] for details.
-
3.
We can conclusively determine whether a knot is nontrivial using solid torus recognition, but this can be slow because it requires normal surface enumeration. In practice, running the algorithm on a nontrivial knot never seems to produce unknotted ideal loops. Thus, the main opportunity for optimisation here is to use fast heuristics that are usually good at certifying that a knot is nontrivial. See [18, Section 5.6] for details.
5.3 Building an edge-ideal triangulation from a knot
When the input knot is presented as a knot diagram, our first task is to convert this into an edge-ideal triangulation of . We use two techniques in parallel to achieve this task.
The first technique takes a knot diagram with crossings, and guarantees to produce an edge-ideal triangulation of size with an ideal loop of length . This is excellent in theory since the cost of the conversion is only linear, but as we discuss shortly is a large enough constant to be a challenge in practice.
To describe the construction, view the input knot diagram as a -regular graph embedded in a -sphere , with over- and under-crossing information recorded at each vertex of the graph. The dual graph decomposes into -sided faces, with one crossing per face. Viewing the ambient -sphere as a suspension of (i.e., two cones over , glued together along ), we obtain a decomposition of the -sphere into -sided footballs: each football is a suspension of one of the -sided faces of . We build an edge-ideal triangulation of the knot by triangulating each football with tetrahedra, with two edges corresponding respectively to the over- and under-crossing strands inside that football; see Figure 6.
This construction is fast to perform, but the resulting triangulation is too large to give practical running times. Using combinatorial moves, our implementation reduces the length of the ideal loop to , and usually produces a significantly smaller triangulation. However, this simplification step is sufficiently slow to be a bottleneck for our implementation.
Our second technique is a heuristic construction that, though not guaranteed to terminate, typically produces small edge-ideal triangulations. Starting with a knot diagram, (1) triangulate the knot exterior, (2) modify this triangulation so that the meridian and longitude appear as boundary edges, and (3) attach a snapped -ball (a -tetrahedron gadget) to ensure that the meridian bounds a disc. Topologically, this realises a Dehn filling, and the longitude becomes the ideal loop. Regina [12] provides functionality for each of these steps, but the overall procedure is not guaranteed to terminate because we only have a heuristic method for (2). See [18, Section 5.3] for more details on this second technique.
In practice, the second technique is often very fast, but sometimes prohibitively slow. Thus, running both techniques in parallel is an essential feature of our implementation.
5.4 Experimental results
In this section we demonstrate that Algorithm 13 is practical – and in some cases even quite efficient – for typical inputs. The code and the experimental data can be accessed from https://github.com/AlexHe98/idealedge.
On a laptop with an Intel Core i5-7200U processor, we ran Algorithm 13 over: (a) all torus knots with to crossings; (b) all satellite knots from the census [11] of prime knots with to crossings; (c) hyperbolic knots with or crossings; and (d) a sample of composite knots with up to prime summands and crossings.
Algorithm 13 certified primeness of: all torus knots in seconds ( seconds per knot); all satellite knots in seconds ( seconds per knot); and all hyperbolic knots in seconds ( seconds per knot). Note that for hyperbolic knots, the crushing part of our algorithm rarely has to run because heuristics for verifying hyperbolicity are often very efficient.
To obtain composite knots, we randomly sample census knots and form their connected sum. Thirty of these composite knots were sums of two prime knots, with diagrams deliberately constructed to “look prime”; Algorithm 13 factorised all of these in seconds ( seconds per knot). We also generated composite knots with diagrams constructed in the standard way; timings for these are summarised in the table below.
prime summands | of samples | avg. running time per knot |
Finally, we used the algorithm from [2] to randomly sample -vertex triangulations of -spheres, and look at the knot types of their edges. To maximise the variety of knots encountered, we started at a triangulation with no unknotted edges from [14]. We sampled knots in triangulations of size –, with running times of seconds per knot.
6 NP certificate for composite knots
We now adapt our techniques to prove Theorem 5: Problem 2 is in , and hence Composite Knot Recognition is in . Recall that Problem 2 asks whether a given knot has at least summands in its prime factorisation.
Our certificate consists of a sequence of edge-ideal triangulations and quad vertex normal surfaces of , , such that: (a) is obtained from via the procedure outlined in Section 5.3; (b) every is obtained from by crushing a suitable quad vertex normal sphere of ; and (c) for all , is a union of edge-ideal triangulations of knots in , such that the input knot is equal to the connected sum of the knots represented by the components of . The certificate is completed by a set of components of together with a certificate that they form nontrivial knots in their respective components.
Since crushing reduces the size of a triangulation, the are quad vertex normal surfaces, and knottedness lies in , the certificate is of polynomial size due to [17, 26].
The procedure from Section 5.3 to build an edge-ideal triangulation of , and the verification that is combinatorially isomorphic to are both polynomial time procedures (see, e.g., [29, Lemma 3.1 and Remark 3.2]). The same applies to checking for each , that either or , and certifying that is a quad vertex -sphere. For this latter task, we must show that type-1 and type-2 induced orbits are trivial, and that is connected; see [18, Section 6.1] for details.
Crushing along to obtain triangulation can be done in polynomial time; see [18, Section 2.5]. The same is true for identifying the new collection of ideal loops , following Section 4; and for verifying that and are combinatorially isomorphic. Verifying knottedness of components of is polynomial time due to [26].
To prove correctness of the above algorithm, it suffices to check that condition (c) above is valid for all . It then follows from the uniqueness of prime factorisation [30], that this is enough to verify that the input knot has at least summands.
First note that (c) is clearly satisfied for . To proceed by induction, assume that (c) is satisfied for some , . Let denote the component of containing and with ideal loop . Lemmas 11 and 12 imply that crushing replaces with either a new edge-ideal triangulation of the same knot, or a pair of edge-ideal triangulations giving a pair of knots obtained by a (possibly trivial) connected sum decomposition of . Either way, (c) is also satisfied for . See [18, Section 6.3] for more details.
For the converse, suppose the verification algorithm succeeds. It follows that must be an edge-ideal triangulation of . Moreover, it follows that the are quad vertex normal surfaces, and hence Lemmas 11 and 12 imply that (c) holds for all . Hence, it follows that contains nontrivial knot summands. By uniqueness of the prime factorisation of , this verifies that has at least summands.
7 Triangulation complexity
In this section we leverage the fact that crushing a nontrivial normal surface reduces the size of its ambient triangulation to study triangulation complexity – i.e., the minimum number of tetrahedra necessary to triangulate a given manifold within a fixed class of triangulations.
Let be the exterior of a composite knot in , and let be the triangulation complexity of over the class of edge-ideal triangulations. Write for the unique prime factorisation of . Starting with an edge-ideal triangulation for , our results from Section 4.3 ensure that we can iteratively find quad vertex -spheres to crush at least times to obtain edge-ideal triangulations for each of the prime knots . If we only crush times, then every crush performs a nontrivial connected sum decomposition; thus, by Lemma 12, each crush increases the number of ideal edges by exactly . Due to the excess ideal edges, it can be shown (see [18, Lemma 25]) that we can crush an additional -sphere. So in fact, we can always crush at least times, and each crush strictly decreases the overall number of tetrahedra, which establishes the bound
(1) |
Example 15.
There are two knot complements of ideal edge complexity : the unknot and the trefoil (both are represented by edges in the unique -tetrahedron -vertex -sphere triangulation). The only knot complement of ideal-edge complexity is . The knot complements of ideal-edge complexity are , , and .
It follows from Equation 1 that the ideal-edge complexity of the complements of and are at least and , respectively. However, such triangulations of do not exist in the census. Instead, the smallest triangulations of containing an ideal edge of type and have sizes and , respectively.
Example 15 motivates the following question.
Question 16.
Is there a composite knot that realises tightness in Equation 1?
We can also adapt our methods to obtain complexity results about ideal triangulations of knot complements; see [18, Section 7.2] for details.
References
- [1] I. Agol, J. Hass, and W. Thurston. The computational complexity of knot genus and spanning area. Trans. Amer. Math. Soc., 358(9):3821–3850, 2006. doi:10.1090/S0002-9947-05-03919-X.
- [2] E. G. Altmann and J. Spreer. Sampling triangulations of manifolds using Monte Carlo methods. Exp. Math., 0(0):1–15, 2025. doi:10.1080/10586458.2024.2433506.
- [3] F. B. Aribi, F. Guéritaud, and E. Piguet-Nakazawa. Geometric triangulations and the teichmüller tqft volume conjecture for twist knots. Quantum Topol., 14(2):285–406, 2023.
- [4] J. A. Baldwin and S. Sivek. On the complexity of torus knot recognition. Trans. Amer. Math. Soc., 371:3831–3855, 2019. doi:10.1090/tran/7394.
- [5] B. Benedetti. Discrete Morse theory for manifolds with boundary. Trans. Amer. Math. Soc., 364(12):6631–6670, 2012. doi:10.1090/S0002-9947-2012-05614-5.
- [6] B. Benedetti and F. H. Lutz. Knots in collapsible and non-collapsible balls. Electron. J. Combin., 20(3):Paper 31, 29, 2013. doi:10.37236/3319.
- [7] M. Buchin, J. Cardinal, A. de Mesmay, J. Spreer, and A. He. Triangulations in geometry and topology (dagstuhl seminar 24072). Dagstuhl Reports, 14(2):120–163, 2024. doi:10.4230/DAGREP.14.2.120.
- [8] B. A. Burton. Converting between quadrilateral and standard solution sets in normal surface theory. Alg. Geom. Topol., 9:2121–2174, 2009. doi:10.2140/agt.2009.9.2121.
- [9] B. A. Burton. Computational topology with Regina: algorithms, heuristics and implementations. In Geometry and Topology Down Under, volume 597 of Contemp. Math., pages 195–224. Amer. Math. Soc., Providence, RI, 2013. doi:10.1090/conm/597/11877.
- [10] B. A. Burton. A new approach to crushing 3-manifold triangulations. Discrete Comput. Geom., 52(1):116–139, 2014. doi:10.1007/s00454-014-9572-y.
- [11] B. 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. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.SoCG.2020.25.
- [12] B. A. Burton, R. Budney, W. Pettersson, et al. Regina: Software for low-dimensional topology, 1999–2023. Version 7.3. URL: https://regina-normal.github.io.
- [13] B. A. Burton, T. de Paiva, A. He, and C. O. Y. Hui. Crushing surfaces of positive genus. arXiv:2403.11523, 2024. To appear in Algebr. Geom. Topol..
- [14] B. A. Burton and A. He. Finding large counterexamples by selectively exploring the Pachner graph. In Erin W. Chambers and Joachim Gudmundsson, editors, 39th International Symposium on Computational Geometry (SoCG 2023), volume 258 of Leibniz International Proceedings in Informatics (LIPIcs), pages 21:1–21:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.SoCG.2023.21.
- [15] B. A. Burton and M. Özlen. A fast branching algorithm for unknot recognition with experimental polynomial-time behaviour. arXiv:1211.1079, 2012. To appear in Math. Program.
- [16] N. M. Dunfield, M. Obeidin, and C. G. Rudd. Computing a Link Diagram from Its Exterior. In Xavier Goaoc and Michael Kerber, editors, 38th International Symposium on Computational Geometry (SoCG 2022), volume 224 of Leibniz International Proceedings in Informatics (LIPIcs), pages 37:1–37:24, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2022.37.
- [17] J. Hass, J. C. Lagarias, and N. Pippenger. The computational complexity of knot and link problems. J. ACM, 46(2):185–211, 1999. doi:10.1145/301970.301971.
- [18] A. He, E. Sedgwick, and J. Spreer. A practical algorithm for knot factorisation. arXiv:2504.03942, 2025.
- [19] Alexander He. AlexHe98/idealedge. Software, swhId: swh:1:dir:ebcbe72831246d6d99ed7ff98f3cc00940ed808c (visited on 2025-06-02). URL: https://github.com/AlexHe98/idealedge, doi:10.4230/artifacts.23286.
- [20] D. Ibarra, D. V. Mathews, J. S. Purcell, and J. Spreer. Triangulations of the -sphere with knotted edge. arXiv:2411.18938, 2024.
- [21] K. Ichihara, Y. Nishimura, and S. Tani. The computational complexity of classical knot recognition. Journal of Knot Theory and Its Ramifications, 32(11):2350069, 2023. doi:10.1142/S0218216523500694.
- [22] A. Jackson. Recognition of Seifert fibered spaces with boundary is in NP. Math. Ann., 2024. doi:10.1007/s00208-024-02920-x.
- [23] W. Jaco and J. H. Rubinstein. -efficient triangulations of 3-manifolds. J. Differential Geom., 65(1):61–168, 2003. doi:10.4310/jdg/1090503053.
- [24] W. Jaco and J. L. Tollefson. Algorithms for the complete decomposition of a closed -manifold. Illinois J. Math., 39(3):358–406, 1995.
- [25] G. Kuperberg. Knottedness is in NP, modulo GRH. Adv. Math., 256:493–506, 2014. doi:10.1016/j.aim.2014.01.007.
- [26] M. Lackenby. The efficient certification of knottedness and Thurston norm. Adv. Math., 387, 2021. Article ID: 107796. doi:10.1016/j.aim.2021.107796.
- [27] M. Lackenby. Unknot recognition in quasi-polynomial time. https://www.maths.ox.ac.uk/node/38304, 2021.
- [28] W. B. R. Lickorish. Unshellable triangulations of spheres. European J. Combin., 12(6):527–530, 1991. doi:10.1016/S0195-6698(13)80103-5.
- [29] S. Schleimer. Sphere recognition lies in NP. In Low-dimensional and symplectic topology, volume 82 of Proc. Sympos. Pure Math., pages 183–213. Amer. Math. Soc., Providence, RI, 2011. doi:10.1090/pspum/082/2768660.
- [30] H. Schubert. Die eindeutige Zerlegbarkeit eines Knotens in Primknoten. Sitzungsberichte der Heidelberger Akademie der Wissenschaften. Springer, 1949. doi:10.1007/978-3-642-45813-2.