{"http:\/\/dx.doi.org\/10.14288\/1.0051866":{"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool":[{"value":"Science, Faculty of","type":"literal","lang":"en"},{"value":"Computer Science, Department of","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider":[{"value":"DSpace","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#degreeCampus":[{"value":"UBCV","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/creator":[{"value":"Jabbari, Zohreh","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/issued":[{"value":"2010-04-30T14:33:18Z","type":"literal","lang":"en"},{"value":"2010","type":"literal","lang":"en"}],"http:\/\/vivoweb.org\/ontology\/core#relatedDegree":[{"value":"Master of Science - MSc","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#degreeGrantor":[{"value":"University of British Columbia","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/description":[{"value":"Given a polygon P, we considered the problem of finding the shortest total paths for two and three mobile guards to cover P. In our definition of the problem, we do not limit the movements of the guards. The guards are allowed to start their paths at any point on the polygon, cross the interior or intersect each other's paths if necessary. A polygon P is covered by two guards if every point in P is on the line that connects the guards at some point in time. We proved that if the polygon is convex, the optimal sweep limits the paths of the guards to the perimeter of the polygon. In the optimal solution the guards may start their paths at the end-points of the longest edge of P and end their paths at the end-points of the second longest edge in P, visiting the n-2 other edges along the way. Finding such a path takes O(n) time. With three, the guarding problem is defined differently. In the three guard problem a point is covered if it is on the triangle formed by the guards at some point in the sweep. We found that even in convex polygons in some cases crossing the polygon makes the sweep shorter. However, we showed that the optimal sweep is always simple (i.e., the guards paths do not cross one another). By recognizing the conditions where interior paths are beneficial we were able to present an algorithm to find the optimal 3-guard path in O(n\u2075) time.","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO":[{"value":"https:\/\/circle.library.ubc.ca\/rest\/handle\/2429\/24248?expand=metadata","type":"literal","lang":"en"}],"http:\/\/www.w3.org\/2009\/08\/skos-reference\/skos.html#note":[{"value":"Optimally Sweeping Convex Polygons with Two and Three Guards by Zohreh Jabbari B.Sc., Sharif University of Technology, 2007 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE in The Faculty of Graduate Studies (Computer Science) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) April 2010 c Zohreh Jabbari 2010 \u00b0 \fAbstract Given a polygon P , we considered the problem of finding the shortest total paths for two and three mobile guards to cover P . In our definition of the problem, we do not limit the movements of the guards. The guards are allowed to start their paths at any point on the polygon, cross the interior or intersect each other\u2019s paths if necessary. A polygon P is covered by two guards if every point in P is on the line that connects the guards at some point in time. We proved that if the polygon is convex, the optimal sweep limits the paths of the guards to the perimeter of the polygon. In the optimal solution the guards may start their paths at the end-points of the longest edge of P and end their paths at the end-points of the second longest edge in P , visiting the n \u2212 2 other edges along the way. Finding such a path takes O(n) time. With three, the guarding problem is defined differently. In the three guard problem a point is covered if it is on the triangle formed by the guards at some point in the sweep. We found that even in convex polygons in some cases crossing the polygon makes the sweep shorter. However, we showed that the optimal sweep is always simple (i.e., the guards paths do not cross one another). By recognizing the conditions where interior paths are beneficial we were able to present an algorithm to find the optimal 3guard path in O(n5 ) time. ii \fTable of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Abstract Acknowledgments Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . vii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 The Watchman Route . . . . . . . . . . . . . . . . . . . . . 1.1.1 The Robber Route Problem . . . . . . . . . . . . . 1.1.2 The ZooKeeper and Safari and Aquarium Problems 1.2 The Two-Guard Street Problem . . . . . . . . . . . . . . . 1.2.1 The Three-Guard Street Problem . . . . . . . . . . 1.3 Searching For an Intruder . . . . . . . . . . . . . . . . . . . 1.3.1 The Hunter\u2019s Problem . . . . . . . . . . . . . . . . 1.3.2 Room Search Problem . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 2 3 3 4 4 5 5 2 Problem Statement . . . . 2.1 Guarding Conditions for 2.2 Coverage Model . . . . 2.3 Minimizing Total Path 2.4 Convex Polygons . . . . . . . . . 6 6 7 10 11 3 2-Guard Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 2-Guard Problem . . . . . . . . . . . . . . . . . . . . . . . . 13 14 15 4 3-Guard Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Simple Mathematical Lemmas . . . . . . . . . . . . . . . . . 4.1.1 Simple Triangle Lemmas (Edge Length and Angle) . 22 34 34 . k . . . . . . . . Guards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii \fTable of Contents . . . . . . 36 38 43 45 49 56 5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 71 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.2 4.3 4.1.2 Majorization . . . . . . . Single Intersection Case . . . . . 4.2.1 Normalization Tools . . . 4.2.2 Normalization Algorithm 4.2.3 Final and Special Cases . Double Intersection Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv \fList of Figures 2.1 2.2 2.3 . . The gray area is not covered by area or line coverage. . . . . . . . . . Line vs. area coverage, the gray area is not covered by line coverage. 8 8 4 guards cover the polygon with a 4-chain sweep, without crossing the interior of the polygon. Guards C is stationary during the sweep, as its 2.4 3.1 3.2 3.3 3.4 3.5 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 chain (C3 ) is empty. . . . . . . . . . . . . . . . . . . . . . . . . . An example of a sweep in a simple polygon. . . . . . . . . . . 10 12 2-Guard perimeter sweep of a convex polygon. . . . . . . . . Pocket Se for free boundary segment e. . . . . . . . . . . . . . Existence of pockets for all intermediate free boundary segments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Left an right paths share a visited interior segment. . . . . . . Left and right paths share a visited boundary segment. . . . . 14 18 An optimal sweep that requires crossing the interior of the polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Another optimal sweep that requires crossing the interior of the polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . A sweep with no interior paths. . . . . . . . . . . . . . . . . . . . . A single interior crossing. . . . . . . . . . . . . . . . . . . . . . . One guard crosses the polygon, and back again to its previous chain. . . a |px| + |qx| is minimized when |p\u2032 x| = a+b d. . . . . . . . . . . . . . . Single intersection. . . . . . . . . . . . . . . . . . . . . . . . . . Double intersection. . . . . . . . . . . . . . . . . . . . . . . . . . The new paths for the three guards, when all paths intersects (Case 3). . Left path and right path share a line segment. . . . . . . . . . . . . . Re-arranging of sweep T when left and right path share a line segment. . Different forms of a Case3 sweep, and its suitable transformation. . . . An arbitrary triangle ABC. . . . . . . . . . . . . . . . . . . . . . When A = \u03c0\/2, a + b < x + y. . . . . . . . . . . . . . . . . . . . . Extending the results to an obtuse angle. . . . . . . . . . . . . . . . A convex polygon with a single intersection. . . . . . . . . . . . . . . 19 20 20 22 23 23 23 23 24 26 26 27 29 30 33 34 35 36 38 v \fList of Figures 4.17 The quadrilateral made by drawing tangency lines, fully encompasses polygon P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.18 An arbitrary quadrilateral ABCD and its two chords x and y. . . . . . 4.19 The quadrilateral can be transformed into a triangle by flattening one of its corners. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.20 An alternative transformation when two adjacent quadrants have angles \u2265 \u03c0\/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.21 Type A, general form of the transformed triangle. . . . . . . . . . . . 4.22 Type B, alternate transformed triangle. . . . . . . . . . . . . . . . . 4.23 Changing t would affect the lengths of x and y. . . . . . . . . . . . . 4.24 Double intersection case1. . . . . . . . . . . . . . . . . . . . . . . 4.25 Double intersection case2. . . . . . . . . . . . . . . . . . . . . . . 4.26 Double intersection case3. . . . . . . . . . . . . . . . . . . . . . . 4.27 Case1 is simplified to a single intersection. . . . . . . . . . . . . . . 4.28 Case2 is simplified to a perimeter walk (no interior paths). . . . . . . . 4.29 The remaining case of double intersection. . . . . . . . . . . . . . . . 4.30 A polygon P where the extended lines of AC and DB diverge. . . . . . 4.31 The general form of a counter-example. . . . . . . . . . . . . . . . . 4.32 The general form of the counter example after the first two steps. . . . 4.33 The outcome of the first seven of transformation on Fig. 4.33. . . \u02db \u02db steps 4.34 Choose A\u0302 on AX such that \u02db\u02dbA\u0302X \u02db\u02db = \u03bb. . . . . . . . . . . . . . . . . 4.35 Normalization transform the polygon into this triangle. . . . . . \u02db \u02db would \u02db \u02db 4.36 If A < \u03c0\/3, \u02dbC\u0302 D\u0302\u02db > \u03bb. . . . . . . . . . . . . . . . . . . . . . . . . 4.37 XC \u2032 and X \u2032 D\u2032 are drawn perpendicular to AB. . . . . . . . . . . . . 4.38 The relationship between edge lengths and \u03b8 in a right triangle. . . . . \u02db \u02db \u02db \u02db 4.39 |CX| + \u02dbAC\u0302 \u02db \u2212 |CA| \u2265 \u03bb\/2 . . . . . . . . . . . . . . . . . . . . . 42 42 42 44 56 56 56 56 56 57 58 59 60 62 62 63 64 65 66 67 \u02db \u02db 4.40 \u02db\u02dbC\u0302 D\u0302\u02db\u02db > \u03bb\/2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 40 40 41 vi \fAcknowledgments This work would not have been possible without the continuous help and support from my supervisors, Dr. David Kirkpatrick and Dr. William Evans. I wish to express my most sincere gratitude to them for their encouragement, patience and guidance that have guided me through the past two years. I am honored to have had the opportunity of working with them and learning from them. I would like to thank Dr. Patrice Belleville for reviewing my thesis and for his valuable comments. I am also thankful to my colleagues at Beta lab for sharing their knowledge and experiences with me. would also like to thank my family for their support through my entire life, my mom and dad for believing in me, my younger sister, Farzaneh, for our joyful conversations and time together, my little niece, Viyana, whose laughter makes my day and last but not least my older sister and brotherin-law, Hosna and Majid, without whose advice, encouragement and editing assistance, I would not have finished this thesis. vii \fTo my parents. viii \fChapter 1 Introduction The original Art Gallery problem was proposed by Victor Klee in 1973. The problem was defined as: \u201cHow many guards are necessary and sufficient to guard artistic objects in a given art gallery with n walls?\u201d. He posed this question in answer to Vasek Chva\u0301tal\u2019s request at a conference at Stanford, for an interesting geometric problem. Assuming that the gallery is a polygon, the problem can also be stated as a visibility problem of covering this polygon with minimum star-shaped polygons. In 1975, Chva\u0301tal proved that, \u230an\/3\u230b guards are occasionally necessary and always sufficient to cover a polygon with n vertices. The proof was later simplified by Fisk, via a 3-coloring argument[16]. The problem of determining the minimum number of guards that suffice to cover a given polygon was shown to be N P -hard by Lee and Lin [9] by reducing it from 3SAT . Many other variations of the Art Gallery Problems and visibility problems have been since analyzed and published. Many of them use the idea of mobile guarding. In this section we will review some of these problems briefly. More information on them and other related problems can be found in [16], [17], [21] and [22]. 1.1 The Watchman Route Chin and Ntafos[3], defined the Watchman Route Problem (WRP). A watchman route for a simple polygon P is a closed walk in P , such that every point of P is visible from some point of the walk. Two point on polygon P are visible from one another if the line connecting them lies completely in P . The problem can be divided into \u201cfixed source\u201d and \u201cfloating\u201d cases[6]. A fixed source WRP, considers a pre-set point s as the starting point of the route, while the floating case finds the optimal route with any possible 1 \f1.1. The Watchman Route starting point. Chin and Ntafos propose an O(n4 log log n) algorithm to find the shortest fixed source route in a simple polygon [4]. It was shown that the problem can be solved in O(n) for orthogonal polygons. The problem is NP-hard for polygons with holes, even when the holes are convex or orthogonal[2]. The hardness result was achieved by reduction from the Geometric Traveling Salesman problem. Different variations of Watchman Route Problem has been studied since, among these problems are External Watchman route, Several Watchman Routes, and Minimum-Link Watchman Tours. External watchman route problem was proposed by Ntafos and Gewali, as \u201cFinding a shortest watchman route from which the exterior of the polygon is visible\u201d. They presented an O(n4 log log n) algorithm for finding the minimum external watchman routes for simple polygons, and more efficient algorithms for restricted classes of polygons (convex, monotone, star and spiral polygons)[15]. Another class of problems, considers the existence of several watchman routes. They define the problem as \u201cGiven an art gallery and an integer m \u2265 1, compute the routes for m watchmen so that each point in the gallery is seen by at least one watchman from some position on his route, and the sum of the lengths of the routes is minimized\u201d [12]. They propose a \u0398(n2 ) to solve the problem. The algorithm extends their \u0398(n) solution for finding the shortest watchman route for a spiral polygon. [1] also considers the problem for m watchmen. 1.1.1 The Robber Route Problem The Robber Route Problem was introduced by Ntafos [13]. We are given a polygon P and a point x on its boundary, a set S (sights) of edges of P and a set T (threats) of points in P . The goal is to find the shortest possible route (if there is one) from x and back to itself, such that every edge in S is visible from some point on the route, while the route is not visible to any of the points in T [13]. The algorithm they present, solves the problem in O(n4 log log n) for simple polygons and in O((|S| + |T |)n + n log log n) in orthogonal polygons. 2 \f1.2. The Two-Guard Street Problem 1.1.2 The ZooKeeper and Safari and Aquarium Problems Safari Route and Zookeeper are both variations of the Watchman Route problem. In these problems a route has to be found such that certain specified areas are visited, and other known areas are avoided. In addition, the length of the route has to be minimal. In other words, given a polygon P with a set of k polygonal sites S within P , find the shortest route in P such that every site in S is visited at some point during the route[21]. In the Safari Route problem, one can enter the sites, but in Zookeeper\u2019s it is not allowed. Chin and Ntafos who proposed the problems, showed them to be NP-hard in general. However if all sites are attached to P , then polynomial algorithms can solve the problem. They proposed an O(n2 ) algorithm to solve the Zookeeper\u2019s problem [21], and an O(n3 ) algorithm to find a Safari Route [14]. Another interesting problem in this group is the Aquarium Problem, which was proposed by Czyzowicz et al [5]. In this problem the edges of the polygon are the visited areas, i.e., the goal is to find the shortest route that touches all the edges of polygon. They gave an O(n) time algorithm for this problem. 1.2 The Two-Guard Street Problem The two-guard street problem was first presented by Icking and Klein. Given a simple polygon P , and two distinguished vertices s and g, \u201cis it possible for two guards to move from s to t, each guard walking on one of the boundary chains, such that the line segment connecting the guards is always contained within P ?\u201d. A movement that allows these constraints is called a walk, and a polygon that admits a walk is walkable. In a general two guard problem, the goal is to find the minimum of all available walks from s to t [8]. The two-guard problem has also been referred to as corridor problem when the s and g are edges rather than vertices. In a walk, a guard may backtrack on his path, in order to maintain his connection with the other guard. If no backtracking is necessary the walk is called straight. A counter walk is a walk where one guards walks from s to g and the other walks from g to s. 3 \f1.3. Searching For an Intruder Icking and Klein propose an O(n log n) solution for the decision problem, also possible straight walk and straight counter walk can be found in O(n log n + k). In a general walk when backtracks are unavoidable, O(n log n + k) time and linear space is sufficient for finding the walk, where k is the length of the walk and may be \u0398(n2 ) [8]. These results were improved by Heffernan [7]. He presented an O(n) algorithm to determine whether a general walk from s to g is possible, although his algorithm did not produce the actual walk. Tseng, Heffernan and Lee, considered the problem from another perspective, they proposed an algorithm that finds all pairs of points in a simple polygon P , that admit a straight or general walk in O(n log n) time and all pairs that admit a straight or counter walk in O(n log n + m)[20]. Bhattacharya, Mukhopadhyay and Narasimhan, further improved the results. Their algorithm determines all pairs of points in P which admit walks, straight walks and discrete straight walks in O(n). 1.2.1 The Three-Guard Street Problem In a recent article, Tan proposes the three-guard problem as an extension of the two-guard problem [19]. As in two-guard case, we are given a simple polygon P and two points s and g on P . One guard walks on the left chain, another on the right chain and the third guard walks inside the polygon; the two guards walking on the perimeter of P should always maintain visibility with the inside guard. The question is if there is a (straight)(counter) walk for three guards from s to g. Their solution, decides the walkability of a given polygon in O(n log n) time, generates a walk in O(n log n + k) time, where k \u2208 O(n2 ) is the size of the optimal walk [19]. 1.3 Searching For an Intruder There are several problems that fit into this category, they generally assume that there is an intruder or intruders in a polygonal space, and a number of guards have to catch or detect the intruder in finite time. This class of problems is similar to our problem, since in addition to finding the intruder they require a minimal coverage of the polygon. The difficulty of these problems however, is mostly related to polygon visibility, which makes it different from our problem. 4 \f1.3. Searching For an Intruder 1.3.1 The Hunter\u2019s Problem Suzuki and Yamashita, defined The Hunter\u2019s Problem as searching a polygonal region for a mobile intruder by one searcher. The searcher is either k\u2212searcher (k \u2265 1) or \u221e\u2212searcher. k\u2212searcher carries k flashlights each emanating a ray, that define his sight. The direction of the rays can be changed continuously with a bounded angular rotation speed. \u221e\u2212searcher can see in 360 degree simultaneously. The goal is to decide if there is a schedule for the given searcher, on a polygon P to find the intruder, and if so, to generate the schedule [18]. They show that if there are three points x, y and z in a polygon P , such that the shortest path (within P ) between each pair is not visible from the third point, then P is not 1-searchable. Also for hedgehog polygons, 2-searcher is as capable as \u221e\u2212searcher [18]. 1.3.2 Room Search Problem The Room Search Problem was introduced in [10]. The problem assumes that we are given a simple polygonal room with one door at point d. Assume that there is an intruder in the room, and the question is whether there is a possible path, a searcher who enters the room from the door can follow, and detect the intruder before he slips out of the room through the door. In their problem the polygon is searched with a 1-searcher. They observe that reflex angles are the source of problems and design their algorithm to detect certain conditions that makes a polygon not searchable by a 1-searcher. 5 \fChapter 2 Problem Statement 2.1 Guarding Conditions for k Guards We define the problem of guarding a polygon P with k mobile guards, as assigning paths to the guards, such that every point on P is covered by the configuration of the guards at some point in time, and also the total length of the paths followed by the guards is minimized. The guards are free to move in any way they need to, as long as the total path length is minimized. Based on the shape of the polygon, the number of guards and the definition of P , we get different sweeps. In this problem the convex polygon is a simplification for an art gallery, and its edges are the walls of the gallery. To make the problem definition consistent with the art gallery concept, we limit the view of each guard by the walls surrounding it; thus the guards have to remain inside the polygon in order to cover it, i.e., G(t) \u2208 P for all t, where G(t) refers to the position of guard G at time t. When studying the problem in convex polygons, the primary focus is on the shape of the sweep. We try to find whether a guard needs to stay on the perimeter of the polygon or crosses the interior, and also if the paths of the guards intersect each other. However when a given polygon is not convex, the mutual visibility of the guards plays a key role in finding the shortest paths for the guards. Therefore we decided to limit our study to convex polygons. In chapter 3 we study the problem for two guards. Paths are defined in a way that the line segment connecting the guards, sweeps the surface of the polygon. In addition, we make the total distance traveled by the two guards is minimal. We prove that in any optimal 2-guard sweep of a convex polygon, both 6 \f2.2. Coverage Model guards stay on the boundary, i.e., for every 2-guard sweep that uses interior paths, we offer a new sweep not longer than the original, where the guards do not leave the perimeter of P . In chapter 4 we study the problem for three guards in a convex polygon. Unlike the two guards case, there are cases where crossing the interior of the polygon makes the sweep shorter. We prove that an optimal 3-guard sweep is simple. A sweep is simple if none of the paths intersect in the interior of the polygon. 2.2 Coverage Model In the precious section we used the phrase covering a polygon, without defining what exactly coverage means. In this section we explain different coverage models and their relationships. 2-guard coverage is defined as sweeping the polygon with the line that connects the guards. In other words, every point in the polygon has to be on the line that connects the guards at some point in the sweep. We call this model of coverage pair-wise line coverage. Although the definition of coverage for the 2-guard case was simple, there are different possible definitions for coverage when there are more than two guards. It is possible to define 3-guard coverage as pair-wise line coverage. This definition is a direct extension of the two guard coverage, so much so that it can be considered as 3-way 2-Guard Coverage, since every point on P has to be on the line that connects a pair of guards at some point in time to be covered. However there are other possible definitions; one of them is area coverage, where every point inside the triangle region determined by the guards is said to be covered. As the guards move in P , the shape of this covered triangle changes and new points in the polygon are covered. This definition may be clear when P is convex, but when guards are not mutually visible in a non-convex polygon, the definition becomes unclear. It is clear that a pair-wise line sweep is also an area sweep, the opposite however is not true. Fig. 2.1 shows an area sweep that is not a line sweep, 7 \f2.2. Coverage Model A C B Figure 2.1: Line vs. area coverage, the gray area is not covered by line coverage. A B C C A B B C A Figure 2.2: The gray area is not covered by area or line coverage. the gray area in the picture is the area not covered when using line coverage. Another definition is boundary coverage, where a polygon P is covered if every point on the boundary of P has been covered by the guards. Points on the boundary of a polygon are covered when they lie on a closed line segment that connects two of the guards at some point in time, i.e., every point on the boundary of P has to be either on the path of a guard or on an edge, that is visited simultaneously by a pair of guards at some point in time. We refer to such an edge as free edge. Using the definitions of coverage explained so far it is easy to see that a sweep is said to provide boundary coverage if it provides either area coverage or pair-wise line coverage, since in both area and line coverage, the boundary of the polygon has to be covered as well. A boundary coverage on the other hand does not guarantee a line or area coverage for a polygon, even when the polygon is convex. Fig. 2.2 shows a sweep that provides boundary coverage for the polygon but not area or line coverage. This implies that minimum length of the paths of the guards that provides boundary coverage is not longer than the minimum length of the paths 8 \f2.2. Coverage Model that covers the area of the polygon, i.e., if an optimal boundary coverage provides area or line coverage, then it is also an optimal area or line sweep, respectively. We define a boundary cover as a sweep that provides boundary coverage. A boundary cover may include traversed and untraversed parts of the boundary. A traversed portions of the perimeter of P , contained between two free boundary segments, is in the form of a chain of traversed edges. A Chain is a series of consecutive traversed edges of P between two free boundary segments. The edges are not necessarily visited by the same guard. The perimeter of a polygon can be divided into chains and free boundary segments, and by definition, every point on a chain has been visited by a guard at some point in time, which leaves us with covering the free boundary segments. In a convex polygon, a free boundary segment can be covered if its end-points are simultaneously visited by a pair of guards at some point during the sweep, therefore we can derive the following condition as the necessary and sufficient condition for a boundary cover: In a k-guard boundary cover, every boundary segment e of a convex polygon P is \u2022 Traversed by a guard, or \u2022 Its end-points are visited by two guards simultaneously. Thus, any set of k parameterized curves on a convex polygon P that follow these rules make a boundary cover. A sweep may include any number of chains separated by free boundary segments. It is easy to see that if the number of chains is less than or equal to the number of guards, then none of the guards need to cross the interior of the polygon. This is true even when there are more than three guards (k guards). We can show that in a k guard sweep with m < k chains the guards can sweep the polygon without crossing the interior. The definition of a chain implies that the length of a sweep T with m chains is at least X |Ci | 1\u2264i\u2264m 9 \f2.3. Minimizing Total Path D A C1 A B C4 C2 B D C C3 Figure 2.3: 4 guards cover the polygon with a 4-chain sweep, without crossing the interior of the polygon. Guards C is stationary during the sweep, as its chain (C3 ) is empty. where Ci is the ith chain in T , and Ci \u2229 Cj = \u2205, for i 6= j. This lower bound is achievable when m \u2264 k (Fig. 2.3), \u2022 Assign one guard to each chain and set an arbitrary order of visit for the free boundary segments. The rest of the guards (if there are more guards than chains) are put on different chains, and stay stationary during the sweep. \u2022 Each guard moves on its chain, walking from one free boundary segment to the other. \u2022 Direction of each walk is from the free boundary segment with the lower order towards the free boundary segment with the higher order. This implies that having fewer than k chains would not be optimal, since a sweep with this number of chains leaves more than one guard in a chain where it is not needed. In fact, we can prove that there should be exactly one guard traversing a chain. Having too many chains would also make the sweep longer, since a sweep with too many chains implies that the guards are crossing the interior of the polygon many times, and possibly even intersect each other\u2019s paths. Although crossing the interior can make the sweep shorter in certain scenarios, this only happens with few interior crossings. 2.3 Minimizing Total Path Our goal is to find a sweep with minimum total length for the guards, based on the definition on coverage for the polygon. Previous problems limited the paths of the guards to the boundary of the polygon, defined specific start 10 \f2.4. Convex Polygons and end points for the guards or limited the movements of the guards by forcing them to stay visible to each other at all times. In our problem we have relaxed all of these conditions, the guards are allowed to start their paths on any point within the polygon, and they are allowed to walk on the interior of the polygon. For the convex polygon case, we will prove that in a two guard sweep, crossing the interior always makes the paths longer, but with greater than or equal to three guards, then there are certain cases where the guards need to cross the interior in order to realize their minimum paths. For simple polygons, there are even more possibilities. In addition to crossing the interior, there are cases where the guards do not maintain visibility with one another during their paths, since covering different parts of the polygon with a different small team of guards may be shorter than moving all guards through the polygon. Or in a k-star shaped polygon, k guards may stay stationary at key points, while the rest of the guards walk the boundary. 2.4 Convex Polygons Finding the unconditional minimum path for the guards that cover a polygon is not trivial even for convex polygons. Although it may appear that crossing the interior of the polygon increases the lengths of the paths, we can easily find examples where this is not true. When the polygon is covered by three or more guards, then there might be a shortcut through the interior that makes the path of a guard shorter. Examples of sweeps with interior crossings will be given in future chapters. In simple polygons the problem becomes much harder. Fig. 2.4 shows a 2-guard sweep, where the guards cover the polygon by walking along parts of the boundary in opposite directions, while the five long edges of polygon lie on the line that connects the guards at some point in time. 11 \f2.4. Convex Polygons Figure 2.4: An example of a sweep in a simple polygon. 12 \fChapter 3 2-Guard Solution In the 2-guard case, we sweep a convex polygon with two mobile guards, in a way that the line connecting the guards covers the whole surface of the polygon, and every point in the polygon is on the line segment joining the two guards at some point in time. In addition, we want the total distance traveled by the two guards to be minimal. Previously studied versions of the problem, have always restrict the paths of the guards to the perimeter of the polygon. In our problem, we allow each guard to start his path anywhere within the convex polygon; and to walk on the interior if needed. We show that allowing the guards this flexibility of movement in the 2-guard case does not improve the result, that is there always exists an optimal solution with the guards walking only on the perimeter of polygon. Covering points on the boundary of a polygon is clearly a necessary condition for covering the polygon, but it may not always be sufficient. In this section, we will first show that an optimal boundary cover can be achieved while the guards stay on the perimeter of the polygon, following our proposed paths. Then we will show that our proposed paths cover the polygon. It follows that the optimal 2-guard boundary cover provides an optimal 2guard polygon cover. For a boundary cover each edge in P is either traversed by a guard or covered. Therefore a perimeter-restricted boundary cover (a sweep restricted to the perimeter) of a convex polygon with n edges using two mobile guards must traverse at least n \u2212 2 edges; as the guards can start their paths from the endpoints of one edge and finish it at the endpoints of another edge, one guard walking clockwise and the other anti-clockwise (Fig. 3.1). The total length of such a perimeter-restricted boundary cover is the sum of the lengths of the paths traversed by the guards. The length of shortest 2-guard path, therefore, is the sum of the n \u2212 2 shortest edges of 13 \f3.1. Definitions A B B A Figure 3.1: 2-Guard perimeter sweep of a convex polygon. the polygon. This sweep can be obtained in \u03b8(n). We prove the optimality of this solution, by showing that there always is a minimum length cover that is perimeter-restricted. 3.1 Definitions In this section, we define the common concepts used in this problem. Many of them are used in the 3-guard case as well. In this problem, the guards are allowed to walk both on the perimeter and the interior of the polygon; therefore the definition of the polygon P includes the boundary and the interior of the polygon. The boundary of the polygon is denoted \u2202P , and the interior of the polygon is denoted I(P ). The guards trace two curves A and B on the polygon. Every point on A or B, is said to be visited by the guards, i.e. a point p in P is visited if, p \u2208 A or p \u2208 B As the relative position of the guards in the polygon is important in the sweep, the curves walked by the guards has been parameterized by time, such that at t = 0 none of the guards have started their walks and the total length of the parameterized curves is 0, and at t = 1 both guards have finished their walks. Since the notion of the length plays an important part in this problem, we have defined some the more commonly used lengths formally: \u2022 The length of a line segment e is |e|, similarly the length of the line segment ED is |ED|. 14 \f3.2. 2-Guard Problem \u2022 The boundary length of the polygon denoted |\u2202P | is given by, P |\u2202P | = 1\u2264i\u2264n |Pi Pi+1 |, where Pi Pi+1 is an edge of P . The notion of coverage that has been used so far can be formally defined as follows: A point p is covered by a pair of parameterized curves (A(t), B(t)), if p \u2208 A(t)B(t) for some t \u2208 [0, 1]. Notice that when P is convex, the guards are always visible to each other; it follows that every point visited by a guard is covered. We define a sweep S to be \u201ca pair of parameterized curves A and B, that cover P \u201d, i.e., t\u2208[0,1] A(t)B(t) = P. In a sweep parts of the perimeter of P may be unvisited, but still covered. We call these parts free boundary segments. A free boundary segment d of the polygon P in sweep (A, B), is a maximal connected subset of the boundary of P that is unvisited. 3.2 2-Guard Problem For the 2-guard problem, we defined the coverage of a pair of guard paths (parameterized curves) as the set of all points in the polygon that belong to the line segment joining the two guards at some time t \u2208 [0, 1]. In order to find the optimal solution to the 2-guard case, we will first relax the definition of the coverage to boundary coverage, i.e., we find the shortest arrangement of paths for the two guards that is required to cover only the boundary of the polygon. Clearly the length of the shortest such boundary cover is at most the length of the shortest polygon cover. We will then show that since an optimal boundary cover keeps the guards on the perimeter of the polygon, it also covers the interior of the polygon. Thus an optimal 2-guard boundary cover, is also an optimal polygon coverage. This section starts with proving certain conditions about a free boundary segment. It is clear that a free boundary segment can not include a curve, since the polygon is convex. In this lemma we will show that a free boundary segment can not contain a corner of the polygon. Lemma 1. Every free boundary segment in a convex polygon P during a sweep (A, B) is a straight line. Note: We assume that the vertices of P are all extreme vertices, that is, no two edges of P are co-linear. Proof. If a free boundary segment is not a straight line, then it includes at least one extreme vertex v of the polygon, i.e., a vertex on the convex hull 15 \f3.2. 2-Guard Problem of P . No convex combination of two points, not equal to v, in P contains v. Hence, the sweep must visit v. There can be any number of free boundary segments in a sweep. We sort these free boundary segments by the time that they are first covered. In a 2-guard sweep all but the first and the last are called the intermediate free boundary segments. In a more general case, an intermediate free boundary segment is a free boundary segment which is not next to an exposed endpoint of a path. In the optimum 2-guard sweep, the guards only traverse n \u2212 2 edges of the polygon, leaving the two longest edges out. They start their paths from the two endpoints of one of the two edges and finish it at the endpoints of the other, walking exclusively on the perimeter. The total length of the sweep would be |\u2202P | \u2212 |\u21131 | \u2212 |\u21132 |, where \u21131 and \u21132 are the two longest edges of P . Theorem 1. The length of the optimal 2-guard sweep of a convex polygon P is at least |\u2202P | \u2212 |\u21131 | \u2212 |\u21132 |. Proof. We want to show that the length of every sweep is at least the length of our proposed optimal solution. First we will show that our solution covers the boundary of the polygon with minimum total length of the paths of the guards. We will then show that the solution also provide a polygon coverage, which leads to the conclusion and the theorem follows. Suppose a shorter sweep (A, B) exists that covers the boundary of the polygon. Such a sweep must avoid covering more of the boundary of P than the length of n\u22122 shortest edges. It must have more than two free boundary segments, since by Lemma 1 every free boundary segment is a straight line, and therefore a part of an edge. The goal is to show that the length of every such boundary cover is at least the length of our proposed optimal solution. We prove this claim by showing that the length of (A, B) is longer than |\u2202P | \u2212 |s| \u2212 |t|, where s and t are the first and last covered free boundary segments in (A, B), respectively. We will then argue that choosing the two longest edges of the polygon as starting and ending free boundary segments gives us the optimal boundary cover. The solution follows a few steps, in the first step, we will remove any existing intersection of the paths of the guards, by assigning a new path to 16 \f3.2. 2-Guard Problem each guard. The new paths lead the guards through a perimeter path from s to t, one guard on the left side and the other on the right. We then explain that the new paths are shorter than the original sweep. Since s is the first free boundary segment that is covered by the two guards, the guards do not participate in covering any other free boundary segments prior to s. This implies that if a guard starts its path before walking to s, that part of its path, is entirely contained inside a chain, thus the guard does not have an exposed starting point. Similarly, the guards either end their paths at t, or on chains. These two facts imply that any two guard sweep of a convex polygon, can only contain exposed end-points at the endpoints of its first and last covered free boundary segments (s and t). In the new sweep, both guards start their paths at the end points of s, and finish them at the end-points of t, one guard walks on the left side of the polygon, and the other on the right side. Their paths are chosen from segments of the original sweep (A, B), we will give the left-most segments (regardless of which guard\u2019s path they originally belonged to) to one guard and the right-most segments to the other guard. The rest of this section, describes this method in more detail. \u2022 Guard 1, \u00b7 starts its path at the left end-point of s. \u00b7 takes the leftmost path on I(P ) at each intersection. \u00b7 until it reaches the left end-point of t. \u2022 Guard 2, \u00b7 starts its path at the right end-point of s. \u00b7 takes the rightmost path on I(P ) at each intersection. \u00b7 until it reaches the right end-point of t. The new paths of the guards will be easily found if there are no other free boundary segments along the way, since all the edges from the left (right) end-point of s to the left (right) end-point of t would be visited, this implies that the new path of the guards would be restricted to the boundary of the polygon. The length of the new boundary cover is |\u2202P | \u2212 |s| \u2212 |t|, and it is less than or equal to the original boundary cover since it does not introduce 17 \f3.2. 2-Guard Problem e Se Figure 3.2: Pocket Se for free boundary segment e. any new segments to the paths. If there are any other free boundary segments (not s or t) on the left (right) side, then these free boundary segments are intermediate free boundary segments. When reaching an intermediate free boundary segment e, a guard will choose a path that leaves the perimeter at one end-point of e, walks on a pocket made by the interior leftmost (rightmost) paths around e and gets to the other end-point of e. Thus we have to prove that there are unique pockets for all intermediate free boundary segments along the way. We will prove that for any intermediate free boundary segment e there is a pocket Se made of the paths of the guards, i.e., a set of sub-curves of A and\/or B, to each intermediate free boundary segment e, as follows: Definition. A pocket of an intermediate free boundary segment e is the smallest cell, in the arrangement of the polygon edges and all guards\u2019 paths (both boundary and interior paths), that contains e and lies in P (Fig. 3.2). A pocket may include parts of the paths of different guards, even parts of the visited boundary of P . If any part of the pocket is traversed multiple times by (A, B), only one of these visits is considered as part of the pocket. We assumed the left and right do not share any part of the paths. We need this to be true because the argument is: |(A, B)| \u2265 |(A, B) \u2229 \u2202P | + \u2265 |(A, B) \u2229 \u2202P | + m\u22121 X i=1 m\u22121 X \u2265 |\u2202P | \u2212 |\u21131 | \u2212 |\u21132 | i=1 |Si | (3.1) |ei | (3.2) (3.3) 18 \f3.2. 2-Guard Problem s f e t Figure 3.3: Existence of pockets for all intermediate free boundary segments. Where ei is an intermediate free boundary segment, and Si is its pocket. Line. 3.1 claims that the new boundary cover is not longer than the old one. This is true if the left and right paths use parts of the old paths of the guards and do not use any part twice (left and right paths do not share a segment). There is a closed pocket around any intermediate free boundary segment, otherwise we can divide (A, B) into two disconnected regions, which is a contradiction (See Fig. 3.3). Since a path is a connected curve from one end-point to another, then a pocket would also be connected and closed around its free boundary segment. Assume that s is on top of the polygon and t is at the bottom. Any other free boundary segment would therefore, lie between s and t. Since both guards are needed to cover s and t, then there are at least two paths from s to t. In other words, making any cut on the polygon that separates s from t would cross (A, B) in at least at two points. This implies that the left and right paths do not share any segment. Fig. 3.4 and Fig. 3.5 show the two cases where left and right paths share a segment, and it is clear that in both cases we can find a cut that separates s from t and intersects (A, B) at only one point, which is a contradiction. Line 3.2 follows immediately from line 3.1. Clearly |Se | \u2265 |e| for every intermediate free boundary segment e, since e is a straight line segment. Line 3.3 is derived from line 3.2, using the fact that the length of the boundary of the polygon \u2212 the length of its first and last covered free boundary segments, is greater than or equal to the length of our proposed solution. 19 \f3.2. 2-Guard Problem s e f t Figure 3.4: Left an right paths share a visited interior segment. s e f t Figure 3.5: Left and right paths share a visited boundary segment. 20 \f3.2. 2-Guard Problem So far we proved that for any intermediate free boundary segment along our proposed left and right paths, there are pockets which do not share any parts of their paths and can be replaced with their respective free edge, since each pocket is strictly longer than its intermediate free boundary segment. We refer to this replacement of pockets with their free edges as flattening a pocket. By flattening each pocket, we create boundary paths from s to t for each guard. Thus we create a boundary cover of length |\u2202P | \u2212 |s| \u2212 |t|, which is less than or equal to the length of the original boundary cover. It also limits the paths of the guards to the perimeter of P . Thus the shortest boundary cover would have s and t equal to the two longest edges of the polygon. Having already established that the length of the optimal sweep is greater than or equal to the length of the optimal boundary cover, we can apply this solution as the optimal sweep, as it also provides coverage for the interior of the polygon. 21 \fChapter 4 3-Guard Solution In the previous section we proved that the optimum solution to the 2-guard case does not include any interior paths, i.e., the guards stay on the perimeter of the polygon during the sweep. When we increase the number of guards to 3, it may appear that the same principle is still true, but studying a few simple examples shows that in certain convex polygons, crossing the interior can make a sweep shorter. Fig 4.1 shows a simple example, where crossing the interior is beneficial. Another such example is depicted in Fig. 4.2. In this picture, two guards stay at opposite sides of the polygon while the third walks part of its first chain, then crosses the polygon to traverse its second chain, walks back to its first chain and covers the rest of it. We defined 3-guard coverage as area coverage or triangular coverage, since the area covered by a set of three points in a convex polygon is in the form of a triangle. Having explained that a boundary coverage is a relaxation of the triangular coverage, we will first relax our sweep to boundary cover, since the necessary conditions for a boundary cover are easy to recognize. We will prove that an optimal boundary cover is simple. This limits the optimal 3-guard boundary cover to one of the three forms in Fig. 4.3, Fig. 4.4 or Fig. 4.5. It is easy to see that these cases also provide area coverage, thus an optimal boundary cover gives us an optimal area sweep. B C A B Figure 4.1: An optimal sweep that requires crossing the interior of the polygon. 22 \fChapter 4. 3-Guard Solution B A C B Figure 4.2: Another optimal sweep that requires crossing the interior of the polygon. B B A C C B B A A B A C A C C B C B B A C C Figure 4.5: One guard Figure 4.3: A sweep with Figure 4.4: A single inte- crosses the polygon, and no interior paths. rior crossing. back again to its previous chain. Using these cases we designed algorithm 1 for finding the shortest simple 3-guard boundary cover for convex polygon P . It finds the solution in O(n5 ) time, where n is the number of edges in P . Finding further conditions on optimality of a sweep in Fig. 4.3, Fig. 4.4 or Fig. 4.5 may lead to an improved algorithm, but we will not focus on improving the algorithm at this time. Given two chains as inputs, Distance(Chain1 , Chain2 , D, P ) finds the shortest possible path for a guard to visit these chains. A sweep where one guard covers two chains is either as Fig. 4.4 or as Fig. 4.5. Distance finds the shortest interior chords that connect the two chains in a valid format. In an instance of Fig. 4.5 guard C can depart from the boundary of P at either a vertex or even an interior point on an edge. We want to find a point x on a line l, where the sum of the distances of two points p and q to x is minimized. We draw the orthogonal projections of p and q on l, and call the intersection points p\u2032 and q \u2032 respectively. Assuming a that |pp\u2032 | = a, |qq \u2032 | = b, and |p\u2032 q \u2032 | = d, it is easy to see that |p\u2032 x| = a+b d. Since in Fig. 4.6 |p\u0302x| + |qx| is minimized when p\u0302q is a straight line. 23 \fChapter 4. 3-Guard Solution Algorithm 1 Traversal Re-arrangement(Polygon P) 1: \u21131 , \u21132 , \u21133 \u2190 three longest edges of P 2: minimumTraversal \u2190 |\u2202P| \u2212 |\u21131 | \u2212 |\u21132 | \u2212 |\u21133 | 3: for every edge e and vertex v in P do 4: D[v, e] \u2190 distance of v to e 5: P [v, e] \u2190 orthogonal projection of v on e 6: end for 7: for each 4 edges e1 , e2 , e3 and e4 in P do 8: C1 \u2190 chain between e1 and e2 9: C2 \u2190 chain between e2 and e3 10: C3 \u2190 chain between e3 and e4 11: C4 \u2190 chain between e4 and e1 12: minimumTraversal \u2190 min{ minimumTraversal, |C1 | + |C2 | + |C3 | + |C4 | + min{ Distance(C1 , C3 , D, P ), Distance(C2 , C4 , D, P )}} 13: end for 14: return minimumTraversal In Algorithm 1 there are two loops, the first one (step 3) calculates D and P for all pairs of edge and vertex thus taking O(n2 ) time. The second one (step 7) iterates \u03b8(n4 ) times, since it is run for every set of four vertices in the polygon. In each iteration two calls to Distance(Chain1 , Chain2 , D, P ) are made, and each call takes O(n) since m + k \u2264 n \u2212 2. Therefore the algorithm runs in O(n5 ) time. Algorithm 1 assumes that in an optimum sweep the paths are simple. p\u0302 d p\u2032 a d a+b a x q\u2032 b q p Figure 4.6: |px| + |qx| is minimized when |p\u2032 x| = a d. a+b 24 \fChapter 4. 3-Guard Solution Algorithm 2 Distance(C1 , C2 , D, P ) 1: p1 , p2 , ..pk \u2190 vertices of C1 2: q1 , q2 , ..qm \u2190 vertices of C2 3: distance \u2190 min{|p1 q1 | , |p1 qm | , |pk q1 | , |pk qm |} 4: for i from 2 to k do 5: a \u2190 D[q1 , pi\u22121 pi ] 6: b \u2190 D[qm , pi\u22121 pi ] 7: d \u2190 |P [q1 , pi\u22121 pi ], P [qm , pi\u22121 pi ]| a 8: x\u2190 d + P [q1 , pi\u22121 pi ] a+b 9: if x is on pi\u22121 pi then 10: distance \u2190 min{distance, |xq1 | + |xqm |} 11: end if 12: distance \u2190 min{distance, |pi q1 | + |pi qm |} 13: end for 14: for j from 2 to m do 15: a \u2190 D[p1 , qj\u22121 qj ] 16: b \u2190 D[pk , qj\u22121 qj ] 17: d \u2190 |P [p1 , qj\u22121 qj ], P [pk , qj\u22121 qj ]| a 18: x\u2190 d + P [p1 , qj\u22121 qj ] a+b 19: if x is on qj\u22121 qj then 20: distance \u2190 min{distance, |xp1 | + |xpk |} 21: end if 22: distance \u2190 min{distance, |p1 qj | + |pk qj |} 23: end for 24: return distance 25 \fChapter 4. 3-Guard Solution Figure 4.7: Single intersection. Figure 4.8: Double intersection. Considering the examples presented for optimal boundary covers that involved interior crossings of the polygon, it is easy to imagine that this assumption is wrong. If there is an intersection in the paths of the guards, we will show that it is either a single intersection as in Fig. 4.7, where an interior path intersects another interior path once, or a double intersection as in Fig. 4.8, where one path crosses another path twice. We study the single intersection case in section 4.2, and the double intersection case in section 4.3. In both cases we will prove that the sum of the lengths of the involved interior paths is longer than some free boundary segments, i.e., we can find enough free boundary segments to visit in place of the interior paths. In the rest of this section we will prove that any boundary cover that contains intersections, can be reduced to a boundary cover with no intersection, a boundary cover with a single intersection or a boundary cover with a double intersection. Therefore we can prove that an optimal boundary cover does not contain an intersection of the paths of the guards. Theorem 2. In an optimal 3-guard sweep, the paths of the guards never intersect one another. Proof. As in the 2-guard case, we will use parts of the existing sweep, without considering the paths of the individual guards, and build a new sweep T \u2032 on P , where |T \u2032 | \u2264 |T | and no guards\u2019 path intersects the paths of another guard in T \u2032 . We can easily find the first and the last covered free edges of T , calling them s and t respectively. Since every free edge is visited simultaneously by two guards, the two guards that cover s, either start their paths at endpoints of s, or start their paths elsewhere but prior to visiting s their paths are limited to the interior of chains, i.e., they do not visit any free edges 26 \fChapter 4. 3-Guard Solution s G1 G2 G3 t Figure 4.9: The new paths for the three guards, when all paths intersects (Case 3). prior to s. The same conclusion can be applied to t, i.e., the guards that cover t, do not visit any other free edges after t. This implies that four of the six end-points in the sweep, are either inside chains or at the end-points of s or t. The two remaining end-points can be used to cover additional free edges. Based on the positions of these end-points sweep T is in one of these three cases: Case 1 , T is simple, i.e., it does not include any intersections of the paths of the guards. Case 2 , each guard\u2019s path intersects at least another guard\u2019s path. Case 3 , one guard walks its path isolated from the others, i.e., it does not intersect any other path. Case 1, Clearly if T does not include any intersections of the paths of the guards, then no modifications are necessary, thus we declare T \u2032 = T . In the rest of the proof we study the other two cases individually, explaining how each case can be changed into a simple sweep. Case 2, If each path intersects at least one other path, then we will redefine the paths of the three guards to remove the intersections and make T \u2032 simpler and shorter than T (see Fig. 4.9). 27 \fChapter 4. 3-Guard Solution Assuming that s is on top and t at the bottom of the polygon, we will change the paths of the guards such that one guard covers the right side of the picture, another the left side and the third guard connects the remaining parts, by following these steps: \u2022 The 1st guard walks on the left chain. \u00b7 It starts its path at the left end-point of s. \u00b7 walking the leftmost path in the arrangement of all guards paths, from s to another end-point. \u00b7 while this end-point is not the left end-point t, \u22c4 back track to the last visited intersection and follows the next leftmost path in the arrangement of all guards paths. \u00b7 It should be noted that the guard will eventually reach the left end-point of t, since all paths intersect other paths, implies that there is a path between any two points in T . \u00b7 If any part of the path forms a pocket for a free edges, then change the sweep to include the free edge in place of its pocket. \u2022 The 2nd guard walks on the right chain. \u00b7 It starts its path at the right end-point of s. \u00b7 Walks the rightmost path in the arrangement of all guards paths, from s to the next end-point. \u00b7 while this end-point is not the right end-point t, \u22c4 back track to the last visited intersection and follows the next rightmost path in the arrangement of all guards paths. \u00b7 If any part of the path forms a pocket for a free edges, then change the sweep to include the free edge in place of its pocket. \u2022 There are at most two exposed vertices separate from s and t. \u2022 The 3rd guard takes the path that connects the two remaining end points on P . The previous algorithm implies that there is always a path between the two remaining end-points that does not include any part of the left and right paths. This is true since even after removing the left and right paths we will be left with these exposed end-points, and since all of the other parts of the 28 \fChapter 4. 3-Guard Solution s e s a t f e a f t Figure 4.10: Left path and right path share a line segment. paths have even degrees (since a path is a connected curve), then any path from one exposed end-point has no choice but to end at the other end-point. If there is only one exposed end-point, then the third guard does not cross the interior, since we can consider the chain that includes this end-point as the total path of the guard. The following lemma proves that when the left and right chain share a line segment then the sweep can be reduced to a single intersection case and we will show that a sweep with single intersection can be reduced to a shorter sweep with only three chains in section 4.2. Lemma 2. If the left and right paths in sweep T share a line segment, then there is a sweep T2 with a single intersection, such that |T2 | \u2264 |T |. Proof. In the algorithm we assumed that left and right paths do not share a line segment. Assume that in sweep T , the left and right paths share a line segment a (Fig. 4.10). We will show that this sweep can be transformed into a single intersection case. In Fig. 4.10, the left and right paths share a. Let ta be the time that guard 1 walks a in the original sweep T . Since no other guard\u2019s path crosses the cut through a that separates s and t and since covering s and t needs two guards then guard 2 is always above a and guard 3 is always below it. There is at least one free edge that crosses the cut through a (there is exactly one free edge if a is a part of the perimeter of P ). Let e be the edge across the cut with the earliest cover time te , and f be the one with the 29 \fChapter 4. 3-Guard Solution s s X X e a t f e a f t Figure 4.11: Re-arranging of sweep T when left and right path share a line segment. latest cover time tf . Note: e might equal f . There two possible cases that define the shape of T , \u2022 tf \u2265 ta , implies that guard 2 finishes its path at f (or in a chain), since it cannot participate in covering any more free edge after ta . \u2022 te \u2264 ta , implies that guard 3 starts its path at e (or in a chain), since it cannot participate in covering any more free edge before ta . In either case, one of the top or bottom section cannot contain another exposed end-point. Assume that the top part has a free edge with an exposed end-point and the bottom part contains only intermediate free edges. We flat the pockets of intermediate free edges using a method similar to the left and right paths, and the outcome would be Fig. 4.10. Based on the direction of the tail that leads to the exposed end-point we can re-arrange the paths to one of the forms in Fig. 4.11. Each has only one intersection, at X. If the left and right paths do not share a line segment then guard 1 traversed the left path and guard 2 traverses the right path and the third guard connects the remaining two exposed vertices. Depending on the position of these exposed vertices, there are two possible case: when the exposed vertices are on the same side of the polygon, we have a double intersection, which is addressed in section 4.3, and when they are on different sides, it is a single intersection, addressed in section 4.2. We prove that both cases can be simplified to paths no longer than the original with no intersections. 30 \fChapter 4. 3-Guard Solution Case 3, If one guard walks its path isolated from the others, i.e., it does not intersect any other path, then we can create T \u2032 from T using a method similar to the left and right path selections. Assuming that s is on top and t at the bottom of the polygon, we divide the sweep into three regions, isolated, left and right (if they exist); where isolated contains the path that does not intersect other paths. Left and right each are the remaining parts of the sweep on the left and right side of the polygon, respectively. Depending on the position of the isolated region we can divide this case into three parts, 1. It is possible that the isolated chain covers one side of the polygon completely, i.e., there are only two regions (isolated and one of left or right). Without loss of generality we assume that the isolated chain is on the left side. We can consider the isolated chain as the left path, traversed by guard 1. Guard 2, would take the right-most path from s to t. If there are two exposed vertices left (not at s or t), guard 3 would take the path that connects these vertices. Since the left side is an isolated chain, both exposed vertices are on the right side. Connecting these exposed vertices creates a sweep with a double intersections which is addressed in section 4.3. 2. If the isolated region does not contain any end-point of s or t, then by choosing the left and right paths will create T \u2032 . Since our isolated region contains two free boundary segments, and the other four are involved in covering s and t, then by flattening the intermediate free edges in left and right paths we will get a sweep that has no intersections. 3. If the isolated region includes one end-point of s, or t, then without loss of generality we can assume that it is the right end-point of s. We have at most one other exposed end-point, since s and t use four of the end-points, and the isolated region uses two, one an end-point of s. If this end-point is not exposed, then we can easily re-assign the paths of the guards in a way that it includes no crossing of the interior (each guard traverses one of the regions). Depending on the position of the chain with the exposed vertex and the alignment of its tail, we get four cases. In each case we can transform the sweep into one that includes only a single intersection. Fig. 4.12 31 \fChapter 4. 3-Guard Solution shows all four cases and how each case can be transformed. 32 \fChapter 4. 3-Guard Solution s s x x a a \u21d2 b b t s t s x x a a \u21d2 b b t s t s a b a \u21d2 b t s t s a a b \u21d2 t b t Figure 4.12: Different forms of a Case3 sweep, and its suitable transformation. 33 \f4.1. Simple Mathematical Lemmas A c b C a B Figure 4.13: An arbitrary triangle ABC. 4.1 Simple Mathematical Lemmas This section contains multiple geometric lemmas that we commonly use in later chapters in larger lemmas. While each of these proofs are easily explained, we thought that keeping them in another chapter would make the process of understanding larger arguments easier. You may skip this section if you are already familiar with these lemmas. The following subsections belong to different classes of arguments and they can be read separately, while the lemmas within each subsection might be connected, and it is best to read them in order. 4.1.1 Simple Triangle Lemmas (Edge Length and Angle) The following two lemmas refer to Figure 4.13 Lemma 3. In an arbitrary triangle(fig 4.13), a \u2265 b \u00d7 sin A. Proof. By the Law of Sines, b a = sin A sin B The lemma follows since sin B \u2264 1. Lemma 4. a \u2265 (b + c) sin A 2 Proof. From Lemma 3, we know that a \u2265 b sin A and a \u2265 c sin A, so 2a \u2265 (b + c) sin A. Since sin is concave and sin 0 = 0, sin A + sin 0 A+0 A sin A = \u2265 sin = sin 2 2 2 2 (using Lemma 6) 34 \f4.1. Simple Mathematical Lemmas B H x a y A C b Figure 4.14: When A = \u03c0\/2, a + b < x + y. Lemma 5. In a triangle ABC with A \u2265 \u03c0\/2 (as shown in Fig 4.15), the sum of the lengths of a and b is less than sum of length of x plus the length of any chord y that connects A to x, i.e. a + b < x + y. Proof. First we will prove our claim for A = \u03c0\/2 (Fig 4.14) and then we will expand the results to include A > \u03c0\/2. Make y as short as possible, then y would be perpendicular to x, dividing it into x1 and x2 . Now, triangles ABH and AHC are similar to each other, and also similar to ABC. Using this similarity between ABH and ABC, we get: area(ABC) = implies Since we have which implies thus ab xy = 2 2 ab = xy. a2 + b2 = x2 a2 + b2 + 2ab = x2 + 2xy (x + y)2 > (a + b)2 since y > 0 x + y > a + b. The inequality would hold if y was greater than the altitude, i.e, for any line y connecting A to BC. To extend the results to A > \u03c0\/2 we convert our triangle ABC to a right triangle AB \u2032 C, see Fig. 4.15. Draw the line AB \u2032 from A to BC in a way that the angle CAB \u2032 is a right angle. Now in the right triangle AB \u2032 C, we know that a\u2032 + b < x\u2032 + y. Both B and B \u2032 are acute angles, and by using triangular inequality in ABB \u2032 we have: a \u2264 a\u2032 + |BB \u2032 |, or a \u2212 a\u2032 \u2264 |BB \u2032 | Now by adding this inequality to the previous one, we get: a + b < x\u2032 + 35 \f4.1. Simple Mathematical Lemmas A b a a\u2032 y x\u2032 C B\u2032 H x B Figure 4.15: Extending the results to an obtuse angle. |BB \u2032 | + y and x = x\u2032 + |BB \u2032 | therefore: a+b m1 + m2 in quadrilateral ABCD, implies that x + y > m1 + m2 in polygon P . We can simplify the quadrilateral further if the interior edge is the longest edge in each quadrant, i.e., if |EH| \u2265 max{|AH| , |AE|} we flat quadrant A, and make its two adjacent quadrants B and D larger, this transforms the quadrilateral into a triangle. Flattening a quadrant refers to replacing the triangle with the edge that forms the base of the triangle. 40 \f4.2. Single Intersection Case Figure 4.19: The quadrilateral can be transformed into a triangle by flattening one of its corners. We assume that this condition does not happen in two opposite quadrants, since if |EH| \u2265 max{|AH| , |AE|} and |F G| \u2265 max{|F C| , |CG|}, then a+c \u2264 |EH|+|F G|. By the triangle inequality we have, |EH|+|F G| \u2264 |EG| + |HF | = x + y, thus m1 + m2 \u2264 a + c \u2264 x + y. Similarly if |EF | \u2265 max{|BE| , |BF |} and |HG| \u2265 max{|DH| , |DG|} then m1 + m2 \u2264 x + y. Every quadrilateral has at least one right or obtuse angle. In a right or obtuse triangle, the longest edge is opposite the right\/obtuse angle, thus we can always flat one quadrant. Fig. 4.19 shows the general shape of the resulting triangle. If there are two adjacent quadrants that can be transformed, the result would be as Fig. 4.20. We claim that in the resulting triangles (either as Fig. 4.19 or as Fig. 4.20) the longest edges of the quadrants are on the boundary of the triangles. It suffices to show that after the transformation none of the longest edges become shorter. We prove that our transformation does not shorten a possible longest edge in the adjacent quadrants. We assume that in an adjacent quadrants the longest edge is on the boundary of the quadrilateral, otherwise we would transform the quadrant. This implies that the quadrilateral\u2019s angle in that region is acute. 41 \f4.2. Single Intersection Case Figure 4.20: An alternative transformation when two adjacent quadrants have angles \u2265 \u03c0\/2. A A c2 c1 E E x y \u03b1 b1 d2 H b2 B a F 2 1 b D \u03b1 a G d1 Figure 4.21: Type A, general form of the transformed triangle. d1 CB d2 H x D y F c1 c2 C Figure 4.22: Type B, alternate transformed triangle. When a quadrant is transformed, the angle of its adjacent quadrants (if the quadrant is not transformed) become smaller. Since these angles have been acute prior to the transformation, the boundary edges grow longer. Going back to our conditions, we can see that x + y \u2212 m1 \u2212 m2 has not increased, as x and y are unchanged, and none of the longest edges of the quadrants have become shorter. The quadrilateral ABCD has been transformed into a triangle of type A in Fig. 4.21 or type B in Fig. 4.22. Since x+y \u2212m1 \u2212m2 has not increased by the transformation, existence of counter example for the quadrilateral implies a counter example of type A or type A. 42 \f4.2. Single Intersection Case In the rest of this section we will perform a series of transformations on the triangles, that will normalize their shapes, while keeping x+y \u2212m1 \u2212m2 from increasing. Our goal is to turn the triangle into a shape where all (or most) of the long edges are of the same length. During these transformations the triangle may change its form (from type A to type B or vice versa), all the while becoming more balanced (the longest edges become closer in length). We will continue with these normalizations, until we either get a shape where the lengths of all longest edges are equal or we arrive at a state where none of our normalizing moves apply. There are some cases where normalization no longer applies but the longest edges are not all equal either. We call these cases special cases, which we will study on a case by case basis. 4.2.1 Normalization Tools There are three general transformations that we apply to the triangle whenever their conditions are satisfied. After each transformation the resulting shape is more balanced and x + y \u2212 m1 \u2212 m2 either has decreased or remains unchanged. We define b = max{b1 , b2 }, c = max{c1 , c2 } and d = max{d1 , d2 }. A segment (a, b, c or d) is called critical if it has length m1 or m2 . During the normalization phase, we make sure that a critical segment\u2019s length is never decreased, since a decrease in a critical length will increase x + y \u2212 m1 \u2212 m2 . The transformations are as follows: 1. Pivoting: pivoting a triangle edge about an endpoint of segment x or y. This is the only transformation that doesn\u2019t change the length of x + y but changes the length of the triangle edge, e.g. we would never pivot AB about E (in triangle type B) since this would change the length of y. The purpose of this move is to balance the lengths of the segments with each other such that it increases the lengths of critical edges while decreasing the lengths of the other segments. 2. Moving: Moving an end-point of x or y along an edge of the triangle, in order to decrease x + y \u2212 m1 \u2212 m2 . This move changes the length 43 \f4.2. Single Intersection Case (c, d) (a, b) y x l (t, 0) (t + 1, 0) Figure 4.23: Changing t would affect the lengths of x and y. of x or y, lengths of some segments might also be affected by the move. 3. Sliding: the goal is to minimize x + y by sliding F G (moving F and G by the same amount and in the same direction) on BC in Fig. 4.21. As a result we may assume either, (a) \u2220DF G = \u2220EGF or (b) F or G becomes B or C respectively (i.e. we switch to type B) Assume we have a line portion l of unit length. Two arbitrary points (a, b) and (c, d) are connected to the vertices of l via two intersecting lines (see Fig. 4.23). The lengths of the two connecting lines (x and y) can be expressed as functions of t, where t shows the position of l. p (1 + t \u2212 a)2 + b2 p y = (t \u2212 c)2 + d2 x = We would like to find the value of a \u2264 t \u2264 c that minimizes x + y. Differentiating x + y with respect to t, we find x + y is minimized when t= da \u2212 d + bc d+b Replacing this value for t, we get b\/x = d\/y which means the angles x and y make with the horizontal line are equal. 44 \f4.2. Single Intersection Case 4.2.2 Normalization Algorithm Transforming the convex polygon into a triangle lead to two triangles typeA and typeB. We divide these two triangles into further cases based on the position of the longest edge in each of their quadrants, i.e., for typeA we have, A1 \uf8f1 \uf8f4 \uf8f2 d 1 b1 c 1 \uf8f4 \uf8f3 \uf8f1 d1 \uf8f4 \uf8f4 \uf8f4 \uf8f4 d1 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f2 d1 A2 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f4 d2 \uf8f4 \uf8f4 \uf8f4 \uf8f3 d \uf8f1 2 \uf8f4 \uf8f2 d2 A3 \uf8f4 \uf8f3 d2 b1 c 2 b2 c 1 b2 c 2 b1 c 1 b1 c 2 b2 c 1 b2 c 2 Similarly for typeB we have, B1 \u00bd d 1 c1 B2 \u00bd d 1 c2 B3 \u00bd d 2 c1 B4 \u00bd d 2 c2 In the rest of this section we will explain the algorithm we use in order to normalize the triangle. We will explain how and when each of our normalization methods are used and what is the desired outcome after each step. Lemma 7. If x + y < m1 + m2 then the triangle ABC is acute. 45 \f4.2. Single Intersection Case Proof. \u2022 For type A triangle: \u00b7 If A \u2265 \u03c0\/2 then |ED| \u2265 c, by the triangle inequality, x + y \u2265 a + |ED|, thus x + y \u2265 a + c \u2265 m1 + m2 (a contradiction). \u00b7 If B \u2265 \u03c0\/2 then \u2220EF G > \u03c0\/2 and x + y > a + |EF | (by Lemma 5). Also since B \u2265 \u03c0\/2, |EF | \u2265 b so x + y > a + b \u2265 m1 + m2 (a contradiction). \u00b7 If C \u2265 \u03c0\/2 a similar contradiction is obtained. \u2022 For type B triangle: both B and C are acute by an argument similar to the one used to show A < \u03c0\/2 for type A triangles. If A \u2265 \u03c0\/2 (in type B) then Lemma 5 implies x + y > a + b \u2265 m1 + m2 (a contradiction). Lemma 8. If triangle \u25b3ABC with a 6= m2 exists where x + y < m1 + m2 , then there exists \u25b3ABC with x + y < m1 + m2 and a = m2 . Proof. 1. For a type A triangle: (a) If a > m2 : We will move one of its endpoints towards the other in order to decrease both a and x + y until a = m2 . (b) If a = m1 : If either d = d2 or b = b2 (CaseA2 or CaseA3), then we will increase a by moving G towards C or F towards B respectively. It is easy to see that the increase in a, is more than the possible increase in x + y (triangle inequality), and therefore this transformation will decrease x + y \u2212 m1 \u2212 m2 . We will continue with this transformation until either a = m2 or the triangle becomes of type B, in case of the latter we will continue the transformations as described below. The remaining case where d = d1 and b = b1 (CaseA1), is one 46 \f4.2. Single Intersection Case of the special cases. We can prove that x + y > m1 + m2 in this case, regardless of any other conditions. We will not worry about this case here, since a more general case will be analyzed in details later. 2. For a type B triangle: (a) If a \u2265 m2 : In this situation we will move the vertex A down until a = m2 , and after the transformation the triangle may be of typeA. (b) If a = m1 : b \u2265 m2 , in which case we will change our labels, and now we will call the old b, a. The new a is greater than or equal to m2 and we are in the previous case. Lemma 9. If a triangle ABC of type B exists where x + y < m1 + m2 , then there exists \u25b3ABC with x + y < m1 + m2 and b \u2208 {m1 , m2 }. Proof. If b is not already one of the minimum pair, then it is greater than m2 . We can shorten b, by moving the endpoint of y down AC, therefore decreasing the length of y while keeping m1 + m2 unchanged. This transformation may only decrease x + y \u2212 m1 \u2212 m2 . After this transformation the triangle might become of type A. Step 1, Pivot the edges, to balance the lengths of b, c and d in a triangle of type A and c and d in type B. This move can be performed as long as the candidate edges of the two involved quadrants have different lengths, and at least one of them is not critical. It is clear that after the two involved segments become the same length we can not use this transformation anymore; we also can not use it if the two involved segments are both critical, even if they are not of the same length. 1. For a triangle of type A: We will balance the lengths of b, c and d, by pivoting AB on E and AC on D, following the conditions of this transformation. If any of the three edges are not in {m1 , m2 }, then we can still pivot an edge and 47 \f4.2. Single Intersection Case balance its length with one of its adjacent edges. In this way we can propagate the length difference, until either all the lengths are equal, or they are all of critical length, i.e., we can continue the transformation until one of the following outcomes occur. (a) b = c = d. (b) c = d = m2 and b = m1 . (c) b = c = m2 and d = m1 . (d) b = d = m2 and c = m1 . (e) ABC becomes of type B, where b > c. In this case, we will continue on balancing the lengths of c and d, following the next steps. 2. For a triangle of type B: By pivoting BC with F as our pivot, we can normalize the lengths of c and d. The following cases are the possible outcomes of this transformation. (a) c = d = m1 = m2 . Which implies a = b = c = d (by Lemma 8 and Lemma 9). (b) c 6= d and c, d \u2208 {m1 , m2 }. (c) c1 = 0 or d1 = 0. This case happens when BC becomes a continuation of EF or DF during the transformation, i.e., B lies on F or C is moved to D. In either case, using the triangular inequality leads to x+y \u2265 a+c or x + y \u2265 b + d and we know that a + c, b + d \u2265 m1 + m2 , thus x + y \u2212 m1 + m2 \u2265 0. (d) c = d > m2 . This case is one of our special cases, we will cover it in two parts, part1, where c = c2 and d = d2 and part2, where c = c1 and d = d2 or vice versa. We will show that assuming c and d are equal to m2 will not change the structure of the proof. After this step, if it has not been already proved that x+y\u2212m1 \u2212m2 \u2265 0, then we will see one of the following situations: 1. A type A triangle where the long edges of all four quadrants have a length in {m1 , m2 }. 48 \f4.2. Single Intersection Case 2. A triangle of type B with a, b \u2208 {m1 , m2 } (from lemma 8,9 and step1). Step 2, If ABC is of type A and b = b2 and d = d2 , then slide a until either it reaches a vertex ( changes to type B) or x + y reaches its minimum value. If ABC is of type B, then if either c = c2 or d = d2 (or both), then slide a or b down their edges to minimize x + y, assuming that the other conditions are satisfied (e.g. for sliding a down AB, A2 < E and d = d2 ). After this transformation we will assume a triangle of type A with b = b2 and d = d2 , has |HF | = |HG|, or a triangle of type B with c = c2 or d = d2 has A2 > E or A1 > D, respectively. 4.2.3 Final and Special Cases In this section we will study all possible outcomes of the normalization algorithm in detail. In each case we will consider one or a group of possible outcomes and prove that x + y \u2265 m1 + m2 in each case. Case A1 In this case d = d1 and b = b1 . We will show that m1 +m2 \u2264 x+y, regardless of the exact lengths of b, d and a. First we use Lemma 3 on triangles BEG and F CD. In \u25b3BEG, (b1 + a) sin(B) \u2264 x Similarly in \u25b3F CD, (d1 + a) sin(C) \u2264 y Together these two inequalities imply, min{(b + a), (d + a)}(sin(C) + sin(B)) \u2264 x + y Since 0 \u2264 B, C \u2264 \u03c0\/2, Lemma 6 on triangle ABC implies, Thus 1 \u2264 sin(C) + sin(B) \u2264 2 m1 + m2 \u2264 min{b + a, d + a}(sin(C) + sin(B)) \u2264 x + y 49 \f4.2. Single Intersection Case Case A2 In this case either b = b1 and d = d2 , or b = b2 and d = d1 . Without loss on generality we will assume d = d1 and b = b2 : \u2265d2 d = d1 and a In \u25b3F CD : |F D| + |DC| \u2265 |F C| i.e., y + d2 thus y =m2 . \u2265d1 + m2 , \u2265m2 . In \u25b3BEG, if B \u2265 \u03c0\/3, |EG| \u2265 min{|BE| , |BG|} x \u2265 min{b2 , a + b1 } \u2265 m1 x + y \u2265 m1 + m2 (since y \u2265 m2 ) The other possibility is when B < \u03c0\/3; we know B + C > \u03c0\/2 (otherwise A \u2265 \u03c0\/2). Using Lemma 3 in \u25b3F DC and Lemma 4 in \u25b3BGE we get: In \u25b3BGE : and in \u25b3F DC : thus Also and imply, x sin(B\/2) y sin(C) \u2265 b1 + b2 + a > b2 + a, \u2265 d1 + a, x+y \u2265 min{a + b, a + d}(sin(B\/2) + sin(C)). B+C > \u03c0\/2 \u03c0 \u2265 C, B \u2265 0 2 sin B\/2 + sin C \u2265 sin B\/2 + sin (\u03c0\/2 \u2212 B). sin B\/2 + sin (\u03c0\/2 \u2212 B) is minimized when B is at its smallest, i.e., B = \u03c0\/3, thus, sin B\/2 + sin (\u03c0\/2 \u2212 B) \u2265 1. Finally we get: x + y \u2265 min{a + b, a + d} x + y \u2265 m1 + m2 50 \f4.2. Single Intersection Case Case A3 In this case b = b2 and d = d2 . By symmetry we can assume that c = c2 . When b = b2 and d = d2 , we slide F G on BC. We get |F H| = |GH|, thus in \u25b3F HG, F = G. We call this angle \u03b1. By pivoting, the lengths of a, b, c and d have been normalized. Either they are all equal to m2 = m1 or one of them is m1 and the other three are equal to m2 . Comparing B and C with \u03b1 we get four possible cases: \u2022 B, C < \u03b1: Place point H \u2032 so that DHEH \u2032 is a parallelogram and so |DH| + |HE| = |DH \u2032 | + |H \u2032 E|. Since B, C < \u03b1, then A lies inside \u25b3DEH \u2032 . It implies, \u00af \u00af \u00af \u00af |DH| + |HE| = \u00afDH \u2032 \u00af + \u00afH \u2032 E \u00af > |DA| + |AE| > m1 By the triangular inequality, |GH| + |HF | > |GF | = m2 . Thus, x + y = |DH| + |HE| + |GH| + |HF | > m1 + m2 . \u2022 C < \u03b1 < B: Similar to the previous case we draw the parallel lines and create parallelogram HDH \u2032 E, but unlike the previous case A lies outside HDH \u2032 E. B > \u03b1 implies that in the current figure EH \u2032 would be to the right of AE, and intersects DA before reaching H \u2032 . Call the intersection point A\u2032 . In \u25b3AEA\u2032 , \u2220AEA\u2032 =B \u2212 \u03b1, and B< \u03c0\/2 thus, B \u00afDA\u2032 \u00af , and we can conclude |HD| + |HE| > |DA| 51 \f4.2. Single Intersection Case thus, x + y > m1 + m2 . \u2022 B < \u03b1 < C If a = b = c = d then clearly C \u2264 B, since |AB| \u2264 |AC|. Similarly if b = m1 or c = m1 , C < B. a can not be m1 , since we set the length of a to m2 during normalization. The only remaining case has d = m1 and b, c and a are m2 . Draw a line F D\u2032 from F parallel to AB. Using the similarity of \u25b3CF D\u2032 and \u25b3ABC, we have |CF | \/ |F B| = |CD\u2032 | \/ |D\u2032 A| > 1. We can therefore conclude that D\u2032 is positioned on DA, since we know |CD| = d < c = |AD|. This implies \u2220B > \u03b1, which is a contradiction. \u2022 \u03b1 < B, C: In \u25b3CF D: y d = . sin \u03b1 sin C Similarly in \u25b3BEG: b x = . sin \u03b1 sin B Thus, x + y > b + d \u2265 m1 + m2 . The rest of the section will contain possible outcomes of type B. Case B1 Since c = c1 and d = d1 , we can show that x + y \u2265 m1 + m2 regardless of the exact lengths of c, d, a and b. Using Lemma 3 on \u25b3ABF , \u25b3AF C and \u25b3AED: 52 \f4.2. Single Intersection Case In \u25b3ABF : y \u2265 (a + d1 ) sin B thus, y \u2265 (a + d) sin B. In \u25b3AF C : y \u2265 (b + c1 ) sin C thus, y \u2265 (b + c) sin C. In \u25b3AED : x \u2265 a sin A, and x \u2265 b sin A thus, Therefore 2x \u2265 (a + b) sin A. 2(x + y) \u2265 (a + b) sin A + (b + c) sin C + (a + d) sin B \u2265 min{a + b, b + c, a + d}(sin A + sin B + sin C). by Lemma 6 Also thus, sin A + sin B + sin C \u2265 2. min{a + b, b + c, a + d} \u2265 m1 + m2 x + y \u2265 m1 + m2 . Case B2 We have d = d1 and c = c2 . In triangle AHD, A1 \u2265 D(otherwise we would have slid AD down AC to minimize x + y). Since, A1 \u2265 D, then in triangle AED we have A > D which implies |ED| > |AE| or x > a. In triangle ABF we have |BF | + |AF | \u2265 |AB|, i.e., |BF | + y \u2265 a + d. We already know that |BF | = d2 \u2264 d, therefore y \u2265 a, thus x+y \u2265 2a \u2265 m1 +m2 (since a = m2 ). Case B3 In this case d = d2 and c = c1 . Similar to the previous argument we have A2 \u2265 E which leads to x > b. 1. If c2 \u2264 b, then using triangular inequality in \u25b3AF C we find out y + c2 \u2265 c1 + b = c + b, so y \u2265 c. Finally we can conclude that x + y \u2265 b + c \u2265 m1 + m2 . 53 \f4.2. Single Intersection Case 2. And if c2 > b (only occurs if b = m1 < c, since c \u2264 b, implies c2 < c < b), then |BC| \u2265 |AC|, since after pivoting BC on F , either c = d \u2265 m2 , or c 6= d and c, d \u2208 {m1 , m2 } (d = m1 or c = m1 ); the latter is not possible as we already assumed b = m1 . |BC| \u2265 |AC| implies A \u2265 B. In AED : In ABF : In AF C : A \u2264 x (Lemma 4). 2 B B (a + d) sin( ) \u2264 (a + d1 + d2 ) sin( ) \u2264 y (Lemma 4). 2 2 (b + c) sin C = (b + c1 ) sin C \u2264 y (Lemma 3). (a + b) sin We also know that (m1 + m2 ) \u2264 min{a + b, a + d, b + c}, thus B A (m1 + m2 )[2 sin( ) + sin( ) + sin C] \u2264 2(x + y) 2 2 (4.1) A B Claim. 2 sin( ) + sin( ) + sin C \u2265 2 2 2 Proof. The following constraints exist on inequality 4.1: 0 \u2264 A, B, C < \u03c0\/2, A + B + C = \u03c0 and A \u2265 B. We will prove that the minimum value for d, (d = 2 sin(A\/2)+sin(B\/2)+ sin C) is greater than 2, and then use this result to show that x + y \u2265 m1 + m2 . Using A + C = \u03c0 \u2212 B, we define: X = \u03c0 \u2212 B. Assuming a fixed value for B, the minimum value for 2 sin(A\/2) + sin(B\/2) + sin C would occur when 2 sin(A\/2) + sin C is minimized. We can rewrite C as X \u2212 A. We want to minimize f (A) = 2 sin(A\/2) + sin(X \u2212 A). We find the first and second derivatives of f : A f \u2032 (A) = cos( ) \u2212 cos(X \u2212 A) 2 1 A f \u2032\u2032 (A) = \u2212 sin( ) \u2212 sin(X \u2212 A) 2 2 f \u2032\u2032 (A) is negative, thus f has a bell shaped form, and the minimum values happen at the extremes,i.e., comparing different values of d when A = X, A = \u03c0\/2 or A = B, 54 \f4.2. Single Intersection Case (a) A = X and A = \u03c0\/2 A = X \u2192 d = 2 sin((\u03c0 \u2212 B)\/2) + sin(B\/2) + sin 0 with X \u2264 \u03c0\/2 \u2192 B = \u03c0\/2, d = 3 sin(\u03c0\/4) \u2248 2.12(A = \u03c0\/2) (b) A = B A = B \u2192 d = 2 sin(B\/2) + sin(B\/2) + sin(\u03c0 \u2212 2B) = 3 sin(B\/2) + sin(2B) We have to find the value for B that minimizes d. Finding the second derivative of d, we realize that d is also minimized when B is at either its maximum or minimum value. B 3 d\u2032\u2032 = \u2212 sin( ) \u2212 4 sin 2B \u2264 0 4 2 \u03c0 \u2212 2B \u2264 \u03c0\/2 \u2192 B \u2265 \u03c0\/4, \u03c0 B = \u03c0\/4 \u2192 d = 3 sin( ) + 1 \u2248 2.15 8 \u03c0 B = \u03c0\/2 \u2192 d = 3 sin( ) + 0 \u2248 2.12 4 The over all minimum greater than 2.12 since this value is obtained with A = B = \u03c0\/2, which does not show a valid triangle. By the claim we know x + y \u2265 m1 + m2 . Case B4 We will show that it is not possible to have a normalized type B triangle where d = d2 and c = c2 . In step 2, of the normalization algorithm, we slide a down AB if d = d2 and angle A2 < E. Similarly we slide b down AC if c = c2 and A1 < D. We have already assumed that d = d2 and c = c2 in this case, so the only possible explanation is that, A1 \u2265 D and A2 \u2265 E. In triangle ADE we have A + D + E = \u03c0, and A = A1 + A2 . Therefore we have A \u2265 E + D so A \u2265 \u03c0\/2, which contradicts our first claim that ABC is acute. 55 \f4.3. Double Intersection Case A A B C C A A B C A A B A B A A B B Figure 4.24: Double inter- Figure 4.25: Double inter- Figure 4.26: Double intersection case1. section case2. A A B C A A section case3. B C A A B B Figure 4.27: Case1 is simplified to a Figure 4.28: Case2 is simplified to a single intersection. 4.3 perimeter walk (no interior paths). Double Intersection Case In this case we study the possibility of having an intersection inside a boundary cover where the path of one guard intersects the path of another guard twice. The case consists of six chains, and three interior paths traversed by the guards such that one guard covers three of the chains, another guard traverses two chains and the third guard only walks on one chain. In the double intersection case, the relative positions of the chains with respect to the interior paths makes for different methods. We define the following three cases based on the the alignment of the tails of the path of guard B in Fig. 4.24 to Fig. 4.26. The first two cases can be reduced to previous cases, \u2022 In case1, the sweep can be simplified to one intersection case, see Fig. 4.27. \u2022 In case2, the sweep can be simplified to a perimeter walk (with no interior paths), see Fig. 4.28. In the section 4.2, we proved that the length of a boundary cover with a single intersection, is no shorter than a boundary cover with three chains, which needs no interior paths. Thus the first two cases are both reduced to sweeps with no intersections. Fig. 4.29 shows the remaining case. 56 \f4.3. Double Intersection Case C A C\u2032 A\u2032 Y X Y\u2032 X\u2032 D\u2032 B\u2032 D B Figure 4.29: The remaining case of double intersection. In the rest of this section, we will prove that the length of a paths of Fig. 4.29, is greater than or equal to a boundary cover with only three chains. Theorem 2. The length of the boundary cover T of polygon P as shown in Fig. 4.29, is greater than or equal to \u2265 |P | \u2212 |\u21131 | \u2212 |\u21132 | \u2212 |\u21133 |, where \u21131 , \u21132 and \u21133 are the three longest edges of P . Proof. Proving that T \u2265 |\u2202P | \u2212 any three edges of P would immediately lead to our claim, and we know that the length of the interior paths is greater than |CA| + |DB|, thus we will assume that CA and DB are two of the three edges. We will choose the shortest of the four remaining free boundary segments as the third edge. It will suffice to show \u00af \u00af |AB| + |CX| + \u00afDX \u2032 \u00af \u2265 |CA| + |DB| + \u03bb where \u03bb = min{|C \u2032 Y | , |D\u2032 Y \u2032 | , |A\u2032 X| , |X \u2032 B \u2032 |}. Since then replacing the interior parts of the guards\u2019 paths with CA, DB and \u03bb will be a shorter boundary cover. First we will take our general shape through several steps of transformation, which will normalize the form of the polygon while making sure that |AB| + |CX| + |DX \u2032 | \u2212 |CA| \u2212 |DB| does not increase, and similarly \u03bb never becomes shorter. In other words, at each step we claim that if a counter example to our claim (|AB| + |CX| + |DX \u2032 | > |CA| + |DB| + \u03bb) exists prior to this step, then one would exist with this condition. 57 \f4.3. Double Intersection Case C E A C\u2032 A\u2032 H X Y X\u2032 Y\u2032 H\u2032 D\u2032 D B\u2032 B Figure 4.30: A polygon P where the extended lines of AC and DB diverge. In Fig. 4.29 draw a line XX \u2032 and extend it in both directions. Extend CA on both sides, this line intersects XX \u2032 on the right side of the picture. Similarly extend DB. The following lemma shows that the extended lines of CA and DB intersect on the left side of the picture. Lemma 10. In Fig.4.30 extension of lines CA, DB, and XX \u2032 creates a triangle. Proof. In other words, we want to prove that CA, DB intersect one another on the left side of the picture, thus we will show that if they do not intersect, |AB| + |CX| + |DX \u2032 | \u2212 |AC| \u2212 |BD| \u2265 \u03bb. Assuming that the lines do not intersect on the left side, then the sum of their intersecting angles with |XX \u2032 | is \u2265 \u03c0. This implies that at least one of them is \u2265 \u03c0\/2. Without loss of generality we will assume that the extension of AC and XX \u2032 form an angle at E that is \u2265 \u03c0\/2. Thus both A and A\u2032 would also be greater than or equal to \u03c0\/2, as they are both greater than E in Fig. 4.30. Since A\u2032 \u2265 \u03c0\/2, |AX| > |A\u2032 X|. Since A \u2265 \u03c0\/2, |CX| + |AH| > |AC| + |AX| (Lemma 5). Therefore, |CX| + |AH| > |AC| + |A\u2032 X|. Also by triangle inequality, |DH \u2032 | + |H \u2032 B| \u2265 |BD|. Thus, \u00af \u00af \u00af \u00af \u00af \u00af |AH| + \u00afH \u2032 B \u00af + |CX| + \u00afDH \u2032 \u00af \u2212 |AC| \u2212 |BD| \u2265 \u00afA\u2032 X \u00af \u2265 \u03bb 58 \f4.3. Double Intersection Case A C Z Y Y A\u2032 C\u2032 X \u2032 D\u2032 X\u2032 D B\u2032 B Figure 4.31: The general form of a counter-example. From Lemma 10, we know that a counter-example must have CA and DB intersect to the left of polygon P , at a point we will call Z. So the counter-example, if one exists, appears as in Fig. 4.31. 1. Make C \u2032 , C, A and A\u2032 co-linear. Extend CA and DB on both sides. From Lemma 10 we know that these lines intersect. Call the intersection point Z. We know that C \u2032 , D\u2032 , Y and Y \u2032 lie inside \u25b3ZCD. Extend Y C \u2032 until it intersects CZ, move C \u2032 to the intersection point. Since the polygon is convex, we know that the extended line would intersect line AC outside of the polygon (after vertex C), thus it will increase the length of Y C \u2032 . It also might decrease |CC \u2032 |, but the decrease does not concern us since |CC \u2032 | is not contributing in our inequality. Similarly by extending XA\u2032 we can move A\u2032 until it is co-linear with A, C and C \u2032 . 2. Make D\u2032 , D, B and B \u2032 co-linear. This step is similar to the previous step, since by extending X \u2032 B \u2032 and Y \u2032 D\u2032 we can make B \u2032 , B, D and D\u2032 co-linear. 3. Move Y and Y \u2032 to Z. Both Y and Y \u2032 reside within triangle \u25b3ZC \u2032 D\u2032 . We claim that we can increase |Y C \u2032 | + |Y \u2032 D\u2032 | by moving Y and Y \u2032 to Z. First extend C \u2032 Y and D\u2032 Y \u2032 until they intersect one another, call the intersection Y1 . We have |C \u2032 Y1 | > |C \u2032 Y | and |D\u2032 Y1 | > |D\u2032 Y \u2032 |. Then extend C \u2032 Y1 to intersect D\u2032 Z at Y2 (see Fig. 4.32). It is clear that |D\u2032 Y1 | is shorter than |D\u2032 Y2 | + |Y2 Y1 |. Similarly, |Y1 C \u2032 | + |Y2 Y1 | < 59 \f4.3. Double Intersection Case C A C \u2032 A\u2032 Z X Y1 Y Y2 Y \u2032 X\u2032 D\u2032 D B B\u2032 Figure 4.32: The general form of the counter example after the first two steps. |Y2 Z| + |C \u2032 Z|, i.e., \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00afY C \u2032 \u00af + \u00afY \u2032 D\u2032 \u00af < \u00afY1 C \u2032 \u00af + \u00afD\u2032 Y2 \u00af + |Y2 Y1 | \u00af \u00af \u00af \u00af < \u00afD\u2032 Y2 \u00af + |Y2 Z| + \u00afC \u2032 Z \u00af . We can conclude that, \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00afY C \u2032 \u00af + \u00afY \u2032 D \u2032 \u00af < \u00afD \u2032 Z \u00af + \u00afC \u2032 Z \u00af . Also \u00af \u2032 \u00af \u00af \u2032 \u00af \u00afD Z \u00af + \u00afC Z \u00af \u2265 2\u03bb. Since |Y C \u2032 | and |Y \u2032 D\u2032 | are both \u2265 \u03bb. Move Y and Y \u2032 to Z. Thus, \u00af \u2032 \u00af \u00af \u2032 \u00af \u00afD Y \u00af + \u00afC Y \u00af \u2265 2\u03bb. (4.2) 4. A = A\u2032 and B = B \u2032 . Move vertex A until it lies on A\u2032 . this will make CA longer, but it also increases AB. CA would get longer by |AA\u2032 |, but |BA\u2032 | \u2264 |BA| + |AA\u2032 | (triangular inequality), thus we will not have an increase in |AB| + |CX| + |DX \u2032 | \u2212 |AC| \u2212 |BD|. A symmetric transformation will move B to B \u2032 . 5. Make A, X, X \u2032 and B co-linear. 60 \f4.3. Double Intersection Case Extend XX \u2032 on both sides until it intersects both Y A and Y B. We want to move A and B to their respective intersection points. Call the intersection point of XX \u2032 and Y A, E. We claim that moving A to E would make both |CA| and |XA| longer, also moving B to the intersection point of XX \u2032 and Y B would increase both DB| and |X \u2032 B|. In order to prove this claim we use the fact that \u2220Y BX \u2032 and \u2220Y AX are acute. Lemma 11. \u2220Y BX \u2032 and \u2220Y AX are both acute. Proof. The proof for this claim is very similar to Lemma 10. Assuming that \u2220Y AX \u2265 \u03c0\/2, we can apply Lemma 5 to \u25b3Y AX. Thus, and Also and Thus |CX| + |AH| \u00af \u00af \u00af \u00af \u00afDH \u2032 \u00af + \u00afH \u2032 B \u00af |AB| \u00af \u00af \u00afDX \u2032 \u00af > |CA| + |AX| \u2265 |DB| . \u00af \u00af \u2265 |AH| + \u00afH \u2032 B \u00af \u00af \u00af \u2265 \u00afDH \u2032 \u00af . \u00af \u00af |AB| + |CX| + \u00afDX \u2032 \u00af\u2265 |AC| + |BD| + |AX| . \u2265 |AC| + |BD| + \u03bb Similarly if \u2220yBX \u2032 \u2265 \u03c0\/2, then |AB|+|CX|+|DX \u2032 | \u2265 |AC|+|BD|+\u03bb, thus \u2220Y AX and \u2220Y BX \u2032 are both acute. When \u2220Y BX \u2032 and \u2220Y AX are acute, moving A to E would lengthen both |CA| and |XA|, since |XE| > |XA|. |AB| would also get longer, but |BE| < |AB|+|AE|. Similarly we can argue that |X \u2032 B \u2032 | and |DB| would both get longer. 6. C = C \u2032 and D = D\u2032 This move is valid since moving C \u2032 to C and D\u2032 to D would make Y C \u2032 and Y D\u2032 longer. After these transformations we have a triangle with vertices A = A\u2032 , B = B \u2032 and Y = Y \u2032 (see Fig. 4.33). 61 \f4.3. Double Intersection Case A A\u0302 A = A\u2032 X X C C C\u0302 X\u2032 X\u2032 Y =Y\u2032 D\u2032 Y B = B\u2032 Figure 4.33: The outcome of the first seven steps of transformation on Fig. 4.33. D\u2032 B \u02db 4.34: Choose A\u0302 on AX such that \u02dbFigure \u02db \u02db \u02dbA\u0302X \u02db = \u03bb. 7. |AX| = |BX \u2032 | = \u03bb and \u2220CXA, \u2220DX \u2032 B \u2264 \u03c0\/2 We claim that either, \u2022 \u2220CXA = \u03c0\/2 and |AX| \u2265 \u03bb, or \u2022 \u2220CXA < \u03c0\/2 and |AX| = \u03bb Since, if \u2220CXA > \u03c0\/2 then we can decrease it by moving X towards X \u2032 , and if \u2220CXA < \u03c0\/2 while |AX| > \u03bb then we will decrease |AX| by moving X towards A. The same is true for the other side of the triangle: \u2022 \u2220DX \u2032 B = \u03c0\/2 and |BX \u2032 | \u2265 \u03bb, or \u2022 \u2220DX \u2032 B < \u03c0\/2 and |BX \u2032 | = \u03bb We conclude that |AX| > \u03bb or |BX \u2032 | > \u03bb only if \u2220CXA = \u03c0\/2 or \u2220DX \u2032 B = \u03c0\/2 respectively. \u00af \u00af \u00af \u00af If |AX| > \u03bb, select A\u0302 on AX such that \u00afA\u0302X \u00af = \u03bb. Connect A\u0302 to Y , intersecting XC at C\u0302. \u00af \u00af \u00af \u00af \u2022 \u00afY C\u0302 \u00af > |Y C|, since \u2220Y CX = \u2220CXA + \u2220CAX > \u03c0\/2 62 \f4.3. Double Intersection Case A \u03bb X C X\u2032 \u03bb Y D B Figure 4.35: Normalization would transform the polygon into this triangle. \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u2022 \u00afC\u0302X \u00af = |CX| \u2212 \u00afC C\u0302 \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u2022 \u00afX A\u0302\u00af = |XA| \u2212 \u00afAA\u0302\u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u2022 \u00afC\u0302 A\u0302\u00af > |CA| \u2212 \u00afC C\u0302 \u00af \u2212 \u00afAA\u0302\u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af Therefore \u00afA\u0302B \u00af + \u00afC\u0302X \u00af + |DX \u2032 | \u2212 \u00afC\u0302 A\u0302\u00af \u2212 |BD| < |AB| + |CX| + |DX \u2032 | \u2212 |AC| \u2212 |BD|. A similar transformation will be done if |BX \u2032 | > \u03bb in order to adjust its length, thus we will assume that |BX \u2032 | = |AX| = \u03bb and \u2220CXA, \u2220DX \u2032 B \u2264 \u03c0\/2. After these seven steps we have a triangle as Fig. 4.35. In the rest of this section we will analyze our triangle and establish more facts regarding its shape which will eventually lead to the proof of our claim. 8. Assume without loss of generality that A \u2265 B. 9. \u2220CXA > A, otherwise |CA| \u2264 |CX|, and |XA| \u2265 \u03bb, thus |CX| + |DX \u2032 | + |AB| \u2212 |AC| \u2212 |DB| \u2265 \u03bb. 10. Similarly \u2220DX \u2032 B > B. 11. A \u2265 \u03c0\/3. Assume A < \u03c0\/3. Since B < A then Y > \u03c0\/3. We claim that if Y > \u03c0\/3, then sum of the projections of CY and Y D on AB is 63 \f4.3. Double Intersection Case A C\u0302 C X X\u2032 Y\u0302 Y D\u0302 1 2 B D Figure 4.36: \u02db \u02db \u02db \u02db If A < \u03c0\/3, \u02dbC\u0302 D\u0302\u02db > \u03bb. greater than \u03bb. We start by drawing perpendiculars from C and D to AB, calling the intersections C\u0302 and D\u0302 respectively. C\u0302 D\u0302 is sum of the projections of \u00af \u00af \u00af \u00af CY and Y D on AB. If \u00afC\u0302 D\u0302\u00af > \u03bb then it is easy to see that, \u03bb < also |AC| < and |DB| < Thus |DB| + |AC| + \u03bb < \u2264 \u00af \u00af \u00af \u00af \u00afC\u0302 D\u0302\u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00afC C\u0302 \u00af + \u00afAC\u0302 \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00afDD\u0302\u00af + \u00afB D\u0302\u00af . \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af |AB| + \u00afC C\u0302 \u00af + \u00afDD\u0302\u00af \u00af \u00af |AB| + |CX| + \u00afDX \u2032 \u00af . \u00af \u00af \u00af \u00af Lemma 12. In \u25b3ABY of Fig. 4.36, if A, B < \u03c0\/3 then \u00afC\u0302 D\u0302\u00af > \u03bb Proof. Let Y\u0302 be the projection of Y onto AB. C\u0302 Y\u0302 is the projection of of DY on AB. It is clear that \u00af projection \u00af \u00afCY \u00afon AB, and D\u0302Y\u0302 is the \u00af \u00af \u00af \u00af \u00afC\u0302 Y\u0302 \u00af = sin Y1 |CY | and \u00afD\u0302Y\u0302 \u00af = sin Y2 |DY |. Since A and B are both < \u03c0\/3, then Y1 and Y2 are both > \u03c0\/6, thus: sin Y1 > 1 2 \u00af \u00af \u00af \u00af \u21d2 \u00afC\u0302 Y\u0302 \u00af > |CY | \/2 64 \f4.3. Double Intersection Case A C C X \u2032 X\u2032 Y D\u2032 D B Figure 4.37: XC \u2032 and X \u2032 D\u2032 are drawn perpendicular to AB. and similarly: sin Y2 > 1\/2 \u00af \u00af \u00af \u00af \u21d2 \u00afD\u0302Y\u0302 \u00af > |DY | \/2 \u00af \u00af \u00af \u00af therefore, \u00afC\u0302 D\u0302\u00af > (|DY | + |CY |)\/2 \u2265 \u03bb, since we already established that |DY | + |CY | \u2265 2\u03bb (see equation 4.2). 12. B < \u03c0\/6 We will show that if B \u2265 \u03c0\/6 then |XC|+|XA|\u2212|CA|+|X \u2032 D|+|X \u2032 B|\u2212 |DB| > \u03bb, and therefore |AB| + |CX| + |DX \u2032 | > |CA| + |DB| + \u03bb. Draw XC \u2032 from X perpendicular to AB. |C \u2032 A| is longer than |CA| by |CC \u2032 | (since \u2220AXC \u2264 \u03c0\/2), and |XC \u2032 | is longer than |XC| by less than |CC \u2032 | (triangular inequality), thus |XC \u2032 | \u2212 |C \u2032 A| \u2264 |XC| \u2212 |CA|. Similarly draw X \u2032 D\u2032 from X \u2032 and we have |X \u2032 D\u2032 | \u2212 |D\u2032 B| \u2264 |X \u2032 D| \u2212 |DB| (see Fig. 4.37). We want to find |XC| + |XA| \u2212 |CA| + |X \u2032 D| + |X \u2032 B| \u2212 |DB|, therefore we will find the value of |XC| + |XA| \u2212 |CA| in \u25b3AXC \u2032 and |X \u2032 D| + |X \u2032 B| \u2212 |DB| in \u25b3BD\u2032 X \u2032 . Considering an arbitrary right triangle ABC, as in Fig. 4.38. We want to find a lower bound for |AB| + |BC| \u2212 |AC|. Define f (\u03b8) = (\u03bb(sin \u03b8 + cos \u03b8 \u2212 1))\/ cos \u03b8 = |AB| + |BC| \u2212 |AC|. By increasing the angle \u03b8 both AC and BC become longer. Using the triangular inequality we can see that the increase in AC is less 65 \f4.3. Double Intersection Case A \u03b8 \u03bb B C Figure 4.38: The relationship between edge lengths and \u03b8 in a right triangle. than the increase in BC, therefore f (\u03b8) is minimized when \u03b8 is at its minimum. This leads to the conclusion that when applied to triangles \u25b3AXC \u2032 and \u25b3BD\u2032 X \u2032 , f (A) \u2265 f (\u03c0\/3) and f (B) \u2265 f (\u03c0\/6). After calculating f (\u03c0\/3) and f (\u03c0\/6) we get: f (\u03c0\/3) = = and, Thus, f (\u03c0\/6) = f (\u03c0\/3) + f (\u03c0\/6) = = > \u03bb(sin(\u03c0\/3) + cos(\u03c0\/3) \u2212 1) cos(\u03c0\/3) \u221a 3 1 \u2212 1) 2\u03bb( + 2 2\u221a 3 2 1 \u221a \u03bb( + \u2212 1). 2 2 3 \u221a \u221a 3\u22121+3\u2212 3 \u221a ) \u03bb( 3 2 \u03bb\u221a 3 \u03bb So we have shown that |AB| + |CX| + |DX \u2032 | > |CA| + |DB| + \u03bb. 13. |CA| > |CX| Assume |CA| \u2264 |CX|, then |CA| + |AX| \u2264 |CX| + |AX| By the triangle inequality |DB| \u2264 |DX \u2032 | + |X \u2032 B|, thus |CA| + |DB| + |AX| \u2264 |CX| + |DX \u2032 | + |AX| + |X \u2032 B| \u2264 |CX| + |DX \u2032 | + |AB|. This indicates that, \u00af \u00af |CX| + \u00afDX \u2032 \u00af + |AB| \u2212 |CA| \u2212 |DB| \u2265 |AX| \u2265 \u03bb 66 \f4.3. Double Intersection Case A 1 C\u2032 H 2 C C\u0302 I X Figure 4.39: \u02db \u02db \u02db \u02db |CX| + \u02dbAC\u0302 \u02db \u2212 |CA| \u2265 \u03bb\/2 \u00af \u00af \u00af \u00af 14. |CX| + \u00afAC\u0302 \u00af \u2212 |CA| \u2265 \u03bb\/2 \u00af \u00af \u00af \u00af We show that when A \u2265 \u03c0\/3 and |CA| > |CX|, then |CX| + \u00afAC\u0302 \u00af \u2212 |CA| \u2265 \u03bb\/2, where C\u0302 is the projection of C on AX. Choose C \u2032 on Y A such that |AC \u2032 | = |C \u2032 X|. Clearly C \u2032 has to be on CA (Fig.4.39), otherwise |CX| would be greater than |CA| since any move to the right of C \u2032 will decrease C \u2032 A more than C \u2032 X. Define H as the projection of C \u2032 on AX. It is clear that |AH| = \u03bb\/2, since \u25b3AC \u2032 X is an isosceles triangle, and by fact 7, |AX| = \u2032 \u03bb. Thus |C \u2032 X| \u00af +\u00af |AH| \u2212 |C A| = \u03bb\/2. Subtracting this equation \u00af \u00af from |CX| + \u00afAC\u0302 \u00af \u2212 |CA| \u2265 \u03bb\/2, we obtain the equivalent inequality \u00af \u00af \u00af \u00af |CX|\u2212|C \u2032 X|+ \u00afC\u0302H \u00af \u2212|CC \u2032 | \u2265 0, which if shown, will establish fact 14. Select I such that \u2220CIC \u2032 = \u03c0\/2 and IC \u2032 is perpendicular to XC \u2032 . \u2032 X| \u2265 |CI| and |CI| = |CC \u2032 | sin(C \u2032 ) = |CC \u2032 | sin(2A\u2212 In Fig. 4.39,\u00af |CX|\u2212|C 2 \u00af \u00af \u00af \u2032 \u03c0\/2). Also \u00afH C\u0302 \u00af = |CC | sin((\u03c0 \u2212 2A)\/2). 67 \f4.3. Double Intersection Case A C\u0302 C X X\u2032 Y\u0302 D\u0302 Y D B Figure 4.40: \u02db \u02db \u02db \u02db \u02dbC\u0302 D\u0302\u02db > \u03bb\/2. Adding these equations together, \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af |CX| + \u00afH C\u0302 \u00af \u2212 \u00afC \u2032 X \u00af \u2212 \u00afCC \u2032 \u00af \u2265 \u00afCC \u2032 \u00af (sin(\u03c0\/2 \u2212 A) + sin(2A \u2212 \u03c0\/2) \u2212 1) \u00af \u00af = \u00afCC \u2032 \u00af (cos A \u2212 cos 2A \u2212 1) \u00af \u00af = \u00afCC \u2032 \u00af cos A(1 \u2212 2 cos A) \u22650 Since A > \u03c0\/3 implies cos A < 1\/2. \u00af \u00af \u00af \u00af 15. In Fig. 4.40 \u00afC\u0302 D\u0302\u00af > \u03bb\/2 \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af If \u00afC\u0302 D\u0302\u00af were less than \u03bb\/2, then \u00afC\u0302B \u00af \u2264 3\u03bb\/2 (since \u00afD\u0302B \u00af \u2264 \u03bb by \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af fact 7). Draw Y Y\u0302 perpendicular to AB. \u00afY Y\u0302 \u00af\/(3\u03bb\/2) < \u00afY Y\u0302 \u00af\/\u00afC\u0302B \u00af < \u00af \u00af \u00af \u00af \u221a \u00af \u00af \u00af \u00af \u00afY Y\u0302 \u00af\/\u00afB Y\u0302 \u00af = tan B < 1\/ 3 (since B < \u03c0\/6 by fact 12). Therefore \u00af \u00af \u221a \u00af \u00af \u00afY Y\u0302 \u00af < \u03bb 3\/2. (4.3) \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af This upper-bound on \u00afY Y\u0302 \u00af poses a problem since \u00afC C\u0302 \u00af would be longer \u00af \u00af \u00af \u00af than \u00afY Y\u0302 \u00af, which is not possible. We know that |AB| \u2265 2\u03bb, which 68 \f4.3. Double Intersection Case \u00af \u00af \u00af \u00af implies \u00afAC\u0302 \u00af \u2265 \u03bb\/2. \u00af \u00af \u00af \u00af \u221a \u00af \u00af \u00af \u00af A C\u0302 = C C\u0302 \u00af tan A > \u03bb\/2 tan A > \u03bb 3\/2 (since A > \u03c0\/3 by fact 11) \u00af \u00af \u00af (4.4) \u00af \u00af \u00af \u00af This contradiction (equations 4.3 and 4.4) implies \u00afC\u0302 D\u0302\u00af > \u03bb\/2. After these steps we have all the required information, thus \u00af \u00af |AB| + |CX| + \u00afDX \u2032 \u00af \u2212 |BD| \u2212 |CA| \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af = \u00afAC\u0302 \u00af + \u00afC\u0302 D\u0302\u00af + \u00afD\u0302B \u00af + |CX| + \u00afDX \u2032 \u00af \u2212 |BD| \u2212 |CA| \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af > \u00afAC\u0302 \u00af + \u03bb\/2 + \u00afD\u0302B \u00af + |CX| + \u00afDX \u2032 \u00af \u2212 |BD| \u2212 |CA| (fact 15) \u00af \u00af \u00af \u00af \u00af \u00af > \u03bb + \u00afD\u0302B \u00af + \u00afDX \u2032 \u00af \u2212 |BD| (fact 14) \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af \u00af > \u03bb + \u00afD\u0302B \u00af + \u00afDD\u0302\u00af \u2212 |BD| (since \u00afDD\u0302\u00af \u22a5 |AB|) > \u03bb (by triangle ineq.) 69 \fChapter 5 Conclusion In this work, we studied the problem of finding the shortest path to cover a convex polygon with two or three mobile guards. When there are two guards a polygon P is covered if every point in P lies on the line that connects the two guards, at some point in time. In the 3-guard case the covered area is defined as the triangle that the guards make, thus the guards move in a way that their triangle covers the surface of P . In both cases we relaxed the problem to a boundary cover, where the objective is to cover the boundary of P . Finding a boundary cover is not harder than finding the optimal sweep, since in an optimal sweep the boundary is also covered. In the two guards case, we proved that the shortest boundary cover is achieved when the guards stay on the polygon. The shortest boundary cover therefore is when the guards leave out the two longest edges of P and visit the other n \u2212 2 edges during the sweep. Since the polygon is convex this solution also provides coverage for the interior of the polygon, thus it is also a solution to the more general problem of finding the optimal sweep for two guards. This solution can be found in order O(n) time, where n is the size of the polygon. In the three guards case, we were able to show that the optimal boundary cover is simple, i.e., the paths of the guards do not intersect on the interior of P . We proved that any boundary cover which included intersection in the paths of the guards, could be simplified to one of two intersection cases, either a single intersection or a double intersection. Each of these cases where shown to be longer than an alternative simple boundary cover. A simple three guard boundary cover has a maximum of four chains, and this makes the optimal boundary cover one of three certain shapes. All 70 \f5.1. Future Work three shapes provide coverage for the interior of the polygon, thus the optimal boundary cover is the optimal three guard sweep. 5.1 Future Work Our objective in this problem was to find the minimum total length of the paths of the guards. With this idea we might find the best solution consists of one guard that walks along the perimeter while the rest are stationary. This solution is of course not practical if we want to cover the polygon in minimum time. If we assume that speed of each guard is limited, and we want to cover the polygon with minimum time, then the problem turns into finding the paths of the guards such that the longest path is minimized. This problem is not trivial even when two guards are covering a convex polygon. Another interesting question arises when there are three or more guards. The purpose of area coverage was to cover a polygon such that every point in the polygon is visible from different directions. One might assume that a narrow triangle does not provide the same quality as an equilateral triangle. This assumption leads to the problem of finding the shortest paths for the guards such that their triangle does not have very large (e.g., \u2265 2\u03c0\/3) or very small angles (e.g., \u2264 \u03c0\/6). A similar problem can also be defined when the guards have limited visibility, i.e., the edges of the covered triangle are not longer than a certain distance. Also the problem can be considered when there are more than three guards. When there are more than three guards, the problem of finding minimum length sweeps becomes more complicated. Since the definition of covered area needs further speculation, as the guards are now able to form shapes that are not convex. 71 \fBibliography [1] Svante Carlsson, Bengt J. Nilsson, and Simeon Ntafos. Optimum guard covers and m-watchmen routes for restricted polygons, 1993. [2] Wei-Pang Chin. Optimum watchman routes. Information Processing Letters, 8:39\u201344, 1988. [3] Wei-Pang Chin and Simeon Ntafos. Optimum watchman routes. In Annual Symposium on Computational Geometry, pages 24\u201333, 1986. [4] Wei-Pang Chin and Simeon Ntafos. Shortest watchman routes in simple polygons. Discrete Computational Geometry, 6:9\u201331, 1991. [5] Jurek Czyzowicz, Peter Egyed, Hazel Everett, David Rappaport, Thomas Shermer, Diane Souvaine, Godfried Toussaint, and Jorge Urrutia. The aquarium keeper\u2019s problem. In SODA \u201991: Proceedings of the second annual ACM-SIAM symposium on Discrete algorithms, pages 459\u2013464, Philadelphia, PA, USA, 1991. Society for Industrial and Applied Mathematics. [6] Moshe Dror, Alon Efrat, Anna Lubiw, and Joseph S.B. Mitchell. Touring a sequence of polygons. In STOC\u201903, pages 473\u2013482, 2003. [7] Paul J. Heffernan. An optimal algorithm for the two-guard problem. In SCG \u201993: Proceedings of the ninth annual symposium on Computational geometry, pages 348\u2013358, New York, NY, USA, 1993. ACM. [8] Christian Icking and Rolf Klein. The two guards problem. In SCG \u201991: Proceedings of the seventh annual symposium on Computational geometry, pages 166\u2013175, New York, NY, USA, 1991. ACM. [9] D.T. Lee and Arthur K.Lin. Computational complexity of art gallery problems. IEEE Transaction on Information Theory, 32:276\u2013282, 1986. [10] Jae-Ha Lee, Sang-Min Park, and Kyung-Yong Chwa. Searching a polygonal room with one door by a 1-searcher. International Journal of Computational Geometry and Applications, 10(2):201\u2013220, 2000. 72 \f[11] Albert W. Marshall and Ingram Olkin. Inequalities: theory of Majorization and Its Applications. Academic Press INC., New York, first edition, 1979. [12] Bengt J. Nilsson and Derick Wood. Optimum watchmen routes in spiral polygons. In Proceeding of 2nd Conference on Computational Geometry, page 269272, 1990. [13] S. Ntafos. The robber route problem. Inf. Process. Lett., 34(2):59\u201363, 1990. [14] Simeon Ntafos. Watchman routes under limited visibility. Comput. Geom. Theory Appl., 1(3):149\u2013170, 1992. [15] Simeon Ntafos and Laxmi Gewali. External watchman routes. The Visual Computer, 10(8):474\u2013483, 1994. [16] Joseph O\u2019Rourke. Art Gallery Theorems and Algorithms. Oxford University Press, New York, US, first edition, 1987. [17] Thomas C. Shermer. Recent results in art galleries. In In Proceedings of the IEEE, volume 80(9), pages 1384\u20131399, 1992. [18] Ichiro Suzuki and Masafumi Yamashita. Searching for a mobile intruder in a polygonal region. Society for Industrial and Applied Mathmatics, 20(5):863\u2013888,, 1992. [19] Xuehou Tan. An efficient algorithm for the three-guard problem. Discrete Applied Mathmatics, 156(17):3312\u20133324, 2008. [20] L. H. Tseng, Paul J. Heffernan, and D. T. Lee. Two-guard walkability of simple polygons. International Journal of Computational Geometry and Applications, 8(1):85\u2013116, 1998. [21] J Urrutia. Handbook of Computational Geometry. North Holland, 2000. [22] Zhong Zhang. Applications of Visibility Space in Polygon Search Problems. PhD thesis, Simon Fraser University, 2005. 73 ","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/hasType":[{"value":"Thesis\/Dissertation","type":"literal","lang":"en"}],"http:\/\/vivoweb.org\/ontology\/core#dateIssued":[{"value":"2010-11","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/isShownAt":[{"value":"10.14288\/1.0051866","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/language":[{"value":"eng","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#degreeDiscipline":[{"value":"Computer Science","type":"literal","lang":"en"}],"http:\/\/www.europeana.eu\/schemas\/edm\/provider":[{"value":"Vancouver : University of British Columbia Library","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/publisher":[{"value":"University of British Columbia","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/rights":[{"value":"Attribution-NonCommercial-NoDerivatives 4.0 International","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#rightsURI":[{"value":"http:\/\/creativecommons.org\/licenses\/by-nc-nd\/4.0\/","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#scholarLevel":[{"value":"Graduate","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/title":[{"value":"Optimally sweeping convex polygons with two and three guards","type":"literal","lang":"en"}],"http:\/\/purl.org\/dc\/terms\/type":[{"value":"Text","type":"literal","lang":"en"}],"https:\/\/open.library.ubc.ca\/terms#identifierURI":[{"value":"http:\/\/hdl.handle.net\/2429\/24248","type":"literal","lang":"en"}]}}