Euclidean TSP in Narrow Strips

We investigate how the complexity of Euclidean TSP for point sets P inside the strip ( −∞ , + ∞ ) × [0 , δ ] depends on the strip width δ . We obtain two main results. For the case where the points have distinct integer x -coordinates, we prove that a shortest bitonic tour (which can be computed in O ( n log 2 n ) time using an existing algorithm) is guaranteed to be a shortest tour overall when δ (cid:54) 2 √ 2, a bound which is best possible. We present an algorithm that is ﬁxed-parameter tractable with respect to δ . More precisely, our algorithm has running time 2 O ( √ δ ) n 2 for sparse point sets, where each 1 × δ rectangle inside the strip contains O (1) points. For random point sets, where the points are chosen uniformly at random from the rectangle [0 , n ] × [0 , δ ], it has an expected running time of 2 O ( √ δ ) n 2 + O ( n 3 ).


Introduction
In the Traveling Salesman Problem one is given an edge-weighted complete graph and the goal is to compute a tour-a simple cycle visiting all nodes-of minimum total weight.Due to its practical as well as theoretical importance, the Traveling Salesman Problem and its many variants are among the most famous problems in computer science and combinatorial optimization.In this paper we study the Euclidean version of the problem.
In Euclidean TSP the input is a set P of n points in R d , and the goal is to compute a minimum-length tour visiting each point.Euclidean TSP in the plane was proven to be np-hard in the 1970s [18,23].Around the same time, Christofides [4] gave an elegant (3/2)-approximation algorithm, which works in any metric space.For a long time it was unknown if Euclidean TSP is APX-hard, until Arora [2], and independently Mitchell [22], presented a PTAS.Mitchell's algorithm works for the planar case, while Arora's algorithm also works in higher dimensions.Rao and Smith [24] later improved the running time of Arora's PTAS, obtaining a running time of 2 We are interested in exact algorithms for Euclidean TSP.As mentioned, the problem is already np-hard in the plane.Unlike the general (metric) version, however, it can be solved in subexponential time, that is, in time 2 o (n) .In particular, Kann [21] and Hwang et al. [19] presented algorithms with n O( √ n) running time.Smith and Wormald [29] gave a subexponential algorithm that works in any (fixed) dimension; its running time in R d is n O(n 1−1/d ) .Very recently De Berg et al. [9] improved this to 2 O(n 1−1/d ) , which is tight up to constant factors in the exponent, under the Exponential-Time Hypothesis (ETH) [20].
There has also been considerable research on special cases of Euclidean TSP that are polynomial-time solvable.One example is Bitonic TSP, where the goal is to find a shortest bitonic tour.(A tour is bitonic if any vertical line crosses it at most twice; here the points from the input set P are assumed to have distinct x-coordinates.)It is a classic exercise [5] to prove that Bitonic TSP can be solved in O(n 2 ) time by dynamic programming.De Berg et al. [10] showed how to speed this algorithm up to O(n log 2 n).When P is in convex position, then the convex hull of P is a shortest tour and so one can solve Euclidean TSP in O(n log n) time [11].Deineko et al. [14] studied the case where the points need not all be on the convex hull; the points inside the convex hull, however, are required to be collinear.Their algorithm runs in O(n 2 ) time.Deineko and Woeginger [15] extended this to the case where the points in the interior of the convex hull lie on k parallel lines, obtaining an O(n k+2 ) algorithm.These results generalize earlier work by Cutler [6] and Rote [27] who consider point sets lying on three, respectively k, parallel lines.Deineko et al. [13] gave a fixed-parameter tractable algorithm for Euclidean TSP where the parameter k is the number of points inside the convex hull, with running time O(2 k k 2 n).Finally, Reinhold [25] and Sanders [28] proved that when there exists a collection of disks centered at the points in P whose intersection graph is a single cycle-this is called the necklace condition-then the tour following the cycle is optimal.Edelsbrunner et al. [16] gave an O(n 2 log n) algorithm to verify whether such a collection of disks exists (and, if so, find one).
Our contribution.The computational complexity of Euclidean TSP in R d is 2 Θ(n 1−1/d ) (for d ⩾ 2), assuming ETH.Thus the complexity depends heavily on the dimension d.This is most pronounced when we compare the complexity for d = 2 with the trivial case d = 1: in the plane Euclidean TSP takes 2 Θ( √ n) time in the worst case, while the 1-dimensional case is trivially solved in O(n log n) time by sorting the points.We study the complexity of Euclidean TSP for planar point sets that are "almost 1-dimensional".In particular, we assume that the point set P is contained in the hypercylinder R × Ball d−1 (δ/2), where Ball d−1 (δ/2) denotes the closed (d − 1)-dimensional ball with radius δ/2, for some relatively small δ and some arbitrary but fixed d ⩾ 2. We investigate how the complexity of Euclidean TSP depends on the parameter δ.As any instance of Euclidean TSP can be scaled to fit inside a hypercylinder, we need to make some additional restriction on the input.We consider three scenarios.
Integer x-coordinates, with d = 2. Bitonic TSP can be solved in O(n log 2 n) time [10].
It is natural to conjecture that for points with distinct integer x-coordinates inside a sufficiently narrow strip, an optimal bitonic tour is a shortest tour overall.We give a (partially computer-assisted) proof that this is indeed the case: we prove that when δ ⩽ 2 √ 2 an optimal bitonic tour is optimal overall, and we show that the bound 2 √ 2 is best possible.Sparse point sets.We generalize the case of integer x-coordinates to the case where the drum [x, x + 1] × Ball d−1 (δ/2) contains O (1) points for all x ∈ R. Furthermore, we investigate how the complexity of Euclidean TSP grows with δ.We show that for sparse point sets in R 2 an optimal tour must be k-tonic-a tour is k-tonic if it intersects any vertical line at most k-times-for k = O( √ δ).This suggests that one might be able to use a dynamic-programming algorithm similar to the ones for points on k parallel lines [15,27].The latter algorithms run in O(n k ) time, suggesting that a running time of n O( √ δ) is achievable for d = 2 in our case.We give a much more efficient algorithm, which is fixed-parameter tractable (and subexponential) with respect to the parameter δ, and which generalizes to d > 2. Its running time for sparse point sets in R d is 2 O(δ 1−1/d ) n + O(δ 2 n 2 ).Random point sets.In the third scenario the points in P are drawn independently and uniformly at random from the hypercylinder [0, n] × Ball d−1 (δ/2).For this case we prove that a very similar algorithm to the algorithm for sparse point sets has an expected running time of 2 O(δ 1−1/d ) n, which is linear if δ = O (1).

Notation and terminology.
Let P := {p 1 , . . ., p n } be a set of points in a d-dimensional hypercylinder with radius δ/2 -we call such a hypercylinder a δ-cylinder-which we assume without loss of generality to be R × Ball d−1 (δ/2).We denote the x-coordinate of a point p ∈ R d by x(p), and its other coordinates by y 1 (p), ..., y d−1 (p).To simplify the notation, we also write x i for x(p i ).We sort the points in P such that x i ⩽ x i+1 for all 1 ⩽ i < n.We define the spacing ∆ i := x i+1 − x i .
For two points p, q ∈ R d , we write pq to denote the directed edge from p to q. Paths are written as lists of points, so (q 1 , q 2 , . . ., q m ) denotes the path consisting of the edges q 1 q 2 , . . ., q m−1 q m .All points in a path must be distinct, except possibly q 1 = q m in which case the path is a tour.The length of an edge pq is denoted by |pq|, and the total length of a set E of edges is denoted by ∥E∥.Finally, a separator is a hyperplane orthogonal to the x-axis, not containing any of the points in P .

