Approximation Algorithms for the Two-Watchman Route in a Simple Polygon

The two-watchman route problem is that of computing a pair of closed tours in an environment so that the two tours together see the whole environment and some length measure on the two tours is minimized. Two standard measures are: the minmax measure, where we want the tours where the longest of them has smallest length, and the minsum measure, where we want the tours for which the sum of their lengths is the smallest. It is known that computing a minmax two-watchman route is NP-hard for simple rectilinear polygons and thus also for simple polygons. Also, any c-approximation algorithm for the minmax two-watchman route is automatically a 2c-approximation algorithm for the minsum two-watchman route. We exhibit two constant factor approximation algorithms for computing minmax two-watchman routes in simple polygons with approximation factors 5.969 and 11.939, having running times O(n^8) and O(n^4) respectively, where n is the number of vertices of the polygon. We also use the same techniques to obtain a 6.922-approximation for the fixed two-watchman route problem running in O(n^2) time, i.e., when two starting points of the two tours are given as input.


Introduction
Some of the most intriguing problems in computational geometry concern visibility and motion planning in polygonal environments.A classical problem is that of computing a shortest watchman route in an environment, i.e., the shortest closed tour that sees the complete free-space of the environment.Watchman routes can either be fixed, requiring the tour to pass a given boundary point or floating, with no requirement to pass any specific point.These problems have been shown NP-hard [6,9] and even Ω(log n)-inapproximable [21] for polygons with holes having a total of n segments.
After a sequence of false starts [7,13,28,29], Tan et al. [30] prove an O(n 4 ) time dynamic programming algorithm for computing a shortest fixed watchman route through a given boundary point in a simple polygon.This is later improved to O(n 3 log n) time by Dror et al. [8] and to O(n 3 ) time by Tan and Jiang [31].Carlsson et al. [5] show how to generalize an algorithm that computes a shortest fixed watchman route to compute a shortest floating watchman route in a simple polygon with a quadratic factor overhead.Tan [26] improves this to a linear factor overhead.Hence, the currently best algorithm for a shortest floating watchman route in a simple polygon uses O(n 4 ) time.
Given the relatively high polynomial time complexity for computing watchman routes in simple polygons, efficient approximation algorithms are also of interest.Nilsson [23] and Tan [27] have independently developed linear time approximation algorithms for a shortest floating watchman route in a simple polygon.
The more general problem of computing multiple watchman routes that together see the environment has received much less attention.Mitchell and Wynters [22] show that already computing the pair of tours that together see a simple rectilinear polygon is NP-hard, if we want to minimize the length of the longest of the two tours, the minmax measure.It is still an open problem whether it is possible to compute a pair of tours for which the sum of the lengths of the two tours is minimal, the minsum measure, in polynomial time.Packer [24] gives some experimental results for multiple watchman routes in simple polygons.For point sized watchmen, so-called static guards, Belleville [2,3] shows an efficiently computable characterization of all simple polygons that are two-guardable with point guards.
Our Results.We present a polynomial time constant factor approximation algorithm to compute a minmax or minsum pair of tours that together see a simple polygon.We first consider the floating version of the problem and obtain a 5.969-approximation algorithm for the minmax pair of tours and 11.939-approximation for the minsum pair of tours that runs in O(n 8 ) time, where n is the number of vertices of the polygon.
In the next three sections, we provide some preliminary results and prove some crucial properties that we use continuously in the sequel.In Section 5, we give the algorithm for the minmax twowatchman route prove its correctness and analyze its running time.In Section 6, we show how to modify the previous algorithm to run in O(n 4 ) time while maintaining constant approximation factor, albeit only guaranteeing a factor twice as large as the previous algorithm.In Section 7 we modify the algorithm to handle the fixed two-watchman route, the case when we have fixed starting points for the tours that they have to pass through, arriving at an O(n 2 ) time algorithm with approximation factor 6.922.We conclude the presentation in Section 8.

Preliminaries
Let P be a simple polygon having n vertices and let ∂P denote the boundary of P. We say that two points in P see each other, if the line segment connecting the points does not intersect the exterior of P. For any arbitrary connected object X inside P, we denote by VP(X ) the weak visibility polygon of X in P, i.e., the set of points in P that see some point of X .The boundary of a visibility polygon VP(X ) consists of edges that are either (sub)edges of P or edges that have their endpoints on ∂P but their interior points in the interior of P.These latter edges are denoted the windows of VP(X ) and they have at least one endpoint on a reflex vertex of P. We henceforth assume the existence of linear time algorithms to compute VP(X ) when X is a point or a segment inside P. Such algorithms have previously been presented in the literature [11,20,25].
A cut is a directed line segment in P with both end points on ∂P and each interior point is an interior point of P. Hence, a directed segment incident to a polygon edge or a directed segment intersecting more than two vertices is not a cut.A cut always separates P into exactly two subpolygons of nonzero area.If a cut is represented by the segment [p, q] we say that the cut is directed from p to q and we call p the start point of the cut and q the end point of the cut.For a cut c in P, we define the left polygon, L(c), to be the set of points in P locally to the left of c according to c's direction.Assume a counterclockwise walk of ∂P.Such a walk imposes a direction on each of the edges of P in the direction of the walk.Consider a reflex vertex of P. The two edges incident to the vertex can each be extended inside P until the extensions reach a boundary point.These extended segments form cuts given the same direction as the edge they are collinear to.We call these cuts extensions; see Figure 1(a) and denote the set of extensions in P by E.
We define a guard set to be any set of points G that together see all of P, i.e., g∈G VP(g) = P.It is clear that any guard set must have points intersecting L(e) for every extension e of P, since otherwise the edge collinear to e will not be seen by the guard set; see Figure 1(a).Chin and Ntafos [7] prove that this is indeed also a sufficient requirement when the guard set is connected, as it is for a shortest watchman route.For disconnected guard sets, it is easy to construct examples where this requirement is not sufficient; see Figure 1(b) where the guard set consisting of the three marked convex vertices has points to the left of each essential extension but it does not see the complete polygon.
Let c be a cut.If a guard set G intersects L(c), we say that c is covered by G. Furthermore, if G intersects the interior of L(c), then G properly covers c.If G properly covers c and intersects c, we say that G crosses c.Finally, if G covers c, but does not properly cover c, then G reflects on c.
We also make use of the fact that shortest paths in P between combinations of segments and points can be computed efficiently [11,12,20].We denote the shortest path between two objects X and Y in P by SP (X, Y ).
Let X 1 and X 2 be two closed polygonal cycles contained in a simple polygon P, such that each point in P sees some point on X 1 or X 2 .We call the pair X = (X 1 , X 2 ), a two-watchman route.The length of a cycle X in P is denoted ∥X ∥ and we let ∥X ∥ sum def = ∥X 1 ∥ + ∥X 2 ∥ be the sum length of X and ∥X ∥ max def = max ∥X 1 ∥, ∥X 2 ∥ be the max length of X .Let S = (S 1 , S 2 ) and T = (T 1 , T 2 ) be two two-watchman routes such that ∥S∥ sum ≤ ∥X ∥ sum and ∥T ∥ max ≤ ∥X ∥ max for any two-watchman route X in P. We say that S is a minsum two-watchman route and T is a minmax two-watchman route.The following inequalities are immediate from the definitions, for any two-watchman route X , and therefore Hence, computing a c-approximation for one measure also gives at most a 2c-approximation for the other measure.One could imagine that there always is a cut in the polygon such that the two tours that are shortest watchman tours for the two sub-polygons formed are almost as short as the optimum two-watchman tour.Trying out all possible cuts, and solving the two single watchman tour subproblems in each case would give a simple and efficient algorithm with good approximation ratio.One would then imagine wrong, as the counterexample in Figure 1(c) shows.The red and blue point sized tours, each see the grey region and the regions of their own color.Here, any partition of the polygon into two pieces by a cut will make the watchman tour solution of each piece infinitely longer than the optimal solution.The example can easily be modified for non-point sized tours.

