minimizing the continuous diameter when … the continuous diameter when augmenting paths and cycles...

24
Minimizing the Continuous Diameter when Augmenting Paths and Cycles with Shortcuts * Jean-Lou De Carufel 1 , Carsten Grimm 2,3 , Anil Maheshwari 2 , and Michiel Smid 2 1 School of Electrical Engineering and Computer Science, University of Ottawa 800 King Edward Avenue, Ottawa, Ontario, K1N 6N5, Canada 2 School of Computer Science, Carleton University 1125 Colonel By Drive, Ottawa, Ontario, K1S 5B6, Canada 3 Institut für Simulation und Graphik, Otto-von-Guericke-Universität Magdeburg Universitätsplatz 2, D-39106 Magdeburg, Germany [email protected] Abstract We seek to augment a geometric network in the Euclidean plane with shortcuts to minimize its continuous diameter, i.e., the largest network distance between any two points on the augmented network. Unlike in the discrete setting where a shortcut connects two vertices and the diameter is measured between vertices, we take all points along the edges of the network into account when placing a shortcut and when measuring distances in the augmented network. We study this network augmentation problem for paths and cycles. For paths, we determine an optimal shortcut in linear time. For cycles, we show that a single shortcut never decreases the continuous diameter and that two shortcuts always suffice to reduce the continuous diameter. Furthermore, we characterize optimal pairs of shortcuts for convex and non-convex cycles. Finally, we develop a linear time algorithm that produces an optimal pair of shortcuts for convex cycles. Apart from the algorithms, our results extend to rectifiable curves. Our work reveals some of the underlying challenges that must be overcome when address- ing the discrete version of this network augmentation problem, where we minimize the discrete diameter of a network with shortcuts that connect only vertices. 1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems, G.2.2 Graph Theory, I.3.5 Computational Geometry and Object Modeling Keywords and phrases Network Augmentation, Shortcuts, Diameter, Paths, Cycles. 1 Introduction The minimum-diameter network augmentation problem is concerned with minimizing the largest distance between two vertices of an edge-weighted graph by introducing new edges as shortcuts. We study the this problem in a continuous and geometric setting where the network is a geometric graph embedded into the Euclidean plane, the weight of a shortcut is the Euclidean distance of its endpoints, and shortcuts can be introduced between any two points along the network that may be vertices or points along edges. As a sample application, consider a network of highways where we measure the distance between two locations in terms of the travel time. An urban engineer might want to improve the worst-case travel time along a highway or along a ring road by introducing shortcuts. Our work advises where these shortcuts should be build. For example, we show where to * This work was partially supported by NSERC. © Jean-Lou De Carufel, Carsten Grimm, Anil Maheshwari, and Michiel Smid; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany arXiv:1512.02257v1 [cs.CG] 7 Dec 2015

Upload: doantuyen

Post on 29-May-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Minimizing the Continuous Diameter whenAugmenting Paths and Cycles with Shortcuts∗

Jean-Lou De Carufel1, Carsten Grimm2,3, Anil Maheshwari2, andMichiel Smid2

1 School of Electrical Engineering and Computer Science, University of Ottawa800 King Edward Avenue, Ottawa, Ontario, K1N 6N5, Canada

2 School of Computer Science, Carleton University1125 Colonel By Drive, Ottawa, Ontario, K1S 5B6, Canada

3 Institut für Simulation und Graphik, Otto-von-Guericke-Universität MagdeburgUniversitätsplatz 2, D-39106 Magdeburg, [email protected]

AbstractWe seek to augment a geometric network in the Euclidean plane with shortcuts to minimize itscontinuous diameter, i.e., the largest network distance between any two points on the augmentednetwork. Unlike in the discrete setting where a shortcut connects two vertices and the diameteris measured between vertices, we take all points along the edges of the network into account whenplacing a shortcut and when measuring distances in the augmented network.

We study this network augmentation problem for paths and cycles. For paths, we determinean optimal shortcut in linear time. For cycles, we show that a single shortcut never decreasesthe continuous diameter and that two shortcuts always suffice to reduce the continuous diameter.Furthermore, we characterize optimal pairs of shortcuts for convex and non-convex cycles. Finally,we develop a linear time algorithm that produces an optimal pair of shortcuts for convex cycles.Apart from the algorithms, our results extend to rectifiable curves.

Our work reveals some of the underlying challenges that must be overcome when address-ing the discrete version of this network augmentation problem, where we minimize the discretediameter of a network with shortcuts that connect only vertices.

1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems, G.2.2 GraphTheory, I.3.5 Computational Geometry and Object Modeling

Keywords and phrases Network Augmentation, Shortcuts, Diameter, Paths, Cycles.

1 Introduction

The minimum-diameter network augmentation problem is concerned with minimizing thelargest distance between two vertices of an edge-weighted graph by introducing new edgesas shortcuts. We study the this problem in a continuous and geometric setting where thenetwork is a geometric graph embedded into the Euclidean plane, the weight of a shortcut isthe Euclidean distance of its endpoints, and shortcuts can be introduced between any twopoints along the network that may be vertices or points along edges.

As a sample application, consider a network of highways where we measure the distancebetween two locations in terms of the travel time. An urban engineer might want to improvethe worst-case travel time along a highway or along a ring road by introducing shortcuts.Our work advises where these shortcuts should be build. For example, we show where to

∗ This work was partially supported by NSERC.

© Jean-Lou De Carufel, Carsten Grimm, Anil Maheshwari, and Michiel Smid;licensed under Creative Commons License CC-BY

Leibniz International Proceedings in InformaticsSchloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany

arX

iv:1

512.

0225

7v1

[cs

.CG

] 7

Dec

201

5

2 Minimizing Continuous Diameter with Shortcuts

find the best shortcut for a highway and we show that a single shortcut never improves theworst-case travel time of a ring road. Our continuous perspective on network augmentationreflects that a shortcut road could connect any two locations along a highway.

1.1 PreliminariesA network is an undirected graph that is embedded into the Euclidean plane and whoseedges are weighted with their Euclidean length. We say a point p lies on a network G andwrite p ∈ G when there is an edge e of G such that p is a point along the embedding of e. Apoint p on an edge e of length l subdivides e into two sub-edges lengths (1− λ) · l and λ · lfor some value λ ∈ [0, 1]. By specifying the points on G in terms of their relative position(expressed by λ) along their containing edge, we avoid any ambiguity in case of crossings.

The network distance between two points p and q on a network G is the length of aweighted shortest path from p to q in G. We denote the network distance between p and qby dG(p, q) and we omit the subscript when the network is understood. The largest networkdistance between any two points on G is the continuous diameter of G, denoted by diam(G),i.e., diam(G) = maxp,q∈G dG(p, q). The term continuous distinguishes this notion from thediscrete diameter that measures the largest network distance between any two vertices.

We denote the Euclidean distance between p and q by |pq|. A line segment pq, withp, q ∈ G is a shortcut for G when |pq| < dG(p, q). We augment a network G with a shortcutpq as follows. We introduce new vertices at p and at q in G, subdividing their containingedges, and we add a edge from p to q of length |pq|. The resulting network is denoted byG+ pq. We seek to minimize the continuous diameter of a network by introducing shortcuts.

1.2 Related WorkIn the discrete abstract setting, we consider an abstract graph G with unit weights andask whether we can decrease the discrete diameter of G to at most D by adding at most kedges. For any fixed D ≥ 2, this problem is NP-hard [1, 6, 8], has parametric complexityW[2]-hard [3, 4], and remains NP-hard even if G is a tree [1]. For an overview of theapproximation algorithms in terms of both D and k refer, for instance, to Frati et al. [3].

In the discrete geometric setting, we consider a geometric graph, where a shortcut connectstwo vertices. Große et al. [5] are the first to consider diameter minimization in this setting.They determine a shortcut that minimizes the discrete diameter of a path with n vertices inO(n log3 n) time. The spanning ratio of a geometric network, i.e., the largest ratio betweenthe network distance and the Euclidean distance of any two points, has been considered astarget function for edge augmentation, as well. For instance, Farshi et al. [2] compute ashortcut that minimizes the spanning ratio in O(n4) time while Luo and Wulff-Nilsen [7]compute a shortcut that maximizes the spanning ratio in O(n3) time.

1.3 Structure and ResultsOur results concern networks that are paths, cycles, and convex cycles. Figures 1 and 2illustrate examples of optimal shortcuts for paths and cycles. In Section 2, we develop analgorithm that produces an optimal shortcut for a path with n vertices in O(n) time. InSection 3, we show that for cycles a single shortcut never suffices to reduce the diameter andthat two shortcuts always suffice. We characterize pairs of optimal shortcuts for convex andnon-convex cycles. Based on this characterization, we develop an algorithm in Section 4 thatdetermines an optimal pair of shortcuts for a convex cycle with n vertices in O(n) time.

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 3

(a) (b) (c)

Figure 1 Examples for paths with an optimal shortcut.

(a) (b) (c) (d)

Figure 2 Examples for cycles with optimal pairs of shortcuts.

2 Shortcuts for Paths

Consider a polygonal path P in the plane. We seek a shortcut pq for a path P that minimizesthe continuous diameter of the augmented path P + pq, i.e.,