Bitonicity for points with integer x-coordinates
In this section we consider the case where d = 2 and the points in P have distinct integer x-coordinates, which implies that ∆ i ∈ N + for all i.Note that separators in R 2 are vertical lines.For simplicity, we will write y(p) := y 1 (p), and y i := y(p i ).We will also assume the points are in the δ-strip R × [0, δ].
For our purposes, two separators s, s ′ that induce the same partitioning of P are equivalent.Therefore, we can define S := {s 1 , . . ., s n−1 } as the set of all combinatorially distinct separators, obtained by taking one separator s i between any two points p i , p i+1 .Let E be a set of edges with endpoints in P .The tonicity of E at a separator s, written as ton(E, s), is the number of edges in E crossing s.We say that a set E has lower tonicity than a set F of edges, denoted by E ≼ F , if ton(E, s i ) ⩽ ton(F, s i ) for all s i ∈ S. The set E has strictly lower tonicity, denoted by E ≺ F , if there also exists at least one i for which ton(E, s i ) < ton(F, s i ).Finally, we call a set E of edges k-tonic if ton(E, s i ) ⩽ k for all s i ∈ S. We will use the terms monotonic and bitonic to denote 1-tonic and 2-tonic, respectively.We say E has exact tonicity k if E is k-tonic, but not (k − 1)-tonic.
The goal of this section is to prove the following theorem.
▶ Theorem 1.Let P be a set of points with distinct and integer x-coordinates in a δ-strip.When δ ⩽ 2 √ 2, a shortest bitonic tour on P is a shortest tour overall.Moreover, for any δ > 2 √ 2 there is a point set P in a δ-strip such that a shortest bitonic tour on P is not a shortest tour overall.
The construction for the case δ > 2 √ 2 is shown in Figure 1.It is easily verified that, up to symmetrical solutions, the tours T 1 and T 2 are the only candidates for the shortest tour. 2 then T1, the shortest bitonic tour (in blue), is longer than T2, the shortest non-bitonic tour (in red).
∥T 2 ∥ < ∥T 1 ∥, which proves the lower bound of Theorem 1.The remainder of the section is devoted to proving the first statement.
Let P be a point set in a δ-strip for δ = 2 √ 2, where all points in P have distinct integer x-coordinates.Among all shortest tours on P , let T opt be one that is minimal with respect to the ≼-relation; T opt exists, since the number of different tours on P is finite.We claim that T opt is bitonic, proving the upper bound of Theorem 1.
Suppose for a contradiction that T opt is not bitonic.Let s * ∈ S be the rightmost separator for which ton(T opt , s * ) > 2. Note that for any two consecutive separators s i , s i+1 , the difference in tonicity at those separators is at most 2. Hence, ton(T opt , s * ) = 4. Let F be the four edges of T opt crossing s * , and let E be the remaining set of edges of T opt .Let Q be the set of endpoints of the edges in F .We will argue that there exists a set F ′ of edges with endpoints in Q such that E ∪ F ′ is a tour and (i) ∥F ′ ∥ < ∥F ∥, or (ii) ∥F ′ ∥ = ∥F ∥ and F ′ ≺ F .We will call such an F ′ superior to F .Option (i) contradicts that T opt is a shortest tour.Since E ∪ F ′ ≺ E ∪ F if and only if F ′ ≺ F , (ii) contradicts that T opt is a shortest tour that is minimal with respect to ≼.Hence, proving that such a superior set F ′ exists finishes the proof.
The remainder of the proof proceeds in two steps.In the first step we move the points in Q, obtaining a set Q with consecutive integer coordinates and an edge set F .These will be such that if an F ′ superior to F exists, then there also exists an F ′ superior to F .In the second step we then give a computer-assisted proof that the desired set F ′ exists.
Step 1: Finding a suitable Q with consecutive x-coordinates.Let T opt , s * , E, F and Q be defined as above.We assume without loss of generality that the x-coordinate of s * is equal to x * + 1 2 , where x * is the largest integer such that the line x = x * + 1 2 intersects all four edges in F .Since the actual edges in E are not important for our arguments, we replace them by abstract "connections" specifying which pairs of endpoints of the edges in F are connected by paths of edges in E. It will be convenient to duplicate the points in Q that are shared endpoints of two edges in F , and add a connection between the two copies; see Figure 2. We denote the set of connections obtained in this way by E, and we call E the connectivity pattern of F (in E ∪ F ).
Next we show how to move the points in Q such that the modified set Q uses consecutive x-coordinates.Recall that s * : x = x * + 1 2 is a separator that intersects all edges in F .Let Q left and Q right be the subsets of points from Q lying to the left and right of s * , respectively.We will move the points in Q left such that they will get consecutive x-coordinates with the Replacing the paths connecting endpoints of edges in F by abstract connections.The copies of duplicated shared endpoints are slightly displaced in the figure to be able to distinguish them, but they are actually coinciding.
Figure 3 The process of moving the points in Q. Grey vertical lines have integer x-coordinates.(i) Moving a point in Q left so that it gets x-coordinate z. (ii) A possible configuration after Q left and Q right have been treated.largest one being equal to x * , while the points in Q right will get consecutive x-coordinates with the smallest one being x * + 1.
We move the points in Q left as follows.Let z ⩽ x * be the largest x-coordinate currently not in use by any of the points in Q left .If Q left lies completely to the right of the line ℓ(z) : x = z, then we are done: the set of x-coordinates used by points in Q left is {z+1, . . ., x * }.Otherwise, we take any point to the left of ℓ(z), and we move it along its edge e ∈ F to the point e ∩ ℓ(z); see Figure 3(i).This process is repeated until the points of Q left have consecutive x-coordinates.Note that duplicate x-coordinates caused by duplicating shared endpoints can still exist, if neither of the duplicates was moved.
After moving the points in Q left we treat Q right in a similar manner; the only difference is that now we define z > x * to be the smallest x-coordinate currently not in use by any of the points in Q right . Figure 3(ii) shows the final result for the example in part (i) of the figure.
Before we prove that this procedure preserves the desired properties, two remarks are in order about the process described above.First, in each iteration we may have different choices for the edge e crossing ℓ(z), and the final result depends on these choices.Second, when we move a point in Q to a new location, then the new x-coordinate is not used by Q but it may already be used by points in P \ Q.Neither of these facts causes any problems for the coming arguments.
Let Q be the set of points from Q after they have been moved to their new locations, and let F be the set of edges from F after the move.With a slight abuse of notation we still use E to specify the connectivity pattern on F , which is simply carried over from F .The following lemma shows that we can use F , Q and E in Step 2 of the proof.
▶ Lemma 2. Let E, F, Q, E, F , Q be defined as above.Let F ′ be any set of edges (with Proof.We define F ′ in the obvious way, by simply taking F ′ and replacing each endpoint Suppose F ′ is superior to F .We will show that F ′ is superior to F .We will do this by first proving that ∥F ∥−∥F ′ ∥ ⩾ ∥F ∥−∥F ′ ∥.Then, we prove that F ′ ≼ F .Finally, we prove that if there exists a separator s ∈ S such that ton(F ′ , s) < ton(F , s), then ton(F ′ , s * ) < ton(F, s * ).
Recall that each edge e ∈ F is obtained from the corresponding edge e ∈ F by moving one or both endpoints along the edge e itself.Also recall that we duplicated shared endpoints of edges in F , so if we move a point in Q, then we move the endpoint of a single edge in F .Hence, ∥F ∥ − ∥F ∥ = total distance over which the points in Q are moved.
Since we added a connection to E between the two copies of a shared endpoint, each point in Q is incident to exactly one connection in E and, hence, to exactly one edge in F ′ .This means that if we move a point in Q, then we move the endpoint of a single edge in F ′ , so Next, we claim that F ′ ≼ F .We will prove this by showing that F is maximal with respect to ≼.Let s be any separator.Let G be any edge set on Q such that E ∪ G forms a tour.Now, the tonicity of G at s is bounded by the minimum of the number of points of Q to the left of s and the number of points of Q to the right of s.Note that F attains this bound for every separator s.We conclude that F is maximal with respect to ≼, and therefore, F ′ ≼ F indeed holds.Finally, let s ∈ S be such that ton(F ′ , s) < ton(F , s).We will show that ton(F ′ , s * ) < ton(F, s * ).Without loss of generality, let s either be to the left of s * , or s * itself.Since ton(F ′ , s) < ton(F , s), the edge set F ′ contains an edge e fully to the left of s: otherwise, the tonicity of F ′ at s would be equal to the number of points to the left of s, which is equal to the tonicity of F at s. Furthermore, since we conclude that ton(F ′ , s * ) < ton(F, s * ).
Recall that by the definition of superior, and (iii) if ton(F ′ , s) < ton(F , s) for some separator s ∈ S, then ton(F ′ , s * ) < ton(F, s * ).
Suppose that F ′ is superior to F .If ∥F ′ ∥ < ∥F ∥, then by (i), we get that (a) holds.
Else, ∥F ′ ∥ = ∥F ∥, so by (i), we get that either (a) holds, or ∥F ′ ∥ = ∥F ∥, satisfying the first requirement of (b).Furthermore, since in this case F ′ ≺ F , there exists a separator s satisfying ton(F ′ , s) < ton(F , s).By (iii), we have ton(F ′ , s * ) < ton(F, s * ).Combining this with (ii) gives us that F ′ ≺ F , which is the second requirement of (b).We conclude that if F ′ is superior to F , then F ′ is superior to F .◀ Step 2: Finding the set F ′ .The goal of Step 2 of the proof is the following: given the tour show that there exists a set F ′ of edges such that E ∪ F ′ is a tour and F ′ is superior to F .Lemma 2 implies that we may work with E and F instead of E and F (and then find F ′ instead of F ′ ).
In Step 1 we duplicated shared endpoints of edges in E. We now merge these two copies again if they are still at the same location.This will always be the case for the shared endpoint immediately to the right of the separator s * : we picked s * : x = x * + 1 2 such that there is a shared endpoint at x = x * + 1 (since s * is the rightmost separator with ton(T opt , s * ) = 4), and the copies of this endpoint will not be moved.So if n left and n right denote the number of distinct endpoints to the right and left of s * , respectively, then n right ∈ {2, 3} and n left ∈ {2, 3, 4}.We thus have six cases in total for the pair (n left , n right ), as depicted in Figure 4.Each of the six cases has several subcases, depending on the left-toright order of the vertices inside the gray rectangles in the figure .For any fixed ordering we can still vary the y-coordinates in the range [0, δ].This may lead to scenarios where different sets F ′ are required.We handle this potentially huge amount of cases in a computer-assisted manner, using an automated prover FindShorterTour(n left , n right , F , E, X, δ, ε).The input parameter X is an array where X[i] specifies the set from which the x-coordinate of the i-th point in the given scenario may be chosen.Here, we assume w.l.o.g. that x(s * ) = −1/2; see Figure 4.The smaller the precision parameter ε is, the more precise the output will be.Its precise role will be explained below.
The output of FindShorterTour is a list of scenarios and an outcome for each scenario.A scenario contains for each point q an x-coordinate x(q) from the set of allowed x-coordinates for q, and a range y-range(q) ⊆ [0, 2 √ 2] for its y-coordinate.This y-range is an interval of length at least ε/2.The outcome of a scenario is either Success or Fail.An outcome Success means that a set F ′ has been found with the desired properties: E ∪ F ′ is a tour, and for all possible instantiations of the scenario-that is, all choices of y-coordinates from the y-ranges in the scenario-we have ∥F ′ ∥ < ∥F ∥.An outcome Fail means that such an F ′ has not been found.It does not guarantee that such an F ′ does not exist for this scenario.
The list of scenarios is complete in the sense that for any instantiation of the input case there is a scenario that covers it.
FindShorterTour works brute-force.It checks all possible combinations of x-coordinates and subdivides the y-coordinate ranges, until a suitable F ′ can be found or until the y-ranges have length smaller than the precision parameter ε.The implementation details of the procedure are in Appendix A.
Note that case (n left , n right ) = (2, 3) in Figure 4 is a subcase of case (n left , n right ) = (3, 2), if we exchange the roles of the points lying to the left and to the right of s * , swap the labels of points 5 and 1, and swap the labels of points 2 and 4. Hence, we ignore this subcase and run our automated prover on the remaining five cases, where we set ε := 0.001.It successfully proves the existence of a suitable set F ′ in four cases; the case where the prover fails is the case (n left , n right ) = (3, 2).For this case, it fails for the two scenarios depicted in Figure 5.
All other scenarios for these cases are handled successfully (up to symmetries).For both scenarios in Figure 5 we consider two alternatives for the set F ′ : the set F ′ 1 shown in red in Figure 5, and the set F ′ 2 shown in blue.We will show that in any instantiation of both scenarios, either F ′ 1 or F ′ 2 is at least as short as F .Since both alternatives are bitonic, this finishes the proof.
For 1 ⩽ i ⩽ 5, let q i be the point labeled i in the left scenario in Figure 5.We first argue that we can assume without loss of generality that y(q 2 ) = y(q 4 ) = 2 √ 2 and y(q 1 ) = y(q 5 ) = 0. To this end, consider an arbitrary instantiation of this scenario, and imagine moving q 2 and  (1,4), (2,3), (2,4)} (1,5), (2,4), (3,5)} (n left , n right ) = (2, 3) (1,5), (2,4), (3,6)} The six different cases that result after applying Step 1 of the proof.Points indicated by filled disks have a fixed x-coordinate.The left-to-right order of points drawn inside a grey rectangle, on the other hand, is not known yet.The vertical order of the edges is also not fixed, as the points can have any y-coordinate in the range [0, 2 Two scenarios covering all subscenarios where the automated prover fails, up to symmetries.Each point has a fixed x-coordinate and a y-range specified by the array Y ; the resulting possible locations are shown as small grey rectangles (drawn larger than they actually are for visibility).For all subscenarios, at least one of F ′ 1 (in red) and F ′ 2 (in blue) is at most as long as F (in black).q 4 up to the line y = 2 √ 2, and moving q 1 and q 5 down to the line y = 0.It suffices to show, for i ∈ {1, 2}, that if we have ∥F ′ i ∥ ⩽ ∥F ∥ after the move, then we also have ∥F i ∥ ⩽ ∥F ∥ before the move.To see why this indeed holds, we will need the following observation.
▶ Observation 3. Let p be a point in R 2 .Suppose we move p in direction ⃗ v at unit speed.Let p(t) denote the position of point p at time t.Let ⃗ p(t) be the corresponding vector.Then , where ' •' denotes the inner product.This also equals the cosine of the angle between ⃗ p(t) and ⃗ v.
Proof.Assume without loss of generality that ⃗ v = (1, 0).Then Finally, for any vector Proof.From Observation 3 we can directly conclude that at any time during the move, the derivative of |ac| is strictly larger than the derivative of |bc|.◀ We can now repeatedly apply Corollary 4 to our current scenario, the left scenario in Figure 5.
Let us first compare ∥F ′ 1 ∥ to ∥F ∥.Moving q 1 downwards to y = 0 changes both by the same Illustration of Observation 5. T is the solid line, T ′ is the dashed line.Between x(r1) and x(q2), the tonicity of T ′ is 2 lower than the tonicity of T .
So now assume y(q 2 ) = y(q 4 ) = 2 √ 2 and y(q 1 ) = y(q 5 ) = 0. Let y := y(q 3 ).If y ⩾ (8 √ 2)/7 then 2)/7 then is at least as short as F , finishing the proof for the left scenario in Figure 5.The proof for the right scenario in Figure 5 is analogous, with cases y ⩾ √ 2 and y ⩽ √ 2. This finishes the proof for the right scenario and, hence, for Theorem 1.