General Properties of Two-Watchman Routes
We make the following assumption about the polygons considered in this section.Assumption 3.1 The polygon P considered in this section is simple and not guardable by one or two point guards.Hence, P is not convex or starshaped.
The following lemma is at the heart of our construction of an algorithm to compute a two-watchman route.
Lemma 3.1 If two tours in P see all of ∂P, then they see all of P.
Proof: We do a proof by contradiction.Let X 1 and X 2 be two tours in P and assume that p is an interior point of P not seen by any of them.We show that there must be some boundary point that is also not seen by the tours contradicting that X 1 and X 2 together see ∂P.Let VP(X 1 ) and VP(X 2 ) be the two visibility polygons of the tours.Each of them must have boundary segments w 1 and w 2 separating the subpolygon containing p from the subpolygon containing the tour.The segment w 1 cuts P into two subpolygons.Let P X1 be the subpolygon containing X 1 and let P p be the subpolygon containing p.If X 2 intersects w 1 , we interchange the roles of X 1 and X 2 , thus we can assume that X 2 is either completely in P X1 or completely in P p .We have three cases: X 2 lies in P X1 .Let SP (p, X 2 ) be the shortest path from p to X 2 and let s be the first segment of this path.It connects p with a reflex vertex v on the boundary of P. Extend s away from v until it hits the boundary at p ′ ; see Figure 2(a).The point p ′ is clearly not seen by X 2 since if it were, then p would also bee seen by X 2 .The point p ′ is not seen by X 1 either since SP (p, X 2 ) crosses w 1 at some point q with SP (p, q) in P p and since SP (p, q) is a shortest path, the extension from p to p ′ cannot cross w 1 ; see Figure 2(b).X 2 lies in P p and w 1 and w 2 intersect.Let q be the intersection point between w 1 and w 2 and let s be the first segment of SP (p, q).It connects p either with a reflex vertex v on the boundary of P or with q.Extend s away from v (or q) until it hits the boundary at p ′ ; see Figure 2(c).The point p ′ cannot be seen by X 1 or X 2 since SP (p, q) lies outside both VP(X 1 ) and VP(X 2 ) (except for the point q), and hence, since SP (p, q) is a shortest path, the extension from p to p ′ cannot cross any of w 1 or w 2 .
X 2 lies in P p and w 1 and w 2 do not intersect.It is clear that there exist points on the boundary not seen by the two tours since the boundary points close to the end points of w 1 not in P X1 and the boundary points close to the end points of w 2 not in P X2 are not seen by any of the tours; see Figure 2(d).
This completes the proof. 2 The lemma implies that it is sufficient that our algorithm constructs two tours that together see the whole boundary of P to guarantee that all of P is guarded.Consider two tours X 1 and X 2 and a polygon boundary edge b.
and therefore convex.Since the intersection of two connected and convex sets is also a connected and convex set, it follows that the connectedness of VP(X 1 ) ∩ VP(X 2 ) ∩ b = i∈{1,2} VP(X i ) ∩ b is an immediate consequence, if we can show that the two sets VP(X i ) ∩ b, for i ∈ {1, 2}, are connected.We make a proof by contradiction and assume that VP(X i ) ∩ b is disconnected, for each i ∈ {1, 2}.By following b from one end point to the other we pass each of the connected components giving us an ordering of them.Let r 1 be a point in the first component and let r 2 be a point in the last component.Each point r 1 and r 2 is seen by X i .Hence, for X i there is a point r ′ on b between r 1 and r 2 that is not seen by X i .Let p j , for j ∈ {1, 2}, be two points on X i that see r j respectively.Without loss of generality, we can assume that [p j , r j ] does not intersect X i except at p j , for i ∈ {1, 2}.If the segments [p 1 , r 1 ] and [p 2 , r 2 ] do not intersect, we construct a closed simple polygon R i in P as follows: follow b from r 1 to r 2 , from r 2 to p 2 , from p 2 to p 1 along a simple path in X i , and finally from p 1 to r 1 .The only edges of the constructed polygon R i that are not part of X i are the three edges adjacent to r 1 and r 2 so R i is completely seen by the part of the tour X i connecting p 2 to p 1 .Hence, the point r ′ is also seen since it lies on b between r 1 and r 2 , giving us a contradiction.
On the other hand if the segments [p 1 , r 1 ] and [p 2 , r 2 ] intersect, let q be an intersection point between [p 1 , r 1 ] and [p 2 , r 2 ].The three points p 1 , p 2 , and q form a triangle interior to P and we construct a closed simple polygon R ′ i in P having q as a vertex as follows: follow a simple path of X i from p 1 to p 2 , a straight edge from p 2 to q, and a straight edge from q to p 1 .If we extend the segment [p ′ , q] inside R ′ i , it must intersect X i , since p 1 connects to p 2 in R ′ i using a simple path of X i .Hence, the point p ′ is also seen from X i , again giving us a contradiction. 2 From Lemma 3.2 we have that T 1 and T 2 both see connected components of any boundary edge of P. Hence, a boundary edge b can be partitioned into at most three subsegments, at most one of which is seen by both T 1 and T 2 and the remaining at most two are seen by one of T 1 and T 2 .
Our next lemma shows that ∥(T 1 , T 2 )∥ max < ∥W opt ∥ and this strict inequality is used in the proof of Lemma 3.4.Lemma 3.3 Let (T 1 , T 2 ) be the shortest minmax two-watchman route and W opt the shortest watchman route.
Proof: Consider a shortest watchman route W opt and let p and q be two points on W opt such that if you follow the tour W opt from p a distance of ∥W opt ∥/2 in counterclockwise order, you reach the point q.
It is clear that following the tour from p to q in clockwise order also gives a path of length ∥W opt ∥/2.Let SP (p, q) be the shortest path from p to q in P. If ∥SP (p, q)∥ < ∥W opt ∥/2, we construct a two-watchman route (X 1 , X 2 ) such that ∥(X 1 , X 2 )∥ max < ∥W opt ∥ as follows.Let X 1 be the tour obtained by following SP (p, q) from p to q and W opt from q to p in counterclockwise order.Since ∥SP (p, q)∥ < ∥W opt ∥/2, the length of X 1 is strictly smaller than ∥W opt ∥.The tour X 2 is obtained by following W opt from p to q in counterclockwise order and then SP (p, q) from q to p. Again, the length of X 2 is strictly smaller than ∥W opt ∥.
If ∥SP (p, q)∥ = ∥W opt ∥/2, on the other hand, then both the clockwise and counterclockwise paths from p to q along W opt follow SP (p, q), since shortest paths are unique.We construct a two-watchman route (X 1 , X 2 ) as follows.Let r be the midpoint on SP (p, q) and let X 1 be the tour obtained by following SP (p, q) from p to r and back to p. Similarly, let X 2 be the tour obtained by following SP (p, q) from q to r and back to q.We have that ∥(X 1 , X 2 )∥ max = ∥W opt ∥/2 < ∥W opt ∥ also in this case.Since (T 1 , T 2 ) is the shortest minmax two-watchman route, it has max-length bounded by that of (X 1 , X 2 ) and is hence also strictly smaller than ∥W opt ∥, concluding the proof. 2 In the previous section, we defined E to be the set of extensions of the edges in P.There is a subdivision of E into nonempty subsets E 1 and E 2 , such that each tour T 1 and T 2 of a minmax twowatchman route covers the extensions in E 1 and E 2 respectively.It is clear that neither E 1 nor E 2 can be empty since if one of them is empty, the other contains all the extensions of E. This means that one of T 1 or T 2 covers all the extensions in E, but the shortest tour that covers all extensions in E is W opt , the shortest watchman route, contradicting Lemma 3.3.Note also that the subdivision is not necessarily a partition since an extension in E can be covered by both T 1 and T 2 .The following stronger claim also holds.Lemma 3.4 There exists a minmax two-watchman route T = (T 1 , T 2 ), such that each tour T i intersects some extension in E i , i ∈ {1, 2}.
Proof: Assume that both tours T 1 and T 2 are as short as possible.At least one of them will have the length ∥(T 1 , T 2 )∥ max and the other the shortest possible length given that the first tour achieves the length ∥(T 1 , T 2 )∥ max .We will show the result only for tour T 1 , but the same argument holds also for T 2 .
Assume first that ∥T 1 ∥ = 0, i.e., T 1 is a point sized tour.This implies that P\VP(T 2 ) is starshaped even though it may be a disconnected set.The set of points in P that see all of P \ VP(T 2 ), also known as the kernel, is the intersection of the left halfplanes collinear to the boundary edges from ∂P ∩ (P\VP(T 2 )) [19].Left means here locally to the left of the associated edge in the order of the counterclockwise traversal.The kernel boundary cannot be made up only of boundary edges of P, since that would make P a convex polygon and thus guardable with one point guard contradicting Assumption 3.1.Hence, there is a kernel boundary edge collinear with some extension of P and we can let T 1 be a point on this kernel boundary edge.Now, assume that ∥T 1 ∥ > 0. We make a proof by contradiction and assume further that T 1 does not intersect any extension in E. If this is the case, T 1 cannot have any reflex vertices, since if T 1 does, then any such vertex coincides with a reflex vertex of P and thus T 1 intersects the two extensions adjacent to this vertex.Hence, T 1 has only convex vertices.If T 1 is a line segment, we consider the two endpoints of the segment to be the convex vertices of the tour that goes back and forth between them.
Consider the points of the boundary ∂P of P that are seen by T 1 .The visibility from T 1 subdivides ∂P into disjoint (maximal) subpaths and we color the interior points of each subpath white if T 1 sees these points and black if T 1 does not see the points.The endpoints of each (maximal) subpath is colored grey.For a color c ∈ {black, grey, white}, we say that a point on ∂P has color c for T 1 .We can similarly color the boundary for T 2 in which case we say that a point has color c ′ for T 2 , c ′ ∈ {black, grey, white}.
We refine the coloring of the boundary somewhat by considering the convex vertices of T 1 .Let u be a convex vertex of T 1 .There exists at least one grey boundary point p(u) that is seen from u but not from any other point of T 1 .The point p(u) must exist, otherwise T 1 can be made shorter, contradicting that both tours T 1 and T 2 are as short as possible.In fact, u can have many such points.We therefore consider a convex vertex u of T 1 to have multiplicity k, if there are k different points p(u) associated to u.We differentiate between p(u) and p(u ′ ) even though u = u ′ and has multiplicity at least two.We let the color of each point p(u) be dark grey.The remaining grey points are considered to be light grey.
Let l (u) be the maximal line segment in P passing through the points u and p(u).The segment l (u) must intersect at least one reflex vertex of ∂P between u and p(u) that hides p(u) from T 1 \u.Let v(u) be the reflex vertex of ∂P on l (u) closest to p(u).The line segment [p(u), v(u)] partitions P into two subpolygons P 1 containing T 1 and P 0 .Let b(u) be the polygon boundary edge adjacent to the reflex vertex v(u) in P 0 and let e(u) be the extension collinear to b(u) inside P 1 .We associate a direction to l (u) so that e(u) lies locally to the left of l (u).Henceforth, we denote P 0 by P e(u) and P 1 by P l(u) to let them depend on the vertex u of T 1 .We refer to Figure 3(a) for an illustration of the given definitions.
The argument for a contradiction relies on the following claim: "any boundary point that is dark grey for T 1 must also be grey for T 2 ."Assuming boundary point p is dark grey for T 1 , we make the following case analysis.
If p is white for T 2 , we have an immediate contradiction since the single convex vertex u of T 1 that sees p can be cut away from T 1 arbitrarily close to u, thus shortening the length of T 1 ; see Figure 3(b).
If p is black for T 2 , this means that there is open interval on the boundary ∂P centered at p that is not seen by any point of T 2 .Since p is one endpoint of a maximal subpath that is seen by T 1 , there exist boundary points not seen by either T 1 or T 2 , a contradiction.
The rest of the proof now shows that, if T 1 does not intersect some extension, then there exists a dark grey boundary point for T 1 that is either black or white for T 2 , or T 1 can be shortened, thus establishing a contradiction.We do this by a further case analysis.
If If all pairs of vertices u and u ′ of T 1 (with multiplicity) have the property that L l (u) ∩L e(u ′ ) ̸ = ∅, where U is the set of vertices of T 1 (with multiplicity), then let q be a point in u∈U L l (u) and let u 1 and u 2 be two distinct vertices of T 1 such that T 1 is completely contained in the cone ∠u 1 , q, u 2 .We note that T 1 is the shortest tour that visits the regions L l (u) , for u ∈ U.
Let △u 1 , q, u 2 denote the triangle with corners at u 1 , q, and u 2 .The interior region of ∠u 1 , q, u 2 \△u 1 , q, u 2 cannot contain convex vertices of T 1 , since any such vertex u ′ would have q ̸ ∈ L l (u ′ ) contradicting that u∈U L l (u) ̸ = ∅; see Figure 3(c).T 1 thus connects u 1 and u 2 by a line segment.
Vertex u 1 (with multiplicity) intersects u∈Uu 1 L l (u) for some subset U u1 of U. Similarly, the vertex u 2 (with multiplicity) intersects u∈Uu 2 L l (u) for some subset U u2 of U, with U u1 ∩ U u2 = ∅.Since the intersection of locally convex regions is also locally convex, any point on the line segment [u 1 , q] intersects u∈Uu 1 L(l (u)) and similarly, any point on the line segment [u 2 , q] intersects u∈Uu 2 L l (u) .Thus we can move u 1 and u 2 (with multiplicity) along their corresponding line segments towards q, thus shortening T 1 , giving us a contradiction; see Figure 3(c).
If u∈U L l (u) = ∅ and for all pairs u and u ′ , L l (u) ∩ L l (u ′ ) ̸ = ∅, T 1 must have at least three vertices.We first show that there exists a subset of three vertices u 1 , u 2 , and the segments l (u) and l (u ′ ) intersect in a point, for every vertex pair u and u ′ .Pick u 1 to be any vertex of T 1 and assume without loss of generality that l (u 1 ) is horizontal and directed towards the right; see Figure 3(d).Initialize the set L to be L := {u 1 } and sort the remaining vertices u on the angle the corresponding cut l (u) makes with l (u 1 ), from 0 to 2π.Now, add vertices u (with multiplicity), one by one, according to the sorted order to L, for u ∈ U until u∈L L l (u) = ∅.Let u 2 denote the last vertex added to L during the process above, and let u 3 be a vertex in L such that the intersection q 1 = l (u 3 ) ∩ l (u 1 ) lies after any point in the intersection L l (u 1 ) ∩L l (u 3 ) lies above (or on) l (u 1 ) and any point in the intersection L l (u 2 ) ∩ L l (u 3 ) lies below l (u 1 ), since q 2 lies below l (u 1 ); see Figure 3(d).
This also shows that u 3 must exist, since if, for all vertices u ∈ L \ {u 1 , u 2 }, the point l (u) ∩ l (u 1 ) lies before l (u) ∩ l (u 2 ) on l (u), the first such intersection point on l (u 2 ) along l (u 2 ) lies to the left (or on) each cut l (u), for u ∈ L, contradicting that u∈L L l (u) = ∅; see Figure 3(d).
The tour T 1 has no points in any of the regions L e(u 1 ) , L e(u 2 ) , or L e(u 3 ) , so T 2 must intersect each of them.Assume that T 2 does not intersect l (u 2 ) or l (u 3 ), otherwise at least one of p(u 2 ) or p(u 3 ) is white for T 2 , giving us a contradiction.However, then T 2 must have interior points in L l (u 2 ) ∩ L l (u 3 ) since T 2 intersects L e(u 2 ) and L e(u 3 ) but does not intersect l (u 2 ) or l (u 3 ).Hence, T 2 has points below l (u 1 ) and since L e(u 1 ) lies above (or on) l (u 1 ), T 2 must intersect l (u 1 ) and thus p(u 1 ) is white for T 2 , again giving us a contradiction; see Figure 3(d).
This concludes the proof. 2

