Amortized efficiency of generating planar paths in convex position - Wu, Ro-Yu; Chang, Jou-Ming; Pai, Kung-Jui; Wang, Yue-Li (Theoretical computer science, 2011)
Let S be a set of n ⩾ 3 points arranged in convex position in the plane and suppose that all points of S are labeled from 1 to n in clockwise direction. A planar path P on S is a path whose edges connect all points of S with straight line segments such that no two edges of P cross. Flipping an edge on P means that a new path P ′ is obtained from P by a single edge replacement. In this paper, we provide efficient algorithms to generate all planar paths. With the help of a loopless algorithm to produce a set of 2-way binary-reflected Gray codes, the proposed algorithms generate the next planar path by means of a flip and such that the number of position changes for points in the path has a constant amortized upper bound.