Computational Topology with Regina: Algorithms, Heuristics And
Total Page:16
File Type:pdf, Size:1020Kb
COMPUTATIONAL TOPOLOGY WITH REGINA: ALGORITHMS, HEURISTICS AND IMPLEMENTATIONS BENJAMIN A. BURTON Dedicated to J. Hyam Rubinstein Abstract. Regina is a software package for studying 3-manifold triangula- tions and normal surfaces. It includes a graphical user interface and Python bindings, and also supports angle structures, census enumeration, combina- torial recognition of triangulations, and high-level functions such as 3-sphere recognition, unknot recognition and connected sum decomposition. This paper brings 3-manifold topologists up-to-date with Regina as it ap- pears today, and documents for the first time in the literature some of the key algorithms, heuristics and implementations that are central to Regina’s perfor- mance. These include the all-important simplification heuristics, key choices of data structures and algorithms to alleviate bottlenecks in normal surface enumeration, modern implementations of 3-sphere recognition and connected sum decomposition, and more. We also give some historical background for the project, including the key role played by Rubinstein in its genesis 15 years ago, and discuss current directions for future development. 1. Introduction Algorithmic problems run to the heart of low-dimensional topology. Promi- nent amongst these are decision problems (e.g., recognising the unknot, or testing whether two triangulated manifolds are homeomorphic); decomposition problems (e.g., decomposing a triangulated manifold into a connected sum of prime mani- folds); and recognition problems (e.g., “naming” the manifold described by a given triangulation). For 3-manifolds in particular, such problems typically have highly complex and expensive solutions—running times are often exponential or super-exponential, and implementations are often major endeavours developed over many years (if they arXiv:1208.2504v2 [math.GT] 22 Feb 2013 exist at all). This is in contrast to dimension two, where many such problems are easily solved in small polynomial time, and dimensions ≥ 4, where such problems can become provably undecidable [21, 40]. Regina [5, 14] is a software package for low-dimensional topologists and knot theorists. Its main focus is on triangulated 3-manifolds, though it is now branch- ing into both two and four dimensions also (see Section 7). It provides powerful algorithms and heuristics to assist with decision, decomposition and recognition problems; more broadly, it includes a range of facilities to study and manipulate 2000 Mathematics Subject Classification. Primary 57-04, 57N10; Secondary 68W05, 57Q15. Key words and phrases. 3-manifolds, algorithms, software, simplification, normal surfaces, recognition, angle structures. The author is supported by the Australian Research Council under the Discovery Projects funding scheme (projects DP1094516 and DP110101104). 1 2 BENJAMIN A. BURTON 3-manifold triangulations. It offers rich support for normal surface theory, a major algorithmic framework that recurs throughout 3-manifold topology. One of Regina’s most important uses is for experimentation: it can analyse a single example too large to study by hand, or millions of examples “in bulk”. Other uses include computer proofs, such as the recent resolution of Thurston’s old ques- tion of whether the Weber-Seifert dodecahedral space is non-Haken [18], and calcu- lation of previously-unknown topological invariants, such as recent improvements to crosscap numbers in knot tables [11, 15]. The remainder of this introduction gives a brief overview of Regina and some history behind its early development, back to its genesis with Rubinstein 15 years ago. Following this, we select some of Regina’s most important features and study the modern heuristics, algorithms and implementations behind them. Some of these details are crucial for Regina’s fast performance, but have not appeared in the literature to date. Overall, this paper offers a fresh update on the significant progress and performance enhancements in the eight years since Regina’s last major report in the literature [5]. The specific features that we focus on are: • the process of simplifying triangulations, which plays a critical role in many of Regina’s high-level algorithms; • the enumeration of normal and almost normal surfaces, including the high- level 0-efficiency, 3-sphere recognition and connected sum decomposition algorithms; • combinatorial recognition, whereby Regina attempts to recognise a trian- gulation by studying its combinatorial structure; • the enumeration of angle structures, taut angle structures and veering struc- tures on triangulations. With respect to these features, there are interesting new developments in the pipeline. Examples include “breadth-first simplification” of triangulations, the tree traversal algorithm for enumerating vertex normal surfaces, and new 0-efficiency and 3-sphere recognition algorithms based on linear programming that exhibit ex- perimental polynomial-time behaviour. The corresponding code is already written (it is now being tested and prepared for integration into Regina), and we outline these new developments in the relevant sections of this paper. To finish, Section 6 gives concrete examples of how Regina can be used for experimentation, including an introduction to Regina’s in-built Python scripting, so that interested readers can use these as launching points for their own experiments. Section 7 concludes with additional future directions for Regina, including new work with Ryan Budney on triangulated 4-manifolds, much of which is already coded and running in the development repository. 1.1. Overview of Regina. Regina is now 13 years old, with over 190 000 lines of source code. It is released under the GNU General Public License, and contribu- tions from the research community are welcome. It adheres to the following broad development principles, in order of precedence: (1) Correctness: Having correct output is critical, particularly for applications such as computer proofs. Regina is extremely conservative in this regard: for example, it will use arbitrary precision integer arithmetic if it cannot COMPUTATIONAL TOPOLOGY WITH REGINA 3 be proven unnecessary, and the API documentation makes thorough use of preconditions and postconditions. (2) Generality: Algorithms operate in the broadest possible scenarios (within reason), and do not require preconditions that cannot be easily tested. For instance, unknot recognition runs correctly for both bounded and ideal triangulations, and even when the input triangulation is not known to be a knot complement (whereupon it generalises to solid torus recognition). (3) Speed: Because many of its algorithms run in exponential or super-exponen- tial time, speed is imperative. Regina makes use of sophisticated algorithms and heuristics that, whilst adhering to the constraints of correctness and generality, make it practical for real topological problems. Regina is multi-platform, and offers a drag-and-drop installer for MacOS, an MSI-based installer for Windows, and ready-made packages for several GNU/Linux distributions. It is thoroughly documented, and stores its data files in a compressed XML format. Regina provides three levels of user interface: • a full graphical user interface, based on the Qt framework [48]; • a scripting interface based on Python, which can interact with the graphical interface or be used a standalone Python module; • a programmers’ interface offering native access to Regina’s mathematical core through a C++ shared library. There are facilities to help new users learn their way around, including an illus- trated users’ handbook, context-sensitive “what’s this?” help, and sample data files that can be opened through the File −→ Open Example menu. Regina’s core strengths are in working with triangulations, normal surfaces and angle structures. It only offers basic support for hyperbolic geometries, for which the software packages SnapPea [60] and its successor SnapPy [23] are more suitable. In addition to its range of low-level operations and 3-manifold invari- ants, Regina includes implementations of high-level decision and decomposition algorithms, including the only known full implementations of 3-sphere recogni- tion and connected sum decomposition. For a comprehensive list of features, see http://regina.sourceforge.net/docs/featureset.html. 1.2. History. In the 1990s, Jeff Weeks’ software package SnapPea had opened up enormous possibilities for computer experimentation with hyperbolic 3-mani- folds. In contrast, outside the hyperbolic world many fundamental 3-manifold algorithms remained purely theoretical, including high-profile algorithms such as 3-sphere recognition, connected sum decomposition, Haken’s unknot recognition algorithm, and testing for incompressible surfaces. More broadly, normal surface theory—a ubiquitous technology in algorithmic 3-manifold topology—had no concrete software implementation (or at least none that had been publicised). Many of the algorithms that used normal surfaces were so complex that it was believed that any attempt at implementation would be both painstaking to develop and impractically slow to run. Nevertheless, Rubinstein sought to move these algorithms from the theoretical realm to the practical, and in 1997 he assembled a team for a new software project that would make computational normal surface theory a reality. This initial team consisted of David Letscher, Richard Rannard, and myself. Much planning was 4 BENJAMIN A. BURTON done and a little preliminary code was written, but then the team members became