Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Search Algorithms Winter Semester 2004/2005 31 Jan.

Similar presentations


Presentation on theme: "1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Search Algorithms Winter Semester 2004/2005 31 Jan."— Presentation transcript:

1 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Search Algorithms Winter Semester 2004/2005 31 Jan 2005 13th Lecture Christian Schindelhauer schindel@upb.de

2 Search Algorithms, WS 2004/05 2 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Spatial Searching  Prolog: Searching with some help  Searching with total Uncertainty  Nearsighted Search –The Cow Path Problem –The Concept of Competitive Analysis –Deterministic Solution –Finding a Shoreline –Probabilistic Solution –The Wall Problem  Farsighted Search –The Watchman Problem –How to Learn your Environment

3 Search Algorithms, WS 2004/05 3 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Art Gallery Problem  Given: –a simple polygon with n corners  Question: –How many watchmen must be placed such that they can survey the complete polygon  Observations –In a convex polygon one watchman suffices –It suffices to watch only all edges Then all other points are covered, too  Trival: –In all polygons n watchmen suffice  Also trivial: –In all polygons n/2 watchmen suffice

4 Search Algorithms, WS 2004/05 4 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Ears of a Simple Polygon  A polygon P is said to be simple if the only points of the plane belonging to two polygon edges of P are the polygon vertices of P. –Such a polygon has a well defined interior and exterior.  A diagonal is a line segment lying entirely inside polygon P and joining two non- consecutive vertices  A vertex is called a principal vertex –if the diagonal between the neighbored vertices intersects the boundary of simple polygon P only at the neighbors  A principal vertex of a simple polygon P is called an ear –if the diagonal between the neighbors lies entirely in P. not a simple polygon simple polygon principal vertices non principal vertices All ears

5 Search Algorithms, WS 2004/05 5 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Two-Ear-Theorem Theorem Except for triangles every simple polygon has at least two ears. Dual-tree: Given a triangulated simple polygon, the dual-tree is the graph generated by plotting a vertex at each triangle and edges joining vertices in adjacent triangles, i.e.triangles which share a diagonal Proof: By Joseph O'Rourke –It is known that a simple polygon can always be triangulated. –Leaves in the dual-tree of the triangulated polygon correspond to ears and every tree of two or more nodes must have at least two leaves.

6 Search Algorithms, WS 2004/05 6 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Art Galllery Theorem Theorem Any simple polygon can be guarded by  n/3  cameras.  Build up a triangulization by sequentially removing an ears –Note that the dual graph is a tree  Color all nodes –such that two neighbored nodes of the triangulation have different colors  Choose the color with the smallest number of occurrences  n/3   Place watchman at theses nodes  Now every triangle is observed –therefore  n/3  watchmen suffice

7 Search Algorithms, WS 2004/05 7 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer n/3 cameras are necessary Theorem There is a simple polygon such that at least  n/3  cameras are necessary Theorem The decision problem whether k cameras are sufficient for controlling an art gallery is NP-complete

8 Search Algorithms, WS 2004/05 8 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Complexity of the Art Gallery-Problem Figures of the proof (from Chris Wu) http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2001/CW/noholeproof.html Reduction from 3-Sat

9 Search Algorithms, WS 2004/05 9 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Streets are special Polygons  Definition A street is a simple polygon P in the plane with two distinguished vertices s and t the two boundary chains from s to t are weakly mutually visible  From every side at least one point of the other side of the street is visible  Problem: –Given an unknown street –Find the shortest path from s to t  A strategy is c-competitive for searching a goal in a street if its path never is longer than c times the length of the shortest path from s to t.

10 Search Algorithms, WS 2004/05 10 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Algorithms for Exploration of a Street  Proposed by –R. Klein. Walking an unknown street with bounded detour. Comput. Geom. Theory Appl., 1:325–351, 1992.  1992: Klein: 5.72  Lower Bound: 1.41.. = 2 1/2  1992: Icking, Klein: 4.44 ... Kleinberg,  1996: Lopez-Ortiz, Schuierer: 1.73  1997: Christian Icking, Alejandro Lopez-Ortiz, Sven Schuierer, Ines Semrau: 1.54  1999: Icking, Klein, Langetepe and independently Schuierer and Semrau: Optimal = 1.41..

