1 Introduction
This paper considers computational questions pertaining to homotopies: in broad terms, a homotopy between two curves in a topological space is a continuous deformation between these two curves. This can be formalized either in a continuous setting, where it constitutes one of the fundamental constructs of algebraic topology, but also in a more discrete one, where the input is a simplicial, or more generally cellular description of a topological space; this latter setting will be the focus of this article. While considerably more restrictive than the more traditional mathematical settings, this setting is nonetheless of key importance in applications areas such as graphics or medical imaging, where inputs are generally represented by triangular meshes built upon scanned point sets from an underlying 3D object.
Investigating homotopies from a computational perspective is a wellstudied problem, dating back to the work of Dehn [dtkzf12] on contractibility of curves, which has strong ties to geometric group theory. While deciding whether two curves in a dimensional complex are homotopic is wellknown to be undecidable in general (see for example Stillwell [sctcgt80]), when the underlying space is a surface, efficient, lineartime algorithms have been designed to test homotopy [dgtcs99, lrhts12, ewtcsr13]. In this article, we add a quantitative twist to this problem: the Homotopy Height problem consists, starting with two disjoint homotopic curves on a combinatorial surface, of finding the homotopy of minimal height, that is, where the length of the longest intermediate curve in the homotopy is minimized. (We refer the reader to Section 2 for formal definitions.) The notion of homotopy height has obvious appeal from a practical perspective, as it quantifies how long a curve has to be to overcome a hurdle: for example, deciding whether a bracelet is long enough to slide off over a hand without breaking is essentially the question of homotopy height. From a computational side, deformations of minimal height minimize the necessary stretch and can be used to quantify how similar curves are, as in map or trajectory analysis.
1.1 Our results
We begin by considering two curves forming the boundary of a discrete annulus, and study the homotopy between these boundaries of minimal height. Our article leverages on recent results in Riemannian geometry [clchidhh14, crmhcdrs16], and in particular on a companion article coauthored with Gregory Chambers and Regina Rotman [ccmormcbd17] where we prove that in the Riemannian setting, such an optimal homotopy can be assumed to be very well behaved. Firstly, it can be assumed to be an isotopy, so that all the intermediate curves remain simple. Secondly, this isotopy can be assumed to only move in one direction and never sweeps any portion of the disk twice; we refer to this property as monotonicity, which we will define more precisely in Section 3.
These isotopy and monotonicity properties turn out to be a key ingredient for computational purposes, once we translate those results to the discretized setting. First, via some surgery arguments, it allows us to prove that Homotopy Height is in NP (Theorem 12). The corresponding exponential time algorithm is to our knowledge the best exact algorithm for Homotopy Height. We note that our setting is very general, and also implies NPmembership for a variant of Homotopy Height in a more restricted setting that was considered in earlier papers [Brightwell09submodularpercolation, homotopyheight, hnsshwdmml16], as well as for Homotopic Fréchet distance, where this was still open despite the recent articles investigating this distance [ccellthfdbcw10, hnsshwdmml16]. Then, further surgery arguments allow us to provide an approximation algorithm for Homotopy Height (Corollary 14), by relying on an earlier approximationalgorithm of HarPeled, Nayyeri, Salvatipour and Sidiropoulos [hnsshwdmml16] for homotopy height in a more restricted setting. Finally, we show that monotonicity directly implies an equivalence between the Homotopy Height problem and a seemingly unrelated graph drawing problem which we call Minimal Height Linear Layout. Therefore, we obtain that this problem is also in NP and we provide an approximation for it.
1.2 Related work
Optimal homotopies (for several definitions of optimal) have been studied extensively in the mathematical community, mainly in Riemannian settings. This literature fits broadly in the setting of quantitative homotopy theory, initially introduced by Gromov [gqht99]
, which aims at introducing a quantitative lens in the study of topological invariants on manifolds. Probably the most extensively considered notion of optimality is the study of homotopies minimizing the area swept; see for example
[lawson1980lectures] for an overview of some variants of this problem, or [white1984] for a discussion of how minimum area homotopies and homologies are connected in higher dimensions. The notion of controlling the width of a homotopy has also been studied [width1980, geodesicwidth2013], and more recent work on minimal height homotopies [clchidhh14, crmhcdrs16] laid the foundation for our results in this work.On the computational side, the rise of Fréchet distance for measuring similarity between curves was a prime motivation for the notion of comparing two curves; see for example [alt2009] for a survey. Generalizing Fréchet distance to surfaces led to the homotopic Fréchet distance, which is essentially the same as finding a minimum width homotopy given two input cycles on a surface; algorithms are known to calculate this in polynomial time for two input curves in the plane minus a set of obstacles [CVE08] and to approximate this in the discrete settings where the two curves bound a disk [hnsshwdmml16].
More directly, minimum height homotopies have been studied from the computational perspective in various discretized settings [homotopyheight, hnsshwdmml16], although mainly to discuss the complexity of the problem. Indeed, as it was not known if the optimal height homotopy was even monotone, the complexity of the problem was completely open. Since the monotonicity result also holds in more geometric settings [ccmormcbd17], a recent paper also examined one natural geometric setting, where the goal is to morph across a polygonal domain in Euclidean space with point obstacles; this work presents a lower bound that is linear in the number of obstacles, as well as a 2approximation for the arbitrary weight obstacles and an exact polynomial time algorithm when all obstacles have unit weight [esahh2017]. The same problem also arises as a combinatorics question in lattice theory as a bnorthward migration, where the authors leave monotonicity of such migrations as an open question [Brightwell09submodularpercolation].
1.3 Relations to graph searching and width parameters
This work also connects to sweep and search parameters in graph theory; see for example [fabggs08] for a survey of this topic. In each variant, the game consists of finding the minimum number of searchers needed, where the goal is to find or isolate a hidden fugitive. For example, in the node searching variant, the fugitive hides on edges, all of which are originally contaminated, and the searchers clear an edge if two are on its incident vertices. In this variant, edges can be recontaminated if they are connected to a contaminated edge by a path without searchers, and the game ends when everything is decontaminated.
One key issue in these games is precisely that of monotonicity, or of determining whether in an optimal strategy, edges get recontaminated. In the node searching variant, monotonicity was established by Lapaugh [lrdnhsg93], and the argument was simplified by Bienstock and Seymour [bsmgs91]. One important corollary to monotonicity for these games is that it immediately shows the problem lies in NP, since a strategy can be certified by the list of edges cleared.
Our homotopy problem is quite similar to these graph parameters; sweeping a disk while keeping the length small is intuitively quite similar to blocking in a fugitive. While our problem does display minor technical differences with the aforementioned variant – most notably, our setting is naturally edgeweighted and the cost is measured on the edges and not the vertices – the key difference is the one of connectedness, as nodesearching games may allow for disconnected strategies. An important variant of node searching, called connected node searching, requires additionally that the decontaminated space remains connected, but makes no restriction on the uncontaminated space.
For graph searching problems, the main argument to establish monotonicity does not maintain connectivity [bsmgs91], and it was proven that an optimal strategy for connected node searching may indeed be nonmonotone [ydasglcn04]. By contrast, Theorem 4 establishes monotonicity of the optimal homotopy in our setting, and the arguments differ radically from the ones of Lapaugh and Bienstock and Seymour. As such, we identify in this paper a new variant of graph searching which is somewhat tractable (i.e., in NP) and introduce a new proof technique to establish monotonicity results.
Finally, when monotonicity is established, graph searching parameters are very intimately related to width parameters of graphs. Minimum cut linear arrangement (also known as cutwidth) is closely connected to the Minimum Height Linear Layout problem, which we show to be equivalent to Homotopy Height, but the key difference is that it may break the embedding of the graph. Thus, NPhardness reductions for this problem [MONIEN1988209] do not imply hardness for our problem. Connected variants of various width parameters give rise to connected pathwidth [dpcp12] and connected treewidth [fnctcgs06], but in contrast to our homotopies, these parameters are only connected “on one side”, which makes them incomparable. We believe that the “doublyconnected” aspect of homotopy height makes it a worthwhile new graph parameter which could offer insights to other parameters in this area.
Outline of the paper.
After introducing the preliminaries in Section 2, we lay the foundations of this work by explaining the structural theorems we rely on in Section 3. In Section 4 we establish surgery lemmas based on the idea of retractions. Then, in Section 5 we prove that Homotopy Height is in NP. In Section 6 we draw connections with Homotopic Fréchet Distance, and we leverage on these connections to provide an approximation algorithm for Homotopy Height.
2 Preliminaries
Homotopy and Isotopy.
Let be a surface, endowed with a cellularly embedded graph with vertices such as in Figure 2, and let and be two simple cycles on bounding an annulus.
A discrete homotopy between and is a sequence of cycles with , with and and any two consecutive paths and are one move apart. The intermediate curves are called level curves or intermediate curves. A move is either a faceflip, an edgespike or an edgeunspike (flip, spike or unspike, for short). A faceflip for a face replaces a single subpath of with the path in . An edgespike for an edge replaces a single occurrence of a vertex by the path consisting of two mirrored copies of that edge in . Symmetrically, an edgeunspike replaces a path of by the single vertex in . The length of a path is the sum of the weights of its edges (with multiplicity). The height of a homotopy is the length of the longest path . An optimal homotopy is one that minimizes the height. The homotopy height between and is the height of an optimal homotopy between and . Figure 3 illustrates an optimal homotopy that uses only faceflips for the instance of Figure 2.
Cross Metric Surfaces.
For most purposes, it is more convenient to think of this discrete model in a dual way, relying on the crossmetric surfaces [cetnpcs10] which are becoming increasingly used in the computational geometry and topology literature. In this dual setting, a crossmetric surface is a surface endowed with a weighted (dual) graph .
Assuming the primal surface is connected, we obtain this dual graph by gluing a disk to each boundary component, taking the dual graph, and puncturing the vertices corresponding to the added disks, without removing the adjacent edges. Such that these (dual) edges end at the boundary of the crossmetric surface instead of at a vertex, see Figure 4.
For a curve on with a finite number of crossings with , its length is the weighted sum of the crossings . Now, a homotopy between and is a homotopy in the usual sense, that is, a continuous map such that and , except that we require that the values of for which is not in general position with are isolated, and each such curve has at most one such degeneracy^{1}^{1}1Any homotopy can be made so by a small perturbation without increasing the height, so we always consider this hypothesis fulfilled in the remainder of the article. with . As before, the height of a homotopy is defined as the maximal length of an intermediate nondegenerate level curve . A homotopy is an isotopy if all the intermediate curves are simple.
Given a homotopy in this setting, we obtain a discrete homotopy on the primal graph on as follows. Pick a curve in each maximal interval of nondegenerate curves in (all curves in such interval have the same crossing pattern with , and therefore the same length). Let be the curve on whose sequence of vertices and edges corresponds to the sequence of faces and edges of visited by . This model is dual to the previous one, and Figure 5 illustrates how any move (flip, spike or unspike) connects two intermediate curves and . We say a discrete homotopy is an isotopy if it can be obtained from an isotopy in the dual setting.
3 Isotopies and monotonicity of optimal homotopies
We begin by restating and explaining the two structural results that we will rely on. Introducing the relevant Riemannian background lies outside of the scope of this paper, so we will simply advise the uninitiated reader to picture a Riemannian surface as a surface embedded into , where the metric on the surface is the one induced by the usual Euclidean metric of . Thanks to the NashKuiper embedding theorem (see [hhierme06]), this naive idea looses no generality. We refer to standard textbooks on the subject for more proper background on Riemannian geometry, for example do Carmo [crg92].
The first theorem shows that up to an arbitrarily small additive factor, the homotopy of minimal height between two simple closed curves can be assumed to be an isotopy.
Theorem 1 ([clchidhh14, Theorem 1.1]).
Let be twodimensional Riemannian manifold with or without boundary, and let and be two noncontractible simple closed curves which are homotopic through curves bounded in length by via a homotopy .
Then for any , there is an isotopy from to through curves of length at most .
Remark. The noncontractibility hypothesis is required because if is not a sphere, contractible cycles with opposite orientations are homotopic but not isotopic. However, if we disregard the orientations, the result holds in full generality.
This theorem has the following discrete analogue:
Theorem 2.
Let be a crossmetric surface, and let and be two noncontractible simple closed curves on which are homotopic through curves bounded in length by via a homotopy .
Then there is an isotopy from to through curves of length at most .
The proof is exactly the same as the one of Theorem 1, except that it does not need the slack: this was required to slightly perturb the curves so that they are simple but in the discrete setting it can be done with no overhead.
The second theorem shows that, when the starting and finishing curves of a homotopy are the boundaries of the manifold, there exists an optimal homotopy that is monotone, i.e., that never backtracks, once again up to an arbitrarily small additive factor. Formally, if is an isotopy (which we can assume the optimal homotopy to be, by Theorem 1) between and , for , the curves and bound an annulus . Then the isotopy is monotone if for , is contained in .
Theorem 3 ([ccmormcbd17, Theorem 1.2 and the following paragraph]).
Let be a Riemannian annulus with boundaries and such that there exists a homotopy between and of height less than .
Then there exists a monotone homotopy between and of height less than .
Note that the slack of Theorem 1 is also present here but is hidden in the open upper bound of . In this theorem, as was observed by Chambers and Rotman [crmhcdrs16], crediting Liokumovitch, the hypothesis that the manifold is entirely comprised between both curves is necessary: see [crmhcdrs16, Figure 5] for a counterexample.
In the discrete setting, the corresponding result is the following, where the definition of monotonicity is the same:
Theorem 4.
Let be a crossmetric annulus with boundaries and such that there exists a homotopy between and of height .
Then there exists a monotone isotopy between and of height .
The proof is exactly identical to the one in the Riemannian settting and it yields a slightly stronger result, since the crossmetric setting removes the need for perturbations and thus the need of an slack.
Remark: Let us observe that the discrete theorems are in some way more general than the Riemannian ones: not only do they bypass the need for some slack, but they also directly imply their Riemannian converses by the following reduction. Starting with a Riemannian surface, and a (nonmonotone) isotopy between two disjoint curves, one can find a triangulation of the surface allowing, at an
cost, to approximate the isotopy using only elementary moves. Then, after making this isotopy monotone in the discrete setting, one can translate it back into a monotone isotopy in the Riemannian setting by interpolating between the face and edge moves.
4 Retractions and pausing at short cycles
In this section, we establish several technical lemmas which are necessary for our proofs in the next section. For simple closed curves and bounding an annulus, denote that annulus by . Let be the set of closed curves in homotopic to boundaries and , that do not intersect homotopic curves of shorter length. Then, for any point , is a shortest closed path through in its homotopy class. Let be the set of minimum length simple closed curves homotopic to the boundaries of , then .
We now introduce the concept of a retraction of a homotopy, which gives a way to shortcut a homotopy at a given curve, provided it is a curve of . This idea is implicit in Chambers and Rotman [crmhcdrs16, Proof of Theorem 0.7], and we refer to their article for more details. For a monotone isotopy between boundaries of an annulus , and a homotopic annulus , define the retraction of to as the same curve with each arc of replaced by the shortest homotopic path along the boundary of . Although paths along (dis)appear discontinuously as varies, can be obtained in the form of a discrete homotopy by (un)spiking these paths as they (dis)appear. The resulting homotopy is a monotone isotopy.
Lemma 5.
If and , and is a monotone isotopy from to of height , then is a monotone isotopy from to with height at most .
Proof.
The retraction is a monotone isotopy from to . Let be the maximum for which intersects . For , we have and therefore . For , each arc of is replaced in by a homotopic path along with , and thus . Hence . ∎
Lemma 6.
If , and is a monotone isotopy from to of height , then there is a monotone isotopy from to of height at most having as a level curve.
Proof.
We have and . So by Lemma 5, the monotone isotopies from to and from to have height at most and can be composed to obtain a monotone isotopy from to of height at most with as a level curve. ∎
Lemma 7.
Let be a set of paths from to without proper pairwise intersections, where each is a shortest homotopic path in between its endpoints. If is a monotone isotopy from to of height , then there exists a monotone isotopy of height at most whose level curves all cross each at most once (after infinitesimal perturbations).
Proof.
Denote by the number of proper intersections of curves and , and by the total number of intersections of with . Let be the maximum total number of intersections over all , and let be the set of maximal intervals with if . If , each level curve of crosses each exactly once and we are done, thus we assume in the following that .
If , we obtain a homotopy from with by, for each interval , replacing subhomotopy of by some with .
Consider a single interval and let . Then consists of subarcs of , each connecting the two boundaries of . For , intersects each such arc exactly once, and each intersects these arcs in the same order. Among the components of , there is a disk bounded by one arc of and two arcs of , and a disk bounded by one arc of and one arc of , such that these disks contain no other arcs of .
We can find that intersects any arc of at most once (in the same order as ), and does not intersect the interiors of and (because the two arcs of on their boundary form a shortest path). Then and the retraction has , since any arc has fewer intersections than has with (in particular with the boundary of ). Symmetrically, for we have . Since the composition is a homotopy from to with and height at most (by Lemma 6), we can use this as a replacement for in . By induction, we obtain a homotopy of height at most whose level curves all cross each at most once. ∎
5 Computing homotopy height in NP
In this section, we show that in the discrete setting, there is an optimal homotopy with a polynomial number of moves. First, we show that there is a homotopy that flips each face exactly once.
Lemma 8.
For an annulus bounded by and , there is a homotopy of minimum height between and that flips each face of exactly once.
Proof.
By Theorem 4, some homotopy of minimum height is a monotone isotopy. For two consecutive level curves and in a monotone isotopy, the move between and flips face if and only if lies in or but not both. Because contains all faces, and contains none, each face is flipped at least once. By monotonicity, we have for , that . So, if face does not lie in , it will not be flipped again in . Hence each face is flipped exactly once. ∎
It remains to show that each edge is involved in a polynomial number of (un)spike moves; note that this does not directly follow from monotonicity, since a second spike of the same edge does not violate monotonicity (as can easily be seen in the dual setting).
Postponing spikes.
Before we bound the number of spike moves, we transform an optimal monotone isotopy into one where each spike move is delayed as much as possible, and each unspike move happens as soon as possible. We explain this transformation in the dual setting.
Suppose a spike move occurs for edge between and , then denote by the (unique) arc of both of whose endpoints lie on . This arc is a subarc of the dual edge . Consider the maximum , for which the component of containing has both endpoints on , and for all , curve has exactly two crossings with (so the only action performed on arc was the spike between and ). Then and enclose a disk . If the interior of contains no edges of , we can delay the spike of at least until just before , as illustrated in Figure 7 (a), where is shaded.
Depending on what happens in the move between and , we may transform the isotopy further. This move is either (1) an unspike attached to , or (2) a faceflip connected to one endpoint or (3) both endpoints^{2}^{2}2This happens only if the primal edge is adjacent to only one face of . of , or (4) a faceflip or spike inside . In cases (1) and (2), we cancel the spike against the unspike or flip, as illustrated in Figure 7 (b) and (c). We do not postpone the spike in cases (3) and (4). Symmetrically, unspike moves can be made to happen earlier. Observe that these operations cannot increase the height of a homotopy since each level curve in the resulting homotopy crosses a subset of the edges of some curve in the original homotopy.
Call a homotopy reduced if it is the result of applying the above rules to until no spike can be canceled or postponed until after a flip or unspike, and no unspike can be canceled or be made to happen before any prior flip or spike. Observe that starting from an optimal monotone isotopy, the reduced isotopy is also an optimal monotone isotopy. The structure of reduced homotopies is given in Lemma 9.
Lemma 9.
Between any two consecutive faceflips in a reduced isotopy lies a single (possibly empty) path of unspike moves followed by a (possibly empty) path of spiked moves.
Proof.
In a reduced homotopy, no unspike follows a spike move, and any spikes that remain ‘surround’ the next faceflip (if any), see Figure 7 (d). Symmetrically, all unspikes between two consecutive faceflips surround the previous faceflip (if any). From the primal perspective, these unspike moves form a path from the previously flipped face and spike moves form a path towards the next flipped face. ∎
Any reduced homotopy starts with zero or more unspikes from , after which a possibly empty path of spikes to the first faceflip occurs, then that face is flipped, and a possibly empty path of unspikes enabled by this flip occurs. Subsequently, a spiked path, faceflip, and unspiked path occur for the remaining faces. Finally, a sequence of spikes towards may occur. We may assume that on and , any two consecutive edges are different, such that no immediate unspike moves are possible from , and no immediate spike moves are possible to . Otherwise we may by Lemma 5 perform those moves immediately without increasing the homotopy height.
Bounding spike moves.
We are now ready to bound the number of spike and unspike moves in an optimal homotopy. Call a homotopy good if it is a minimumheight reduced monotone isotopy and it has a minimum number of moves. By Theorems 2 and 4 , the height of is the homotopy height between and .
Define an edgespike of an edge to be between existing copies of , if the portion of the dual edge crossed by the (dual) level curve, lies between two existing crossings of the level curve with , such as in Figure 8. We show that such spikes never appear in .
Lemma 10.
If homotopy is good, there are no spikes between existing copies of any edge .
Proof.
Suppose the move from to is the last move between existing copies of the same edge, and assume this move is a spike of edge from to . In the dual setting, consider the component of that is crossed by the spike move (highlighted in Figure 8). Let be the number of crossings of with , then for some between and , , and for some unique , again, and for , we have (because we assumed this was the last spike between existing copies of any edge).
For , label the four crossings of with by , , , and , in order along , so the spike move at creates and . Consider the three components , and of , such that touches and from the dual face of , and touches and from the dual face of , and touches in two segments from the dual face of . Because lies between and , will first contract either component or , namely at . Assume without loss of generality that contracts first.
We modify such that any level curve crosses at most twice by reconnecting the neighborhood of , whose local structure evolves exactly as depicted in the top row of Figure 9. We essentially remove crossings and , and reconnect with using a (zerolength) segment along in face . On the other side, consider the arc of with as endpoint. We cut this arc in two subarcs and , where has as endpoint, and connect the other endpoint to the arc of at the endpoint at using a segment along in . Similarly, we connect the endpoint of that at to the loose end of . These reconnections are depicted in the bottom row of Figure 9. A more global view (corresponding to Figure 8) is illustrated in Figure 10.
Observe that the reconnected curves can be made to appear continuously in such a way that they form a monotone isotopy. Because level curves only changed in the neighborhood of , where they were shortened by avoiding the crossings with , we have an isotopy whose height is at most that of , and in which at least one spike is removed. So, because was optimal, we have constructed an optimal monotone isotopy with fewer moves. Therefore, the corresponding reduced isotopy also has fewer moves, contradicting that was good. ∎
Our final step towards bounding the number of edge spikes is to derive a contradiction if for some interval without faceflips, an edge is spiked (or unspiked) times in . The proof is similar to that of Lemma 10.
Lemma 11.
For a good homotopy , any subhomotopy contains either a faceflip, or at most spike (and at most unspike) moves of the same edge.
Proof.
Suppose contains no faceflip, then because is reduced, the spike moves in form a path of spike moves in . Assume for a contradiction that some edge lies on at least times. We say two spikes and are consecutive on if no spike occurs on the arc of between the first crossing of with and the first crossing of with .
Because by Lemma 10, does not contain spikes between existing copies of edges, we can find three spikes , and of on where and as well as and are consecutive on , and happens before and happens before . Let , , and be the subpaths of such that , also labeled in Figure 11.
To get rid of spike , we connect to in an alternative way. Figure 12 illustrates all possible ways , and (in the dotted area) can be connected by , and how our method will reconnect without . Formally, to decide where this reconnection takes place, we consider the components of , where is the arc of between its intersections with and . There are three components, component touching and , component touching and , and component touching entirely, and touching in two arcs. The component that contracts first is either or (since lies between the other two).
First consider the case where is contracted first, then the path starts in the dual face of the endpoint of . Note that there is a (zerolength) path between the start or endpoint of and the endpoint of because and are adjacent along . Use this zerolength path to connect to at the start or endpoint of and call the resulting tree .
We claim we obtain an optimal monotone isotopy from by replacing the spiked path by the spiked tree , and removing the unspike move of following the contraction of . Up until the creation of , the move sequence is the same as in . Since contains a subset (all spikes except ) of the spikes of , the spiked tree can be created without surpassing the height of . After the creation of in and in , locally, the level curves of and differ only in a small neighborhood of , so that all moves of except those crossing can still be performed in . Because is the only spike along that lies between and , the next move that crosses is the unspike move, call it , following the contraction of . The level curve of just before is identical to the level curve of just after , so it is safe to omit move in . All subsequent level curves of and are identical, so we conclude that is an optimal monotone isotopy (with fewer moves). Therefore, the reduced monotone isotopy of has fewer moves, contradicting that was good.
The proof for the case where contracts first, is symmetrical, except that the spiked tree is created differently. In this case, we define to be , whose endpoint is connected to at the start or endpoint of . When spiking this tree, the direction of the spikes on (and sometimes ) is reversed, but this does not affect the proof.
Hence, in a good homotopy, no spiked path spikes the same edge times.
∎
Theorem 12.
For and bounding an annulus with faces and edges, there is a homotopy of minimum height that has at most moves. Therefore, deciding whether their Homotopy Height is at most is in NP.
Proof.
Let be the number of faces, and the number of edges in . As a direct consequence of Lemmas 8 and 11, there is a good homotopy that spikes each edge at most times and unspikes each edge at most times. So there is a homotopy of minimum height that has at most moves. Testing whether this homotopy indeed has height at most can be done by computing the maximum length over its (polynomially many) level curves, each containing a polynomial number of edges, and comparing this maximum with . Given a good homotopy, all of this can be done in polynomial time assuming addition and comparisons of numbers takes polynomial time. ∎
We note that the Homotopy Height problem can also be defined in slightly different settings, for example