Tentacles and Jellyfish
We will use the following definitions extensively in the sequel.
Definition 4.1 For a point q in P and a point r on the boundary ∂P, we call the shortest path from q to some point in P that sees r, a tentacle from q to r, denoted Z r q .We say that q is the head of the tentacle and that a tentacle is attached to its head.The other endpoint of the tentacle is called the tip.
With a tentacle Z r q (where q does not see r) we also associate a tentacle cut c(Z r q ).Consider the maximal line segment l in P passing through the tip p of Z r q and the boundary point r.If the segment l has endpoints r and r ′ and (possibly) subdivides into connected pieces l 1 , l 2 , . . .intersecting the boundary only at the end points and where l i partitions P into two subpolygons, one containing q and one containing r.The cut c(Z r q ) is the segment l i directed so that q ∈ P \ L c(Z r q ) ; see Figure 4(a).The first boundary vertex u encountered as you move from r along l towards p is the hiding vertex of the tentacle Z r q .We can prove the following technical lemma.Lemma 4.1 If q is a point in P and s b is a subsegment of a boundary edge b of ∂P having endpoints r 1 and r 2 , then the two tentacles Z r1 q and Z r2 q together see the whole subsegment s b .
Proof: The proof is a simple modification of the proof of Lemma 3.2.Let p 1 and p 2 be the two tips of Z r1 q and Z r2 q , respectively.Let r be some arbitrary point in s b .If the segments [p 1 , r 1 ] and [p 2 , r 2 ] do not intersect, we construct a closed simple polygon R in P as follows: follow s b from r 1 to r 2 , from r (a) q , its hiding vertex, and its associated cut.(b) The difference between tentacle and edge restricted tentacle.Vertex u is the hiding vertex for Z v q and v is the hiding vertex for Z v q (b).
r 2 to p 2 , from p 2 to q along the tentacle Z r2 q , from q to p 1 along Z r1 q , and finally from p 1 to r 1 .The only edges of the constructed polygon R that are not part of the two tentacles are the three edges adjacent to r 1 and r 2 so R is completely seen by the two tentacles.Hence, the point r is also seen since it lies on s b between r 1 and r 2 .
On the other hand if the segments [p 1 , r 1 ] and [p 2 , r 2 ] intersect, let p be an intersection point between [p 1 , r 1 ] and [p 2 , r 2 ].The three points r 1 , r 2 , and p form a triangle interior to P and we construct a closed simple polygon R ′ in P having p as a vertex as follows: follow the tentacles from r 1 to r 2 via q, a straight edge from r 2 to p, and a straight edge from p to r 1 .If we extend the segment [r, p] inside R ′ , it must intersect a tentacle, since r 1 connects to r 2 in R ′ using the tentacles.Hence, the point r is also seen from the tentacles. 2 Let s be a line segment in P and let b = [v, v ′ ] be some boundary edge of ∂P.The next lemma establishes that if we move the head of the tentacle Z r q , from q ∈ s, a small distance to the point q ′ ∈ s and the point r ∈]v, v ′ [ to the point r ′ ∈]v, v ′ [ also a small distance, the difference in length between the two tentacles ∥Z r q ∥ − ∥Z r ′ q ′ ∥ is a smooth function.
Lemma 4.2 Let q move a distance δ to q ′ on a line segment s and let r move a distance ϵ to r ′ , where both r and r in such a way that the first segment of the tentacles from q and q ′ intersect the same reflex vertex, if the tentacle consists of multiple segments, and c(Z r q ) and c(Z r ′ q ′ ) have the same hiding vertex, then where F 0 , . . ., F 23 are constants.
The proof of the lemma is a lengthy case analysis where all arguments are based on similarity and the cosine theorem and is therefore deferred to Appendix A.
To alleviate the fact that Lemma 4.2 only holds for points r in the interior of boundary edges we define the edge restricted tentacle Z r q (b) to be An edge restricted tentacle Z r q (b) can differ from Z r q only when r is a vertex of b.If v is a reflex vertex and q lies to the right of extension e collinear to boundary edge b, then Z v q (b) is the shortest path from q that sees b, not just v; see Figure 4(b).In all other cases, Z r q (b) = Z r q .The proof of Lemma 4.1 does not make use of the edge restriction of a tentacle Z r q (b) so it still holds for edge restricted tentacles.We can generalize Lemma 4.2 to also hold for vertices using edge restricted tentacles.We claim this as a corollary.Corollary 4.3 Let q move a distance δ to q ′ on a line segment s and let r move a distance ϵ to r ′ along a boundary edge b = [v, v ′ ], in such a way that the first segment of the tentacles from q and q ′ intersect the same reflex vertex, if the tentacle consists of multiple segments, and c Z r q (b) and c Z r ′ q ′ (b) have the same hiding vertex, then where F 0 , . . ., F 23 are constants.
We will henceforth only work with edge restricted tentacles and just call them tentacles.Given two points q and q ′ in P, consider the tentacles Z v q (b) and Z v q ′(b ), for each boundary edge b and each vertex v of b.We define two sets J q and J q ′ of tentacles such that In this way, each end point v of each boundary edge b has exactly one tentacle in one of J q or J q ′ .From Lemma 4.1 it is clear that if both endpoints of a boundary edge b = [v, v ′ ] have tentacles in the same set, either J q or J q ′ , then the tentacles in the set sees the whole edge b.However, assume that Since the length of a tentacle Z r q (b) changes smoothly as r moves along b from v to v ′ ; see Corollary 4.3, there is some point r * on b such that ∥Z r * q (b)∥ = ∥Z r * q ′ (b)∥.If we include Z r * q (b) into J q and Z r * q ′ (b) into J q ′, this guarantees that the tentacles in J q and J q ′ together see b.
Thus, if each edge b either has the two tentacles of its endpoints in one set or there is a point r * on b such that Z r * q (b) ∈ J q and Z r * q ′ (b) ∈ J q ′ , then the whole boundary is seen by the tentacles in the set.By considering the tour constructed by following each tentacle from the head to the tip and back in some order for each set J q and J q ′ , by Lemma 3.1, the polygon P is guarded by the tentacles in the two sets.We call each of the two sets J q and J q ′ a jellyfish with head q and q ′ , respectively, and J q,q ′ = J q ∪ J q ′ the jellyfish pair with heads q and q ′ .We define ∥J q,q ′ ∥, the length of a jellyfish pair, to be the length of its longest tentacle; see Figure 5 Figure 5: (a) A pair of tentacles Z r q (b) and Z r q ′(b ) in blue, (b) a jellyfish pair J q,q ′ in blue with jellyfish Jq and J q ′ , (c) a minimum jellyfish pair J min Let e 1 and e 2 be two extensions intersected by T 1 and T 2 respectively.These extensions exist by Lemma 3.4 and we have the following lemma.Proof: Without loss of generality, assume that a longest tentacle in J u1,u2, is Z r u1 (b), for some point r on boundary edge b.We distinguish five cases.
1.If r is an interior point of b seen by T 1 , then follow a path from u 1 along T 1 until we reach the first point u ′ 1 on T 1 that sees r.Denote the subpath of T 1 thus constructed T 1 [u 1 , u ′ 1 ] and let the other subpath (T 1 , u 1 ] also sees r since u ′ 1 sees r.The tentacle Z r u1 (b) is at most as long as the shorter of the subpaths 5. If r = v is a vertex of b not seen by T 1 , then b contains some connected set that includes v and that is not seen by T 1 .This set must be seen by T 2 and we can use the argument in the previous step to establish that ∥Z v u1 (b)∥ ≤ ∥T 2 ∥/2 also in this case.
This concludes the proof.

2
Given two segment s and s ′ in P, we define the bases along s and s ′ to be a pair of points having the property q * , q ′ * = arg min q∈s,q ′ ∈s ′ ∥J q,q ′ ∥ , i.e., two points, q * on s and q ′ * on s ′ , where ∥J q * ,q ′ * ∥ is minimal.We denote the jellyfish pair J q * ,q ′ * by J min s,s ′ , the minimum jellyfish pair; see Figures 5(b)  and (c).
From this definition and Lemma 4.4, we have that where again, e 1 and e 2 are two extensions intersected by T 1 and T 2 , respectively.Let q 1 on e 1 and q 2 on e 2 be the two bases of J min e1,e2 ; see Figure 5(c).We denote by J min e1 the subset of tentacles having their heads at q 1 and by J min e2 the subset of tentacles having their heads at q 2 .Each set of tentacles J min e1 and J min e2 is a minimum jellyfish.We call q 1 the base of J min e1 and q 2 the base of J min e2 .Thus, J min e1,e2 = J min e1 ∪ J min e2 .The main part of our algorithm, presented in the next section, computes, for every pair of extensions and every pair of boundary edges, the heads of the shortest tentacle pairs that see these edges.The heads are then used as potential bases and the length of the jellyfish pair with these heads as bases is computed.We keep the jellyfish pair with minimum length and its bases through the iteration and from the previous discussion we know that at the end of the iteration the final bases are q 1 and q 2 .

The Algorithm
Our algorithm is illustrated in pseudo-code in Figure 6 and we show that it approximates a minmax two-watchman route by a factor of 7π/6 + 3 − √ 3 + √ 5 arcsin 1/ √ 5 and therefore by Inequality (2) also a minsum two-watchman route by a factor twice as large.
The algorithm begins by running Belleville's algorithm [2,3] to establish if the polygon is guardable by two point guards.If this is the case, it returns the two point guards computed by the algorithm.Note that if P is two-guardable by point guards, our algorithm must obtain two such point guards to satisfy the approximation guarantee.Otherwise, it computes the set of extensions E in O(n log n) time using a dynamic ray-shooting data structure [16], and initializes the solution to be a single shortest watchman route W opt [26,31] together with some arbitrary point in P.
The rest of this section is devoted to showing how to implement Step 5 of the algorithm.It consists of an iteration over all pairs of extensions.For each pair, we assume that each tour in a minmax two-watchman route intersects one of the extensions in the pair.

Computing Tentacles and Bases
The algorithm needs to find the two bases q 1 on e 1 and q 2 on e 2 .To this end, let s ei be the maximal line segments through q i , orthogonal to e i inside P, for i ∈ {1, 2}.The segment s ei partitions P into two subpolygons P L and P R .The minimum jellyfish J min ei either has one tentacle that attains the length ∥J min ei ∥ with its first segment orthogonal to e i or at an endpoint of e i , or it has two tentacles, one in P L and the other in P R , that attain this length.To prove this, note that if the single tentacle attaining the length ∥J min ei ∥ does not have a first segment orthogonal to e i , then by moving the head slightly along e i , we can reduce the length of the tentacle and thereby the jellyfish.Similarly, if all  tentacles attaining the maximal length are in the same subpolygon, say P L , then we can move the head along e i into P L , again reducing the length of the jellyfish.In both cases, this contradicts that J min ei is a minimum jellyfish from a minimum jellyfish pair on e 1 and e 2 .Thus, there are at most two longest tentacle pairs of J min e1,e2 , at least one pair of which attains the length ∥J min e1,e2 ∥.We identify the different cases that can occur and design the data structures needed to compute the bases.These data structures are, for each reflex vertex in P and each extension endpoint, the shortest path tree to every vertex in P [12].The shortest path trees are augmented with the additional edges and leaves obtained by extending each tree edge until it intersects a boundary edge of P without crossing any other tree edge.Also, for each augmented tree, a data structure is built, enabling us to find the common ancestor of any pair of nodes in the tree (vertices of P) in constant time [14].These can be precomputed in linear time for each root vertex, i.e., in quadratic time in total.

Case 1
If J min e1,e2 has one unique longest tentacle, then we know from the previous discussion that it is a tentacle Z v qe i (b) for some vertex endpoint v of some boundary edge b and i = 1 or i = 2.The point q ei is the point on e i that minimizes this distance and furthermore let e be the extension associated to it and we have that v) .In both cases, q ei is the point of intersection between the shortest path and e i .Given e 1 and e 2 we can, for each boundary edge b and for each vertex end point v, verify if v is reflex or convex, compute SP e 1 , VP(v) ∩ L(e) and SP e 2 , VP(v) ∩ L(e) or SP e 1 , VP(v) and SP e 2 , VP(v) , depending on the case, in linear time [10,11,17,18,20,25].We denote these tentacles Z v e1 (b) and Z v e2 (b) to indicate that the intersection points with e 1 and e 2 are not fixed given points.We select the shorter of the two, Z v ei (b), identifying the intersection with the Figure 7: Computing the bases of the minimum jellyfish pair.
corresponding extension e i , i = 1 or 2, keeping the q ei for which the tentacle is the longest.After iterating over all boundary edges, one potential base q ei remains on e i and one q e3−i remains on e 3−i .The whole process takes quadratic time and gives us the potential bases q (1) 1 and q (1)  2 on e 1 and e 2 , respectively.