11 Search Algorithms, WS 2004/05 11 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Idea for Optimal Street Walking [Icking, Klein, Langetepe]  Collect the left and right vertices of the street  Careful analysis reduces the problem to the problem of walking a funnel  Consider one (visibility) triangle (s,v l,v r ) –For all possible combinations optimize the path –yielding a curve obeying trigonometric properties  Related to the problem of looking around a corner

12 Search Algorithms, WS 2004/05 12 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Search Pattern for known Rectilinear Polygons  “On-Line Search in a Simple Polygon” [Kleinberg]  Given: –a rectilinguar simple polygon –a robot has a map of this polygon –unknown position of the target  Find: –a search pattern that minimizes the path until the target can be seen  Definition: –Extended edge is a prolongation of an edge into the interior of the polygon to another point of the polygon –Essential cut is an extended edge such that no other extended edge (of same orientation) can be reached through this cut

13 Search Algorithms, WS 2004/05 13 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Lower Bound for Searching in a Rectilinear Polygon Theorem [Kleinberg] A polygon cannot be searched better than O(m) competitive, where m is the number of essential cuts Algorithm:  Build a tree from s to all essential cuts  Use a spiral search strategy to find the target on all the paths from s to the essential cuts Theorem [Kleinberg] This construction is optimal up to a constant factor.

14 Search Algorithms, WS 2004/05 14 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Looking around a Corner An Optimal Competitive Strategy for Looking Around a Corner Christian Icking, Rolf Klein, Lihong Ma, 1994  Two halflines meet at the origin O  The shaded wedge formed by the halflines is opaque and has an angle less than 180◦  Assume that on one of the halflines a mobile robot is located at point W, outside the wedge –equipped with an on-board vision system facing O.  Its task is to “look around the corner”, –i. e. to inspect the other halfline which is invisible from W (but for its endpoint, O).  A strategy for this class of problems should produce a path from W to any point on the prolongation, M(φ), of the invisible halfline. –φ denotes the angle between the invisible halfline and the prolongation of the visible one.

15 Search Algorithms, WS 2004/05 15 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Looking around a Corner  Competitive Ratio: –Path of algorithm versus –Shortest path to look around corner Theorem[Icking, Klein Ma, 1994] There is an optimal strategy solving the “Looking around a Corner problem” with competive ratio c = 1.21218...  See also http://videos.compgeom.org/socg04video/ 5. Searching with an Autonomous Robot

16 Search Algorithms, WS 2004/05 16 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Summary of the Lecture PART I (1st-6th lecture)  Pattern Search –Rabin-Karp –KMP –Boyer-Moore  Pattern Search in Compressed Text –Huffman Code –Shannon Bound –Kolmogorov-Complexity –LZW-Compression –Searching in LZW-Compressed Text  Searching the Web –PageRank –Kleinberg’s HITS-Algorithm PART II (7th-13th lecture) –Structure of the Web –Searching in Power Law Networks  Spatial Search –Searching with some Uncertainty –Competitive Algorithms –The Cow Problem –Probabilistic Cows: Smart Cows –The Wall Problem –Watchman Problem –Exploring a Street –Exploriing a Polygon

17 Search Algorithms, WS 2004/05 17 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer The Exam is at 17/18 Feb 2005 or 16 Mar 2005 Learn!! Have you presented an exercise during the second part? Register for the oral exam (now) 1 hour prior to the oral exam: Solve an exercise Do you accept your grade from your midterm exam? Answer question of the complete lecture Answer question of the second half Goto party on Feb 18th, 7pm Kachelöfchen no yes

18 18 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Thanks for your attention End of 13th lecture Final exam:Mo 17/18 Feb 2005 or We 16 Mar 2005 Next exercise class:Mo 17 Jan 2005, 1.15 pm, F0.530 or We 19 Jan 2005, 1.00 pm, E2.316


Download ppt "1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Search Algorithms Winter Semester 2004/2005 31 Jan."

Similar presentations


Ads by Google