An optimal algorithm for the two-guard problem

In this paper we give optimal solutions for two versions of the <italic>two-guard</italic> problem. Given a simple polygon P with vertices <italic>s</italic> and <italic>t</italic>, the <italic>straight walk</italic> problem asks whether we can move two points monotonically on P from <italic>s</italic> to <italic>t</italic>, one clockwise and one counterclockwise, such that the points are always co-visible. In the <italic>counter walk</italic> problem, both points move clockwise, one from <italic>s</italic> to <italic>t</italic> and the other from <italic>t</italic> to <italic>s</italic>. We provide &THgr;(<italic>n</italic>) constructive algorithms for both problems. We obtain our results by examining the structure of the restrictions placed on the motion of the two points, and by employing properties of shortest paths and shortest path trees.