Handle Slide Local Transformations

10.1.1 Prior work

Catenanes and rotaxanes are examples of nontrivial structural tanglings. The focus of this chapter is on computing the linking number, the link invariant de- fined in Section 6.3. Haken 1961 showed that important knotting and linking problems are decidable in his seminal work on normal surfaces. His approach, as reformulated by Jaco and Tollefson 1995, forms the basis of many cur- rent knot detection algorithms. Hass et al. 1999 showed that these algorithms take exponential time in the number of crossings in a knot diagram. They also placed both the UNKNOTTING PROBLEM and the SPLITTING PROBLEM in NP, the latter problem being the focus of this chapter. Generally, other approaches to knot problems have unknown complexity bounds and are assumed to take at least exponential time. As such, the state of the art in knot detection only allows for very small data sets.

10.1.2 Approach

The approach in this chapter is to model molecules by filtrations of α-complexes, and detect potential tanglings by computing the linking num- bers of the filtration. The linking numbers constitute a signature function for the filtration. This combinatorial approach makes the same fundamental as- sumption as in Chapter 2 that α-complex filtrations capture the topology of a molecular structure. Given a filtration, we will use the spanning surface defi- nition of the linking number for its computation. Consequently, we need data structures for the efficient enumeration of co-existing pairs of cycles in differ- ent components. We also need an algorithm to compute the linking number of a pair of such cycles.

10.2 Algorithm

In this section, we present data structures and algorithms for computing the linking numbers of the complexes in a filtration. As we only use canonical 1-cycles for this computation, we will refer to them simply as cycles. As- sume we have a filtration K 1 , K 2 , . . . , K m as input. As simplices are added, the complex undergoes topological changes that affect the linking number: New components are created and merged together, and new nonbounding cycles are created and eventually destroyed. A basis cycle z with persistence interval [i, j may only affect the linking numbers of complexes K i , K i +1 , . . . , K j − 1 in the filtration. Consequently, we only need to consider basis cycles z ′ that exist during some subinterval [u, v ⊆ [i, j in a different component than z’s. for each p-linked pair z p , z q with interval [u, v { Compute λ = |λz p , z q |; Output λ, [u, v; } Fig. 10.1. Linking number algorithm. Definition 10.1 potentially linked A pair of canonical cycles z , z ′ in dif- ferent components, whose persistence intervals have a nonempty intersection [u, v, are potentially linked p-linked. The interval [u, v is the p-linking inter- val for this p-linked pair of cycles. Focusing on p-linked pairs, we get an algorithm with three phases. In the first phase, we compute all p-linked pairs of cycles. In the second phase, as shown in Figure 10.1, we compute the linking numbers of such pairs. The third and final phase is trivial. We simply aggregate the contributions from the pairs to find the linking number signature for the filtration. Two cycles z p , z q with persistence intervals [i p , j p , [i q , j q co-exist during [r, s = [i p , j p ∩ [i q , j q . We need to know if these cycles also belong to dif- ferent components during some subinterval [u, v ⊆ [r, s. Let t p ,q be the mini- mum index in the filtration when z p and z q are in the same component. Then, [u, v = [r, s ∩ [0,t p ,q . The cycles z p , z q are p-linked during [u, v = ∅. In the remainder of this section, we first develop a data structure for computing t p ,q for any pair of cycles z p , z q . We then use this data structure to efficiently enumerate all pairs of p-linked cycles. Finally, we examine an algorithm for computing λz p , z q for a p-linked pair of cycles z p , z q .

10.2.1 Component Tree

To compute t p ,q , we need to have a history of the changes to the set of compo- nents in a filtration. There are two types of simplices that can change this set. Vertices create components and are therefore all positive. Negative edges con- nect components. To record these changes, we construct a binary tree called a component tree by maintaining a union-find data structure for components Cormen et al., 1994. The leaves of the component tree are the vertices of the filtration. When a negative edge connects two components, we create an inter- nal node for the component tree and connect the new node to the nodes repre- senting these components, as shown in Figure 10.2. The component tree has size O n for n vertices. We construct it in time OnA − 1 n, where A − 1 n is the inverse of the Ackermann’s function, encountered earlier in Section 7.2.3. 2 1 5 4 6 7 3 Fig. 10.2. The component tree has the complex vertices as leaves and negative edges as internal nodes. During construction, the tree exists as a forest. Fig. 10.3. The augmented union-find data structure places root nodes in the shaded circular doubly linked list. Each root node stores all active canonical cycles in that component in a doubly linked list, as shown for the darker component. Having constructed the component tree, we find the time the two vertices w , x are in the same component by finding their lowest common ancestor lca in this tree. We may utilize the optimal method by Harel and Tarjan 1984 to find the lca’s with O n preprocessing time and O1 query time. Their method uses bit operations. If such operations are not allowed, we may alternatively use the method of van Leeuwen 1976 with the same preprocessing time and O log log n query time.

10.2.2 Enumeration

Having constructed the component tree, we use a modified union-find data structure to enumerate all pairs of p-linked cycles. We augment the data struc- ture to allow for a quick listing of all existing canonical cycles in each compo- nent in K i . Our augmentation takes two forms: We put the roots of the disjoint trees, representing components, into a circular doubly linked list. We also store all existing cycles in each component in a doubly linked list at the root node of the component, as shown in Figure 10.3. When components merge, the root x 1 of one component becomes the parent of the root x 2 of the other component. We concatenate the lists stored at the x 1 , x 2 , store the resulting list at x 1 , and