Case 2
If J min e1,e2 has two longest tentacles, this can occur in three different ways.One possibility is that two tentacles Z v ei (b) and Z v ′ ej (b ′ ), i ∈ {1, 2}, j ∈ {1, 2} and different boundary edges b and b ′ , have exactly the same length.If i = j, the heads of Z v ei (b) and Z v ′ ej (b ′ ) also coincide in this case, otherwise the base is found in Case 3.Such tentacles are discovered using the method described in the previous case.
The second way is that two tentacles in J min e1,e2 are Z r * e1 (b) and Z r * e2 (b), for some boundary edge b, where r * is a point on b such that ∥Z r * qe 1 (b)∥ = ∥Z r * qe 2 (b)∥, q e1 and q e2 being the points on e 1 and e 2 that make these tentacles as short as possible.We can, for each boundary edge The positions on b for the first three event point types can be obtained in linear time, if Z r ei (b) consists of at least two segments having as common endpoint the reflex boundary vertex u i , by a traversal of the augmented shortest path tree to each vertex in P from the root u i , giving us a total of O(n) such event points.If Z r ei (b) consists of just one segment, the positions for the first three event point types on b can be obtained in linear time by a traversal of the augmented shortest path trees rooted at the two end points of e i .
The fourth type is obtained by finding the point at which the first edge of the tentacle hits either endpoint of e i and where the last edge of the tentacle intersects c Z r ei (b) orthogonally on the boundary which can happen only once for each tentacle in each interval between event points of the first three types.Finally, the last type of event points can occur only a constant number of times in each interval between event points of the first four types, since here each function is the sum of at most three square roots of rational polynomials of constant degree and two such functions can be equal in at most a constant number of points.The number of event points between v and v ′ on b is at most linear and iterating over all possible boundary edges, takes quadratic time to solve this case.This gives us the potential bases q (2)  1 and q (2)  2 on e 1 and e 2 , respectively.

