Abstract 1 Introduction 2 Background 3 Existence of suitable quad vertex normal spheres 4 Tracking ideal edges under crushing 5 Algorithm and implementation 6 NP certificate for composite knots 7 Triangulation complexity References

A Practical Algorithm for Knot Factorisation

Alexander He ORCID 401 Mathematical Sciences, Oklahoma State University, Stillwater, OK, USA Eric Sedgwick ORCID School of Computing, DePaul University, Chicago, IL, USA Jonathan Spreer ORCID School of Mathematics and Statistics, The University of Sydney, Australia
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 19-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 3-manifold topology.

Keywords and phrases:
Prime and composite knots, (crushing) normal surfaces, edge-ideal triangulations, co-NP certificate, triangulation complexity
Funding:
Alexander He: Supported by an Australian Government Research Training Program Scholarship for part of this project.
Jonathan Spreer: Supported by the Australian Research Council under the Discovery Project scheme (grant number DP220102588).
Copyright and License:
[Uncaptioned image] © Alexander He, Eric Sedgwick, and Jonathan Spreer; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Problems, reductions and completeness
; Mathematics of computing Combinatorial algorithms ; Mathematics of computing Geometric topology
Related Version:
Full Version: https://arxiv.org/abs/2504.03942 [18]
Supplementary Material:
Software  (Source Code): https://github.com/AlexHe98/idealedge [19]
  archived at Software Heritage Logo swh:1:dir:ebcbe72831246d6d99ed7ff98f3cc00940ed808c
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 Wang

1 Introduction

Computational problems in 3-manifold topology often exhibit a gap between theory and practice. For example, consider the Unknot Recognition problem, which takes a knot K as input, and asks whether K 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 K.

OUTPUT:

A collection of knots giving the prime factorisation of K.

Problem 2 (k-Summands).
INPUT:

A knot K, and a positive integer k.

QUESTION:

Does the prime factorisation of K have at least k nontrivial summands?

Problem 3 (Composite Knot Recognition).
INPUT:

A knot K.

QUESTION:

Is K a composite knot?

Most commonly, the input knot K 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 3-manifold obtained by deleting a small open neighbourhood of K from the ambient 3-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 K, an edge-ideal triangulation is a pair (𝒯,), where 𝒯 is a triangulation of the 3-sphere 𝕊3, and is an embedded loop (called an ideal loop) of edges (called ideal edges) in 𝒯, such that is topologically equivalent to K. This idea extends to triangulations 𝒯 of arbitrary compact 3-manifolds, and collections of loops in the 1-skeleton of 𝒯.

Embedding a knot in the 1-skeleton of a triangulation is, on its own, not a new idea. For knots in 3-manifolds this is a common choice of combinatorial encoding; e.g., see [1, 26]. But even for knots in 𝕊3, 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 3-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 K, we consider a small open solid torus neighbourhood N of , and we view (𝒯,) as a combinatorial presentation of the 3-manifold given by deleting N from 𝒯. In this article, 𝒯 is a 3-sphere and hence is just the exterior of K.

