Published October 8, 2024 | Version v1
Publication

Bichromatic separability with two boxes: A general approach

Description

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 rectangles R and B such that R (resp. B) contains only red (resp. blue) points. We prove that this problem can be solved in O(n2 logn) 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.

Additional details

Created:
October 9, 2024
Modified:
October 9, 2024