diam(P + pq) = mina,b∈P

diam(P + ab) = mina,b∈P

maxu,v∈P+ab

dP+ab(u, v) .

The following notation is illustrated in Figure 3. Let s and e be the endpoints of P andlet p be closer to s than q along P , i.e., d(s, p) < d(s, q). For a, b ∈ P , let P [a, b] denote thesub-path from a to b along P , and let C(p, q) be the simple cycle in P + pq.

p

qC(p, q)

x

y

z

z

|pq||pq|

p

q

s

e

Figure 3 Augmenting a path P with a shortcut pq. The shortcut creates a cycle C(p, q) with thesub-path from p to q along P . The farthest point from p on this cycle is p and q is farthest from q

on C(p, q). The distance d(q, p) between q and p along P matches the Euclidean distance between pand q, because of the following. When we move a point g from p to q along the shortcut pq, then thefarthest point g form g along C(p, q) moves from p to q traveling the same distance as g, i.e., |pq|.

I Lemma 2.1. Let pq be a shortcut for P . Every continuous diametral path in P + pq

contains an endpoint of P , except when the shortcut connects the endpoints of P .

4 Minimizing Continuous Diameter with Shortcuts

Proof. Let P be a polygonal path with endpoints s and e, and let pq be a shortcut for P .

p

q

π

π′

s

e

Figure 4 We can shift any path π with endpoints on C(p, q) until one of them coincides with q.The shifted path π′ can be extended by the sub-path P [e, q], i.e., π is not continuous diametral.

Let π be a path along P + pq. When an endpoint of π lies on P [s, p] or on P [e, q], wecan create a longer path by extending π to s or to e. Suppose both endpoints of π lie onthe simple cycle C(p, q). As illustrated in Figure 4, we can move the endpoints of π at thesame speed counter-clockwise along C(p, q) until one them coincides with p or with q. Theresulting path π′ has the same length as π and can be extended by P [s, p] or P [e, q] creatinga longer path than π, unless s = p and e = q. Therefore, for every shortcut pq other than se,every continuous diametral path in P + pq must contain and endpoint of P . J

q

p

p

q

U(p, q)

s

e

(a) The path U(p, q) from s to e.

p

p

q

q

S(p, q)

s

e

(b) The path S(p, q) from s to the cycle .

Figure 5 Two candidate diametral paths in P + pq, namely the shortest path connecting s ande in (a) and a path from s via p to the farthest point from p on the cycle C(p, q) in (b). For thelatter, there is a second path S′(p, q) of the same length traversing C(p, q) in the other direction.

According to Lemma 2.1, we have the following three candidates for continuous diametralpaths in the augmented network P + pq, two of which are illustrated in Figure 5.1. The path U(p, q) from s to e via the shortcut pq,2. the path S(p, q) from s to the farthest point from s on C(p, q), and3. the path E(p, q) from e to the farthest point from e on C(p, q).

Let p be the farthest point from p on C(p, q), and let q be the farthest point from q

on C(p, q). Furthermore, let δ(p, q) := d(p,q)−|pq|2 denote the slack between p and q (and

symmetrically between p and q) along C(p, q). With this notation, we have

d(p, p) = d(q, q) = |C(p, q)|2 = d(p, q) + |pq|

2 = d(p, q)− |pq|2 + |pq| = δ(p, q) + |pq| ,

and we can express the lengths of U(p, q), S(p, q), and E(p, q) as follows.

|U(p, q)| = d(s, p) + |pq|+ d(q, e)|S(p, q)| = d(s, p) + d(p, p) = d(s, p) + |pq|+ δ(p, q)

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 5

|E(p, q)| = d(e, q) + d(q, q) = d(e, q) + |pq|+ δ(p, q)

The following lemma characterizes which of the paths U(p, q), S(p, q), and E(p, q) de-termine the diameter of P + pq. Notice that these cases overlap, for instance, E(p, q) andS(p, q) are both continuous diametral when d(s, p) = d(e, q) ≤ δ(p, q).

I Lemma 2.2. Let pq be a shortcut for a path P . Let x = d(s, p), y = d(e, q), and z = δ(p, q).The path U(p, q) is continuous diametral if and only if z = min(x, y, z).The path S(p, q) is continuous diametral if and only if y = min(x, y, z).The path E(p, q) is continuous diametral if and only if x = min(x, y, z).

Proof. The claim follows, since the following relations are preserved for ∼∈ {<,=, >}.

|U | ∼ |S| ⇐⇒ d(s, p) + |pq|+ d(q, e) ∼ d(s, p) + |pq|+ δ(p, q) ⇐⇒ d(e, q) ∼ δ(p, q)|U | ∼ |E| ⇐⇒ d(s, p) + |pq|+ d(q, e) ∼ d(e, q) + |pq|+ δ(p, q) ⇐⇒ d(s, p) ∼ δ(p, q)|S| ∼ |E| ⇐⇒ d(s, p) + |pq|+ δ(p, q) ∼ d(e, q) + |pq|+ δ(p, q) ⇐⇒ d(s, p) ∼ d(e, q)

For instance, we have |U(p, q)| ≥ |S(p, q)| and |U(p, q)| ≥ |E(p, q)| if and only if d(e, q) ≥δ(p, q) and d(s, p) ≥ δ(p, q), i.e., z = δ(p, q) = min(d(s, p), d(e, q), δ(p, q)) = min(x, y, z). J

I Lemma 2.3. For every path P , there is an optimal shortcut pq such that S(p, q) andE(p, q) are continuous diametral paths in P + pq, i.e., diam(P + pq) = |S(p, q)| = |E(p, q)|.

Proof. Suppose we have a shortcut pq for a path P such that U(p, q) is continuous diametralin P + pq. In the notation of Lemma 2.2, this means z ≤ x and z ≤ y.

By the triangle inequality, the length of U(p, q)—and, thus, the continuous diameter—decreases or remains the same as we move p closer to s (decreasing x) or q closer to e(decreasing y). Moreover, decreasing x or y increases z. Therefore, we can move the shortcutcloser to s and to e until we have x = z or y = z, i.e., min(x, y, z) = min(x, y) whilemaintaining or decreasing the continuous diameter. According to Lemma 2.2, S(p′, q′) orE(p′, q′) are continuous diametral in P + p′q′ for the resulting shortcut p′q′. Consequently,there is an optimal shortcut p∗q∗ where S(p∗, q∗) or E(p∗, q∗) are continuous diametral.

x

x q′ q

p

y

s

e

Figure 6 Moving a shortcut to balance the distances to the endpoints of the path.

Now suppose E(p, q) is a continuous diametral path and S(p, q) is not, i.e., d(s, p) < d(e, q),according to Lemma 2.2. Let q′ ∈ P be the point with d(s, p) = d(e, q′), as illustrated inFigure 6. By the triangle inequality, we have |pq|+ d(q, q′) ≥ |pq′| and, thus,

|E(p, q)| = d(e, q) + |pq|+ d(p, q)2 = d(e, q′) + d(q, q′) + |pq|+ d(p, q)

2

6 Minimizing Continuous Diameter with Shortcuts

= d(e, q′) + |pq|+ d(q, q′) + d(p, q) + d(q, q′)2

≥ d(e, q′) + |pq′|+ d(p, q′)

2 = |E(p, q′)| .

We have |E(p, q′)| = |S(p, q′)| by construction and we have |E(p, q′)| ≥ |U(p, q′)| becauseof the following. Since E(p, q) was continuous diametral, we have |E(p, q)| ≥ |U(p, q)| andd(s, p) ≤ δ(p, q) by Lemma 2.2. This implies δ(p, q′) ≥ d(s, p), because

δ(p, q) = d(p, q)− |pq|2 = d(p, q) + d(q, q′)− |pq| − d(q, q′)

2

= d(p, q′)− |pq| − d(q, q′)2

≤ d(p, q′)− |pq′|2 = δ(p, q′) .

Using δ(p, q′) ≥ d(s, p) and d(s, p) = d(e, q′), we obtain |E(p, q′)| ≥ |U(p, q′)|, as

|E(p, q′)| = d(e, q′) + δ(p, q′) + |pq′| ≥ d(s, p) + d(e, q′) + |pq′| = |U(p, q′)| .

In summary, we have diam(P + pq) = |E(p, q)| ≥ |E(p, q′)| = |S(p, q′)| = diam(P + pq′), i.e.,there is an optimal shortcut p∗q∗ where S(p∗, q∗) and E(p∗, q∗) are continuous diametral. J

According to Lemmas 2.2 and 2.3, we can restrict our search for an optimal shortcutto those shortcuts satisfying d(s, p) = d(e, q) ≤ δ(p, q). For x ∈ [0, |P |/2], let p(x) and q(x)be the points on P such that x = d(s, p(x)) and x = d(e, q(x)), and let D(x) = |p(x)q(x)|.Notice that d(p(x), q(x)) = |P | − 2x. Using this notation, we phrase our problem as

minimize x+ d(p(x), q(x)) + |p(x)q(x)|2 = x+ |P | − 2x+ |p(x)q(x)|

2 = |P |+D(x)2

such that x ≤ δ(p(x), q(x)) = d(p(x), q(x))− |p(x)q(x)|2 = |P | − 2x−D(x)