The tonicity of TSP tours of sparse point sets
In this section we investigate the tonicity of optimal TSP tours for planar sets P that are sparse.Recall that P is sparse if for any 1) points.We start with an easy observation that holds for point sets in an arbitrary number of dimensions, illustrated in Fig. 6.
▶ Observation 5. Let T be a tour containing the (directed) edges q 1 q 2 and r 1 r 2 .Let Then if we swap the edges q 1 q 2 and r 1 r 2 for the edges q 1 r 1 and q 2 r 2 we obtain a tour Furthermore, if q 1 and r 1 are to the left of q 2 and r 2 , then T ′ ≺ T .
Proof.The fact that ∥T ′ ∥ ⩽ ∥T ∥ (or ∥T ′ ∥ < ∥T ∥) is trivial.Furthermore, if q 1 and r 1 are to the left of q 2 and r 2 , then T ′ ≺ T holds: between max(x(q 1 ), x(r 1 )) and min(x(q 2 ), x(r 2 )) the tonicity has been lowered by 2. Everywhere else the tonicity remains unchanged, so T ′ ≺ T .◀ We will need the following observation, illustrated in Fig. 7.
r 1 , r 2 be any four points of P with max(x(q 1 ), x(r 1 )) ⩽ a < b ⩽ min(x(q 2 ), x(r 2 )) and 2 be the points on q 1 q 2 with x-coordinates a, b respectively.Let r ′ 1 , r ′ 2 be the points on r 1 r 2 with x-coordinates a, b respectively.Then Proof.When we move q 1 straight towards q 2 until it reaches q ′ 1 , then Combining this with our assumption that |q . Note how we have essentially swapped q 1 for q ′ 1 .We can repeat this process three more times.First we swap q 2 for q ′ 2 , then we swap r 1 for r ′ 1 , and finally we swap r 2 for r ′ 2 .We thus obtain that |q ′ We complete our proof by noting that since From now on, we will once more assume that d = 2, and that the point set P lies in the Recall that s i denotes the separator between points p i , p i+1 , and recall the definition ∆ i := x i+1 − x i .A direct consequence of Observation 6 is the following.
Let T opt be a shortest tour on P .Then there exists a shortest tour Proof.Let T opt be a shortest tour.If ton(T opt , s i ) > 2k, then T opt has at least k + 1 edges crossing s i from left to right.We claim that at least one pair of edges (q 1 q 2 , r 1 r 2 ) has the property that To see this, suppose such a pair does not exist.
If we order the edges crossing s i on where they cross s i , and then apply Observation 6 to each consecutive pair, we get that 2δ > 2k∆ i .Specifically, let e 1 , ..., e k+1 be such a set of k + 1 edges crossing s i .Let e j = (e j1 , e j2 ) for all j, and let e ′ j1 and e ′ j2 be the points on e j with x-coordinates x i and x i+1 , respectively.Note that since e j crosses s i and is defined by two points of P , e ′ j1 and e ′ j2 are indeed well-defined.Now, from Observation 6, we get for See Figure 8 for an example.Therefore, This, however, directly contradicts our assumption that δ ⩽ k∆ i .Therefore, such a pair of edges must exist.Using this pair, we can find a tour T * opt ≺ T opt with ∥T * opt ∥ ⩽ ∥T opt ∥ (and therefore a shortest tour), by Observation 5. We apply this repeatedly until we have obtained a shortest tour A more general version is the following: T opt be a shortest tour.Then there exists a shortest tour Proof.Let T opt be a shortest tour.If ton(T opt , s i ) > 2k, then T opt has at least k + 1 edges crossing s i from left to right.We claim that at least one pair (q 1 q 2 , r 1 r 2 ) of crossing edges has the property that To see this, suppose such a pair does not exist.Since at most j − i − 1 of these k + 1 edges have an endpoint in {p i+1 , ..., p j−1 }, at least k + 1 − (j − i − 1) of these have length at least x j − x i .Analogously to the previous lemma, we order these edges depending on where they cross s i , and then apply Observation 6 to each consecutive pair.This gives us that 2δ > 2(k − (j − i − 1))(x j − x i ).This, however, directly contradicts our assumption.Therefore, such a pair of edges must exist.
Analogously to the previous lemma, we can use this to find a tour T opt1 ≺ T opt with ∥T opt1 ∥ ⩽ ∥T opt ∥ (and therefore a shortest tour), by Observation 5. We apply this repeatedly until we obtain a shortest tour T * opt ≼ T opt with ton(T * opt , s i ) ⩽ 2k.By symmetry, we can then find a shortest tour T ′ opt ≼ T * opt with ton(T ′ opt , s j−1 ) ⩽ 2k.Since T ′ opt ≼ T * opt , we also have ton(T ′ opt , s i ) ⩽ 2k.Therefore, T ′ opt ≼ T opt is indeed a shortest tour with ton(T ′ opt , s i ) ⩽ 2k and ton(T ′ opt , s j−1 ) ⩽ 2k.◀ We can now bound the tonicity of an optimal TSP tour for P .
▶ Theorem 9. Let P be a set of points inside a δ-strip such that for any x ∈ R there are at most c points with x-coordinates in the interval [x, x + 1].Then there exists an optimal TSP tour on P that is 2k-tonic for k := ⌊2 √ cδ + 2c⌋.
Proof.Let T opt be a shortest tour.We define m := ⌊ δ/c + 2⌋.We split the proof into two cases.
Case I: n < 2cm.Trivially, T opt is n-tonic.We have Case II: n ⩾ 2cm.For any i, j such that 1 ⩽ i and j = i + cm ⩽ n, we would like to apply Lemma 8. To do so, we first argue that δ ⩽ (x j − x i )(k − j + i + 1).Note that since for any x ∈ R there are at most c points with x-coordinates in the range [x, x + 1], we have This is true independent of our choice of i.Therefore, we can first apply Lemma 8 with i = 1, giving us an optimal tour T opt1 ≼ T opt that is 2k-tonic at s 1 and at s cm .When we apply this lemma again on T opt1 with i = 2, we get a shortest tour T opt2 ≼ T opt1 that is 2k-tonic at s 1 , s 2 , s cm and s cm+1 .After doing this for all i such that i + cm ⩽ n, we have a shortest tour T ′ opt ≼ T opt that is 2k-tonic at all s i for 1 ⩽ i ⩽ n − cm and for cm ⩽ i ⩽ n.Since n ⩾ 2cm, this implies that the tour T ′ opt is 2k-tonic at all s i .◀ If the points of point set P have distinct integer x-coordinates (note that we therefore have a sparse point set with c = 2), then we can get a slightly better bound in a similar way.▶ Theorem 10.Let P be a set of points with distinct integer x-coordinates inside a δ-strip.Then there exists an optimal TSP tour on P that is 2k-tonic for k : Proof.The proof is analogous to that of Theorem 9, substituting ⌊k/2⌋ for cm.The only significant difference is the proof that ( This time, we have We finish the proof using that k ∈ N and k ⩾ 2 Proof.Let δ k := 2k 2 .First, we will give a set Q k of points with distinct integer x-coordinates of which the shortest path is unique and consists of the shortest |Q k | − 1 edges.Then, we will add a point t, and argue that the (unique) shortest tour on P k = Q k ∪ {t} is the aforementioned path with both endpoints connected to t.
Let k ⩾ 2 be any fixed integer.Let p := (2k + 1, 0), let q i := (k + i, 2ki) and let See Figure 9 for an example with k = 2.We claim that π := (p, q 0 , r 0 , q 1 , ..., r k−1 , q k ) is the unique shortest path on Q k .To see this, first observe that the edge pq 0 and all k edges of the form q i r i are the shortest possible edges, with lengths k + 1 and length √ 2k, respectively.The next shortest are the k edges of the form r i q i+1 , with length √ 2k 2 + 2k + 1.Note that these 2k + 1 edges together form the path π.Therefore, if all other possible edges are indeed longer, then π is indeed the shortest path through all points of Q k , as claimed.The only other serious candidates are of the form r i r i+1 or q i q i+1 , all of which have length √ 4k 2 + 1.Since k ⩾ 2, these are indeed longer than the edges in π.
Finally, let t be any point in the δ-strip with a sufficiently large x-coordinate.Then, the two points closest to t are those two that have the highest x-coordinates: p and q k .Specifically, t := (3k 4 , 2k 2 ) suffices.Since π is a shortest path on Q k , and starts in p and ends in q k , we can combine it with the edges q k t and tp to obtain the shortest tour T through all points of In conclusion, for any k ⩾ 2, we can find a point set P k , consisting of 3k 4 + 1 points with distinct x-coordinates, and a δ k of 2k 2 , of which the shortest tour is unique and has exact tonicity 2k.◀

An algorithm for narrow cylinders
In this section we investigate how the complexity of Euclidean TSP depends on the width δ of the strip (or cylinder) containing the point set P .Recall that a point set P inside a δ-cylinder is sparse if for every ▶ Theorem 12. Let P be a set of n points in a δ-cylinder.
Part (ii) of the theorem is a trivial consequence of part (i), so the rest of the section focuses on proving part (i).Our proof uses and modifies some techniques of [9].For i ∈ Z, let σ i be the drum [iδ, (i + 1)δ] × Ball d−1 (δ/2).Define n i := |σ i ∩ P |-we assume without loss of generality that all points from P lie in the interior of a drum σ i -and let k := max i n i .We say that a drum σ i is empty if n i = 0.
We will regularly use that any subset E of edges from an optimal tour of a point set P has the Packing Property [9]: for any λ > 0 and any cube σ of side length λ, the number of edges from E of length at least λ/4 that intersect σ is O(1).The Packing Property is at the heart of several subexponential algorithms [21,29].We need a recent separator theorem [9, Theorem 5], as explained next.
For a cube σ of side length λ and a number c > 0, let cσ denote the cube of side length cλ and with the same center as σ.We say that an edge e enters a cube σ if one endpoint of e is inside σ and the other endpoint is outside σ.The following lemma formalizes the core of the proof of Theorem 5 (and Corollary 3) in [9].Theorem 5 from that paper is stronger than the lemma below, as it also involves balancing the number of points inside and outside the separator.To guarantee a good balance, a special cube σ is used in the lemma below, but for us that is not relevant.
▶ Lemma 13 (De Berg et al. [9]).Let P be a unknown set of points in R d .Let Q be a (known) subset of P of m points.Let T be an unknown shortest tour on P , and let E be the (unknown) set of edges of T of which both endpoints are in Q.Then for any cube σ we can in O(m d+1 ) time compute a scale factor c ∈ [1,3] such that the following holds for the cube cσ (which is the cube σ scaled by a factor c with respect to its center).
, where E cσ ⊆ E denotes the set of edges entering cσ.
There is a family ) candidate sets such that E cσ ∈ C, and this family can be computed in 2 O(m 1−1/d ) time.
Recall that a separator for a set P of points inside a δ-cylinder is a hyperplane orthogonal to the x-axis which does not contain a point from P and which partitions P into two non-empty subsets.Let T opt be an optimal TSP tour on P .For a separator t, let T (t, σ i ) denote the set of edges from T opt with both endpoints in σ i−1 ∪ σ i ∪ σ i+1 and crossing t. ▶ Lemma 14.Let σ i be a drum as defined above.Then we can compute a separator t ) sets, which we call candidate sets, such that T (t, σ i ) ∈ C, and this family can be computed in 2 O(k 1−1/d ) time.
Proof.We apply Lemma 13 to the point set Q := P ∩ (σ i−1 ∪ σ i ∪ σ i+1 ) and the cube σ of side length δ whose left facet contains the right facet of σ i .The boundary ∂ (cσ) of the cube cσ given by the lemma intersects σ i (potentially on its boundary), and it is disjoint Figure 10 The separators t0, . . ., t |T |+1 and the blocks they define.
from the interiors of σ i−1 and σ i+1 .Let t be the separator containing σ i ∩ ∂ (cσ).The number of points in the three drums is at most 3k.The number of edges from For an edge set E and a separator t, let E(t) ⊆ E denote the subset of edges intersecting t.Define P right (E, t) to be the set of endpoints of the edges in E(t) that lie to the right 1 of t.We call P right (E, t) the endpoint configuration of E at t.The next two lemmas rule out endpoint configurations with two "distant" points from the separator.▶ Lemma 15.Let s left : x = x left and s right : x = x right be two separators such that x right − x left > 3δ, and suppose there is a point z ∈ P with x left + 3δ/2 < x(z) < x right − 3δ/2.Then an optimal tour on P cannot have two edges that both cross s left and s right .
Proof.Suppose for a contradiction that an optimal tour T has two (directed) edges, q 1 q 2 and r 1 r 2 , that both cross s left and s right .(The direction of q 1 q 2 and r 1 r 2 is according to a fixed traversal of the tour.)If both edges cross s left and s right from left to right (or both cross from right to left) then replacing q 1 q 2 and r 1 r 2 by q 1 r 1 and r 2 q 2 gives a shorter tour (see Observation 5), leading to the desired contradiction.Now suppose that q 1 q 2 and r 1 r 2 cross s left and s right in opposite directions.Assume w.l.o.g. that x(q 1 ) < x left and x(r 2 ) < x left , and that z lies on the path from r 2 to q 1 .Let u 1 , . . ., u k , v 1 , . . ., v l , w 1 , . . ., w m and z 2 be such that We claim that the tour T ′ defined as is a strictly shorter tour.To show this, we will first change our point set P into a point set P ′ such that if ∥T ′ ∥ < ∥T ∥ on P ′ , then ∥T ′ ∥ < ∥T ∥ also on P .To this end we replace q 1 by q ′ 1 := q 1 q 2 ∩ s left and q 2 by q ′ 2 := q 1 q 2 ∩ s right , and we replace r 1 by r ′ 1 := r 1 r 2 ∩ s left and r 2 by r ′ 2 := r 1 r 2 ∩ s right ; see Figure 11.
1 The separators given by Lemma 14 are not incident to any input points.
Finally, we replace z 2 by a point z ′ 2 coinciding with z (note that if z 2 = q 1 , then we can split it before moving the resulting two points, analogous to the proof of Theorem 1).Using a similar reasoning as in the proof of Lemma 2, one can argue that the point set has the required property.To get the desired contradiction it thus suffices to show that ∥T ∥ − ∥T ′ ∥ > 0 on P ′ .This is true because where the last line uses that x left + 3δ/2 < x(z).◀ ▶ Lemma 16.Let t i ∈ T be a separator, and let σ j = [jδ, (j + 1)δ] × Ball d−1 (δ/2) denote the drum in which it is placed.Let T opt be an optimal tour on P and let V := P right (T opt , t i ) be its endpoint configuration at t i .Let P ′ denote the set of input points with x-coordinates between (j + 2)δ and x(t i+3 ), and let P ′′ be the set of input points with x-coordinate larger than x(t i+3 ).Then (i) |P ′ ∩ V | ⩽ c * for some absolute constant c * , and (ii) Proof.Consider a tour edge crossing t i .Any edge crossing t i ending in P ′ must fully cross σ j+1 , see Figure 12.Therefore such edges have length at least δ.By the Packing Property, there can be at most c * = O(1) such edges.This proves (i).
To prove (ii), note that there is a non-empty drum between t i and t i+3 with distance at least 2δ from t i and t i+3 .Lemma 15 thus implies that T opt has at most one edge crossing both t i and t i+3 , proving (ii).◀ Putting Lemma 14 and Lemma 16 together, we get the following corollary.
▶ Corollary 17.Let T opt be an optimal tour, let t i ∈ T be a separator, and let V ⊂ P be the (unknown) endpoint configuration of T opt at t i .Then we can enumerate in 2 O(k 1−1/d ) n time a family B i of candidate endpoint sets such that V ∈ B i .
Proof.Let c * , P ′ and P ′′ be as defined in Lemma 16.We use the enumeration of candidate edge sets from Lemma 14, and only keep the endpoints that are to the right of t i .To each of these endpoint sets, we add at most c * endpoints from P ′ , and we add at most one endpoint from P ′′ .There are poly(k) and O(n) ways to add such endpoints, respectively.This gives a family of 2 ) n sets.By Lemma 16, the resulting family of endpoint sets contains V .◀ Illustration for the proof of Lemma 15.The point z ′ 2 coincides with z but is slightly displaced for visibility.The sum of the lengths of the edges unique to T (displayed in blue) is strictly larger than the sum of the lengths of the edges unique to T ′ (displayed in red).In addition to the sets Matchings, the rank-based approach, and representative sets.When we cut a tour using a separator, the tour falls apart into several paths.As in other TSP algorithms, we need to make sure that the paths on each side of the separator can be patched up into a Hamiltonian cycle.Following the terminology of [9], let P be our input point set, and let M be a perfect matching on a set B ⊆ P , where the points of B are called boundary points.A collection P = {π 1 , . . ., π |B|/2 } of paths realizes M on P if (i) for each edge (p, q) ∈ M there is a path π i ∈ P with p and q as endpoints, and (ii) the paths together visit each point p ∈ P exactly once.We define the total length of P as the length of the edges in its paths.In general, the type of problem that needs to be solved on one side of a separator is called Euclidean Path Cover.The input to such a problem is a point set P ⊂ R d , a set of boundary points B ⊆ P , and a perfect matching M on B. The task is to find a collection of paths of minimum total length that realizes M on P .
To get the claimed running time, we need to avoid iterating over all matchings.We can do this with the so-called rank-based approach [3,7].As our scenario is very similar to the general Euclidean TSP, we can reuse most definitions and some proof ideas from [9].
Let M(B) denote the set of all perfect matchings on B, and consider a matching M ∈ M(B).We can turn M into a weighted matching by assigning to it the minimum total length of any collection of paths realizing M .In other words, weight(M ) is the length of the solution of Euclidean Path Cover for input (P, B, M ).We use M(P, B) to denote the set of all such weighted matchings on B. Note that |M(P, We say that two matchings M, M ′ ∈ M(B) fit if their union is a Hamiltonian cycle in B. Consider a pair P, B. Let R be a set of weighted matchings on B and let M be another matching on B. We define opt(M, R) := min{weight(M ′ ) : M ′ ∈ R and M ′ fits M }, that is, opt(M, R) is the minimum total length of any collection of paths on P that together with the matching M forms a cycle.A set R ⊆ M(P, B) of weighted matchings is defined to be representative of another set R ′ ⊆ M(P, B) if for any matching M ∈ M(B) we have opt(M, R) = opt(M, R ′ ).Note that our algorithm is not able to compute a representative set of M(P, B), because it is also restricted by the Packing Property and Lemma 15, while a solution of Euclidean Path Cover for a generic P, B, M may not satisfy them.Let M * (P, B) denote the set of weighted matchings in M(P, B) that have a corresponding Euclidean Path Cover solution satisfying the Packing Property and Lemma 15.
The basis of the rank-based approach is the following result.

▶ Lemma 18. [Bodlaender et al. [3], Theorem 3.7]
There exists a set R consisting of 2 |B|−1 weighted matchings that is representative of the set M(P, B).Moreover, there is an algorithm Reduce that, given a representative set R of M(P, B), computes such a set R in Lemma 18 can also be applied in our case, where R is representative of M * (P, B), the set of weighted matchings in M(P, B) that have a corresponding Euclidean Path Cover solution satisfying the Packing Property and Lemma 15.
We say that perfect matchings M on B and M ′ on B ′ are compatible if their union on B ∪ B ′ is either a single cycle or a collection of paths.The join of these matchings, denoted by Join(M, M ′ ) is a perfect matching on the symmetric difference B△B ′ obtained by iteratively contracting edges with an incident vertex of degree 2 in the graph (B ∪ B ′ , M ∪ M ′ ) .
The algorithm.Our algorithm is a dynamic program, where we define a subproblem for each separator index i, and each set of endpoints B ∈ B i .The value of A[i, B] is defined as follows.
where M is a perfect matching on B and x is a real number equal to the minimum total length of a path cover of The length of the entire tour will be the value corresponding to the empty matching at index |T | + 1, that is, it will be the value Our dynamic-programming algorithm works on a block-by-block basis.It uses the algorithm TSP-repr by De Berg et al. [9] for Euclidean Path Cover on arbitrary ddimensional point sets to solve subproblems inside a block.In particular, TSP-repr computes a set of weighted matchings that represents M * (P, B).Algorithm 1 gives our algorithm in a pseudocode, which is further explained below.
for all (M, x) ∈ TSP-repr if M ′ and M are compatible then 11:

Reduce(A[i, B])
The goal of Lines 5-12 is to compute a representative set We say that a point p ∈ P is distant (with respect to a separator t i ) if it is to the right of t i+3 , and denote the set of distant input points from t i by distant(t i ).First, we iterate over all sets B ∈ B i in Line 5. Next, we consider certain boundary sets B ′ ∈ B i−1 .Note that if there is a distant point p ∈ B ′ ∩ distant(t i ), then a tour edge crossing t i−1 ending at p also crosses t i , and thus p is also a (distant) point of B.
In Line 8 we call the algorithm of De Berg et al. [9] on the point set so the first parameter of the call can be written as P i−1 ∪ B. This gives us a representative set R of M * (P i−1 ∪ B, B ′ △B).For each weighted matching (M, x) ∈ R, and for each weighted matching from the representative set (M ′ , x ′ ) ∈ A[i − 1, B ′ ], we check whether M and M ′ are compatible.If so, then taking the union of the corresponding path covers gives a path cover of P 0 ∪ • • • ∪ P i−1 ∪ B of total length x + x ′ , which realizes the matching Join(M, M ′ ) on B; we then add (Join(M, M * ), x + x * ) to A[i, B] in Line 11.
After iterating over all boundary sets B ′ , the entry A[i, B] stores a set of weighted matchings.These weighted matchings will be used on the next iteration at Line 9 to generate the A[i + 1, •] entries.To prevent each iteration taking more time than the previous one, thus blowing up the constants, we reduce A[i, B] to size at most 2 M k 1−1/d for some large but fixed M using the Reduce algorithm [3] in Line 12.
Note that in the final iteration, when i = t + 1, we take B = ∅.Now M and M ′ are compatible if and only if the union of the corresponding path covers is a Hamiltonian cycle.Line 12 then gives to a single entry the smallest weight.Therefore, the length of the only entry in A[t + 1, ∅] after the loops have ended, is the length of the optimal TSP tour.Hence, the correctness of NarrowRectTSP-DP follows from the next lemma.

▶ Lemma 19. After Step 12, the set
Proof.This proof is very similar to the correctness proof of [9].We use induction on i.For i = 1, we are directly calling TSP-repr(P 0 ∪ B, B), which gives a representative set.This set is reduced to a potentially smaller set on Line 12, which is still a representative set by Lemma 18.
Assume now that i > 1, and for each B ′ ∈ B i−1 the family For any fixed B ′ ∈ B i−1 , we have that the set returned by TSP-repr is a representative set of M * (P i−1 ∪ B, B ′ △B).By Lemma 3.6 in [3], the join operation executed on all compatible pairs of weighted matchings from two representative sets results in a representative set, thus for each fixed B ′ , we have inserted a representative set of , where B ′ is the family of endpoint configurations we consider at Line 7. Note that B ′ is a (super)set of all possible endpoint configurations in B i−1 that a path cover of The ) entries.By Lemma 18 the application of the Reduce algorithm results in a representative set of size at most 2 . Hence, the total running time is This concludes the proof of Theorem 12.