Case 3
In the third possibility that J min e1,e2 has two longest tentacles, the two tentacles are q (b 2 ) for two boundary edges b 1 and b 2 with vertex endpoints v 1 and v 2 respectively and q on e i such that ∥Z ei (b 2 ) and let q ei and q ′ ei be the heads of ei (b 2 ), respectively, on e i .We let a point q slide along e i from q ei to q ′ ei .Again, by Corollary 4.3, the lengths of Z v 1 q (b 1 ) and Z v 2 q (b 2 ) as q moves along e i are smooth functions (continuous and differentiable) except at the event points established in Case 2. At these event points, the structures of the tentacles are updated and we can test whether the two tentacles have equal length for some head point on e i before the next event point.The number of event points between q ei and q ′ ei on e i is at most linear.We perform these steps also on e 3−i and take the shortest pair as the representative base for the pair (v 1 , v 2 ) of vertices.Iterating over all possible pairs of boundary edges and their endpoints, the process takes cubic time in total and gives us the potential bases q (3)  1 and q (3)  2 on e 1 and e 2 , respectively.

Case 4
If J min e1,e2 has three longest tentacles, this can occur in two ways.The first possibility if some combination of three tentacles with common heads from the three previous cases exist, in which case these can be established using the previously described methods.
The second possibility that J min e1,e2 has three longest tentacles occurs if there are two boundary edges b q * (b 2 )∥, with q * on e i ; see Figure 7(b).We can establish the event points by a combination of the methods in Cases 2 and 3. Begin by finding the interval [q ei , q ′ ei ] on e i by computing the tentacles Z ei (b 2 ) having the heads q ei and q ′ ei , and then the event points generated by Z v q (b) and Z v ′ q (b ′ ) in order as q moves along e i from q ei to q ′ ei .Subsequently, establish the event points generated by Z r ei (b) and Z r e3−i (b) in order as r moves along b.For each pair of intervals between event points along e i and along b 1 , we verify if we can establish a point q in the interval on e i and a point r in the interval on b 1 such that Z r q (b 1 ), Z v 2 q (b 2 ), and Z r e3−i (b 1 ) have equal length by solving the system of equalities given by the length functions of the three tentacles.Within each interval the length functions are smooth according to Corollary 4.3 so this takes constant time.In the worst case, we have to consider a linear number of intervals each on e i and b 1 taking quadratic time.Iterating over all possible pairs of boundary edges and their endpoints, the computation takes quartic time in total and gives us the potential bases q (4) 1 and q (4)  2 on e 1 and e 2 , respectively.