2 ,

which simplifies to minimizing D(x) such that 4x+D(x) ≤ |P |.

I Lemma 2.4. The function B(x) = 4x+D(x) is strictly increasing on [0, |P |/2].

p(x)

p(x′)

q(x′)

q(x)x′ − x

x′ − x

Figure 7 Moving each endpoint of the shortcut by a geodesic distance of x′ − x along the pathdecreases their Euclidean distance by at most 2(x′ − x), attained when moving towards each other.

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 7

Proof. Let x, x′ ∈ [0, |P |/2] with x < x′. As illustrated in Figure 7, the length of the shortcutdecreases by at most 2(x′ − x) from p(x)q(x) to p(x′)q(x′), because each endpoint moves adistance of x′ − x. Thus, we have D(x′)−D(x) ≥ −2(x′ − x) and the claim follows, since

B(x′)−B(x) = 4x′ +D(x′)− 4x−D(x)= 4(x′ − x) +D(x′)−D(x)≥ 4(x′ − x)− 2(x′ − x)= 2(x′ − x) > 0 . J

Summarizing the above, the following theorem describes an optimal shortcut.

I Theorem 2.5. Let P be a path and let b be the unique value in [0, |P |/2] with B(b) = |P |.Suppose D has a global minimum in the interval [0, b] at x∗, i.e., D(x∗) = minx∈[0,b] D(x).Then the shortcut p(x∗)q(x∗) achieves the minimum continuous diameter for P .

Proof. As argued above, an optimal shortcut is attained at the minimum of D(x) amongthose x ∈ [0, |P |/2] satisfying 4x + D(x) ≤ |P |. The claim follows, because these valuesof x form an interval [0, b], where b is the unique value in [0, |P |/2] with B(b) = |P |, sinceB(0) = 4 · 0 + |p(0)q(0)| = |se| ≤ |P | and since B is strictly increasing due to Lemma 2.4. J

p(x∗)s

q(x∗)e

p(b)

q(b)

(a) A path P with its optimal shortcut p(x∗)q(x∗).

0 x∗ |P |2

b

(b) A plot of D(x) = |p(x)q(x)|.

Figure 8 The optimal shortcut for the path in (a) with the function D(x) plotted in (b).

I Lemma 2.6. Let P be a path with n vertices. Then D2(x) is a continuous function whosegraph consists of at most n parabolic arcs or line segments.

Proof. Let x1, x2 ∈ [0, |P |/2] be such that v1 = p(x1) and v2 = p(x2) lie on the same edgeof P and u1 = q(x1) and u2 = q(x2) lie on the same edge of P . With λ(x) = x−x1

x2−x1, we have

p(x) = (1− λ(x)) · v1 + λ(x) · v2 and q(x) = (1− λ(x)) · u1 + λ(x) · u2

for all x ∈ [x1, x2]. Let 〈u, v〉 denote the scalar product of two vectors u and v. ExpandingD2(x) = ‖p(x)− q(x)‖2 with the above representations of p(x) and q(x) yields

D2(x) = ‖(1− λ(x)) · (v1 − u1) + λ(x) · (v2 − u2)‖2

= (1− λ(x))2 · |v1u1|2 + 2(1− λ(x))λ(x) · 〈v1 − u1, v2 − u2〉+ λ(x)2 · |v2u2|2 .

This means that D2(x) is a convex parabola with its apex at

a = (x2 − x1) · 〈v1 − u1, v1 − v2 + u2 − u1〉‖v1 − v2 + u2 − u1‖2 + x1

8 Minimizing Continuous Diameter with Shortcuts

when v2 − v1 6= u2 − u1 and D2(x) has constant value |v1u1|2 when v2 − v1 = u2 − u1. Thelatter case applies when p(x) and q(x) travel in the same direction maintaining their distance.

When v2 − v1 6= u2 − u1 and x1 ≤ a ≤ x2, the minimum of D2(x) on [x1, x2] is

D2(a) = |v1u1|2|v2u2|2 − 〈v1 − u1, v2 − u2〉2

‖v1 − v2 + u2 − u1‖2 ,

and the minimum of D2(x) on [x1, x2] is min(|u1v1|2, |u2v2|2), otherwise.We subdivide [0, |P |/2] at those values of x where p(x) or q(x) coincides with a vertex.

This yields at most n intervals on each of which D2 is a parabolic arc or a horizontal segment(i.e., a degenerate parabolic arc), since p(x) and q(x) only switch edges at a vertex. J

I Corollary 2.7. Given a path P with n vertices, we can compute a shortcut for P achievingthe minimal continuous diameter in O(n) time.

Proof. Let xπ(1) ≤ xπ(2) ≤ · · · ≤ xπ(n) be the values in [0, |P |/2] where p(xπ(i)) or q(xπ(i))coincides with the i-th vertex of P for each i = 1, 2, . . . , n.

We compute the minimum of the parabolic arc of D2 on each interval [xπ(i), xπ(i+1)]for i = 1, 2, . . . , n until we arrive at k with B(xπ(k)) < |P | and B(xπ(k+1)) ≥ |P |. We thencompute b by solving the quadratic equation D2(b) = (|P | − 4b)2 and, finally, computethe minimum of D2(x) on [xπ(k), b]. The lowest minima of the encountered parabolic arcsis the global minimum of D on [0, b], which reveals the position of an optimal shortcutaccording to Theorem 2.5. Altogether, the running time is Θ(k + 1) = O(n), since we obtainxπ(1), xπ(2), . . . , xπ(k+1) by merging the vertices by their distances from s or from e. J

I Remark. Our result on the location of an optimal shortcut from Theorem 2.5 also holdsfor rectifiable curves in the plane. However, obtaining an optimal shortcut for such curvesdepends on our ability to calculate b and a global minima of D(x) in the interval [0, b].

3 Shortcuts for Cycles

Consider a polygonal cycle C in the plane; C may have crossings but cannot lie on a line. Forany two points p and q along C that may be vertices or points along edges of C, let dccw(p, q)and dcw(p, q) be their counter-clockwise and clockwise distance along C, respectively. Letd(p, q) = min(dccw(p, q), dcw(p, q)) denote the geodesic distance between p and q along C.We call the line segment pq a shortcut for C when |pq| < d(p, q). We seek to minimize thecontinuous diameter by augmenting C with shortcuts.

I Lemma 3.1. Adding a single shortcut pq to a polygonal cycle C never decreases thecontinuous diameter, i.e., diam(C) ≤ diam(C + pq) for all p, q ∈ C.

Proof. Consider any shortcut pq to a cycle C. Let Cccw be the cycle consisting of pq andthe counter-clockwise path from p to q along C, as illustrated in Figure 9. Let pccw andqccw be the farthest points from p and from q on Cccw, respectively. Since pccw and qccw areantipodal from p and q in Cccw, we have d(qccw, pccw) = |pq| and d(pccw, q) = d(p, qccw).

Consider a point g along the clockwise path from pccw to qccw and let g ∈ C be thefarthest-point form g with respect to C. We claim that dC(g, g) = dC+pq(g, g).

Assume that there is a shortest path from g to g in C + pq that contains pq and is shorterthan the path from g to g along C. Suppose this path reaches q before p. Since p lies on atleast one shortest path from g to g and since pccw lies on the path from g to q, we have

dC+pq(g, g) = dC(g, q) + |pq|+ dC(p, g) = dC(g, pccw) + dC(pccw, q) + |pq|+ dC(p, g) ,

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 9

pcw

qcw

Ccw

Cccw

pccw

qccw

q

p

g

g

Figure 9 The unaffected regions (solid red) for a shortcut pq (dashed red) to a cycle. The pointxy denotes the farthest points from x along the cycle Cy for x ∈ {p, q} and y ∈ {cw, ccw}. Any pointg along the clockwise path from pccw to qccw has their farthest point g on the clockwise path fromqcw to pcw and vice versa. The distance between g and g is unaffected by the addition of pq to C.

and we can express the distance between g and g along C as

dC(g, g) = dC(g, p) + dC(p, g) = dC(g, qccw) + dC(qccw, p) + dC(p, g) .

Together with dC(pccw, q) = dC(p, qccw) and dC(qccw, g) + dC(g, pccw) = |pq|, our assumptiondC(g, g) < dC+pq(g, g) implies the following.

dC(g, pccw) + dC(pccw, q) + |pq|+ dC(p, g)< dC(g, qccw) + dC(qccw, p) + dC(p, g) = |pq| − dC(g, pccw) + dC(pccw, q) + dC(p, g)

This implies the contradiction dC(g, pccw) < 0. Hence, no shortest path from g to g in C+ pq

contains pq and, thus, diam(C) = dC(g, g) = dC+pq(g, g) ≤ diam(C + pq). J

According to Lemma 3.1, some points preserve their farthest distance in C when adding asingle shortcut pq to C. The points that are unaffected by pq in this sense form the unaffectedregion of pq that consists of the counter-clockwise path from qccw to pccw and the clockwisepath from qcw to pcw, as illustrated in Figure 9. Conversely, every point on C outside of theunaffected region uses pq as a shortcut to their farthest point in C + pq.