Random point sets inside a narrow rectangle
Algorithm 1 also works efficiently on random point sets, with only minimal changes.Specifically, in this section we will prove the following.
▶ Theorem 20.Let P be a set of n points taken independently uniformly at random from the hypercylinder [0, n] × Ball d−1 (δ/2).Then we can solve Euclidean TSP on P in 2 O(δ 1−1/d ) n expected time.
Our proof has four steps.In the first step, we will show that long edges are unlikely to be viable.For the second step, recall the definition of the spacing of p i (in P ) as ∆ i = x i+1 − x i , for all 1 ⩽ i ⩽ n − 1.We extend this definition with ∆ 0 = x 1 , and ∆ n = n − x n .Note that n i=0 ∆ i = n.The values ∆ i play an important role in the analysis of the algorithm, and it will be convenient to assume that the ∆ i are independent.However, when the x-coordinates of the points are generated uniformly at random in the interval [0, n], this is not quite true.In the second step, we therefore describe a method to generate the random point set in a different way, and we show how to relate the expected running times in these two settings.In the third step, we will explain which changes are made to the algorithm.Finally, in the fourth step, we will use the previous steps to analyse the expected running time of the algorithm.
Step 1: Long edges are unlikely to be viable.In this step, we will create a pattern of points through which no long edge can pass.To do so, we will first show that if a long edge is in an optimal tour T , then T must be bitonic at certain separators.Recall that s j is the separator between points p j and p j+1 .▶ Observation 21.Let i < j < k with x i + δ 2 < x j and ∆ j > 1 and x j+1 + δ 2 < x k .Let T be an optimal tour on P , and suppose that T contains p i p k .Then T is bitonic at s j .
Proof.See Figure 13 for an example.W.l.o.g., T contains the directed edge from p i to p k .Suppose for a contradiction that T is an optimal tour and not bitonic at s j .Then T must cross s j at least four times, which implies that there must be another directed edge q 1 q 2 with x(q 1 ) ⩽ x j and x j+1 ⩽ x(q 2 ).Note that q 1 ̸ = p i and q 2 ̸ = p k , since a single point cannot have two incoming or two outgoing edges.We will now show that By Observation 5, we then get an optimal tour T ′ shorter than T , thereby finishing the proof.First, we will simplify the problem using an argument similar to the proof of Observation 6. Suppose we move q 1 towards q 2 until x(q 1 ) = x j .By doing so, |q 1 p i | will never decrease more than |q 1 q 2 |.Therefore, it is sufficient to prove the statement for x(q 1 ) = x j .Analogously, it is sufficient to prove the statement for x(q 2 ) = x j + 1 and x i = x j − δ 2 and x k = x j + 1 + δ 2 .Together, we now have We get By Observation 5, this gives us an optimal tour T ′ shorter than T , thereby finishing the proof. ◀ We are now ready to create our pattern.We define a wall to be a set of four points (p i , . . ., p i+3 ) with the following properties: ∆ i > 7∆ i+1 and ∆ i+1 > 1 and ∆ i+2 > 7∆ i+1 , and , where p ′ i+1 and p ′ i+2 are the orthogonal projections of p i+1 and p i+2 onto the ball {0} × Ball d−1 (δ/2), respectively.See Figure 14 for an example of a wall.Now we will prove that walls indeed tell us something about the validity of long edges.To do so, we will need the following lemma: Proof.We split the proof into two cases: Case 4c − a − b ⩾ 0. We get This concludes the proof of Lemma 22. ◀ We are now ready to prove that long edges passing through the wall must have one endpoint close to the wall.▶ Lemma 23.Let (p i , . . ., p i+3 ) be a wall.Let q 1 q 2 be an edge with x(q 1 ) + δ 2 < x i and x i+3 + δ 2 < x(q 2 ).Then the shortest tour on the points of P does not contain q 1 q 2 .Proof.Suppose for a contradiction that T is an optimal tour that contains w.l.o.g. the directed edge q 1 q 2 .By Observation 21, T is bitonic at s i and s i+1 and s i+2 .Note that q 1 q 2 passes through all three of these separators.Therefore, one of the neighbours of p i+1 must be to the left of p i+1 , and one must be to its right.The same holds for p i+2 .Since both q 1 q 2 and the edge from p i+2 to its 'right' neighbour pass through s i+2 , the edge from p i+1 to its 'right' neighbour cannot pass through s i+2 .Therefore, the 'right' neighbour of p i+1 is p i+2 .In conclusion, T must contain the directed edge p i+2 p i+1 .
Combining these simplifications, we want to prove that We invoke Lemma 22 with a = (2δ 2 +15∆ i+1 ) 2 and b = ∆ 2 i+1 +δ 2 /4 and c = (δ 2 +8∆ i+1 ) 2 +δ 2 .We check whether the requirement holds.A bit of algebra gives us that for these values we can rewrite 4ab − (4c which is indeed at least 0 for all δ > 0 and ∆ i+1 > 1, as required.Therefore, we have now proven that |q Therefore, T is not an optimal tour, leading to the conclusion that a shortest tour on the points of P does not contain q 1 q 2 .◀ Note that if the ∆ i are i.i.d.(independent and identically distributed) and the other coordinates of the points are taken independently uniformly at random from Ball d−1 (δ/2), there exists some constant probability that (p i , . . ., p i+3 ) is a wall.This probability is independent of δ, n, i, and whether any (p j , . . ., p j+3 ) is a wall for any j ⩽ i − 3 or j ⩾ i + 3. We will expand on this later.This brings us to our next step.
Step 2: Another way of generating points, with independent ∆ i .As n goes to infinity, the ∆ i become more and more independent.True independence would greatly simplify the calculation of the running time.Therefore, let us take a look at a different way of generating our point set.
First, we generate n + 1 independent exponentially distributed variables, ∆ 0 , . . ., ∆ n ∼ Exp (1).Using these, we compute the x-coordinates of our points, defined as x i := i−1 j=0 ∆ i for 1 ⩽ i ⩽ n.We will also write x n+1 := n i=0 ∆ i for brevity.Note that the value of x n+1 will very likely be relatively close to n, since its distribution converges to a normal distribution with mean n + 1 and standard deviation √ n + 1 when n → ∞.Finally, we generate the other coordinates by picking n independent uniformly distributed points in Ball d−1 (δ/2).Combining these gives us n points in the hypercylinder [0, x n+1 ] × Ball d−1 (δ/2).
A point set generated this way has two important properties.First of all, the ∆ i are now independent.Second, as we will prove next, the expected running time of an algorithm on a uniformly distributed point set can be bounded by the expected running time of that algorithm on a point set generated this way.We can even generalize this for more arbitrary point set distributions.
Let X n be a random point set of n points in R d , where the x-coordinates of the points are taken independently uniformly at random from the interval [0, n], and the other coordinates are i.i.d. and independent of the x-coordinates.Let Y n be a random point set of n points in R d , where the spacings ∆ i = x i+1 − x i are taken independently from Exp(1) (including ∆ n to create an x n+1 ), and the other coordinates are i.i.d. and independent of the x-coordinates, with the same distribution as in X n .We then get ▶ Lemma 24.Let X n and Y n be as defined above.Let A be an algorithm that runs on point sets in R d .Let T A (P ) denote its running time for a point set P .Suppose for all λ > 1 and P , we have T A (P λ ) ⩽ T A (P ), where P λ is obtained from P by scaling the x-coordinates by a factor λ > Proof.First, we note that X n and Y n are remarkably similar: when the x-coordinates of the points of Y n are scaled such that x n+1 = n, we obtain the same distribution as X n , see [8].Therefore, Since T A (P λ ) ⩽ T A (P ) for all λ > 1, P , we get that Finally, since the distribution of x n+1 converges to a normal distribution with mean n + 1 and standard deviation for n large enough finishing the proof.◀ Now we can give a simple lower bound on the probability that (p i , . . ., p i+3 ) forms a wall.Let B d−1 (p, r) be the (d − 1)-dimensional ball with midpoint p and radius r.Define q 1 as x(q 1 ) = 0, y 1 (q 1 ) = 3δ/8, y 2 (q 1 ) = . . .= y d−2 (q 1 ) = 0, and define q 2 as x(q 2 ) = 0, y 1 (q 2 ) = −3δ/8, y 2 (q 2 ) = . . .= y d−2 (q 2 ) = 0. Recall that p ′ i+1 and p ′ i+2 are the orthogonal projections of p i+1 and p i+2 , respectively, on {0}×Ball d−1 (δ/2).Now, note that if Now, it is well-known that the volume of the (d − 1)-dimensional ball with radius r is c d r d−1 for some constant c d .Since p ′ i+1 is a random point uniformly at random in {0}×Ball d−1 (δ/2), we get since we assume d to be a constant.
Step 3: A new algorithm.The new algorithm is exactly the same as the old algorithm, with three changes.The first change is simple: we previously stated that we start by sorting our Note that the corresponding probabilities are equal, and that the location of p ′ i+1 is independent of the location of p ′ i+2 .
points on their x-coordinate.In the case of sparse point sets we use a worst-case O(n log n) sorting algorithm for this, but now we can use a bucket sort with n buckets.This brings the expected sorting time to O(n) [5].
For the second change, we need to take another look at how we place the separators t i .We previously placed these separators in every second nonempty drum σ i := [iδ, (i + 1)δ] × Ball d−1 (δ/2) based on the points in σ i−1 ∪ σ i ∪ σ i+1 .However, in order for our algorithm to meet the requirements of Lemma 24, we would like to avoid having a point enter a drum after the x-coordinates are multiplied by some factor λ > 1.Furthermore, since the proof of Lemma 14 requires every drum to be at least δ wide, we cannot simply scale the drums as well.Therefore, we will need to allow some overlap.For j ∈ {−1, 0, 1} and all i, we define τ i,j := [(X(i) − 1/2 + j)δ, (X(i) + 1/2 + j)δ] × Ball d−1 (δ/2), with X(i) := (i + 1/2)x n+1 /n.Note that the center of drum τ i,0 scales with the point set, and τ i,−1 and τ i,1 are the drums directly to its left and right.In our new algorithm, we will use the drums τ i,j instead of the σ i used so far.Since this is quite a drastic change, before we show how exactly these new drums are used in the algorithm, we will need to revisit all drum-related lemmas and corollaries.Let us start with Lemma 14.When applied to the new drums, it gives us the following.
▶ Lemma 25.Let T opt be an optimal TSP tour on P .For a separator t, let T (t, τ i,0 ) denote the set of edges from T opt with both endpoints in τ i,−1 ∪ τ i,0 ∪ τ i,1 and crossing t.

Let k be the number of points in τ
Proof.The proof is analogous to that of Lemma 14. ◀ Note that k is now defined 'locally', since we no longer have a good bound on the maximum density of our point set.Instead of placing the separators t i in every second nonempty σ i , we place them in every τ i,0 instead, using the points in τ i,−1 ∪τ i,0 ∪τ i,1 .We continue to Lemma 16, since Lemma 15 is independent of the drums used.We first define P [i, j] := {p i , . . ., p j } for all 1 ⩽ i ⩽ j ⩽ n.The revised version of Lemma 16 is the following: ▶ Lemma 26.Let t i ∈ T be a separator.Let T opt be an optimal tour on P and let V := P right (T opt , t i ) be its endpoint configuration at t i .Let z be the leftmost point with an x-coordinate larger than (X(i) + 3)δ.Let p j be the leftmost point more than 3δ/2 to the right of z.Let P ′ denote the set of points with x-coordinates between (X(i) + 3/2)δ (the right border of τ i,1 ) and x j , and let Proof.Consider a tour edge crossing t i .Any edge crossing t i ending in P ′ must fully cross τ i,1 .Therefore such edges have length at least δ.By the Packing Property, there can be at most c * = O(1) such edges.This proves (i).
To prove (ii), we can directly apply Lemma 15.Note that point z indeed suffices, since it is more than 3δ/2 to the right of the right border of τ i, 1 .Proof.Let c * , P ′ and P ′′ be as defined in Lemma 26.We use the enumeration of candidate edge sets from Lemma 25, and only keep the endpoints that are to the right of t i .To each of these endpoint sets, we add at most c * endpoints from P ′ , and we add at most one endpoint from P ′′ .There are poly(k) and O(n) ways to add such endpoints, respectively.This gives a family of 2 ) n sets.By Lemma 26, the resulting family of endpoint sets contains V .◀ The rank-based approach is independent of the drums used.This brings us to the algorithm itself.It requires only a single change: all separators to the left of a previously found separator can be ignored.
For the third and final change, we can use walls to decrease the number of viable distant points.If we find a wall sufficiently far to the right of t i , then by Lemma 23 all points that are sufficiently far to the right to this wall are unviable and can therefore be left out of P ′′ .Specifically, let p j be the leftmost point with x j > X(i) + δ/2 + δ 2 and j divisible by 4. Note that this point is at least δ 2 to the right of τ i,0 and therefore at least δ 2 to the right of t i .We then check whether (p j , . . ., p j+3 ) is a wall.If it is not, we check (p j+4 , . . ., p j+7 ) and so forth, until we either have found a wall, or have reached p n .If we find a wall, then we only use the distant points that are not rendered unviable by the wall.If we do not, then we use the same set of distant points as we used previously.
Step 4: Analysis of the running time.As stated before, the sorting of the points can be done in O(n) expected time.For the rest of the analysis, we will need a few lemmas.▶ Observation 28.Let X, Y be two integer nonnegative random variables, such that for all k ⩾ 0, the equation P For the proof, see [30,Formula 3.3

on p. 6].
The next lemma gives us information about among others the running time of an algorithm when the input has a random size.
Proof.Let M, λ > 0 be such that for all x > 0 we have f (x) ⩽ M + 2 λx 1−1/d .Let us write µ := e λ+2 .We get We have now shown that Proof.Let λ, µ > 0 be such that g(x) := µ2 λx 1−1/d is larger than f (x) for all x.Clearly, it is sufficient to show that E[g(M )] = 2 O(z 1−1/d ) .Let X ′ := X + i.First, we will show that For this case, let us first take a look at the value of We have already seen that for both of these values of k, we have for all k, and g is increasing, Observation 28 gives us that we get Since X follows a Poisson distribution with mean z, Lemma 29 gives us that E[g(X)] = 2 O(z 1−1/d ) .In conclusion, we have as we wanted to prove.◀ We are now ready to analyse the total running time of the algorithm.We will look at each part of the algorithm separately.
Line 1: Computing the separators.There are O(n) separators to be computed.Recall that . Now we want a bound on the total expected amount of time needed per separator, 1) for all j, and the total horizontal interval covered by τ i,−1 ∪ τ i,0 ∪ τ i,1 is 3δ.Clearly, M ⩾ 0. Therefore, M is almost a Poisson distributed variable with expected value 3δ.There is one difference: since there are only n points, M ⩽ n.Therefore, M does have all the required properties for Lemma 30, so the total expected time needed per separator is [26], we can prove that the expected time is O(δ d+1 ), but the above will suffice.)Since there are O(n) separators, the total expected time needed for this part is 2 O(δ 1−1/d ) n. Lines 2 and 5: The sets B i .We will now give an upper bound on the expected value of Recall that each B ∈ B i consists of (i) the rightmost endpoints of a candidate edge set, (ii) at most c * points from P ′ and (iii) at most one point to the right of P ′ , not rendered unviable by a wall.Note that the expected number of possibilities of each type is dependent: the more possibilities one set contains, the fewer others can have.After all, no point can be in two sets of different types at once.Aside from the number of points in each interval, the three types are otherwise independent.Therefore, to find an upper bound on E[|B i |] it suffices to multiply upper bounds of the expected values of possibilities of (i), (ii) and (iii).Let us start with the number of viable distant points, (iii).Let p j be the leftmost point such that (p j , . . ., p j+3 ) is the first candidate wall checked.We have already seen that the probability that it is a wall is some constant α.If it is not a wall, the next set we check has the same probability, and so forth.Therefore, the geometric distribution with probability α forms an upper bound on the expected number of possible walls checked.The expected x-coordinate of the last viable distant point therefore is . Therefore, the expected number of viable distant points is O(δ 2 ).This brings us to the number of possible B ′ .Since we use Corollary 27, this is , where M is the number of points which are in τ i,−1 ∪ τ i,0 ∪ τ i,1 or in P ′ .Note that we have a factor O(δ 2 ) instead of the factor O(n) as in the statement of Corollary 27.This is because, as we have just shown, the expected number of distant points we need to consider is not O(n) but O(δ 2 ).Now, let us look at M .Recall how P ′ was defined: Let z be the leftmost point with an x-coordinate larger than (X(i) + 3)δ.Let p j be the leftmost point more than 3δ/2 to the right of z.Then P ′ contains all points between (X(i) + 3/2)δ (the right border of τ i,1 ) and p j .Therefore, M equals the number of points in an interval of length 3δ + 3δ/2 + 3δ/2 = 6δ, plus one.We once more apply Lemma 30, giving us that the total expected number of B ′ is 2 O(δ 1−1/d ) .
Since i ∈ {1, . . ., |T | + 1} ⊆ {1, . . ., n}, the total expected number of elements in all B i combined is bounded by ), so the running time of each call to TSP-repr in Algorithm 1 is 2 , for some M 1 , M 2 with all properties required for Lemma 30.Similar statements hold for the number of weighted matchings in the representative set returned by TSP-repr and the number of matchings in the representative set of Consequently, before executing the reduction in Line 12, the set ) entries for some M 1 , M 2 , M 3 with all properties required for Lemma 30.By Lemma 18 the application of the Reduce algorithm results in a representative set of size at most 2 |B|−1 = 2 O(M 1−1/d ) for some M with all properties required for Lemma 30.In conclusion, the total expected running time is bounded by 2 O(δ 1−1/d ) n when the ∆ i are exponentially distributed.
Finally, we will show that the requirements for Lemma 24 hold, where we take A to be the algorithm described above.The only nontrivial requirement is that T A (P λ ) ⩽ T A (P ) for all point sets P and x-axis scaling factors λ > 1. Intuitively, we would expect this to hold: every single separator t i and wall (p i , . . ., p i+3 ) retains its properties when scaled with a factor larger than 1, while the boundary sets can only decrease in size and P λ might contain extra walls.Furthermore, since we only check whether (p i , . . ., p i+3 ) forms a wall for i divisible by 4, we do not miss walls we previously would have seen.
Unfortunately, T A (P λ ) ⩽ T A (P ) does not necessarily hold for all λ and P , since we have only proven bounds on the running times, not the actual running times themselves.However, it is easy to show the existence of an algorithm B of which we know the exact expected running time of every step.Algorithm B is simply algorithm A, but after every step it waits as long as necessary to make its expected running time for that step equal to the bound calculated for this step.To be precise, there are two types of waiting, best explained by an example.We have previously shown that computing a separator takes O(|Q| d+1 ) time, where Q is the set of points of P in τ i,−1 ∪ τ i,0 ∪ τ i,1 .Let c 1 be such that for all Q, computing this separator takes T (Q) < c 1 |Q| d+1 time for A. When algorithm B computes a separator, it waits for c 1 |Q| d+1 − T (Q) time afterwards, therefore taking exactly c 1 |Q| d+1 time in total.Note that the time waited by B depends on Q, but the total time used depends only on |Q|, and not Q itself.This is the end of the first type of waiting, but not of the example.Next, we showed that the total expected time needed to compute a separator was upper bounded by 2 O(δ 1−1/d ) .So, let c 2 be such that A, including the first type of waiting, takes T (δ, d) < 2 c2δ 1−1/d expected time to compute a separator.When computing a separator, B also waits 2 c2δ 1−1/d − T (δ, d) time.Note that the time waited is independent of Q. Together, these two types of waiting ensure that (i) the time needed by B is monotone in |Q| and (ii) the total expected time needed by B equals the calculated upper bound for A. Finally, we always wait as long as needed to emulate the separators being in the worst possible place for that specific step.Therefore, the time taken is completely independent of the locations of the separators.
Since we know the exact running time of B, using the arguments given earlier we get that T B (P λ ) ⩽ T B (P ) for all point sets P and x-axis scaling factors λ > 1.Therefore, we can apply Lemma 24 on B, giving us that B has an expected running time of 2 O(δ 1−1/d ) n on X n , the random point set of which the x-coordinates are picked uniformly from [0, n].Since B is slower than A, we conclude that the expected running time of A must have the same bound, finishing the proof.
Figure 16 The separators ti and t + i are placed alternately.Note that even though t + i+2 is placed in a different drum than ti+3, in this example they are equivalent, since they induce the same partitioning of P .

