A linear-time algorithm for finding all door locations that make a room searchable

  • Authors:
  • John Z. Zhang;Tsunehiko Kameda

  • Affiliations:
  • Department of Mathematics and Computer Science, University of Lethbridge, Lethbridge, AB, Canada;School of Computing Science, Simon Fraser University, Burnaby, BC, Canada

  • Venue:
  • TAMC'08 Proceedings of the 5th international conference on Theory and applications of models of computation
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

A room is a simple polygon with a prespecified point, called the door, on its boundary. Search may be conducted by two guards on the boundary who keep mutual visibility at all times, or by a single boundary searcher with a flashlight. Search starts at the door, and must detect any intruder that was in the room at the time the search started, preventing the intruder from escaping through the door. A room may or may not be searchable, depending on where the door is placed or no matter where the door is placed. We want to find all intervals on the boundary where the door can be placed for the resultant room to be searchable. It is known that this problem can be solved in O(n log n) time, if the given polygon has n sides. We improve this complexity to O(n).