Consequently, we have to add at least two shortcuts pq and rs in order to decrease thecontinuous diameter of the augmented cycle C + pq + rs. We call a pair of shortcuts pqand rs useful when diam(C) > diam(C + rs+ pq), and we call pq and rs useless, otherwise.A pair of shortcuts pq and rs is useful if and only if their unaffected regions are disjoint.

We call a polygonal cycle C degenerate when it consists of two congruent line segmentsof length |C|/2. No number of shortcuts can decrease the diameter of a degenerate cycle,since the endpoints of its line segment will always remain at distance diam(C) = |C|/2.

I Theorem 3.2. For every non-degenerate cycle C, there exists a pair of shortcuts pq andrs that decrease the continuous diameter, i.e., diam(C) > diam(C + pq + rs).

Proof. Let C be a cycle. Suppose there exist three points p, q, and s on C with d(p, q) =d(q, s) = |C|/4 such that pq and qs are shortcuts, i.e., |pq| < d(p, q) and |qs| < d(q, s).

We argue that pq and qs are useful. Let q denote the farthest point from q on C. Asillustrated in Figure 10, the unaffected region of pq is confined to the interior of the clockwisepaths from q to p and from q to s, and the unaffected region of qs is confined to the interior

10 Minimizing Continuous Diameter with Shortcuts

q

q

s p

Figure 10 The unaffected regions of two touching shortcuts pq and qs.

of the clockwise paths from s to q and from p to q. Therefore, the unaffected regions of pqand qs are disjoint, i.e., pq and qs are useful shortcuts, i.e., diam(C) > diam(C + pq + qs).

Suppose, on the other hand, that for every three points p, q, and s on C with d(p, q) =d(q, s) = |C|/4 at least one of pq and qs is not a shortcut, i.e., |pq| = d(p, q) or |qs| = d(q, s).We argue that C is degenerate by showing that C contains a line segment of length |C|/2.

s

qp

s′

q′

p′

(a) Rotating from p, q, s to p′, q′, s′.

s

q′

p′s′′

q′′

p′′s′

(b) Rotating from p′, q′, s′ to p′′, q′′, s′′

Figure 11 Illustration of the discussion regarding the shape of a cycle where one of the linesegments sq or qp is not a shortcut for every tripel of points with d(s, q) = d(q, p) = |C|/4.

Assume, without loss of generality, that qs is not a shortcut, i.e., C contains the line segmentqs. We move p, q, and s clockwise along C while maintaining d(p, q) = d(q, s) = |C|/4 untilwe arrive at the first positions p′, q′ and s′ where q′s′ ceases to be a shortcut, i.e., C containsthe line segment sq′ and the line segment q′p′, as illustrated in Figure 11a. The points p′, q′and s′ exist, since 0 ≤ |sq′| ≤ |C|/2, because the cycle C cannot contain a line segment thatis longer than |C|/2. If |sq′| = |C|/2, C is degenerate. Suppose |sq′| < |C|/2.

We move the three points again by a distance of |C|/4− ε for some ε with 0 < ε < |C|/4.Let p′′, q′′, and s′′ be the resulting points. As illustrated in Figure 11b, s′′ lies on s′q′ atdistance ε from q′, and q′′ lies on q′p′ at distance ε from p′. Since d(s′′, q′′) = d(q′′, p′′) = |C|/4,one of s′′q′′ or q′′p′′ is not a shortcut. However, s′′q′′ must be a shortcut, since otherwiseq′ would be contained in the line segment s′′q′′ contradicting the choice of q′ as the firstpoint where q′p′ is not a shortcut. Therefore, q′′p′′ is not a shortcut and C contains the linesegment q′p′′ whose length is |q′p′′| = |q′p′|+ |p′p′′| = |C|/2− ε. Since the above holds forarbitrary small values of ε, the cycle C contains a line segment of length |C|/2. J

3.1 Alternating vs. ConsecutiveWhen placing two shortcuts pq and rs on a cycle C, we distinguish whether their endpointsappear in alternating order or in consecutive order along the cycle, as illustrated in Figure 12.We show that there is always an optimal pair of shortcuts in the alternating configuration.

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 11

r

s

q

p

(a) Alternating Configuration

s

q

p

r

(b) Consecutive Configuration

Figure 12 The two cases for adding two shortcuts pq and rs to a cycle C. The endpoints of theshortcuts appear in alternating cyclic order p, r, q, and s, as shown in (a), or in consecutive cyclicorder p, q, r, and s, as shown in (b). The two cases overlap when q coincides with r.

To establish our claim we study the cycles created by the insertion of the shortcuts.We call a cycle in C+pq+rs diametral when it contains a diametral pair. Each configurationhas five candidates for diametral cycles: two that use both shortcuts, two that use one ofthe shortcuts, and one (C) that does not use any shortcut. Figures 13 and 14 illustrate thecandidates for diametral cycles in each configuration, except for the cycle C itself. To helpdistinguish the cycles using one shortcut, we color pq red and rs blue and we refer to thelonger cycle in C + pq + rs using the red shortcut pq as the red split and we refer to thelonger cycle using the blue shortcut rs as the blue split. If C happens to be diametral inC + pq + rs, then our pair of shortcuts is useless.

r

s

q

p

(a) The bowtie (./).

r

s

q

p

(b) The hourglass ( ./ ).

q

p

(c) The red split (�).

r

s

(d) The blue split (�).

Figure 13 The candidate diametral cycles, except C, for shortcuts in the alternating configuration.

s

q

p

r

(a) The handset.

s

q

p

r

(b) The base station.

q

p

(c) The red split.

s

r

(d) The blue split.

Figure 14 The candidate diametral cycles, except C, for shortcuts in the consecutive configuration,depicted for d(q, r) ≤ d(s, p). Even though the handset (a) is no simple cycle, it might still contain adiametral pair. Observe that the base station (b) is only listed for the sake of completeness: by thetriangle inequality, this cycle is never longer than the split cycles and, therefore, never diametral.

For the following, let the points xy with x ∈ {p, q, r, s} and y ∈ {cw, ccw} be defined asin Figure 9, e.g., let rcw be the farthest point from r on the cycle Ccw(r, s) that consists ofrs and the clockwise path from r to s along C, and let qccw be the farthest point from q on

12 Minimizing Continuous Diameter with Shortcuts

the cycle Cccw(p, q) that consists of pq and the counter-clockwise path from p to q.

I Lemma 3.3. Two shortcuts pq and rs in alternating configuration are useful if and onlyif |pq|+ |rs| < dccw(r, q) + dccw(s, p) and |pq|+ |rs| < dccw(p, r) + dccw(q, s).

Proof. Suppose pq and rs are useless, i.e., the unaffected regions of pq and rs overlap. Inthe alternating configuration, this overlap occurs along the bowtie or along the hourglass.Since these cases are symmetric, we consider only the former in the following.

r

s

rccw

q

p

pcw

qcwrcw

scw

qccw

pccwsccw

Figure 15 A pair of useless shortcuts whose unaffected regions have an overlap (purple) alongthe bowtie, i.e., the points s, rccw, pcw, and q appear clockwise in this order along the cycle.

An overlap on the bowtie manifests along the clockwise path from rccw to pcw with amirrored overlap along the clockwise path from scw to qccw, as illustrated in Figure 15. Thismeans the sum of the lengths of the counter-clockwise paths from r to rccw and from pcw to p isat least the length of the counter-clockwise path from r to p, i.e., dccw(pcw, p)+dccw(r, rccw) ≥dccw(r, p). This is equivalent to |pq|+ |rs| ≥ dccw(r, q) + dccw(s, p), since

dccw(q, p) + |pq|+ dccw(r, s) + |rs| = 2dccw(pcw, p) + 2dccw(r, rccw) ≥ 2dccw(r, p)⇐⇒ |pq|+ |rs| ≥ dccw(r, p)− dccw(q, p)︸ ︷︷ ︸

=dccw(r,q)

+ dccw(r, p)− dccw(r, s)︸ ︷︷ ︸=dccw(s,p)

.

Analogously, we derive that |pq|+ |rs| ≥ dccw(p, r) + dccw(q, s) holds if and only if there isan overlap along the hourglass. Consequently, the shortcuts pq and rs are useful if and onlyif |pq|+ |rs| < dccw(r, q) + dccw(s, p) and |pq|+ |rs| < dccw(p, r) + dccw(q, s). J

I Lemma 3.4. Consider two consecutive shortcuts pq and rs with dccw(q, r) ≤ dccw(s, p).Then pq and rs are useful if and only if |pq|+ |rs| < dccw(s, p)− dccw(q, r).

Proof. Suppose pq and rs are useless, i.e., the unaffected regions of pq and rs overlap. Inthe consecutive configuration with dccw(q, r) ≤ dccw(s, p), this overlap occurs on the handsetand manifests along the clockwise path from rccw to pcw with a mirrored overlap alongthe clockwise path from scw to qccw. An overlap along a clockwise path from pccw to sccwis impossible, since otherwise pccw would lie on Ccw(p, q) or sccw would lie on Ccw(r, s),contradicting their definitions. We argue below that an overlap along a clockwise path fromqcw to rcw is impossible, as well, after discussing an overlap along the handset.