6
A more efficient algorithm for sparse point sets Our algorithm will be a dynamic program which uses three different tables.The first two of these will be very similar to the table used by our previous sparse point set algorithm.We will proceed in four steps.First, we will recall a few core concepts, and introduce another set of separators.Second, we will introduce the three tables, and define what values they contain.Third, we will show how to compute these values.Fourth, we will show that the algorithm runs in the desired time.
Step 1: A new set of separators.Because P is sparse, the drum σ i := [(i − 1)δ, iδ] × Ball d−1 (δ/2) contains at most k points from P for any i ∈ Z. Furthermore, recall that we have a separator s i between every pair of consecutive points p i and p i+1 .These separators form the set S := {s 1 , . . ., s n−1 }.Since any two separators that induce the same partitioning of P are considered equivalent, S is the set of all nontrivial separators.Recall that we also selected a separator from every second non-empty drum.Let t i denote the separator in the i'th such drum.We define a function st that maps the index i of a separator in T to the index of the corresponding separator in S. Thus s st(i) = t i .Let T = {t 1 , . . ., t |T | } be the collection of selected separators.For every separator t i , we computed a family B i of candidate endpoint sets in 2 O(k 1−1/d ) • n time.
We will now place separators in the other nonempty drums.Each drum contains at most k points, and has width δ.Therefore, for all i we can find a separator t + i in the nonempty drum between t i and t i+1 such that x st + (i)+1 − x st + (i) > δ/(2k), where st + is defined by See Figure 16 for an example.Note that this is not tight; we can in fact obtain x st + (i)+1 − x st + (i) ⩾ δ/(k + 1), but the above will suffice.Let T + := {t + 1 , . . ., t + |T |−1 } be the resulting set of separators.Note that no two separators t + i , t + j are equal.However, we can have t i = t + i or t + i = t i+1 , namely when t i (or t i+1 ) and t + i induce the same partitioning as the boundary between the consecutive drums in which they are placed.See Figure 16 for an example.In this case, we will still consider t + i to be to the right of t i and to the left of t i+1 .Recall that we also defined t 0 and t |T |+1 as 'separators' which are to the left and to the right of all points, respectively.To ensure we have no two t i , t i+1 without a t + i in between, we define two new separators.We define t + 0 := t 0 , but we do consider it to be to the right of t 0 .Similarly, t + |T | := t |T |+1 , which we consider to be to the left of t |T |+1 .The following observation, which is a slightly modified version of Observation 21, shows how we can use the separators from T + .
▶ Observation 32.Let k be such that P contains at most k points in any drum.Let t + i ∈ T + .Let r 1 , r 2 be two points with x(r 1 ) + 2kδ < x st + (i) and x st + (i)+1 + 2kδ < x(r 2 ).Let T be an optimal tour on P , and suppose that T contains r 1 r 2 .Then T is bitonic at t + i .
The proof is analogous to the proof of Observation 21; see Appendix B for the full proof.Finally, we will need the following observation: ▶ Observation 33.Let k be such that P contains at most k points in any drum.Let p i and p j be two points with i < j.Suppose j − i ⩾ (m + 1)k for some m ∈ N. Then x j − x i ⩾ mδ.
Proof.Since for all i ∈ Z the drum σ i contains at most k points, x j − x i ⩾ j−i k − 1 δ.From this, the observation directly follows. ◀ Step 2: The three tables.Let t i be a separator in T .Recall that the basic algorithm used a family B i of sets, such that B i contains the endpoint configuration of the edges of an optimal tour that are crossing t i .The set B i was formed as follows (see also Corollary 17).Let R 1a be the family of sets of points formed by taking the right endpoints of edges of the candidate edge sets from Lemma 14.Let R 1b be the family of sets of at most c * points between t i and t i+3 , where c * is as defined in Lemma 16.To improve readability, we write Finally, let R 2 be the family of sets containing at most one point to the right of t i+3 and none to its left, so each element of R 2 is either the empty set or a set containing a single point.Then See Figure 17(i) for an example.
Recall that the basic algorithm takes 2 O(δ 1−1/d ) n 2 time because for each of the O(n) separators t i , the family B i contains 2 O(k 1−1/d ) n sets.To counter this, we replace B i by two other families of sets of points, each containing only 2 O(k 1−1/d ) sets.Recall that P [i, j] := {p i , . . ., p j } for all i ⩽ j.
Let R ′ 2 be the family of sets of at most one point from P [st(i) + 1, st(i) + 20k 2 ].Note that R ′ 2 contains 20k 2 + 1 sets: 20k 2 singleton sets and the empty set.The number 20 is not special; it is merely a large enough constant.Finally, let R 3 be the family of sets of at most one point from P [st(i) − 20k 2 + 1, st(i)].Now we define B (1) i as the family of sets of points formed by combining one set from R 1 , one from R ′ 2 and one from R 3 , such that there exists a j such that all the points lie in P [j, j + 20k 2 ].In other words, for some j}.
See Figure 17(ii) for an example.Note that the empty set is an element of B i .Also, note that not every element of B (1) i is an element of B i .Specifically, this is true for the elements which contain a point to the left of t i .