To see why this perspective is useful, consider a normal surface S in 𝒯. The intersection of S with the solid torus N is a disjoint union of meridian discs, with one such disc for each point in S. After deleting N, S 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 3-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 3-manifold algorithms provided by Regina [9, 10, 12], such as unknot recognition or 3-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 K into an edge-ideal triangulation of K, 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 K 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 19 crossings [11], as well as composite knots constructed by summing up to 8 knots sampled from the census (hence, knots with up to 152 crossings), including some “hard” diagrams of composite knots with up 70 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 (k-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 2-spheres and discs (though see [13, 21]). At first glance, this is an obstacle for the applications we have mentioned. For a knot K, testing whether K is composite entails finding a certain essential annulus (in the exterior of K). 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 2-spheres that intersect in two points. Thus, instead of crushing annuli, we are able to work in the better-understood setting of crushing 2-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 2-spheres in our edge-ideal triangulations; we show that suitable 2-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 K:S13 into 3-space. We sometimes embed knots into the 3-sphere 𝕊3, instead of 3; since 𝕊3 is the one-point compactification of 3, 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 Φ:3×[0,1]3 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.

Figure 1: Some examples of knot diagrams.

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 K1 and K2, we can construct a connected sum K=K1#K2 by cutting both K1 and K2 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 K has a factorisation K=K1##K into nontrivial prime knots Ki, 1i, and this factorisation is unique up to re-ordering [30].

2.1 Triangulations of manifolds

A triangulation 𝒯 (of size |𝒯|:=n) is given by taking a finite set of disjoint tetrahedra Δ1,,Δn, and gluing them together along their 4n boundary triangles in pairs. Let Φ1,,Φ2n denote the gluings. The quotient space 𝒯={Δ1,,Δn}/{Φ1,,Φ2n} forms a closed 3-manifold, in which case we call 𝒯 a 3-manifold triangulation, if and only if: (a) no edge is identified to itself in reverse; and (b) for each vertex v of 𝒯, the link of v – i.e., the frontier of a small regular neighbourhood of v – forms a 2-sphere.

As a result of the gluings, multiple lower-dimensional faces of {Δ1,,Δn} become identified and we refer to the equivalence class of such faces as a single face of the triangulation 𝒯. In fact, we often consider 1-vertex triangulations, where all 4n vertices of {Δ1,,Δn} are identified to a single vertex. Two 3-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 3-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 D 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 D in Δ is the number of points in which D intersects the edges of Δ.

A normal surface S in a triangulation 𝒯 is a properly embedded surface such that:

  • S 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 ΔS 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).

Figure 2: The seven types of elementary disc.

The link of a vertex v 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.