Suppose we have an overlap on the handset as illustrated in Figure 16. This occurs whenthe sum of the lengths of the counter-clockwise paths from r to rccw and from pcw to p is atleast the length of the counter-clockwise path from r to p, i.e., dccw(pcw, p) + dccw(r, rccw) ≥dccw(r, p). This is equivalent to |pq|+ |rs| ≥ dccw(s, p)− dccw(q, r), since

dccw(q, p) + |pq|+ dccw(r, s) + |rs| = 2dccw(pcw, p) + 2dccw(r, rccw) ≥ 2dccw(r, p)

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 13

s

q

p

pcw

qcw

qccw

pccw

scw

rccw

sccwr

Figure 16 A pair of useless shortcuts whose unaffected regions overlap on the handset.

⇐⇒ |pq|+ |rs| ≥ dccw(r, p)− dccw(r, s)︸ ︷︷ ︸=dccw(s,p)

+ dccw(r, p)− dccw(q, p)︸ ︷︷ ︸=−dccw(q,r)

.

s

q

prcw qcw

r

Figure 17 An impossible overlap for shortcuts in the consecutive configuration.

Suppose we have an overlap on the base station along a clockwise path from qcw to rcw, asillustrated in Figure 17. This occurs when the sum of the lengths of the clockwise paths from r

to rcw and from qcw to q is at least the length of the cycle C, i.e., dccw(rcw, r)+dccw(q, qcw) ≥|C|+ dccw(q, r) ≥ |C|. This is equivalent to |pq|+ |rs| ≥ d(p, q) + d(r, s), since

dccw(q, p) + |pq|+ dccw(s, r) + |rs| = 2dccw(q, qcw) + 2dccw(rcw, r) ≥ 2|C|⇐⇒ |pq|+ |rs| ≥ |C| − dccw(q, p)︸ ︷︷ ︸

=dccw(p,q)≥d(p,q)

+ |C| − dccw(s, r)︸ ︷︷ ︸=dccw(r,s)≥d(r,s)

.

However, the inequality |pq|+ |rs| ≥ d(p, q) + d(r, s) implies |pq| ≥ d(p, q) or |rs| ≥ d(r, s),i.e., one of pq or rs was not a shortcut to begin with contradicting their choice. Thus, theunaffected regions in the consecutive case can only overlap along the handset. J

I Theorem 3.5. Let pq and rs be a pair of shortcuts for a cycle C in consecutive configuration.There exists a pair p′q′ and r′s′ of shortcuts in the alternating configuration that are at leastas good as pq and rs, i.e., diam(C + p′q′ + r′s′) ≤ diam(C + pq + rs).

Proof. Suppose pq and rs are useful shortcuts in the consecutive configuration. Assume,without loss of generality, dccw(q, r) ≤ dccw(s, p) and dccw(p, q) ≤ dccw(r, s).

14 Minimizing Continuous Diameter with Shortcuts

We consider the shortcuts p′q′ = pr and r′s′ = rs, which are illustrated in Figure 18 andlie in the intersection of the alternating and consecutive case. We argue that pr and rs areuseful shortcuts and that each candidate diametral cycle in C + pq + rs has a one-to-onecorrespondence to a candidate diametral cycle in C + pr + rs of smaller or equal length.

q

ps

r

Figure 18 Replacing two shortcuts pq and rs in consecutive configuration with two shortcutsp′q′ = pr and r′s′ = rs that are in both consecutive and alternating configuration.

The line segment pr is a shortcut, because otherwise |pr| = d(p, r), i.e., the shortestpath from p to r along C is a line segment containing q. This would imply |pq| = d(p, q)contradicting pq being a shortcut. We have |pr| < d(p, r) and |rs| < d(r, s), since pr and rsare shortcuts, and we have |pq|+ |rs|+ dccw(q, r) < dccw(s, p), since pq and rs are useful, byLemma 3.4. According to Lemma 3.3, pr and rs are also useful, since

|pr|+ |rs| < d(p, r) + d(r, s) ≤ dccw(p, r) + dccw(r, s) ,

and |pr|+ |rs| ≤ |pq|+ d(q, r) + |rs| < dccw(s, p) ≤ dccw(s, p) + dccw(r, r) .

The bowtie in C + pr + rs is at most as long as the handset in C + pq + rs and thehourglass in C + pr+ rs is at most as long as the base station in C + pq + rs. The blue splitcycle remains unchanged, as r′s′ = rs. Below, we proof that the red split cycle in C+ pr+ rs

is at most as long as the red split cycle in C + pq + rs.First, the red split cycle remains on the same side, viz., clockwise, of the red shortcut

when replacing pq with pr. Our premises dccw(p, q) ≤ dccw(r, s) and dccw(q, r) ≤ dccw(s, p)imply |Cccw(p, q)| ≤ |Ccw(p, q)|, since dccw(p, q) ≤ dccw(r, s) ≤ dccw(q, p), and |Cccw(p, r)| ≤|Ccw(p, r)|, since dccw(p, r) = dccw(p, q) + dccw(q, r) ≤ dccw(r, s) + dccw(s, p) = dccw(r, p).Second, the red split cycle shrinks when moving q to r, i.e., |Ccw(p, r)| ≤ |Ccw(p, q)|, due tothe triangle inequality and the fact that it remains on the same side of the red shortcut.

The above implies that diam(C + pr+ rs) ≤ diam(C + pq + rs), because of the following.The value of diam(C + pq + rs) is the maximum of four values, viz., the largest distancebetween any two points on each of the four candidate diametral cycles (excluding C, sincepq and rs are useful). When replacing pq with pr we decrease or maintain each of these fourvalues whose maximum becomes diam(C + pr+ rs), since pr and rs are useful shortcuts. J

3.2 Balancing Diametral CyclesWe show that every cycle has an optimal pair of alternating shortcuts where the bowtie andthe hourglass are both diametral and we show that every convex cycle has an optimal pair ofshortcuts where both split cycles are diametral, as well. We obtain these results by applyinga sequence of operations that each slide the shortcuts along the cycle in a way that reducesor maintains the continuous diameter and brings the candidate diametral cycles closer to the

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 15

desired balance. The last two operations only reduce the diameter for convex cycles as theshortcuts might get stuck at reflex vertices, which leads to our characterization of optimalshortcuts for convex and non-convex cycles.

p

q

r

a

b

c

d

s

Figure 19 The sections of a cycle with a pair of alternating shortcuts.

Let pq and rs be two alternating shortcuts and let a = dccw(p, r), b = dccw(r, q), c =dccw(q, s), and d = dccw(s, p). As depicted in Figure 19, we assume that the red split cyclecontains s and the blue split cycle contains p, i.e., a+b ≤ c+d and b+c ≤ a+d. Furthermore,we abbreviate the lengths of the bowtie ( ./), the hourglass ( ./ ), the red split (�), and theblue split (�) as follows.

./ := a+ c+ |pq|+ |rs| � := c+ d+ |pq| ./ := b+ d+ |pq|+ |rs| � := a+ d+ |rs|

I Lemma 3.6. For each relation ∼∈ {<,=, >} we have

./∼ ./ ⇐⇒ a+ c ∼ b+ d � ∼ � ⇐⇒ c+ |pq| ∼ a+ |rs|./∼ � ⇐⇒ a+ |rs| ∼ d ./ ∼ � ⇐⇒ b+ |rs| ∼ c./∼ � ⇐⇒ c+ |pq| ∼ d ./ ∼ � ⇐⇒ b+ |pq| ∼ a

and pq and rs are useful if and only if |pq|+ |rs| < a+ c and |pq|+ |rs| < b+ d.

Proof. The claims follow from the definitions of ./, ./ , �, and �. J

I Lemma 3.7. Consider a pair of useful alternating shortcuts where one of the split cyclesevenly divides the cycle. Then this split cycle must have length at most ./ or at most ./ .

Proof. Assume, for the sake of a contradiction, that we have a pair of useful shortcuts where� divides the cycle evenly, i.e., a+ b = c+ d, and where ./< � and ./ < �.

Then we have a+ |rs| < d and b+ |rs| < c, by Lemma 3.6, which yields

a+ |rs| < d = a+ b− c < a− |rs| ,

leading to the contradiction |rs| < 0. J

I Lemma 3.8. There exists an optimal pair of shortcuts in alternating configuration suchthat none of the split cycles is the only diametral cycle.

Proof. Suppose pq and rs are useful and � is sole diametral, i.e., ./< �, ./ < �, and � < �.Then we have b+ |pq| < a and c+ |pq| − |rs| < a. We move r clockwise along the cycle

until we arrive at some r′ where b′ + |pq| = a′ or c+ |pq| − |r′s| = a′, as in Figure 20.Changing r to r′ leads to the following changes in the candidate diametral cycles.

16 Minimizing Continuous Diameter with Shortcuts

p

q

r

s

r′

Figure 20 Shrinking the blue split by moving r clockwise to r′.

The blue split shrinks or remains the same, i.e., � ≥ �′.The red split remains the same, i.e., � = �′.The bowtie changes as the blue split does, i.e., ./≥ ./′ and ./′ < �′.The hourglass remains the same or increases, i.e., ./ ≤ ./ ′.The hourglass increases when the blue split remains the same, i.e, �− ./ > �′ − ./ ′.