Case 5
If J min e1,e2 has four longest tentacles, this can occur in two ways.Again, the first possibility is if some combination of four tentacles with common heads from the four previous cases exist, in which case these can be established using the previously described methods.
The second possibility that J min e1,e2 has four longest tentacles occurs if there are two boundary edges b 1 and b 2 such that ∥Z 1 on e 1 , q * 2 on e 2 , r * 1 on b 1 , and r * 2 on b 2 ; see Figure 7(c).We can establish the event points by extending the method in Case 4, giving a linear number of intervals on each segment e 1 , e 2 , b 1 , and b 2 , where the length functions of the tentacles are smooth according to Corollary 4.3.We verify if we can establish point q 1 , q 2 , r 1 , and r 2 in their respective interval such that Z r1 q1 (b 1 ), Z r1 q2 (b 1 ), Z r2 q1 (b 2 ), and Z r2 q2 (b 2 ) have equal length by solving the system of equalities given by the length functions of the four tentacles which takes constant time in each interval.In the worst case, we have to consider a linear number of intervals each on e 1 , e 2 , b 1 , and b 2 , thus taking quartic time.Iterating over all possible pairs of boundary edges and their endpoints, the computation takes O(n 6 ) time in total and gives us the potential bases q (5)  1 and q (5)  2 on e 1 and e 2 , respectively.

Case 6
If J min e1,e2 has five or more longest tentacles, they must occur as some combination of tentacles structured as in the previous cases and they can therefore be obtained using the methods described above.This gives us five pairs of potential bases, q (1)  1 , q (1) 2 , q (2) 1 , q (2) 2 , . . ., q (5) 1 , q (5)  2 , for which we can compute the jellyfish pairs J q (1) , . . ., J q (5) 1 ,q , each in quadratic time, and from these we select the minimum one.By Corollary 4.3 and the previous discussion, it follows that this jellyfish pair is a minimum jellyfish pair J min e1,e2 with bases q 1 and q 2 on e 1 and e 2 , respectively.In this way, we have an O(n 6 ) time subroutine to find the bases q 1 and q 2 on e 1 and e 2 , respectively.Given the bases, the computation of J min e1,e2 takes an additional quadratic time.The whole process of Step 5.1 of the algorithm thus takes O(n 6 ) time.