Figure 3: The link of a vertex is a normal surface built entirely from triangles.

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 n-tetrahedron triangulation 𝒯, all normal surface coordinate vectors lie inside a polyhedral cone in 7n, 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 3n, 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 S in a triangulation 𝒯 of a 3-manifold , we can cut along S, shrink S to a point, and collapse cells that are not simplices until we recover a (possibly disconnected) triangulation 𝒯. This operation is called crushing (S 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 S and then shrinking S to a point. Moreover, crushing has an extremely important algorithmic advantage: whenever S 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 2-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 2-spheres are quad vertex, which allows us to: (a) enumerate candidate 2-spheres efficiently, and (b) control the effect of crushing such 2-spheres.

Let (𝒯,) be an edge-ideal triangulation of a knot K. The ideal loop consists of a sequence of edges of 𝒯, which we denote by 1,,m. For any edge e of 𝒯 and any normal surface S in 𝒯, let we(S) denote the edge-weight of S at e – i.e., the number of times S intersects e. Moreover, we define w(S)=i=1mwi(S) – i.e., the number of times S 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 K. If K is a composite knot, then 𝒯 contains a nontrivial normal 2-sphere S with w(S)=2.

Lemma 7.

Let (𝒯,) be an edge-ideal triangulation of a knot. Moreover, let Ω denote the set of all nontrivial normal 2-spheres S in 𝒯 such that either w(S)=0 or w(S)=2. If Ω is nonempty, then there must be a quad vertex normal surface in Ω.

Corollary 8.

Let (𝒯,) be an edge-ideal triangulation of a knot K. If K is composite, then 𝒯 contains a quad vertex 2-sphere S such that either w(S)=0 or w(S)=2.

Proof.

To apply Lemma 7, we simply note that Ω is nonempty, by Lemma 6.

Corollary 9.

Let (𝒯,) be an edge-ideal triangulation of a knot K. If K is composite, then 𝒯 contains a standard vertex 2-sphere S such that either w(S)=0 or w(S)=2.

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 2-sphere S intersecting twice. It is known that crushing S only mildly changes the topology of 𝒯 [10]. In this section, we use a new characterisation of quad vertex 2-spheres to show that crushing S 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 S be a normal surface in an edge-ideal triangulation (𝒯,). We say that S splits an (ideal) edge into (ideal) segments. After crushing S, each segment either gets destroyed or gets identified with a surviving segment that becomes an edge of the new triangulation. To determine how crushing S 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 o(σ) 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 S; this is not a subcomplex of 𝒯, but rather a subcomplex of the cell decomposition obtained by subdividing 𝒯 along S. We say that a segment is type-k, k{0,1,2}, if S intersects exactly k 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-k, for some k.

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-2 orbit can be of the same order as the size of the normal coordinates of S; this is exponential in |𝒯| if S 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: k pairings between sequences of consecutive integers in [1,N]:={n:1nN} (i.e., bijections that either preserve or reverse the order between sequences); and a weight function w:[1,N]d. For each orbit in [1,N] 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 F of 𝒯, and use F 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 S is a vertex surface, then plugging the bounds from [17] into the running time for the Agol-Hass-Thurston algorithm gives a polynomial in |𝒯|.

Figure 4: This triangle defines three pairings: g1:[s1+5,s1+9][s2,s2+4], g2:[s2+6,s2+8][s3,s3+2], and g3:[s3+4,s3+7][s1,s1+3]. Adapted from Figure 4 of [1].

4.2 Quad vertex 𝟐-spheres and trivial induced orbits

Call a type-1 induced orbit trivial if it forms a cone over a homotopically trivial subcomplex of S built from normal arcs and triangles. Call a type-2 induced orbit trivial if it forms a homotopically trivial product I-bundle. Our algorithm relies on the fact that quad vertex 2-spheres have trivial induced orbits. In fact, we can prove not just this, but also its converse:

Lemma 10.

A normal 2-sphere is quad vertex if and only if every type-1 and every type-2 segment has a trivial induced orbit.

Proof outline.

Jaco and Tollefson gave a characterisation of vertex 2-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-2 orbits; type-1 orbits come into play because we are working with quad vertex 2-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.

Figure 5: In each tetrahedron, an exchange annulus (blue) is always “close to” a type-2 segment.

4.3 The effect of crushing on ideal loops

Let (𝒯,) be an edge-ideal triangulation of a (possibly trivial) knot K. We now study the effect of crushing quad vertex 2-spheres that intersect the ideal loop in at most two points.

Lemma 11.

Let (𝒯,) be an edge-ideal triangulation of a (possibly trivial) knot K, and let S be a quad vertex 2-sphere with w(S)=0.

Crushing S yields a new triangulation 𝒯 consisting of either one or two 3-sphere components. Moreover, all the edges in are left untouched, and together form an embedded loop in a component 𝒯0 of 𝒯, and (𝒯0,) forms an edge-ideal triangulation of K.

Proof outline.

Let 𝒯 denote the triangulation given by crushing S. Because S and are disjoint, crushing S 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 S is quad vertex, it is a consequence of Lemma 10 that 𝒯 has at most two components, each of which must be a 3-sphere. See [18, Lemma 21] for a complete proof.

Lemma 12.

Let (𝒯,) be an edge-ideal triangulation of a (possibly trivial) knot K, and let S be a quad vertex 2-sphere with w(S)=2, so that S cuts into two ideal arcs α1 and α2, corresponding respectively to two (possibly trivial) knots K1 and K2 such that K=K1#K2.

Crushing S yields a new triangulation 𝒯 consisting of either one or two 3-sphere components. Moreover, for each new knot Ki, i=1,2, we have either:

  1. 1.

    all the segments in αi survive the crushing to become an embedded loop i in a component 𝒯i of 𝒯, so that (𝒯i,i) forms an edge-ideal triangulation of Ki;

  2. 2.

    αi consists of two type-1 segments, and these two segments merge to form a single non-loop edge i in a component 𝒯i of 𝒯; or

  3. 3.

    αi is deleted.

Items 2 and 3 can only happen if Ki is trivial. If K1 and K2 both fall under Item 1, then the corresponding components 𝒯1 and 𝒯2 are distinct.

Proof outline.

We give some intuition for the three cases. See [18, Lemma 22] for details.

Since S is a quad vertex 2-sphere, it is a consequence of Lemma 10 that crushing S gives a triangulation 𝒯 with at most two components, each of which is a 3-sphere. Moreover, since S is a separating 2-sphere, the two ideal arcs α1 and α2 must end up in different components of 𝒯. In the case where 𝒯 has fewer than two components, this simply means that the corresponding ideal arc αi was deleted entirely (this is Item 3); it can be shown that this only occurs if the corresponding knot Ki is trivial.

It remains to consider what happens for an ideal arc αi that survives. Since crushing involves collapsing S to a point, we know that the endpoints of αi become identified in 𝒯. If these are the only points of αi that get identified, then the result is an ideal loop corresponding to the knot Ki (this is Item 1). Otherwise, if crushing causes further identifications in αi, then it can be shown that αi falls under Item 2, and that Ki is trivial.

To summarise, Lemmas 11 and 12 show that if we crush suitable quad vertex 2-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 K as input, and produces the prime factorisation of K as a collection of edge-ideal triangulations. As stated, the input is a diagram of K, 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 K, compute the prime factorisation of K (represented as edge-ideal triangulations) as follows:

  1. 1.

    Build an edge-ideal triangulation (𝒯K,K) of K; i.e., build a triangulation 𝒯K of 𝕊3 such that K is embedded in 𝒯K as an ideal loop K. Section 5.3 describes how this can be done.

  2. 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 (𝒯K,K).

  3. 3.

    If is nonempty, then pick and remove one edge-ideal triangulation (𝒯,) from and continue to Item 4. Otherwise, terminate with output 𝒫.

  4. 4.

    Search for a quad vertex normal 2-sphere S in 𝒯 with either w(S)=0 or w(S)=2.

    • If S 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 S 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 K 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) K 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.

