Discrete & Computational Geometry

, Volume 33, Issue 4, pp 593-604

First online:

Output-Sensitive Algorithms for Computing Nearest-Neighbour Decision Boundaries

  • David BremnerAffiliated withFaculty of Computer Science, University of New Brunswick, Fredericton, New Brunswick, E3B 5A3 Email author 
  • , Erik DemaineAffiliated withLaboratory for Computer Science, MIT, 32 Vassar Street, Cambridge, MA 02139 Email author 
  • , Jeff EricksonAffiliated withComputer Science Department, University of Illinois, Urbana, IL 61801-2302 Email author 
  • , John IaconoAffiliated withDepartment of Computer and Information Science, Polytechnic University, 6 MetroTech Center, Brooklyn, NY 11201 Email author 
  • , Stefan LangermanAffiliated withCharge de recherches du FNRS, Universite Libre de Bruxelles, ULB CP212, boulevard du Triomphe, 1050 Bruxelles  Email author 
  • , Pat MorinAffiliated withSchool of Computer Science, Carleton University, 1125 Colonel By Drive, Ottawa, Ontario, K1S 5BL  Email author 
  • , Godfried ToussaintAffiliated withSchool of Computer Science, McGill University, Montreal, Quebec H3A 2A7 Email author 

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access


Given a set R of red points and a set B of blue points, the nearest-neighbour decision rule classifies a new point q as red (respectively, blue) if the closest point to q in R ⋃ B comes from R (respectively, B). This rule implicitly partitions space into a red set and a blue set that are separated by a red-blue decision boundary. In this paper we develop output-sensitive algorithms for computing this decision boundary for point sets on the line and in ℝ2. Both algorithms run in time O(n log k), where k is the number of points that contribute to the decision boundary. This running time is the best possible when parameterizing with respect to n and k.