and are two paths with common endpoints and , such that is the boundary of a combinatorial disk. Then is homotopic to with fixed endpoints, and we are interested in computing the optimal height of this homotopy. This is the Homotopy Height problem considered by E. Chambers and Letscher [homotopyheight].

There is a single curve forming the boundary of a combinatorial disk. This curve is contractible, and we are interested in computing the optimal height of such a contraction. This is one of the settings considered in [ccmormcbd17].
In both these cases, the Theorems 2 and 4 have analogues establishing that some optimal homotopy is an isotopy and is monotone. The rest of our proof techniques then readily apply, and prove that the Homotopy Height problem in these cases is also in NP. The next section investigates more distant variants.
6 Variants and approximation algorithms
6.1 Homotopic Fréchet distance
There is a strong connection between the problem of Homotopy Height and the problem of Homotopic Fréchet distance, which we now recall. As in [hnsshwdmml16], our setting is the one of a disk with four points , , and on the boundary, connected by four disjoint boundary arcs , , and , with from to ; from to ; from to ; and from to , see Figure 13, left. A homotopy between and is a series of elementary moves connecting curves of with one endpoint on and the other on , where the collection of curves starts at and ends at . The Homotopic Fréchet distance between and is the height of a homotopy between and of minimal height. The common intuition for this distance is that it is the minimal length of a leash needed for a man on to walk his dog along , where the leash may stretch but cannot be lifted out of the underlying space.
We note that this is slightly different than the original setting for homotopic Fréchet distance in the original work [CVE08], where an exact algorithm is presented for the plane minus a set of polygonal obstacles. In the original work, the start and end leashes are not fixed, and in fact the bulk of the work is in determining an optimal relative homotopy class in order to find the best homotopy.
Proposition 13.
The Homotopic Fréchet distance problem is in NP.
Proof.
We reduce Homotopic Fréchet Distance to Homotopy Height using the following construction. We add a vertex and edges of weight between this vertex and all the vertices of the paths and , where is a constant greater than the sum of the weights of the edges of the disk, as well as all the intermediate triangles, see Figure 13, right. This results in a pinched annulus , with two boundaries and obtained from the paths and , both completed into closed curves using the additional vertex . We claim that an optimal homotopy between and translates into an optimal homotopy in between and , and viceversa. Indeed, by Lemma 7, there exists an optimal homotopy in such that any intermediate curve crosses the shortest path between and exactly once, and in our case the shortest path is the zero length path starting and ending at the vertex . Furthermore, if the weight is big enough, the level curves of an optimal homotopy between and will always use exactly two of the edges of weight , since two are needed but any more would be too expensive. Thus, an optimal homotopy between and translates directly into an optimal homotopy between and after cutting on and removing the edges linked to and viceversa. The homotopy height is increased by exactly in this translation. ∎
HarPeled, Nayyeri, Salvatipour and Sidiropoulos [hnsshwdmml16] provide an algorithm to compute in time a homotopy of height , where is a lower bound on the height of an optimal homotopy, and is the complexity of . In particular, one can set to be the maximum of , , the diameter of , and half of the total weight of the boundary of any face. This yields an approximation for Homotopic Fréchet distance^{3}^{3}3This algorithm assumes triangular faces, but using our definition of , one can extend the algorithm of [hnsshwdmml16] to also work with polygonal faces.. We show here that their algorithm can be adapted to yield an approximation for Homotopy Height.
Proposition 14.
One can compute in time an approximation of Homotopy Height.
Proof.
Starting with an annulus and two boundary curves and , we first compute a shortest path between the boundary curves and and cut along to obtain a disk . This brings us to the setting of Homotopic Fréchet Distance, and we can apply the aforementioned algorithm and obtain a homotopy . In order to recover a homotopy between and , we glue back the disk along into an annulus, and the level curves of are completed into closed curves by using subpaths of , this gives us a homotopy . It remains to show that this is an approximation of the optimal homotopy. By Lemma 7, some optimal homotopy between and has level curves cutting exactly once. Thus, the height of an optimal homotopy in the disk is a lower bound for the height of an optimal homotopy in the annulus . Furthermore, each level curve of consist of two subpaths, one being a level curve of and the other being a subpath of . Since is a shortest path, is also a shortest path between its endpoints, so it is shorter than since they have the same endpoints. By construction, the length of is , and thus the length of is . This concludes the proof. ∎
6.2 Minimum height linear layouts
We also show that a seemingly unrelated graph drawing problem is directly equivalent to the Homotopy Height problem. A linear layout is an embedding of a planar graph where the edges have isolated tangencies with the vertical line, and all the vertices have distinct coordinates. The Minimum Height Linear Layout problem is the following one: Given a planar embedding of an edgeweighted graph , find a homeomorphic linear layout of in such that the maximal weight of the vertical lines is minimized. Here, the weight of a vertical line is the sum of the weights of the edges that it crosses, and (similarly to the crossmetric setting), vertical lines crossing tangent to the edges or crossing vertices are not counted.
Theorem 15.
The Minimum Height Linear Layout problem is equivalent to the Homotopy Height problem.
Proof.
Indeed, a linear layout of a planar graph naturally induces a discrete homotopy sweeping its dual graph . More formally, we drill a small hole around the vertex dual to the outer face of , and we view its complement as a disk which is a crossmetric surface for the graph . Since the hole was drilled in the middle of the face of , its boundary has zero length. We pick two arbitrary vertices and on it, which cuts the boundary into two paths and . Then we claim that a minimum height linear layout of is equivalent to a homotopy of minimum height between and (where the endpoints are fixed)^{4}^{4}4The point of the somewhat artificial construction with and is to force the homotopy to go through the outer face of at all times.. Indeed, whenever the sweep of induced by the vertical lines crosses an edge or passes a vertex, by the dual interpretation of homotopies with crossmetric surfaces outlined in the preliminaries, it amounts to doing a face or an edge move, and thus the whole vertical sweep defines a homotopy between the two paths and . Furthermore, this homotopy is an isotopy, since the vertical lines are simple, and a monotone one since they only go in a single direction. Conversely, a discrete homotopy of optimal height between and can be “straightened” into a linear layout: by Theorem 4, one can assume such a homotopy to be an isotopy and to be monotone, and therefore the succession of dual moves of with respect to are homeomorphic to a sweep of by vertical lines, as pictured in Figure 14. An optimal homotopy amounts, via this homeomorphism, to finding a linear layout of minimal weight. ∎
In particular, the Minimum Height Linear Layout problem is in NP and admits an approximation algorithm.
Acknowledgements.
We are grateful to Tasos Sidiropoulos for his involvement in the early stages of this research, and to Gregory Chambers and Regina Rotman for helpful discussions. This research began while partially supported through the program “Simons Visiting Professorship” by the Mathematisches Forschungsinstitut Oberwolfach in 2015. Erin Chambers is supported in part by NSF grants IIS1319944, CCF1054779, and CCF1614562. Arnaud de Mesmay is partially supported by the ANR project ANR16CE40000901 (GATO). Tim Ophelders is supported by the Netherlands Organisation for Scientific Research (NWO) under project no. 639.023.208.
Comments
There are no comments yet.