Note: Computing closest and farthest points for a query segment

  • Authors:
  • Michael Segal;Eli Zeitlin

  • Affiliations:
  • Communication Systems Engineering Department, Ben-Gurion University of the Negev, Beer-Sheva 84105, Israel;School of Computer Science, Tel-Aviv University, Tel-Aviv 69978, Israel

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2008

Quantified Score

Hi-index 5.23

Visualization

Abstract

In this paper we present an improved algorithm for finding k closest (farthest) points for a given arbitrary query segment. We show how to preprocess a planar set P of n given points in O(n^2logn) expected time (or, alternatively, in O(n^2log^2n) deterministic time) and a subquadratic space, in order to report k closest points to an arbitrary given query line segment in O(k+log^2nloglogn) time. Here, for the first time, the data structure that provides polylogarithmic query time and uses subquadratic space is presented. We also show an algorithm for reporting the k farthest points from an arbitrary given query line segment.