1 / 18

Search Algorithms Winter Semester 2004/2005 31 Jan 2005 13th Lecture

Search Algorithms Winter Semester 2004/2005 31 Jan 2005 13th Lecture. Christian Schindelhauer schindel@upb.de. Spatial Searching. Prolog: Searching with some help Searching with total Uncertainty Nearsighted Search The Cow Path Problem The Concept of Competitive Analysis

gryta
Download Presentation

Search Algorithms Winter Semester 2004/2005 31 Jan 2005 13th Lecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Search AlgorithmsWinter Semester 2004/200531 Jan 200513th Lecture Christian Schindelhauer schindel@upb.de

  2. 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. 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. The Ears of a Simple Polygon not a simple polygon 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. principal vertices non principal vertices All ears

  5. 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. 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. 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. The Complexity of the Art Gallery-ProblemFigures of the proof (from Chris Wu)http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2001/CW/noholeproof.html Reduction from 3-Sat

  9. 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. 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.. = 21/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. 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,vl,vr) • For all possible combinations optimize the path • yielding a curve obeying trigonometric properties • Related to the problem of looking around a corner

  12. 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. 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. Looking around a CornerAn 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. 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. 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. The Exam is at 17/18 Feb 2005 or 16 Mar 2005 Register for the oral exam (now) Learn!! Have you presented an exercise during the second part? 1 hour prior to the oral exam: Solve an exercise no yes Do you accept your grade from your midterm exam? yes Answer question of the second half no Answer question of the complete lecture Goto party on Feb 18th, 7pm Kachelöfchen

  18. Thanks for your attentionEnd of 13th lectureFinal 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

More Related