Consequently, diam(C+pq+ r′s) ≤ diam(C+pq+ rs) and �′ = ./′ or �′ = �′, which implies

our claim, provided that pq and r′s are useful shortcuts.We argue that r′s is a shortcut and that pq and r′s are useful. Assume, for the sake

of a contradiction, that r′s is not a shortcut, i.e., |r′s| = d(r′, s). Suppose the shortestpath from r′ to s in C travels counter-clockwise around the cycle, i.e., d(r′, s) = dccw(r′, s).Then s, r, and r′ are colinear, since r′s contains rs. This contradicts rs being a shortcut.Suppose, on the other hand, the shortest path from r′ to s in C travels clockwise aroundthe cycle, i.e., d(r′, s) = dcw(r′, s). Since b+ c ≤ a+ d, the shortest path from r to s travelscounter-clockwise along the cycle. This means that when moving r to r′ we passed througha point r′′ where the blue split �′′ evenly divides the cycle and is at least as large as thehourglass ./ ′′ and strictly larger than the bowtie ./′′, contradicting Lemma 3.7. Since theassumption |r′s| = d(r′, s) leads to a contradiction in both cases, r′s is a shortcut.

The shortcuts pq and r′s remain useful, as |pq|+ |r′s| < b′ + d holds, since

|pq|+ |r′s| ≤ |pq|+ |rs|+ dccw(r′, r) < b+ d+ dccw(r′, r) = b′ + d ,

and, as |pq|+ |r′s| < a′ + c holds, since |r′s| < d(r′, s) ≤ b′ + c and b′ + |pq| ≤ a′ imply

|pq|+ |r′s| < |pq|+ b′ + c ≤ a′ + c .

Therefore, there is a pair of optimal shortcuts where � is not the only diametral cycle. J

I Lemma 3.9. There exists a pair of optimal shortcuts with ./= ./ .

Proof. Suppose pq and rs are useful shortcuts with ./ 6= ./ .We balance ./ and ./ using the following operations that maintain or decrease the

continuous diameter while decreasing the difference between bowtie and hourglass. Two ofthese operations are illustrated in Figure 21.

1. As long as neither split cycle divides the cycle C evenly, we shrink the larger split cyclein a way that decreases the difference of bowtie and hourglass:

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 17

p

q

r

s

s′

(a) Operation 1.a

r

s

p

qq′

p′

(b) Operation 2.a

Figure 21 Two of the operations used to balance bowtie and hourglass.

a. When ./< ./ and � ≤ �, we move s counter-clockwise.b. When ./< ./ and � > �, we move p clockwise.c. When ./> ./ and � ≤ �, we move r clockwise.d. When ./> ./ and � > �, we move q counter-clockwise.

2. Once a split cycle evenly divides the cycle, we move the endpoints of the correspondingshortcut in the direction that decreases the difference between bowtie and hourglass:a. When ./< ./ and � evenly divides the cycle, we move p and q clockwise.b. When ./> ./ and � evenly divides the cycle, we move p and q counter-clockwise.c. When ./< ./ and � evenly divides the cycle, we move s and r counter-clockwise.d. When ./> ./ and � evenly divides the cycle, we move s and r clockwise.

For each operation, we argue that pq and rs remain useful shortcuts and that the diameternever increases while the difference between hourglass and bowtie always decreases.

Suppose ./< ./ and neither split is even. By repeatedly applying Operations 1.a and 1.b,we move s counter-clockwise to s′ and we move p counter-clockwise to p′ until ./′ = ./

′ oruntil one split is even. This causes the following changes in the candidate diametral cycles.

Both splits shrink or remain the same, i.e., � ≥ �′ and � ≥ �′.The bowtie grows or remains the same, i.e., ./≤ ./′.The hourglass remains the same or shrinks, i.e., ./ ≥ ./ ′.

Altogether, this means diam(C + pq + rs) ≥ diam(C + p′q + rs′), provided that p′q and rs′are useful shortcuts. Moreover, the bowtie grows when the hourglass remains the same andthe hourglass shrinks when the bowtie remains the same, i.e., ./ − ./> ./

′ − ./′.Assume, for the sake of a contradiction, that p′q is not a shortcut, i.e., |p′q| = d(p′, q). As

the red split never switched sides during the operation, we have d(p′, q) = dccw(p′, q). Thismeans that the line segment p′q contains pq contradicting our choice of pq as a shortcut.Therefore, p′q must be a shortcut. Symmetrically, we can argue that rs′ is a shortcut.

By the triangle inequality, we have |p′q| ≤ |pq|+ dccw(p′, p) and |rs′| ≤ |rs|+ dccw(s, s′).With a′ + c′ ≤ b′ + d′ from ./′ ≤ ./ ′, we obtain that p′q and rs′ are useful, since

|p′q|+ |rs′| ≤ |pq|+ dccw(p′, p) + |rs|+ dccw(s, s′)< a+ dccw(p′, p) + c+ dccw(s, s′) = a′ + c′ ≤ b′ + d′ .

Applying Operations 1.a and 1.b, never increases the diameter while reducing the differencebetween bowtie and hourglass. Similarly, we can argue that the same holds for 1.c and 1.d.

18 Minimizing Continuous Diameter with Shortcuts

Suppose ./< ./ and � is an even split, i.e., a+ b = c+ d. Consider Operation 2.a. Wesimultaneously move p clockwise to p′ and q clockwise to q′ until ./′ = ./

′. This causes thefollowing changes in the candidate diametral cycles.

The red split cycle remains an even split, i.e., a′ + b′ = c′ + d′.The blue split cycle remains unchanged, i.e., � = �′.The bowtie grows or remains the same, i.e., ./≤ ./′.The hourglass remains the same or shrinks, i.e., ./ ≥ ./ ′.

Even though the red split might grow in length, it cannot determine the diameter, since�′ ≤ ./′ or �′ ≤ ./

′, due to Lemma 3.7. Altogether, this means diam(C + pq + rs) ≥diam(C + p′q + rs′), provided that p′q′ and rs are useful shortcuts. Moreover, the bowtiegrows when the hourglass remains the same and the hourglass shrinks when the bowtieremains the same, i.e., ./ − ./> ./

′ − ./′, and, consequently, ./′ = ./′.

Assume, for the sake of a contradiction, that p′q′ is not a shortcut, i.e., |p′q′| = d(p′, q′).Since �′ is an even split, this would mean |p′q′| = a′ + b′ = c′ + d′ = |C|/2, i.e., the cycle Cis degenerate. Since we exclude degenerate cycles, p′q′ must be a shortcut.

We moved both p and q by the same distance ∆ along the network. By the triangleinequality, we have |p′q′| ≤ |pq|+ 2∆. With a′ + c′ = b′ + d′ from ./′ = ./

′, this yields

|p′q′|+ |rs| ≤ |pq|+ 2∆ + |rs| < a+ ∆ + c+ ∆ = a′ + c′ = b′ + d′ ,

which implies that p′q′ and rs are indeed useful. Therefore, Operation 2.a, never increasesthe diameter while reducing the difference between bowtie and hourglass until they are equal.Similarly, we can argue that the same holds for Operations 2.b, 2.c, and 2.e.

The above implies the claim, since, by using Operation 1 and Operation 2, we cantransform every alternating configuration of useful shortcuts into another configuration wherebowtie and hourglass have equal length without increasing the continuous diameter. J

I Corollary 3.10. There exists a pair of optimal shortcuts that is in the alternating configu-ration such that none of the split cycles is the only diametral cycle and such that the bowtieand the hourglass have the same length.

Proof. Let pq and rs be a pair of optimal shortcuts for a cycle C where none of the splits isthe only diametral cycle. Each of Operations 1.a, 1.b, 1.c, and 1.d from Lemma 3.9 shrinksthe larger split cycle at the same rate as they shrink the larger of bowtie and hourglass.Thus, we do not create a sole diametral cycle by applying these operations. Furthermore,each of Operations 2.a, 2.b, 2.c, and 2.d rotates an even split that cannot become diametralby Lemma 3.7. By applying Lemma 3.9, we obtain a pair of optimal shortcuts p′q′ and r′s′with at least two diametral cycles and where bowtie and hourglass have the same length. J

I Theorem 3.11. For every non-degenerate cycle, there exists an optimal pair of shortcutssuch that the hourglass and the bowtie are both diametral.

Proof. Let C be a non-degenerate cycle. By Corollary 3.10, there is a pair of optimalshortcuts pq and rs where neither split cycle is the only diametral cycle and where ./= ./ .

Suppose that ./ and ./ are not diametral. The cycle C cannot be diametral, since pq andrs are useful. This means a split is diametral, i.e., � > ./= ./ or � > ./= ./ . Since neither� nor � is the only diametral cycle, we have � = � > ./= ./ .

We shrink the splits by simultaneously moving p and r clockwise while moving q and scounter-clockwise, as illustrated in Figure 22. By moving pq and rs at appropriate speeds,we ensure that this operation maintains both the balance between the split cycles and

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 19

p

q

r

s

q′

p′

r′

s′

Figure 22 Shifting the shortcuts to shrink the split cycles while maintaining the balance betweenboth split cycles and the balance between bowtie and hourglass.