Establishing the Tours
Given a minimum jellyfish pair J min e1,e2 , we sort the tentacles in decreasing order of length and for each tentacle Z r qi (b) in decreasing order check if c Z r qi (b) is already covered by a longer tentacle.If so, Z r qi (b) is removed from the jellyfish pair.We call the resulting jellyfish pair reduced and denote it by J red e1,e2 with individual jellyfish J red e1 and J red e2 .Let t(J ) denote the two relative convex hulls of each of the jellyfish in the jellyfish pair J inside P. Without loss of generality, if J = J 1 ∪ J 2 with J 1 and J 2 being the two jellyfish, t(J 1 ) and t(J 2 ) also denote the individual relative convex hulls of J 1 and J 2 in P. Let W 1 and W 2 be the relative convex hulls t(J red e1 ) and t(J red e2 ) in P, respectively.These tours can be computed in linear time by first following the shortest path from each tentacle tip to the next, cyclically around the corresponding head of each jellyfish and then applying the algorithm by Toussaint [32]; see Figure 8(a).
Consider a polygonal tour that has reflex vertices only at reflex vertices of P. A maximal consecutive subsequence of edges of the tour is called a reflex chain of the tour, if each interior vertex of the chain is reflex in the tour.The end vertices of a reflex chain must therefore be convex vertices of the tour.In contrast, a convex chain of the tour is a maximal consecutive subsequence of edges such that each interior and end vertex of the chain is convex in the tour.We note that a single convex vertex of a tour is a convex chain if the preceding and subsequent vertices are reflex.
Lemma 5.1 The tours (W 1 , W 2 ) obtained by algorithm Two-Watchman-Route form a two-watchman route and Proof: The correctness of the algorithm follows from Lemmas 3.1, 4.1, and the fact that since the two tours together see every boundary edge this ensures that they form a two-watchman route.
To prove the approximation bound, we assume that T 1 and T 2 do not intersect, otherwise and the algorithm initializes the two-watchman route with a shortest watchman tour and a point in Step 3 and then only updates its two-watchman route in Step 5.4 if its max length is strictly smaller than that of the current route pair.
The algorithm computes the reduced minimum jellyfish pair J red e1,e2 in Step 5.2.By trying all pairs of extensions in Step 5, the algorithm must necessarily consider a pair, e 1 and e 2 , intersected by the tours T 1 and T 2 ; see Lemma 3.4.Consider the tentacles in J red e1 and J red e2 centered on the bases q 1 on e 1 and q 2 on e 2 , respectively.Every tentacle has length at most R = ∥(T 1 , T 2 )∥ max /2 by Inequality (5), since we can assume that T 1 intersects e 1 and T 2 intersects e 2 , whereby the geodesic radii of W 1 and W 2 are both at most R.
Each convex chain of W 1 has length at most 2πR, where R is an upper bound on the length of each geodesic shortest path from q 1 to any point on W 1 , since the circle is the longest convex curve of radius R.This follows from Archimedes' axioms for arc-length [1,4].
We make a case analysis and bound the length of W 1 for each case separately.
W 1 has one convex chain.The convex chain of W 1 has length at most 2πR as we noted above.
The length of the possible reflex chain of W 1 is bounded by at most two radii from q 1 to the circle perimeter since its length is bounded by that of the two tentacles of J min e1 connecting to the endpoints of the reflex chain.Hence, W 1 has at least two convex chains.This case is further subdivided into the cases: W 1 or its interior intersects both T 1 and T 2 .If W 1 intersects T 1 , let p 1 be an intersection point of W 1 with T 1 .From p 1 move counterclockwise along W 1 until the endpoint of a tentacle from J red e1 is reached at p L .Similarly, move clockwise along W 1 until the endpoint of a tentacle from J red e1 is reached at p R .Since the region bounded by moving counterclockwise from p R along W 1 to p L , from p L along the tentacle of J red e1 to q 1 , and from q 1 along a tentacle of J red e1 to p R forms a pseudotriangle, relatively convex inside P, the shortest path from p 1 to q 1 has length at most that of one of the tentacles of J red e1 , which is bounded by R. If W 1 does not intersect T 1 , then T 1 lies interior to W 1 and we let p 1 be a point closest to q 1 .Again, the length of shortest path from p 1 to q 1 is bounded by R, since extending the first edge until it hits the tour W 1 at some point p ′ 1 , the shortest path from p ′ 1 to q 1 contains p 1 and since p ′ 1 lies on W 1 , we can use the previous argument to show that the length of the shortest path from p ′ 1 to q 1 is bounded by R. If W 1 intersects T 2 , let p 2 be intersection point of W 1 with T 2 , otherwise let p 2 be a point on T 2 closest to q 1 .In the same way as above, we can bound the length of the shortest path from p 2 to q 1 by R. Now, construct a tour W bnd by following T 1 from p 1 around in counterclockwise order, following the shortest path from p 1 to q 1 , the shortest path from q 1 to p 2 , from p 2 around T 2 in counterclockwise order, and then back along the shortest paths via q 1 to p 1 .It is clear that W bnd is a watchman tour and therefore has length no shorter than W opt and since the algorithm initializes the two-watchman route with W opt and an arbitrary point in Step 3 and then only updates its two-watchman route in Step 5.4 if it has max-length strictly smaller than the current route pair, the length of W 1 is bounded by W 1 or its interior intersects at most one of T 1 or T 2 .Without loss of generality, we assume that T 1 does not intersect W 1 or the interior of W 1 , otherwise we interchange the roles of T 1 and T 2 in the argument below.
Cut P along the segments of W 1 into disjoint pieces, thus partitioning P into separate components; see Figure 8(b).Let Q be the component containing T 1 .The subpath Π of W 1 bounding Q is either a single segment connecting two reflex vertices of W 1 or it consists of a single convex chain C between two segments having reflex vertices v and v ′ at the endpoints.Extend Π at both ends along W 1 until convex vertices are reached at both ends, these must exist since W 1 has at least two convex chains.Let the path thus obtained be Π ′ .If C 1 is not empty, consider the two endpoints v and v′ of C 1 (if the endpoints coincide, C 1 is a single point and has length 0, so we assume that the endpoints do not coincide); see Figure 8(b).Let e and e ′ be the two tentacle cuts covered by the two endpoints v and v′ of C 1 .Since T 2 does not cover any of e or e ′ , T 1 must have points to the left of these cuts.Without loss of generality, we assume that v is passed before v′ during a counterclockwise traversal of W 1 starting at a point interior to C 1 .We make the additional observation that any tentacle cut associated to convex vertices of W 1 \ C 1 must be covered by T 2 , otherwise T 1 would intersect W 1 or have points in its interior.
Let l and l ′ be the lines through e and e ′ and let p be the intersection point between l and l ′ , assuming that it exists.If l and l ′ are parallel or p lies after v on l in the direction of e, then the angle between the tentacle of J red e1 connecting q 1 and v and the tentacle of J red e1 connecting q 1 and v′ containing C 1 is at most π, since q 1 , v′ , p, and v form a convex quadrilateral (p can be taken to be a point on l implicitly at infinity, if l and l ′ are parallel); see Figure 9(a).Each segment of C 1 can be projected onto a half circle centered at q 1 having radius R without overlap so the length of C 1 is therefore bounded by πR in this case.Now, if p lies before v on l in the direction of e; see Figure 9(b), then since T 1 lies in Q without intersecting C 1 , T 1 must intersect the two cuts e and e ′ .Assume these intersection points are r and r ′ .The distance between r and r ′ is at most R since ∥T 1 ∥ ≤ ∥(T 1 , T 2 )∥ max = 2R by Inequality 5. Assume that the longest tentacle of J red e1 connecting q 1 with a convex vertex of C 1 has length D ≤ R and let d and d ′ be the points at distance exactly D from q 1 to l and l ′ , respectively.The point d must lie between v and r on e, otherwise T 1 intersects the longest tentacle of J red e1 and therefore also C 1 .For the same reason, the point d ′ must lie between v′ and r ′ on e ′ .The distance ∥d, d ′ ∥ ≤ R since T 1 does not intersect W 1 .Given that the angle at d, q 1 , v, and the angle at d ′ , q 1 , v′ , are each at most π/2, that the angle at d, q 1 , d ′ is θ, the segments of C 1 can be projected onto a semicircle centered at q 1 having radius D without overlap.The length of this semicircle is (π + θ)D, which is maximized for θ = π/3 and D = R as obtained by standard analytic methods.Thus, is the maximum bound in all cases.
Next, we bound the length of the remainder of W 1 .Let p now be an intersection point between W 1 and e 1 .From p, walk counterclockwise along W 1 back to p, shortcutting those convex vertices associated to tentacle cuts only covered by T 1 and let W ′ 1 be the tour thus obtained.Let J 2 e1 be the subset of tentacles of J red e1 for which the associated tentacle cut is covered by T 2 .By construction, the tour W ′ 1 is the relative convex hull of the tentacles of J 2 e1 in P. All convex vertices on W 1 associated to tentacle cuts covered only by T 1 lie on C 1 by our observation above, giving us since the union of the two tentacles connecting q 1 with the endpoints of C 1 intersects W ′ 1 , they together cover the tentacle cuts covered by W 1 at the same points, and W 1 is relatively convex.Our objective now is to bound the length of W ′ 1 .Let e be an extension covered by T 1 such that T 1 makes a reflection on e.Such an extension must exist by Lemma 3.4 since, if T 1 properly covers e, then it must cover some other extension in L(e).Without loss of generality, we can therefore assume that e 1 = e and thus that all but one point of T 1 lie in P \ L(e 1 ).It also follows that T 2 cannot cover e 1 , since this would mean that T 1 could be made shorter contradicting that T 1 and T 2 are as short as possible.Hence, all points of T 2 lie in P \ L(e 1 ).
We identify two different cases.
W ′ 1 has at least two reflex chains or one reflex chain with both endpoints in P \ L(e 1 ) We prove that T 2 must intersect W ′ 1 .Let e ′ and e ′′ be the two tentacle cuts associated to convex vertices of W ′ 1 on either side of a reflex chain with both end points in P \ L(e 1 ).The cuts e ′ and e ′′ must exist and do not intersect in P \ L(e 1 ), otherwise W ′ 1 does not have the stated reflex chain.Now, T 2 must cover e ′ and e ′′ so it either covers e ′ exactly at the reflection point of W ′ 1 and e ′ or T 2 covers e ′′ exactly at the reflection point of W ′ 1 and e ′′ , giving us an intersection point between W ′ 1 and T 2 in either case, or T 2 contains a path that connects a point in P \ L(e 1 ) ∩ L(e ′ ) with a point in P \ L(e 1 ) ∩ L(e ′′ ) which must intersect W ′ 1 since e ′ and e ′′ are separated by reflex vertices on W ′ 1 touching the boundary of P and T 2 has no point in the interior of L(e 1 ); see Figure 10(a).We can construct a tour that connects q 1 with the closest point on T 2 , follows T 2 around in counterclockwise order and then connects to q 1 .This tour has the following properties, that we call bounding properties, 1. it covers all the tentacle cuts covered by W ′ 1 (and thus by J 2 e1 ), 2. it lies completely in e 1 ∪ (P \ L(e 1 )), 3. it has a convex vertex at q 1 , and 4. it has length at most 2R + ∥T 2 ∥.The last bounding property follows since T 2 intersects W ′ 1 (or its interior).Now, let U 2 be the shortest tour that obeys the bounding properties.We show how to extend U 2 to a new tour V 2 so that 1 is relatively convex and contained in V 2 , we immediately have 2 .The path either degenerates into the single point p 1 end e (i) 2 intersect, or it is a path connecting a point r (i) 1,2 on e (i) 1 to a point r (i) 2,1 on e (i) 2 .In this case, is the shortest path from u (i) 1 to e (i) 1 , the path from r (i) 1,1 to r (i) 1,2 (or p (i) 1 ) on e (i) 1 , followed by the shortest path from e (i) 1 to e (i) 2 , the path from r (i) 2,1 (or p (i) 1 ) to v (i) 2 ; see Figure 10(c) and (d).
As previously noticed, the length of the subpath of 1 is upper bounded by the length of the two catheti connecting u (i) 1 with v (i) 1 , one being parallel to e (i)  1 and the other orthogonal to e (i) 1 .Similarly, the length of the subpath of 1 is lower bounded by the length of the line segment from u (i) 1 to v (i) 1 forming the hypotenuse of a right angled triangle with u (i) 1 and v (i) 1 as two corners.From elementary geometry it follows that the sum of the lengths of the catheti is bounded by √ 2 times the length of the hypotenuse in a right angled triangle.Thus, the length of the subpath of 1 .The same argument ensures that the length of the subpath of 2 is also at most √ 2 times the length of the subpath of 1 ] allowed to pass through the boundary of P, if e (i) 1 and e (i) 2 do not intersect.Let l be the line orthogonal to s passing through p (i) 1 .We slide l along the segment s from p (i) 1 towards q 1 until l touches a point of 1 and v (i) 2 inclusive, giving the line l * .In fact, this intersection point is one of v (i) 1 or v (i) 2 .Let r (i) 1,2 be the intersection point of SP (e (i) 1 , l * ) on e (i) 1 and r (i) 1, * the intersection point of SP (e (i) 1 , l * ) on l * .Similarly, let r (i) 2,1 be the intersection point of SP (e (i)  2 , l * ) on e (i) 2 and r (i) 2, * the intersection point of SP (e (i) 2 , l * ) on l * .As before, r (i) 1,1 is the intersection point of SP (u (i) 1 , e (i) 1 ) with e (i) 1 .Now, C (i) u (i) 1 , v (i) 2 is the shortest path from u (i)  1 to e (i) 1 , the path from r (i) 1,1 to r (i) 1,2 , followed by the shortest path from e (i)  1 to l * at r (i) 1, * , the path from r (i) 1, * to r (i) 2, * on l * , the shortest path from l * to e (i) 2 ending at r (i) 2,1 , followed by the path from r (i) 2,1 to v (i) 2 ; see Figure 10(e).Since α (i)  1 is acute, the interior angles between e (i) 1 and l * and between e (i) 2 and l * are both obtuse or right angles.Hence, the lengths of the subpaths of C (i) from u (i) 1 and from v (i) 1 to v (i) 2 are upper bounded by the lengths of the corresponding catheti of the right angled triangles, one connecting u (i)  1 and v (i) 1 , with one catheter being parallel to e (i) 1 , and one connecting v (i) 1 to v (i) 2 , with one catheter parallel to l * .As before, the length of this subpath of 2 is at most √ 2 times the length of the subpath of C (i) from u (i)  1 to v (i) 2 .Thus, we have proved Inequality (10) for both cases.
W ′ 1 has no reflex chain or one reflex chain with at most one endpoint in P \ L(e 1 ) If there is a point of T 2 at distance at most R from q 1 , then there exists a tour having the bounding properties as defined above and we can bound the length of W ′ 1 in exactly the same way as in the previous case.Hence, from now on, we assume that all points of T 2 have distance greater than R from q 1 .Since each tentacle of J 2 e1 has length at most R, every point of the tour W ′ 1 has distance at most R to q 1 and each tentacle is perpendicular to the tentacle cut which in turn when it has at most one reflex chain with at most one endpoint in P \ L(e1) and the distance from T2 to q1 is greater than R.
intersects T 2 , except where W ′ 1 has a reflex chain.Let D 1 be the possible set of points that can be points of W ′ 1 , given T 2 but for any possible set of tentacle cuts.Thus, W ′ 1 is contained in D 1 .The perimeter of D 1 consists of connected circular arcs with possible line segments in between.If W ′ 1 has a reflex chain, the perimeter alternates between circular arcs centered at q 1 and straight line segments connecting those reflex boundary vertices where W ′ 1 also has reflex vertices.Any other polygon boundary part intersecting the interior of the region is disregarded as we want to obtain the maximum possible perimeter length in relation to R, given that W ′ 1 has at most one reflex chain.D 1 is the region painted light green in Figure 11(a).Since W ′ 1 passes q 1 and the remaining perimeter of D 1 is convex (except where W ′ 1 follows the reflex chain), it follows that ∥W ′ 1 ∥ ≤ sup ∥∂D 1 ∥ over the set of all possible tentacle cuts.We bound the length of the perimeter of D 1 as follows.Consider the smallest angle cone ∠T 2 with apex q 1 that contains T 2 .Let t 1 and t 2 be two points of T 2 that touch the sides of this cone; see Figure 11(a).We assume a coordinate system where q 1 is at the origin, t 1 is at distance R + y 1 , with y 1 > 0, directly above q 1 and t 2 lies in the first quadrant in this coordinate system at distance R + y 2 , with y 2 > 0, from q 1 .We can also assume that any reflex chain of W ′ 1 lies in the first quadrant in the coordinate system.It is clear that if the reflex chain has points in the fourth quadrant, the length Figure 12: Illustrating the trade-off between the optimal base placement and the approximate base placement.

