Bichromatic separability with two boxes: A general approach

  • Authors:
  • C. Cortés;J. M. Díaz-Báòez;P. Pérez-Lantero;C. Seara;J. Urrutia;I. Ventura

  • Affiliations:
  • Departamento Matemática Aplicada I, Universidad de Sevilla, Spain;Departamento Matemática Aplicada II, Universidad de Sevilla, Spain;Departamento de Computación, Universidad de La Habana, Cuba;Departament de Matemàtica Aplicada II, Universitat Politècnica de Catalunya, Spain;Instituto de Matemáticas, Universidad Nacional Autónoma de México, Mexico;Departamento Matemática Aplicada II, Universidad de Sevilla, Spain

  • Venue:
  • Journal of Algorithms
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Let S be a set of n points on the plane in general position such that its elements are colored red or blue. We study the following problem: Find a largest subset of S which can be enclosed by the union of two, not necessarily disjoint, axis-aligned rectanglesRandBsuch thatR (resp.B) contains only red (resp. blue) points. We prove that this problem can be solved in O(n^2logn) time and O(n) space. Our approach is based on solving some instances of Bentley's maximum-sum consecutive subsequence problem. We introduce the first known data structure to dynamically maintain the optimal solution of this problem. We show that our techniques can be used to efficiently solve a more general class of problems in data analysis.