the balance between bowtie and hourglass, i.e., �′ = �′ and ./′ = ./′. This decreases the

continuous diameter, provided that the line segments p′q′ and r′s′ remain useful shortcuts.Assume, for the sake of a contradiction, that p′q′ is not a shortcut, i.e., |p′q′| = d(p′q′).

By Lemma 3.7 we cannot pass through an even red split during our operation. Thus, we haved(p′, q′) = dccw(p′, q′), i.e., the line segment p′q′ contains pq contradicting the choice of pq asshortcut. Therefore, p′q′ is a shortcut. Symmetrically, we can argue that r′s′ is a shortcut.

We argue that p′q′ and r′s′ remain useful. From ./′ = ./′ ≤ �′ = �′, we obtain

|p′q′| ≤ d′ − c′, |p′q′| ≤ a′ − b′, and |r′s′| ≤ c′ − b′, by Lemma 3.6. Together with b′ > 0 anda′ + c′ = b′ + d′, we derive that p′q′ and r′s′ are useful, because

|p′q′|+ |r′s′| ≤ d′ − c′ + c′ − b′ = d′ − b′ < d′ + b′ = a′ + c′ .

This means p′q′ and r′s′ are useful shortcuts with ./′ = ./′ = �′ = �′ and diam(C+pq+rs) >

diam(C + p′q′ + r′s′) contradicting the optimality of pq and rs. Therefore, there exists apair of optimal shortcuts where both the hourglass and the bowtie are diametral. J

I Theorem 3.12. For every convex cycle, there exists an optimal pair of alternating shortcutssuch that the hourglass, the bowtie, and the splits are diametral, i.e., ./= ./ = � = �.

Proof. According to Theorem 3.11, there are optimal shortcuts pq and rs with ./= ./ ≥ �and ./= ./ ≥ �. Suppose we have ./= ./ >

� or ./= ./ > �.We establish the claim in three steps. First, we ensure that we can increase each split in

a way that shrinks its shortcut. Second, we grow the smaller split until both splits are equal.Third, we grow both splits at the same rate until they are equal to bowtie and hourglass.

Moving p counter-clockwise and q clockwise shifts the red shortcut pq in a way thatincreases the red split �. As argued in Theorem 3.11, this shift maintains the balancebetween bowtie and hourglass and preserves usefulness.

Suppose that shifting the red shortcut pq to increase � shortens the red shortcut. Sincethe cycle is convex, the red shortcut shrinks as we continue to shift it.Suppose that shifting the red shortcut pq to increase � increases the length of the redshortcut, as illustrated in Figure 23. Since the cycle is convex, the red shortcut shrinks aswe shift the red split in the other direction, moving p clockwise and q counter-clockwise.We shift the red shortcut to shrink � until it becomes even and starts growing.

20 Minimizing Continuous Diameter with Shortcuts

p

q

Figure 23 The situation when shifting the red shortcut increases its length. Since the cycle (gray)is convex, shifting the red shortcut in the other direction must decrease its length.

Since each shift operation maintains a+ c and b+ d, the bowtie and the hourglass changeas |pq|+ |rs| changes. As argued above, we shift pq or rs in a way that decreases |pq|+ |rs|and thereby ./ and ./ while increasing the smaller split until both splits are equal. The sameapplies when we continue to shift pq and rs at the same time adjusting the speed of the shiftsto maintain � = �. Eventually, we arrive at shortcuts p′q′ and r′s′ with ./′ = ./

′ = �′ = �′and diam(C + pq + rs) ≥ diam(C + p′q′ + r′s′), since we only decreased the diametral cyclesthroughout the shift operations and maintain usefulness as argued in Theorem 3.11. J

I Corollary 3.13. For every non-degenerate cycle, there exists an optimal pair of shortcutssuch that the hourglass and the bowtie are diametral and such that each split cycle is diametralor the shortcut of the split has at least one endpoint at a reflex vertex.

I Corollary 3.14. For every convex cycle, there exists an optimal pair of shortcuts witha+ b ≤ c+ d and b+ c ≤ a+ d such that the following holds.

a+ c = b+ d = |C|2 (1)

|rs| = d− a = c− b (2)|pq| = d− c = a− b (3)

d = |C|4 + |pq|+ |rs|2 = diam(C + pq + rs) (4)

b = |C|4 −|pq|+ |rs|

2 = diam(C)− diam(C + pq + rs) (5)

a = |C|4 + |pq| − |rs|2 (6)

c = |C|4 + |rs| − |pq|2 (7)

Proof. Equations (1), (2), and (3) follow from ./= ./ = � = � and Lemma 3.6. Equations(4)–(7) follow from ./ begin diametral, i.e., diam(C + pq + rs) = ./ /2. J

4 A Linear-Time Algorithm for Convex Cycles

For convex cycles, we restrict our search to the pairs of shortcuts satisfying ./= ./ = � = �,due to Theorem 3.12. We proceed as follows. First, we pick some point p on the cycle C andcompute three points q, r, and s such that ./= ./ = � = �—regardless of whether pq and rsare shortcuts. We show that the points q, r, and s exist and are unique for every point palong C. Once we have balanced p, q, r, and s, we slide p along C maintaining the balanceby moving q, r, and s appropriately. We show that q, r, and s move in the same direction asp while preserving their order along C. Thus, each endpoint traverses each edge of the nedges of C at most once throughout this process, which therefore takes O(n) time.

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 21

For the remainder of this section, we only focus on convex cycles with non-empty interior.Consider a cycle C and a fixed point p on C. We say a triple of points q, r, and s is inbalanced configuration with p when the points p, r, q, and s appear counter-clockwise in thisorder along C, dccw(p, q) ≤ |C|/2, dccw(r, s) ≤ |C|/2, and ./= ./ = � = �.I Theorem 4.1. Consider a convex cycle C and a point p on C. There exists a triple q, r,s of points on C that are in balanced configuration with p.

Proof. Suppose we place s at some arbitrary position on C with |C|/4 ≤ dccw(s, p) ≤ |C|/2.We have three objectives when placing r and q. First, ensure ./= ./ by enforcing a distance of|C|/2−dccw(s, p) between r and q along C. Second, place r and q such that dccw(p, q) ≤ |C|/2and dccw(r, s) ≤ |C|/2. Third, ensure � = � as follows:

p

sq

r

s

p

ab

c

d

q

r

s

p

Figure 24 Locating r and s to balanced the splits for fixed p and s.

Let p and s be such that d(p, p) = d(s, s) = |C|/2. Suppose we slide q and r along theclockwise path from p to s while maintaining d(q, r) = d(p, s), as illustrated in Figure 24. Asq moves clockwise � increases and � decreases. For convex cycles, at least one of � and �changes at any time during this motion. When s is close enough to p, we have � < � whenq = p and � > � when r = s. By the intermediate value theorem, there exist positions for qand r such that ./= ./ and � = � and these positions are unique, since C is convex.

As s moves closer to p, we reach a position s∗ where � = � when q = p or where� = � when r = s. Suppose s = s∗ with � = � for q = p. Then d = a = d(s, p) andb = d(q, r) = |C|/2− d = dccw(q, p)− d. By Lemma 3.6, we have c+ |pq| = a+ |rs|, i.e.,

./= ./ = b+ d+ |pq|+ |rs| = d(q, p)− d+ d+ |pq|+ |rs| > d(q, p) + |pq| = � = � .

Analogously, we obtain ./= ./ >� = � when s = s∗ with � = � for r = s.

For all s from p to s∗, the difference ./−� is a continuous function of d(s, p). We have./= ./ <

� = � when s = p, and we have ./= ./ >� = �, when s = s∗. By the intermediate

value theorem there exists some position for s such that ./= ./ = � = �. J

I Corollary 4.2. Consider a convex cycle C with n vertices and a point p on C. Suppose weknow the counter-clockwise distance from p to any other vertex. Then we can determine thetriple of points on C that are in balanced configuration with p in O(log2 n) time.

Proof. Tracing the argumentation from the existence proof for Theorem 4.1, we perform abinary search for s with a binary search for q and r in each step. The relations between thecycles ./, ./ , �, and � will guide these binary searches, e.g., q and r need to move clockwisewhen � < �, and s needs to move counter-clockwise when ./= ./ >

� = �. Once we haveidentified the edges containing q, r, and s, we can express their exact positions as system ofdegree two polynomials and linear inequalities based on the conditions in Corollary 3.14. J

22 Minimizing Continuous Diameter with Shortcuts

I Lemma 4.3. Consider a convex cycle C. Suppose p moves counter-clockwise along C.Then any three points in balanced configuration with p are moving counter-clockwise, as well.

Proof. Consider p and p′ with dccw(p, p′) < |C|/4. Let q, r, s and q′, r′, s′ be triples ofpoints on C that are in balance with p and p′, respectively. Note that dccw(p, p′) < |C|/4ensures that p, s′, q′, and r′ appear clockwise in this order along C. Furthermore, letδx := dccw(p, x′) − dccw(p, x) and ∆(xy) := |x′y′| − |xy| for any x, y ∈ {p, q, r, s}. By thetriangle inequality, we have ∆(xy) ≤ |δx|+ |δy| where ∆(xy) = |δx|+ |δy| occurs when theline segment x′y′ contains xy and ∆(xy) = −|δx| − |δy| occurs when xy contains x′y′.

