Abstract: Given n points in the plane and an integer k, we consider the problem of selecting that pair which determines the line with the kth smallest or largest slope. In the restricted case where k is O(n), line sweeping gives an optimal, Θ(nlog n) algorithm. For general k we use the parametric search technique of Megiddo to describe an O(n (log n)2) algorithm. This is modified to produce a new, optimal Θ(nlog n) selection algorithm by incorporating an approximation idea.
Loading