In the final execution of Item 3, is empty and thus the output list 𝒫 contains the prime summands of K. See [18, Theorem 24] for details omitted from this proof outline.

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. 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 9n tetrahedra from an n-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 9 tetrahedron crossing gadget. Left: fully assembled gadget; red edges correspond to over- and under-crossing strands. Right: exploded view showing the individual tetrahedra.
  2. 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. 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 K is presented as a knot diagram, our first task is to convert this into an edge-ideal triangulation of K. We use two techniques in parallel to achieve this task.

The first technique takes a knot diagram with n crossings, and guarantees to produce an edge-ideal triangulation of size 9n with an ideal loop of length 2n. This is excellent in theory since the cost of the conversion is only linear, but as we discuss shortly 9 is a large enough constant to be a challenge in practice.

To describe the construction, view the input knot diagram as a 4-regular graph embedded in a 2-sphere S, with over- and under-crossing information recorded at each vertex of the graph. The dual graph decomposes S into 4-sided faces, with one crossing per face. Viewing the ambient 3-sphere as a suspension of S (i.e., two cones over S, glued together along S), we obtain a decomposition of the 3-sphere into 4-sided footballs: each football is a suspension of one of the 4-sided faces of S. We build an edge-ideal triangulation of the knot by triangulating each football with 9 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 1, 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 3-ball (a 1-tetrahedron gadget) to ensure that the meridian bounds a disc. Topologically, this realises a 10 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 122 torus knots with 15 to 100 crossings; (b) all 376 satellite knots from the census [11] of prime knots with 15 to 19 crossings; (c) 100 hyperbolic knots with 15 or 16 crossings; and (d) a sample of composite knots with up to 8 prime summands and 152 crossings.