Note that B
(2) i ⊆ B i and that B (1) i ∩ B (i) i = ∅.See Figure 17(iii) for an example.Now we can define the tables A (1) , A (2) and A (3) that our algorithm uses.Recall that for Algorithm 1, we used A representative set containing pairs (M, x), where M is a perfect matching on B ∈ B i and x is a real number equal to the minimum total length of a path cover of P 0 ∪ • • • ∪ P i−1 ∪ B realizing the matching M .
We use the same definition for A (1) [i, B] for all B ∈ B (1) i , and for A (2) [i, B] for all B ∈ B (2) i .We get A (1)  Note that the only difference between these three definitions is for which B the table entries are defined.Furthermore, note that A (1) [||T | + 1, ∅] is defined, and the corresponding representative set contains a single element (∅, x) where x is the length of the shortest tour on all points of P .
Unfortunately, we cannot compute every value of A (1) and A (2) using only these two tables.This brings us to the third and final table.Let t + i ∈ T + , and let q 1 be a point between t + i and t + i+1 .Let q 2 be a point in P [st(i) + 20k 2 + 1, n].We then define A (3) [i, q 1 , q 2 ] := The length of the shortest path from q 1 to q 2 that visits all points in P [1, st(i)], such that the neighbour of q 2 is a point in P [1, st(i) − 5k 2 ].
See Figure 17(iv) for an example.
Step 3: Computing the table values.Since the algorithm uses three different tables, the order in which to compute these is nontrivial.Furthermore, for the third table, we will need to precompute two (significantly smaller) tables.Algorithm 2 gives our algorithm in pseudocode, which we will explain below.
Step 3-a: Computing table values of A (1) .Computing the values of A (1) is analogous to computing the table values of the basic algorithm.See Figure 18 for an example.However, there is one exception.Sometimes, this would require a (non-existing) table entry A (1) i−1 .Note that this can only be the case because B ′ contains a point too far to the right.Since there are at most 3k points between t i and t i−1 , the set B ′ contains a point in P [st(i − 1) + 20k 2 + 1, st(i − 1) + 20k 2 + 3k].Since there exists a j such that B ′ ⊆ P [j, j + 20k 2 ], the set B ′ does not contain a point to the left of t i−1 .Therefore, i−1 , and so A (2) [i − 1, B ′ ] is the value we need.For pseudocode, for a given i and B ∈ B (1) i , see Algorithm 3. The analysis of the running time for table A (1) is analogous to the analysis of the basic algorithm.Therefore, the time needed to calculate a single table entry is 2 O(k 1−1/d ) .