We first argue that q′, r′, s′ lie counter-clockwise of q, r, s, respectively, i.e., δq, δr, δs ≥ 0,as illustrated in Figure 25. Then, we show δq, δr, δs > 0, which means q, r, and s movecounter-clockwise as p moves counter-clockwise and none of them remain at their position.

q

r

s

s′

r′

q′

p

p′δp

δr

δq

δs

ab

c

d

a′b′

c′

d′

Figure 25 Two balanced configurations p, q, r, s and p′, q′, r′, s′ with δp, δq, δr, δs > 0.

Regardless of the signs of δq, δr, and δs, the following holds.

a′ = a+ δr − δp b′ = b+ δq − δr c′ = c+ δs − δq d′ = d+ δp − δs

Lemma 3.6 yields the following equations, since ./′ = ./′ = �′ = �′ and ./= ./ = � = �.

./′ = ./′ ∧ ./= ./ ⇐⇒ δp + δq = δr + δs (8)

./′ = �′ ∧ ./= � ⇐⇒ 2δp = δr + δs + ∆(rs) (9)

./′ = �′ ∧ ./ = � ⇐⇒ 2δr = δp + δq + ∆(pq) (10)

Together with ∆(rs) ≤ |δr|+ |δs| we obtain

0 < 2δp = δr + δs + ∆(rs) ≤ δr + δs + |δr|+ |δs| . (11)

This means that at least one of δr and δs must be positive. Assume, for the sake of acontradiction, that δs < 0. Then δr > 0 and Equation (11) implies 0 < δp ≤ δr. Wedistinguish the two cases δp < δr and δp = δr. Suppose the former holds. Then Equation (10)and ∆(pq) = |p′q′| − |pq| ≤ |δp|+ |δq|, yield 0 < δr ≤ δp + δq, as

2δp < 2δr = δp + δq + ∆(pq) ≤ 2δp + δq + |δq| ⇒ 0 < δq + |δq| ⇒ 0 < δq ,

which contradicts δs < 0, since Equation (8) implies δs = δp + δq − δr ≥ 0. Now, considerthe case when δp = δr. Note that δp > 0 and δs < 0 be assumption. Equation (8) impliesδq = δs < 0. Revisiting Equations (9) and (10) with δp = δr > 0 and δq = δs < 0 yields

2δp = δr + δs + ∆(rs) ⇐⇒ ∆(rs) = δr − δs = |δr|+ |δs| (12)

J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid 23

pqq′ p′

|δq| δp

ss′ r r′

Figure 26 The impossible constellation when ∆(rs) = |δr| + |δs| and ∆(pq) = |δp| + |δq| withδp = δr > 0 and δq = δs < 0 for a convex cycle. The cycle C would be confined to a line.

2δr = δp + δq + ∆(pq) ⇐⇒ ∆(pq) = δp − δq = |δp|+ |δq| . (13)

Equation (12) means that p′ and q′ lie on the line `(p, q) through p and q, as illustratedin Figure 26. Since C is assumed to be convex and, therefore, without self-intersections, thecounter-clockwise path from p′ to q′ along C coincides with the line segment p′q′. Both sand s′ lie on `(p, q), since s lies on pq, since q and s travel clockwise for the same distance(δq = δs < 0), and since p travels in the other direction (δp > 0). Equation (13) means thatr′ and s′ lie on the line `(r, s) through r and s. Since ss′ is contained in p′q′, the points p, q,r, s, p′, q′, r′, and s′ are colinear. Therefore, C is confined to a line and cannot be convex.

Similarly, we can derive a contradiction from the assumption δr < 0. Therefore, neither δrnor δs are negative and one of them is positive. In this case Equation (11) implies δp ≤ δr+δsand we obtain δq = δr + δs − δp ≥ 0 with Equation (8), i.e., δq, δr, δs ≥ 0 when δp > 0.

Next, we argue that δq, δr, δs > 0 when δp > 0. Assume, for the sake of a contradiction,that δq = 0. Equations (8) and (9) imply ∆(rs) = δr + δs. This means that the line segmentr′s′ contains rs, as illustrated in Figure 27. Since both r and s are moving counter-clockwisealong C, this implies that C is confined to the line through r and s, unless δr = 0 or δs = 0.

rs

δs

δrs′ r′

Figure 27 The positions of s′ and r′ when δs > 0, δr > 0, and |r′s′| = |rs|+ δs + δr.

Suppose δr = 0 and δs > 0, i.e., s, s′, and r = r′ are colinear. Furthermore, we haveδp = δs > 0, by Equation (8), and we have ∆(pq) = −δp by Equation (10). Consequently,p, p′, and q = q′ are colinear. However, the cycle is confined to a line again, since p andp′ lie on the line through r and s. Similarly, we arrive at a contradiction when δr > 0 andδs = 0. Hence, we are only left with the option δr = δs = 0 when δp > 0 and δq = 0. Sincethis yields the contradiction 0 < δp = δr + δs = 0, we assert that δq > 0 when δp > 0.

Assume we have δp, δq > 0 and δr = 0. By Equation (10), we have ∆(pq) = −δp − δqwhich means that p′q′ is strictly contained in the line segment pq and, thus, C is confined tothe line through p and q. Similarly, C is confined to a line when δp, δq, δr > 0 and δs = 0.

As all other cases are exhausted, we have δr, δq, δs > 0 when δp > 0, i.e., when p movescounter-clockwise along C then so do any three points in balanced configuration with p. J

I Corollary 4.4. Consider a convex cycle C and a point p on C. There exists a unique tripleq, r, s of points on C that are in balanced configuration with p.

24 Minimizing Continuous Diameter with Shortcuts

Proof. Assume, for the sake of a contradiction, that there are two distinct triples q, r, s andq′, r′, s′ in balanced configuration with p. From the proof of Theorem 4.1, we already knowthat q and r are uniquely determined by s. Therefore, s and s′ must be distinct.

Suppose s lies closer to p than s′, i.e., d(s, p) < d(s′, p). Invoking Lemma 4.3 with s inthe role of p yields that q, r, and p must move clockwise as s moves clockwise to s′. Hence,p, q′, r′ are not in balanced configuration for s′. This contradicts q′, r′, s′ being in balancewith p. Therefore, p has three unique points that are in balanced configuration with p. J

I Theorem 4.5. Consider a convex cycle C with n vertices. We can compute an optimalpair of shortcuts for C in O(n) time.

Proof. We pick an arbitrary point p along some edge ep of C and identify the edges eq,er, and es containing the points q, r, and s that form a balanced configuration with p, asdescribed in Corollary 4.2. We find a (locally) optimal pair of shortcuts p∗q∗ and r∗s∗ withwhose endpoints lie on the edges ep, eq, er, es by minimizing d = diam(C + pq + rs) subjectto a+ b ≤ |C|/2 and b+ c ≤ |C|/2, and the constraints stated in Corollary 3.14 that ensure./= ./ = � = �. Then, we identify the four edges that would host p, q, r, and s next, if p

were to move counter-clockwise: for each endpoint x ∈ {p, q, r, s}, we calculate how far theother endpoints would move under the assumption that x is the first point to hit a vertex.Corollary 4.4 guarantees that this calculation has a unique solution. Since all points movein the same direction as p, an edge e will never host an endpoint x in any subsequent step,once x has left e. Therefore, the entire process takes O(n) time. Since we encounter everyfour points in balanced configuration, we also encounter an optimal pair of shortcuts. J

References1 Victor Chepoi and Yann Vaxès. Augmenting trees to meet biconnectivity and diameter

constraints. Algorithmica, 33(2):243–262, 2002.2 Mohammad Farshi, Panos Giannopoulos, and Joachim Gudmundsson. Improving the

stretch factor of a geometric network by edge augmentation. SIAM Journal on Computing,38(1):226–240, 2008.

3 Fabrizio Frati, Serge Gaspers, Joachim Gudmundsson, and Luke Mathieson. Augmentinggraphs to minimize the diameter. Algorithmica, 72(4):995–1010, 2015.

4 Yong Gao, Donovan R. Hare, and James Nastos. The parametric complexity of graphdiameter augmentation. Discrete Applied Mathematics, 161(10-11):1626–1631, 2013.

5 Ulrike Große, Joachim Gudmundsson, Christian Knauer, Michiel Smid, and Fabian Stehn.Fast algorithms for diameter-optimally augmenting paths. In 42nd International Collo-quium on Automata, Languages, and Programming (ICALP 2015), pages 678–688, 2015.

6 Chung-Lun Li, S. Thomas McCormick, and David Simchi-Levi. On the minimum-cardinality-bounded-diameter and the bounded-cardinality-minimum-diameter edge addi-tion problems. Operations Research Letters, 11(5):303–308, 1992.

7 Jun Luo and Christian Wulff-Nilsen. Computing best and worst shortcuts of graphs embed-ded in metric spaces. In 19th International Symposium on Algorithms and Computation(ISAAC 2008), pages 764–775, 2008.

8 Anneke A. Schoone, Hans L. Bodlaender, and Jan van Leeuwen. Diameter increase causedby edge deletion. Journal of Graph Theory, 11(3):409–427, 1987.