Algorithm 13 certified primeness of: all 122 torus knots in 310.02 seconds (2.54 seconds per knot); all 376 satellite knots in 404.66 seconds (1.08 seconds per knot); and all 100 hyperbolic knots in 138.48 seconds (1.38 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 124.82 seconds (4.16 seconds per knot). We also generated 430 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
2 100 4.71
3 100 10.95
4 100 24.06
5 100 33.06
6 10 47.75
7 10 70.21
8 10 88.68

Finally, we used the algorithm from [2] to randomly sample 1-vertex triangulations of 3-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 285 knots in triangulations of size 2530, with running times of 0.23 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 K has at least k summands in its prime factorisation.

Our certificate consists of a sequence of edge-ideal triangulations (𝒯0,L0),,(𝒯m,Lm) and quad vertex normal surfaces Si of 𝒯i, i{0,,m1}, such that: (a) (𝒯0,L0) is obtained from K via the procedure outlined in Section 5.3; (b) every (𝒯i+1,Li+1) is obtained from (𝒯i,Li) by crushing a suitable quad vertex normal sphere Si of 𝒯i; and (c) for all i{0,,m}, (𝒯i,Li) is a union of edge-ideal triangulations of knots in 𝕊3, such that the input knot K is equal to the connected sum of the knots represented by the components of Li. The certificate is completed by a set of k components of Lm together with a certificate that they form nontrivial knots in their respective components.

Since crushing reduces the size of a triangulation, the Si 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 (𝒯0,L0) of K, and the verification that (𝒯0,L0) is combinatorially isomorphic to (𝒯0,L0) are both polynomial time procedures (see, e.g., [29, Lemma 3.1 and Remark 3.2]). The same applies to checking for each i{0,,m1}, that either wi(Si)=0 or wi(Si)=2, and certifying that Si is a quad vertex 2-sphere. For this latter task, we must show that type-1 and type-2 induced orbits are trivial, and that Si is connected; see [18, Section 6.1] for details.

Crushing 𝒯i along Si 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 Li+1, following Section 4; and for verifying that (𝒯i+1,Li+1) and (𝒯i+1,Li+1) are combinatorially isomorphic. Verifying knottedness of components of Lm 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 i{0,,m}. It then follows from the uniqueness of prime factorisation [30], that this is enough to verify that the input knot K has at least k summands.

First note that (c) is clearly satisfied for (𝒯0,L0). To proceed by induction, assume that (c) is satisfied for some (𝒯i,Li), 0i<m. Let Ci denote the component of 𝒯i containing Si and with ideal loop i. Lemmas 11 and 12 imply that crushing Si replaces (Ci,i) 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 i. Either way, (c) is also satisfied for (𝒯i+1,Li+1). See [18, Section 6.3] for more details.

For the converse, suppose the verification algorithm succeeds. It follows that (𝒯0,L0) must be an edge-ideal triangulation of K. Moreover, it follows that the Si are quad vertex normal surfaces, and hence Lemmas 11 and 12 imply that (c) holds for all i{0,,m}. Hence, it follows that (𝒯m,Lm) contains k nontrivial knot summands. By uniqueness of the prime factorisation of K, this verifies that K has at least k 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 K in 𝕊3, and let c~() be the triangulation complexity of over the class of edge-ideal triangulations. Write K=K1##Km for the unique prime factorisation of K. Starting with an edge-ideal triangulation (𝒯,) for K, our results from Section 4.3 ensure that we can iteratively find quad vertex 2-spheres to crush at least m1 times to obtain edge-ideal triangulations for each of the prime knots K1,,Km. If we only crush m1 times, then every crush performs a nontrivial connected sum decomposition; thus, by Lemma 12, each crush increases the number of ideal edges by exactly 2. Due to the excess ideal edges, it can be shown (see [18, Lemma 25]) that we can crush an additional 2-sphere. So in fact, we can always crush at least m times, and each crush strictly decreases the overall number of tetrahedra, which establishes the bound

c~(𝕊3K)m+i=1mc~(𝕊3Ki). (1)
Example 15.

There are two knot complements of ideal edge complexity 1: the unknot and the trefoil 31 (both are represented by edges in the unique 1-tetrahedron 1-vertex 3-sphere triangulation). The only knot complement of ideal-edge complexity 2 is 51. The knot complements of ideal-edge complexity 3 are 41, 71, 819 and 10124.

It follows from Equation 1 that the ideal-edge complexity of the complements of 31#31 and 31#51 are at least 4 and 5, respectively. However, such triangulations of 𝕊3 do not exist in the census. Instead, the smallest triangulations of 𝕊3 containing an ideal edge of type 31#31 and 31#51 have sizes 5 and 6, 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 3-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. 0-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 3-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.