Figure 17
Examples of entries of every table.Note that all three different types of separators are used (s, t and t + ).Also note that the spaces between consecutive separators contain varying numbers of points.(i) For comparison, an entry of table A of the basic algorithm.A set of points in Bi consists of a set from R1 (in red), and possibly any point to the right of ti+3 (in blue).(ii) An entry of A (1) .A set of points in B (1) i contains points from a set in R1 (in red), possibly a point between ti+3 and s st(i)+15k 2 (in blue), and possibly a point between s st(i)−15k 2 and tj (in grey).Not shown is the property that there exists a j such that all the points lie in P [j, j + 20k 2 ]. (iii) An entry of A (2) .A set of points in B (2) i contains points from a set in R1 (in red), and exactly one point between s st(i)+20k 2 and s st(i)+20k 2 +3k (in blue).(iv) An entry of A (3) .It contains exactly one point q1 between t + i and t + i+1 (in red), and exactly one point q2 to the right of s st(i)+20k 2 (in blue).Not shown is the property that the neighbour of q2 is a point in An example of the computation of one of the elements of a table entry of A (1) .The The two possible cases for a table entry of A (2) .The red circles (open and filled) form B. The open circles (black and red) form B ′ .The grey paths contain only points to the left of the leftmost separator shown.
we get that x j − x st + (i−1)+1 > 2kδ.Therefore, if p j has a neighbour far enough to the left, then Observation 32 gives us that the tour is bitonic at t + i−1 .Let M be a perfect matching on B with corresponding path cover C. Let p be the neighbour of p j in C. Now there are two possible cases: either p ∈ P [st(i) − 10k 2 + 1, st(i)], or p ∈ P [1, st(i) − 10k 2 ].To compute the value of x, we will simply take the minimum of these two cases, illustrated in Figure 19.
Case (i): p ∈ P [st(i) − 10k 2 + 1, st(i)].For this case, we do the following for all possible p, and take the minimum of the resulting values.We simply add the length of |p j p| to the corresponding value of A (1) [i, B ′ ], where B ′ is formed by taking B, and swapping p j for p. See Figure 19(i) for an example.We claim that B ′ ∈ B (1) i .Since p j , the rightmost point of B, is not in B ′ , the only non-trivial requirement we must check for this claim is that there exists an index z such that B ′ ⊆ P [z, z + 20k 2 ].We will now show that this is satisfied for z = st(i) − 10k 2 .We first take a look at the leftmost point of B ′ , which is p.Clearly, p ∈ P [st(i) − 10k 2 , st(i) + 10k 2 ].Now, the rightmost point from B ′ is to the left of t i+3 .Since there are at most 7k points between t i and t i+3 , all points except p are guaranteed to be in P [st(i) + 1, st(i) + 7k + 1] ⊆ P [st(i), st(i) + 10k 2 ].Since both the leftmost point and the rightmost point of B ′ are in P [st(i) − 10k 2 , st(i) + 10k 2 ], we conclude that B ′ ∈ B (1) i .Case (ii): p ∈ P [1, st(i) − 10k 2 ].For this case, things are slightly more complicated.By Observation 32, we get that C must be bitonic at t + i−1 .Let M * be a perfect matching on B. Let q be the point to which p j is matched in M * .See Figure 19(ii) for an example.Note that the path from q to p j of C crosses t + i−1 at least twice.Therefore, this path crosses t + i−1 exactly twice, and no other path crosses t + i−1 .Let q ′ be the last point on this path before t + i−1 is crossed the first time.Note that q ′ = q can hold.We can now split C into two parts of which the lengths can be computed independently: the path from q ′ to p j , and the rest.Let us take a look at these two separately: Recall that P i is the set of points between t i and t i+1 .We want to know the length of the shortest path from q ′ to p j using all points in P 1 ∪ . . .
is the set of points between t i−1 and t + i−1 .This is the value A (3) [i − 1, q ′ , p j ].Note that p j is far enough to the right to make this a valid table entry.Indeed, since p ∈ P [1, st(i) − 10k 2 ], and there are at most 3k points between t + i−1 and t i , we have p ∈ P [1, st + (i − 1) − 5k 2 ], as required.Finally, we claim that q ′ is indeed between t + i−1 and t + i .We know that the tour must be bitonic at t + i−1 and t + i , and that there is at least one point between these two separators.If q ′ is not between t + i−1 and t + i , we would have two edges crossing both of these separators: the edge following q ′ in the path from q ′ to p and the edge from p to p j .However, since there is at least one point between these two separators, there is also at least one point with at least one neighbour to the left of t + i−1 or to the right of t + i .Both lead to a contradiction, as we now have at least three edges crossing a separator where the tour must be bitonic.We conclude that q ′ is indeed between t + i−1 and t + i .Let Q ′ i−1 be the set of points between t + i−1 and t i .In other words, Let M be the matching M * , with one difference: instead of q being matched to p j , it is matched to q ′ .Now we want to know the length of the shortest path cover on Q ′ i−1 ∪ B \ {p j } realizing the matching M .We can find this value using the method of the standard 2 O(n 1−1/d ) algorithm.We can compute the total length of C for all possible q ′ , and take the minimum of these values, to find the minimal length of C.This ends the second case.
In conclusion, for a given i and B ∈ B (2) i , we can compute A (2) [i, B] using the pseudocode of Algorithm 4. Notice that the Reduce at the end automatically takes the minimum of all options added at Line 6 for every M .for all (M ′ , x ′ ) ∈ A (1) [i, B ′ ] do 5: M := M ′ with p swapped for p j 6: M ′ := {{q ′ , p j }} 10: x if M ′ and M are compatible then 13: Insert (Join(M, M ′ ), x + x ′ ) into A (2) [i, B] 14: Reduce(A (2) [i, B]) Next, let us take a look at the time needed to compute a single table entry of A (2) .For the first part, there are O(k 2 ) possible p.For every p, we need |A (1) For the second part, there are O(k) possible q ′ .For each of these combinations, we run the 2 O(n 1−1/d ) algorithm on a set containing O(k) points.Analogously to the basic algorithm, The two options for a table entry of A (3)  the Reduce algorithm runs in 2 O(k 1−1/d ) time.Therefore, the total running time needed to compute a single table entry is k Step 3-c: Computing table values of A (3) .Finally, we will show how to compute the value of A (3) [i, q 1 , q 2 ].The point q 2 is far enough to the right of t + i−1 to make Observation 32 relevant.Therefore, we will once more split into two possible cases, of which we will use the minimum of the resulting values.Let p be the neighbour of q 2 in the shortest path corresponding to this table entry.Now either p ∈ P [1, st

Case (i): p
From Observation 33 we get that x st + (i−1) − x(p) > 2kδ.Therefore, by Observation 32, the path from q 1 to q 2 must be bitonic at t + i−1 .Since the edge pq 2 crosses t + i−1 , it can only be crossed once before.See Figure 20(i) for an example.Let q ′ be the last point on this path before t + i−1 is crossed the first time.Note that q ′ ̸ = q 1 , as q ′ is between t + i−1 and t + i , since there is at least one point between these separators.We can now split the value of A (3) [i, q 1 , q 2 ] into the sum of two values which can be computed independently: the length of the path from q 1 to q ′ , and the length of the path from q ′ to q 2 .Let us take a look at these two separately: We want to know D[i, q 1 , q ′ ] := the length of the shortest path from q 1 to q ′ using all points between t + i−1 and t + i .We can find this value using the standard 2 O(n 1−1/d ) algorithm.Note that this value is independent of q 2 , and therefore only needs to be computed once.This is done at Line 14 of Algorithm 2. We want to know the length of the shortest path from q ′ to q 2 using all points in P 1 ∪. ..∪P i−1 ∪Q i−1 ∪{q ′ , q 2 }.This value can be found in the table entry A (3) [i−1, q ′ , q 2 ].Notice that this is indeed a valid table entry, since q ′ is between t + i−1 and t + i .We can compute the sum of these lengths for all possible q ′ , and take the minimum of these sums to find the optimal path length for this case.

Case (ii): p
. In this case, A (3) [i, q 1 , q 2 ] is equal to |q 2 p| plus the length of the shortest path from p to q 1 , using every point in P [1, st(i)].
See Figure 20(ii) for an example.Let B = {p, q 1 }.We claim that table A (1) contains a representative set containing pairs (M, x), where M is a perfect matching on B and x is a real number equal to the total length of the path cover of P [1, st(i)] ∪ B realizing the matching M .Note that since B ⊆ P [st + (i − 1) − 10k 2 + 1, st + (i − 1) + 3k], no invalid table entries of A (1) are called.Since B contains only two points, this representative set contains only one pair, of which M = {{p, q 1 }}.Therefore, the value x is the length of the shortest path we are looking for.Since this value is independent of q 2 , it needs only to be computed once.This can be done with the following pseudocode, which is the full version of Line 16 of Algorithm 2: This ends the second case.
for all (M ′ , x ′ ) ∈ A (1) [i, B ′ ] do 6: M ′ and M are compatible then 7: Combining the two cases, for a given i, q 1 and q 2 we get the following pseudocode to use at Line 18 of Algorithm 2: 1: A (3) [i, q 1 , q 2 ] := ∞ 2: for all q ′ between t + i−1 and t + i do 3: A (3) [i, q 1 , q 2 ] := min{A (3) [i, q 1 , q 2 ], E[i, p, q 1 ] + |pq 2 |} Finally, let us take a look at the time needed to compute a single table entry of A (3) .For the first option, there are O(k) possible q ′ , and the computations now only take constant time per q ′ .For the second option, there are O(k) possible p (since st(i) − st + (i − 1) ⩽ 3k), and the computations only take constant time per p.This brings the total time needed to compute a single table entry of A (3) to O(k + k) = O(k).This does not include the computations done at Line 16 and Line 18 of Algorithm 2; these will be considered below.
This concludes the computation of the table entries.
Step 4: The running time.Let us analyse the total time needed by Algorithm 2.

Computation of table entries of
i .As seen before, the computation of a single table entry takes 2 O(k 1−1/d ) time.This brings the total time needed for this line to i .As seen before, the computation of a single table entry takes 2 O(k 1−1/d ) time.This brings the total time needed for this line to

Precomputation of table D (Line 14).
We compute the length of the shortest path from q 1 to q ′ using all points between t + i−1 and t + i .There are O(n) possible i, there are O(k) possible q 1 and there are O(k) possible q ′ .The 2 O(n 1−1/d ) algorithm is run on a point set of size O(k).Therefore, the total time needed for this line is 2 O(k 1−1/d ) n.

Precomputation of table E (Line 16
).Let i, p, q 1 be some valid combination for the second option.There are O(n) possible i, there are O(k) possible p and O(k) possible q 1 .Analogously to the computation of a table entry of A (1) , for each combination 2 O(k 1−1/d ) time is needed.Therefore, this line takes 2 O(k 1−1/d ) n time in total. (3)(Line 18).There are O(n) possible i, a total of O(k) possible q 1 and O(n) possible q 2 .As seen before, the computation of a single table entry takes O(k) time.This brings the total time needed for this line to O(nknk) = O(k 2 n 2 ).This brings the total running time to

Computation of table entries of A
this concludes the proof of Theorem 31.

Concluding remarks
Our paper contains three main results on Euclidean TSP.First, we proved that for points with distinct integer x-coordinates in a strip of width δ, an optimal bitonic tour is optimal overall when δ ⩽ 2 √ 2. The proof of this bound, which is tight in the worst case, is partially automated to reduce the potentially enormous number of cases to two worst-case scenarios.It would be interesting to see whether a direct proof can be given for this fundamental result.We note that the proof of Theorem 1 can easily be adapted to point sets of which the x-coordinates of the points need not be integer, as long as the difference between x-coordinates of any two consecutive points is at least 1.
Second, we gave a 2 O(δ 1−1/d ) n + O(δ 2 n 2 ) dynamic programming algorithm for sparse point sets in a d-dimensional δ-cylinder.For δ = Θ(n) the running time becomes 2 O(n 1−1/d ) , which is optimal under ETH.We expect that the factor O(δ 2 n 2 ) can be improved to a factor O(δ 2 n log 2 n), using a method similar to that used by De Berg et al. to solve Bitonic TSP in O(n log 2 n) time [12].
Third, we gave a 2 O(δ 1−1/d ) n expected time algorithm for random point sets.The proof also gives a way to relate the expected running times of algorithms for any problem on two different kinds of random point sets: a version where the x-coordinates of the points are taken uniformly at random from [0, n], and a version where the differences between two consecutive x-coordinates are taken independently from Exp (1).Note that the problem is scalable, so these results generalize to any desired interval or desired expected difference between two consecutive x-coordinates.
There are several directions for further research.In R 2 , our results show how the complexity of TSP scales as we go from an essentially 1-dimensional problem (δ is a small constant) to an essentially unrestricted 2-dimensional problem (δ = n).We can also ask how the complexity of TSP scales from a 2-dimensional problem to a 3-dimensional problem.For instance, we can assume the points are randomly distributed inside a box of size n × n × δ, or we can consider sparse point sets inside a slab of width δ. (Here a point set is sparse when every box of size 1 × 1 × δ contains O(1) points.)The goal would be to obtain an algorithm with running time 2 O(f (δ) for constant δ (which is optimal for TSP in R 2 , under ETH), and it becomes 2 O(n 2/3 ) for δ = n (which is optimal for TSP in R 3 , assuming ETH).One can also generalize the problem in another way.Instead of assuming that the points are all close to a line or line segment, one could also assume that the points are all close to for example a curve, or a (connected) set of line segments.We believe that our algorithm can serve as the basis of an algorithm solving such a problem, under the assumption that the point sets are dense enough to ensure that the solution will generally follow these curves / segments.Making this precise, and investigating how the running time depends on the number of line segments, would be interesting.More generally, we believe this more fine-grained look at the dimension of a problem instance is worth investigating for many other problems as well.We already investigated this for the Minimum Rectilinear Steiner Tree problem in R 2 , where the fastest known algorithm runs in 2 O( √ n log n) time [17].We showed that there exists an n O( √ δ) algorithm for sparse point sets and a 2 O(δ √ δ) n expected time algorithm for random point sets [1].

Figure 21
Three pairs of intervals, the shortest edges between points in those intervals (solid) and the longest edges between points in those intervals (dashed)

A
The automated prover Here, we will give an overview of the inner workings of the automated prover.See Algorithm 5 for pseudocode, which we will now explain.First, all candidate sets of edges F ′ that form a tour together with E are generated.Then, a set of cases is generated.Each case consists of the following: The x-coordinates of each of the points, stored in X .Every point must have a different integer x-coordinate, and must adhere to the given bounds on the x-coordinates.
For every point, an interval denoting the range in which its y-coordinate must lie, stored in Y.When the cases are first generated, this is simply [0, δ] for every point.For each possible combination X of x-coordinates of the points, one such case is generated.Note that every possible set of points in represented by one of these cases.Then, for every case, it does the following: To prove a case, it calculates an upper bound on the total lengths of every candidate F ′ , and a lower bound of the total length of F .For every edge, a lower bound can be found by simply taking the points as close together as possible, and an upper bound is found by doing the opposite.See Figure 21 for some examples.Suppose there exists a set F ′ such that the upper bound on its length is guaranteed to be lower than the lower bound on the length of F .Then ∥F ′ ∥ < ∥F ∥ must hold, and the case holds.To counter rounding errors, the calculated upper bound must be more than some fixed η := 10 −6 lower than the calculated lower bound for this to trigger.The prover has been implemented in Java using doubles, which have a precision of up to 15 to 16 decimal digits.
If it fails to prove the case, it splits the case into 2 n left +n right cases, by splitting the interval of every y-coordinate into two equal parts.For example, if a case has two points and intervals [0, 2] and [6,8], it is split into the four cases ([0, 1], [6,7]), ([0, 1], [7,8]), ([1, 2], [6,7]) and ([1, 2], [7,8]).Then, it recursively tries to prove all of these cases.If, however, the intervals become too small (smaller than the given precision parameter ε), the prover gives up on proving this case.This process continues until all cases have been either proven or given up on.Finally, the prover returns a list of all cases and whether it succeeded or failed on these cases.Note that the smaller the precision parameter ε is, the more precise the cases (and therefore the answer) will be.However, a smaller ε will also result in more cases, which increases both the running time and the number of lines of the output.

Input:
n left and n right denote the number of points with x-coordinate at most −1 and at least 0, respectively; F , E are edge sets such that E ∪ F forms a tour; X is an array where X[i] specifies the set from which the x-coordinate of the i-th point in the given scenario may be chosen; ε denotes the maximum 'size' of the returned cases.

Output:
A list of scenarios and an outcome for each scenario.
A scenario contains for each point q an x-coordinate x(q) from the set of allowed x-coordinates for q, and a range y-range(q) ⊆ [0, 2 √ 2] for its y-coordinate.This y-range is an interval of length at least ε/2.The outcome of a scenario is either Success or Fail.An outcome Success means that a set F ′ has been found with the desired properties: E ∪ F ′ is a tour, and for all possible instantiations of the scenario-that is, all choices of y-coordinates from the y-ranges in the scenario-we have ∥F ′ ∥ < ∥F ∥.An outcome Fail means that such an F ′ has not been found.It does not guarantee that such an F ′ does not exist for this scenario.
The list of scenarios is complete in the sense that for any instantiation of the input case there is a scenario that covers it.Generate case (X , Y), consisting of the exact x-coordinates of the points, and the bounds [0, δ] for the y-coordinate of each of the points if there exists an F ′ such that F ′ is guaranteed to be shorter than F then 3: Add (X , Y, Success) to result  Add (X , Y, Fail) to result r 1 r 2 q 1 q 2 x st + (i) x st + (i)+1 > 2kδ

B
Omitted proofs

B.1 Proof of Observation 32
See Figure 22 for an example.Note that x st + (i) is the x-coordinate of the rightmost point to the left of t + i , and that x st + (i)+1 is the x-coordinate of the leftmost point to the right of t + i .Therefore, x st + (i)+1 − x st + (i) > δ/(2k).
W.l.o.g., T contains the directed edge from r 1 to r 2 .Suppose for a contradiction that T is an optimal tour and not bitonic at t + i .Then T must cross t + i at least four times, which implies that there must be another directed edge q 1 q 2 with x(q 1 ) ⩽ x st + (i) and x st + (i)+1 ⩽ x(q 2 ).

Figure 1
Figure 1 Construction for δ > 2 √ 2 for Theorem 1.The grey vertical segments are at distance 1 from each other.If δ > 2 √2 then T1, the shortest bitonic tour (in blue), is longer than T2, the shortest non-bitonic tour (in red).

FFigure 4
Figure 4The six different cases that result after applying Step 1 of the proof.Points indicated by filled disks have a fixed x-coordinate.The left-to-right order of points drawn inside a grey rectangle, on the other hand, is not known yet.The vertical order of the edges is also not fixed, as the points can have any y-coordinate in the range [0, 2 √ 2].

▶ Corollary 4 .
where α is the angle between ⃗ v 1 and ⃗ v 2 .Since ⃗ v is a unit-length vector, this finalizes our argument.◀ This leads us to the following corollary.Let a, b, c be three points.Let ℓ be the vertical line through c, and suppose we move c downwards along ℓ.Let α be the smaller angle between ac and ℓ if y(c) < y(a), and the larger angle otherwise.Let β be the smaller angle between bc and ℓ if y(c) < y(b), and the larger angle otherwise.Suppose α < β throughout the move.Then the move increases |ac| more than it increases |bc|.

Figure 12
Figure 12 Only O(1) edges from Topt can cross ti and the hyperplane x = (j + 2)δ, because of the Packing Property.Tour edges crossing ti and ti+3 obey Lemma 15.The points in the red area form P ′ .The points in the blue area form P ′′ .

Algorithm 1 1 : 2 : 5 :
NarrowRectTSP-DP(P, δ)Input: A set P of points in (−∞, ∞) × Ball d−1 (δ/2) that is sparse Output: The length of the shortest tour through all points in P Compute the separators t 0 , . . ., t |T |+1 using Lemma 14, as explained above.Compute the sets B 0 , . . ., B |T |+1 as explained in the proof of Corollary 17. 3: A[0, ∅] := {(∅, 0)} 4: for i = 1 to |T | + 1 do for all B ∈ B i do 6: A[i, B] := ∅ 7: boundary B obeying the Packing Property and Lemma 15 can have.The set M B ′ contains the subset of M * (P 0 ∪• • •∪P i−1 , B) corresponding to path covers where the endpoint configuration at before executing Line 12, and by Lemma 18, it remains a representative set after executing this line.◀ Analysis of the running time.The loop of Lines 4-12 has |T | + 1 = O(n) iterations.Each set B i contains 2 O(k 1−1/d ) n sets.For each choice of B ∈ B i , we have 2 O(k 1−1/d ) options for B ′ , since B can have at most one point distant from t i by Lemma 15.The running time of TSP-repr is T (|P |, |B|) = 2 O(|P | 1−1/d +|B|) [9, Lemma 8].By Lemma 14 we have |B| = O(k 1−1/d ), so the running time of each call to TSP-repr in Algorithm 1 is 2 representative set returned by TSP-repr has 2 O(k 1−1/d ) weighted matchings, and the representative set of A[i−1, B ′ ] also has 2 O(k 1−1/d ) matchings.Checking compatibility, joining and insertion in Lines 10 and 11 takes poly(|M |, |M ′ |) = poly(k) time.Consequently, before executing the reduction in Line 12, the set

Figure 13
Figure 13 An example of Observation 21.Edges of T are shown in black, edges of T ′ are shown in red.

Figure 14
Figure14 An example of a wall, for d = 2.

Lines 7 - 12 .
The running time of TSP-repr is T (|P |, |B|) = 2 O(|P | 1−1/d +|B|) [9, Lemma 8].By Lemma 25 we have |B| = O(M 1−1/d 1 [i, B] :=    A representative set containing pairs (M, x), where M is a perfect matching on B ∈ B (1) i and x is a real number equal to the minimum total length of a path cover of P 0 ∪ • • • ∪ P i−1 ∪ B realizing the matching M and A (2) [i, B] :=    A representative set containing pairs (M, x), where M is a perfect matching on B ∈ B (2) i and x is a real number equal to the minimum total length of a path cover of P 0 ∪ • • • ∪ P i−1 ∪ B realizing the matching M .
Figure18 An example of the computation of one of the elements of a table entry of A(1) .The red circles (open and filled) form B. The open circles (black and red) form B ′ .The grey paths contain only points to the left of ti−1. t

1: result ← ∅ 2 :
Generate all F ′ for which E ∪ F ′ is a tour 3: for Every valid combination X of x-coordinates for the points do 4:

4 : else if the bounds in Y are larger than ε then 5 : 6 :
for every of the 2n left +n right subcases Y ′ of Y do TryToProveCase(X , Y ′ ) 7:

Figure 22
Figure 22 An example of Observation 32.Edges of T are shown in black, edges of T ′ are shown in red.
Next up is Corollary 17, which we adapt as follows:▶ Corollary 27.Let T opt be an optimal tour.Let t i ∈ T be a separator.Let V ⊂ P be the (unknown) endpoint configuration of T opt at t i .Then in 2 O(k 1−1/d ) n time we can enumerate a family B i of candidate endpoint sets such that V ∈ B i .Here, k denotes the number of points which either lie in τ i,−1 ∪ τ i,0 ∪ τ i,1 or are an element of P ′ , where P ′ is as defined inLemma 26.
contains at most O(1) points.We have already proven that if P is sparse, we can solve Euclidean TSP in 2 O(δ 1−1/d ) n 2 time; see Theorem 12.The goal of this section is to obtain the following improved result: ▶ Theorem 31.Let P be a set of n points in a δ-cylinder.If P is sparse then we can solve Euclidean TSP in 2