Complexity Analysis of the Algorithm
The complexity analysis of the algorithm is straightforward.The for-loop in Theorem 1 The Two-Watchman-Route algorithm computes a 5.969-approximation of the minmax two-watchman route and a 11.939-approximation of the minsum two-watchman route in O(n 8 ) time.

A Trade-off between Computation Time and Accuracy
We can trade the approximation bound for computational efficiency by realizing that relaxing the computation as described in Section 5.1 still provides base positions q 1 and q 2 sufficiently close to their optimal positions on e 1 and e 2 .To do this, we reduce the computation in Section 5.1 to only use the first two cases, taking O(n 2 ) time rather than O(n 6 ) time.Let q 1 be the base placement on e 1 using the reduced computation and let q * 1 be its optimal placement on e 1 .Let Z r q1 (b) be a longest tentacle in the jellyfish J min q1 .Now, consider the tentacle Z r * q * 1 (b), taking into account that r moves to r * on b when the head moves from q 1 to q * 1 on e 1 .There must exist a boundary edge b ′ such that the tentacle Z r ′ q * 1 (b ′ ) intersects the line through q 1 orthogonal to e 1 , otherwise q 1 would be closer to q * 1 ; see Figure 12.Hence, ∥q 1 , q * 1 ∥ ≤ ∥Z r ′ q * 1 (b ′ )∥ and we have since R is the length of the longest tentacle in J min e1 .We can argue similarly for J min q2 giving us the jellyfish pair J min q1,q2 for which we can compute the reduced jellyfish pair and then its relative convex hulls.
Using R ′ = 2R in the proof of Lemma 5.1 instead of R, all the arguments go through giving us a tour with an approximation ratio at worst twice that of Theorem 1.We state this as a corollary.

Figure 1 :
Figure 1: Illustrating the definitions and a counterexample.
T 1 has two vertices u and u ′ , such that L l (u) ∩ L e(u ′ ) = ∅, then the intersection L e(u) ∩ L e(u ′ ) is also empty, since L e(u) \P e(u) ⊂ L l (u) .This means that T 1 lies properly in the region P \ L e(u) ∪ L e(u ′ ) and T 2 must intersect the two disjoint regions L e(u) and L e(u ′ ) .Since L l (u) ∩ L e(u ′ ) = ∅, T 2 must cross l (u) and hence p(u) is white for T 2 giving us a contradiction; see Figures3(a) and (b).

Figure 4 :
Figure 4: (a) Illustrating the tentacle Z rq , its hiding vertex, and its associated cut.(b) The difference between tentacle and edge restricted tentacle.Vertex u is the hiding vertex for Z v q and v is the hiding vertex for Z v q (b).

e 1
,e 2 with minimum jellyfish J min e 1 and J min e 2 in blue.

2 . 3 . 4 .
If r is an interior point of of b but is not seen by T 1 , then it is seen by T 2 , and since ∥Z r u1 (b)∥ ≤ ∥Z r u2 (b)∥ and by the argument in Case 1. using u 2 and T 2 instead of u 1 and T 1 , giving us ∥Z r u2 (b)∥ ≤ ∥T 2 ∥/2, we have ∥Z r u1 (b)∥ ≤ ∥T 2 ∥/2 in this case.If r = v is a vertex of b seen by T 1 and T 1 also sees other points of b, then by Lemma 3.2, T 1 sees some connected set of b that includes v. Hence lim b∋p→v ∥Z p u1 ∥ = ∥Z v u1 (b)∥ by the definition of edge restricted tentacle and using our argument from Case 1 (including the fact that T 1 sees all points p on b in a connected neighbourhood of v), we have ∥Z v u1 (b)∥ ≤ ∥T 1 ∥/2 in this case.If r = v is a vertex of b seen by T 1 but T 1 sees no other points of b, then T 2 must see v and other points of b, otherwise there are points on b not seen by any of T 1 and T 2 .Using the same argument as in Case 3 for u 2 and T 2 , we have
b)∥, or the inequalities are reversed, we let a point r slide along b from v to the other endpoint v ′ ; see Figure 7(a).By Corollary 4.3, the lengths of Z r e1 (b) and Z r e2 (b) as r moves along b are smooth functions (continuous and differentiable) except at positions denoted event points where any of the participating tentacles has one of the following properties: 1. an interior point of the first edge of a tentacle intersects a vertex of P, or the first and second edge of the tentacle become collinear, 2. an interior point of the last edge of a tentacle intersects a vertex of P, or the last and penultimate edge of the tentacle become collinear, 3. the cut c Z r ei (b) , i ∈ {1, 2}, becomes intersects more than one vertex of P, 4. the head or the tip of a tentacle either hits or leaves the boundary of P, and 5. one tentacle goes from being shorter than the longer tentacle to becoming the longer tentacle, at which point the two tentacles have equal length.

Figure 8 :
Figure 8: Illustrating the construction of the tour and the partition into subpaths used in the proof of Lemma 5.1.

Figure 11 :
Figure 11: Illustrating the proof of Lemma 5.1.Bounding the length of W ′ 1 Step 5 considers O(n 2 ) pairs of extensions.Computing the tentacles and bases in Step 5.1 takes O(n 6 ) time as established in Section 5.1.The work in Step 5.2 takes O(n log n) time since it is dominated by sorting the tentacles by length.Step 5.3 requires linear time using the algorithm by Toussaint [32] and the test in Step 5.4 takes constant time.Hence, the total time complexity for the algorithm is O(n 8 ).
Run Belleville's algorithm to establish if the polygon is guardable by two point guards.If this is the case, return the two point guards computed by the algorithm 2 Compute the set of extensions E in P 3 Compute a shortest watchman route Wopt in P 4 Let W * T ← (Wopt, arbitrary point in P) 5 for every pair of extensions e1, e2 ∈ E, e1 ̸ = e2 do 5.1 Establish the bases q1 and q2, and compute J min e 1 ,e 2 = J min TEnd Two-Watchman-Route