Bichromatic Classifications of Points Using Strips
Abstract
Given a set of points in the plane, each colored either blue or red, we study the problem of finding a strip that separates the blue points from the red points. Specifically, we consider the following two variants: (1) locating a strip that contains no red points while maximizing the number of blue points within the strip, and (2) locating a strip that contains all blue points while minimizing the number of red points within the strip. For variant (1), we present an -time algorithm, improving upon the previously best -time result. We also show that this running time is optimal under the standard 3SUM conjecture. We also give an output-sensitive algorithm with running time that returns a strip, where is the number of blue points not contained within the strip in an optimal solution. We extend our results to the case of up to parallel strips, obtaining an -time algorithm. For variant (2), an optimal -time algorithm is known for . We show 3SUM-hardness for and give an -time algorithm. For any , we present an -time algorithm.
Keywords and phrases:
Bichromatic Classification, Separation, Strip, DualityCopyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometryFunding:
This work was partly supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (RS-2023-00219980), and the Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No. RS-2019-II191906, Artificial Intelligence Graduate School Program (POSTECH)) and (No. 2017-0-00905, Software Star Lab (Optimal Data Structure and Algorithmic Applications in Dynamic Geometric Environment)).Editor:
Pierre FraigniaudSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Given a set of points in the plane, each colored either blue or red, we aim to identify a simple geometric region that separates the two colors as well as possible. In this paper, we focus on the case where the separation region is a strip, defined as a closed region bounded by two parallel lines of arbitrary orientation.
This model represents a fundamental classification task in which blue points represent positive instances, while red points represent negative instances. There is a fair amount of work for achieving a perfect bichromatic separation, wherein the two colors are distinctly separated without any errors. This is done using simple geometric shapes such as a line (or a collection of lines), a strip, a wedge, and a circle [20, 21, 27].
In many real-world datasets, however, it is often not possible to achieve a perfect separation by a low-complexity shape due to factors such as noise, overlapping distributions, or outliers. In such cases, one typically optimizes a trade-off between two types of classification errors: false positives, where negative instances are incorrectly classified as positive, and false negatives, where positive instances are incorrectly classified as negative. The problems addressed in this paper correspond to two particularly important settings along this trade-off. In applications where admitting a negative instance is unacceptable, the objective is to enforce zero false positives and maximize the number of correctly classified positive instances. Conversely, in applications where missing a positive instance is unacceptable, the objective is to enforce zero false negatives and minimize the number of admitted negative instances.
We first study the following problem, which corresponds to the zero false positives setting.
Problem 1 (MaxBlue).
Given a set of points in the plane, find a strip that contains the maximum number of points from set while excluding any points from set .
The MaxBlue problem enforces a strict feasibility constraint on red points. A complementary perspective is to require the separating region contains no red point while maximizing the number of covered blue points. This addresses settings where omitting a positive instance is unacceptable, leading to complete coverage of and minimizing red points. This results in the MinRed variant, which corresponds to the zero false negatives setting.
Problem 2 (MinRed).
Given a set of points in the plane, find a strip that contains all points of while minimizing the number of points of contained in the strip.
Motivation for using strips.
The strip model is a natural and powerful geometric representation of separation. Unlike a single separating line, which represents a zero-width decision boundary, a strip provides a thickened boundary that captures a tolerance margin around a linear separator. This model represents situations in which the target set must lie within a bounded corridor that remains free of extraneous or adversarial points. Such a representation is essential when the target data corresponds to a physical object, a high-confidence cluster, or a region that must be certified safe within a specified geometric width [19]. Optimizing the placement of such a strip allows one to quantify the structural purity of a dataset and determine how much perturbation can be tolerated before separation becomes impossible. In this sense, strip separability serves as a robust geometric analogue of margin-based classification.
Applications.
This geometric formulation arises naturally in several application domains requiring high-precision spatial reasoning. In metrology and industrial design, strip containment models tolerance-zone analysis: a manufactured component must lie within an allowable corridor while avoiding forbidden regions occupied by other parts [33]. In robotics and motion planning, strip separation captures narrow-passage navigation problems, where a robot must follow a collision-free linear trajectory that accounts for its physical width while avoiding obstacles. In pattern recognition and machine learning, strip separation corresponds to margin-based classification, where maximizing the width of a separating strip improves robustness and generalization [32]. Similarly, in geographic information systems and urban planning, strips model buffer zones that must fully contain protected regions while remaining disjoint from hazardous or restricted areas. These examples illustrate that strips provide a minimal yet expressive geometric primitive for modeling safety margins, tolerances, and robustness constraints.
Generalization to Multiple Strips.
Furthermore, we consider natural generalizations of MaxBlue and MinRed, in which up to parallel strips are allowed for the separation, for a fixed integer . Extending from a single strip to multiple parallel strips is both natural and essential for modeling structured data in which target points occur in several roughly parallel groups separated by gaps or forbidden regions. Such patterns arise in applications like crop-row detection [22], multi-lane traffic modeling [18], and circuit layout verification [23]. A single strip cannot capture these interleaved configurations, whereas multiple strips allow the model to represent periodicity and spacing, yielding a more expressive separability that maximizes covered target points while strictly excluding forbidden ones. This formulation is a discrete analogue of maximum-margin separation for nonconvex distributions, related to classical geometric separability and covering problems [26, 31].
Problem 3 (-MaxBlue).
Given a set of points in the plane and an integer , find parallel strips whose union contains the maximum number of points from set while excluding any points from set .
Problem 4 (-MinRed).
Given a set of points in the plane and an integer , find parallel strips whose union contains all points of while minimizing the number of points from set contained in the union.
See Figure 1 for an illustration of each problem.
1.1 Related Work
In the classical approach to geometric bichromatic separation, the objective is to achieve perfect separation between the two classes. This involves finding a simple geometric shape that separates the two colors without any errors. The simplest case is perfect separation by a line, which can be decided in time using linear programming [20]. Perfect separation by a circle can be decided in time [27]. Hurtado et al. [21] gave -time algorithms for perfect separation by regions bounded by two lines, including a strip, wedge, and double wedge. Moreover, several of these problems have lower bounds [3].
The study of bichromatic separation with errors has been motivated in the context of situations where perfect separation does not exist. In the false negative setting, which minimizes the number of red points within a separation region that contains all blue points, Glazenburg et al. [17] gave -time algorithms for finding an optimal separation by a halfplane, strip, or wedge, and an -time algorithm for finding an optimal separation by a double wedge. Bitner et al [6] studied optimal separation by a disk and gave an -time algorithm. The variant using an axis-parallel square or rectangle has also been considered [24].
Fewer results are known for the complementary false positive setting, which maximizes the number of blue points within a separation region that contains no red point. Eckstein et al. [13] showed NP-hardness for separation by a box for blue and red points in -dimensional space when the dimension is part of the input. For the planar case (), the problem can be solved in time [4]. Glazenburg et al. [17] gave algorithms for optimal separation of blue and red points in the plane using various geometric shapes, including halfplanes, strips, wedges, and double wedges. Their optimal strip separation algorithm, which is exactly MaxBlue, runs in time.
Few results are known about natural generalizations concerning the union of multiple geometric objects. Seara [28] studied perfect separation using two strips, two parallel strips, and two wedges. Maji and Sadhu [24] studied MinRed using two interior-disjoint axis-parallel rectangles (or squares) and two interior-disjoint convex polygons.
Some works consider alternative objective functions for bichromatic separation. For instance, Everett et al. [15] and Glazenburg et al. [17] minimized the total number of misclassified points (uncovered blue points plus red points within the separation region). Dobkin et al. [12] maximized the discrepancy, the difference between the numbers of blue and red points within the region.
1.2 Our Results
We present exact algorithms for MaxBlue, -MaxBlue and -MinRed. We give an -time algorithm for MaxBlue, improving upon the previous best -time result by Glazenburg et al. [17]. We show that this running time is optimal under the standard 3SUM conjecture (Section 4).
The time complexity of our algorithm depends primarily on the total number of points . However, a perfect separation strip can be computed in time [28] if one exists, revealing a significant computational gap when the number of blue points not contained in an optimal strip for MaxBlue is small. Considering the practical motivations and applications of this problem, the excluded points typically represent outliers or noise within the dataset. In such contexts, is expected to be substantially smaller than , making an output-sensitive approach highly advantageous. We present an output-sensitive algorithm for MaxBlue with running time . Consequently, our algorithm is expected to run in near-linear time for such practical inputs, making the output-sensitive approach particularly valuable.
To ensure robustness, we run the output-sensitive algorithm within a time budget of ; if it does not terminate within this bound, we invoke the -time algorithm. This hybrid approach yields an overall complexity of for MaxBlue (Section 5), effectively bridging the gap between theoretical worst-case analysis and practical efficiency.
Finally, we consider the natural generalization for the MaxBlue problem and MinRed problem, in which up to parallel strips are allowed for the separation. We present an -time algorithm for the -MaxBlue problem, for any value of (Section 6). For the -MinRed, we present an -time algorithm for (Section 7). When , we show that the problem is 3SUM-hard, and give an -time algorithm. A summary of our results and previous works is shown in Table 1.
2 Preliminaries
For any two points in the plane, we denote the line segment connecting them by .
Duality
We employ the standard point-line duality transform [5]. For any point , its dual is the line . Conversely, the dual of a nonvertical line is the point . This duality transform is order preserving: lies on if and only if lies on , and lies above if and only if lies above . For a set of points , we define . A strip bounded by two parallel lines in the primal plane corresponds to the vertical line segment connecting their dual points in the dual plane (see Figure 2(a–b)).
Observation 5.
Let be a strip bounded by parallel lines and . A point lies in if and only if its dual line intersects the vertical line segment connecting and .
Proof.
Without loss of generality, assume lies above . A point lies in if and only if it is on or below and on or above . Since and are parallel, they share the same slope, which implies that their dual points and have the same -coordinate; thus, the segment is vertical. By the order-preserving property, is equivalent to lying on or below and lying on or above , which means intersects the segment .
Arrangement
Let be a set of lines in the plane. The arrangement is the subdivision of the plane induced by . The level of a point is the number of lines in strictly below . Since the level is constant along any edge of , the level of an edge is well-defined. The -level of , denoted by , consists of the edges with level ; this set forms an -monotone chain [25]. We denote the union of the -levels for all by (see Figure 2(c) and [8, 29]).
Let denote the complexity of . It is known that [11] and [30]. can be computed in time [7] or in expected time [8]. In contrast, the complexity of is [2, 10, 14]. Everett et al. [15] computed in time. Furthermore, Chan [9] proposed an expected -time algorithm to minimize a linear objective function over .
3 Problem Formulation in the Dual Plane
We reformulate the problems with the dual plane. For an input set of points in the primal plane, we consider its corresponding dual set . As established in Observation 5, a strip in the primal plane maps to a vertical segment in the dual plane. By extension, a set of parallel strips in the primal plane corresponds to vertical segments sharing a common -coordinate in the dual plane. Thus, each problem can be expressed in terms of dual-plane geometry as follows.
Problem 6 (MaxBlue∗).
Given a set of lines in the plane, find a vertical segment that intersects the maximum number of lines in while intersecting no lines in .
Problem 7 (MinRed∗).
Given a set of lines in the plane, find a vertical segment that intersects all lines in while minimizing the number of lines in that intersect it.
Problem 8 (-MaxBlue∗).
Given a set of lines in the plane and an integer , find vertical segments with a common -coordinate whose union intersects the maximum number of lines in while intersecting no lines in .
Problem 9 (-MinRed∗).
Given a set of lines in the plane and an integer , find vertical segments with a common -coordinate whose union intersects all lines in while minimizing the number of lines in intersected by the union.
4 -time algorithm for MaxBlue and 3SUM-hardness
We present an -time algorithm for MaxBlue, improving upon the previous best -time algorithm [17]. We also show that this running time is optimal under the standard 3SUM conjecture.
Theorem 10.
We can solve MaxBlue and MaxBlue∗ in time.
Proof.
We can solve MaxBlue by solving MaxBlue∗. Let be a set of lines in the plane. Our algorithm is rather simple. It computes a vertical segment in each cell of that intersects the most lines in . Among all such segments, it reports the one that intersects the most. An optimal vertical segment intersects no lines in , which ensures the algorithm’s correctness. However, achieving the optimal running time is challenging.
We describe the algorithm in detail and analyze its time complexity. Consider the arrangements and . Note that once is computed, the arrangement is implicitly available. Let be a cell of . Imagine we sweep with a vertical line from left to right, starting from the leftmost vertex of . Let be the number of lines in whose intersection with lies in the interior of . Observe that at the leftmost vertex of , and changes only when hits an intersection point between a line in and the boundary of , excluding the leftmost and rightmost vertices: increases by one if enters at , and decreases by one if leaves at . Thus, we can maintain by traversing the upper and lower boundary chains of from their leftmost vertex within the arrangement , and determine the position of at which is maximized. We repeat this procedure for every cell in .
The arrangement can be computed in time. For each cell in , the procedure above takes time, where denotes the number of vertices of lying on the boundary of . Let be the degree of a vertex in , that is, number of edges incident to in . Observe that each vertex of appears on the boundaries of at most cells of . Thus, the total time complexity is bounded by .
We show that MaxBlue is 3SUM-hard by a reduction from the GEOMBASE problem. Thus, there is no strongly sub-quadratic algorithm for MaxBlue unless the 3SUM problem can be solved in time for any . The GEOMBASE problem is defined as follows: Given points in the plane with integer coordinates on three horizontal lines , and , determine whether there exists a non-horizontal line containing three of the points. It is known that the GEOMBASE problem is 3SUM-hard [16].
Theorem 11.
MaxBlue and MaxBlue∗ are 3SUM-hard.
Proof.
We use a reduction from the GEOMBASE problem. Consider blue points in the plane with integer -coordinates larger than 0 and at most on three horizontal lines , and , for some integer . For each blue point , we place two red points and . We show that no line passing through any two blue points intersects unless it passes through . If does not pass through , since , , and are all integers. Then the distance between and is . See Figure 4(a).
Similarly, for each , we place two red points on for each blue point such that no line passing through any two blue points for intersects unless it passes through . Thus, we have blue points and red points in total. The reduction takes time.
If a non-horizontal line contains three blue points, there is a strip containing three blue points while excluding any red points. If no such line exists, no strip contains three blue points while excluding any red points. See Figure 4(b).
5 -Time Algorithm for MaxBlue
We present an -time algorithm for MaxBlue, where denotes the number of blue points not covered by an optimal strip. In the dual plane, we are given a set of lines in the plane, and our goal is to find a vertical segment that intersects the maximum number of lines in while intersecting no lines in . For convenience, we will refer to the lines in as blue lines and the lines in as red lines.
We focus on vertical segments whose endpoints lie on blue lines. If an endpoint does not lie on a blue line, we can shorten the segment until each endpoint does, without changing the set of blue lines it intersects.
In Section 5.1, we compute a value such that . Then, in Section 5.2, we determine and compute an optimal vertical segment using binary search. We assume , as the case can be detected in time [21].
5.1 Reducing a Search Space
We find a value such that using exponential search. For each , we check if there exists a vertical segment with exactly blue lines above it and exactly blue lines below it, and no red lines intersecting it. Let be the smallest value of for which the exponential search succeeds. We have because there exists a vertical segment that intersects no red lines and misses exactly blue lines. The search fails for . We show . Suppose . Then there exists a vertical segment with blue lines above and blue lines below, intersecting no red line, such that . Shortening it gives a vertical segment with blue lines above it and blue lines below it, intersecting no red lines. This contradicts that the search fails for . Thus, .
To perform this exponential search, we observe that a vertical segment with exactly blue lines above it and exactly blue lines below it has one endpoint on and the other on . We denote such a segment by , where is its -coordinate. Imagine moving from left to right while keeping its endpoints on these two -monotone chains. As we increase , we maintain the number of red lines intersected by and check if there exists a position such that intersects no red lines.
Lemma 12.
For , suppose that the points in and are given in sorted order of their -coordinates. We can decide whether there exists a vertical segment intersecting no red lines, with one endpoint on and the other on in time.
Proof.
Let be a value smaller than the smallest -coordinate among the points in . Any vertical segment lying on or to the left of with one endpoint on and the other on intersects the same set of red lines. See Figure 5.
We sweep the plane with a vertical line , starting at and moving to the right, and count the number of red lines intersected by the vertical segment whose endpoints are and . At , we compute in time.
As moves to the right, changes only when passes through a point in . Therefore, given these intersection points in increasing order of their -coordinates, we can update while sweeping and determine whether there exists a position at which the segment intersects no red lines in time.
Let be an integer with . We show that and can be computed and sorted in time.
Lemma 13.
We can compute a collection of edge-disjoint concave chains whose union is in time.
Proof.
We use a standard algorithm to decompose into concave chains as in [1, 9]. Chan [9] showed that this can be done in the same time we construct . Thus, the chains can be constructed in time [7, 11].
Lemma 14.
has size and can be computed in time.
Proof.
We first decompose into concave chains in time using Lemma 13. By construction, every vertex of each chain lies on . Therefore, each chain has complexity . Then, for every pair consisting of a chain and a line in , we compute all intersection points between them. Since each chain is concave, a line intersects it at most twice, and these intersections can be found in time. As there are chains and lines, the total number of intersections is , and all intersections can be computed in time. See Figure 6.
Let , which can be computed in time by Lemma 14. Observe that . We can compute in time [7, 11]. After sorting the points of in increasing order of their -coordinates, we traverse the chain from left to right and, for each point of , check whether it lies on . Since both sequences are processed in increasing order of their -coordinates, this can be done in linear time in the size of and . Consequently, we can identify all points in within the same time bound.
Corollary 15.
has size and can be computed in time.
Observe that has size and can be computed in time by Corollary 15 and symmetry. Thus, by Lemma 12 and Corollary 15, we can decide whether there exists for some intersecting no red lines in time.
Recall that , where is the smallest value of for which the exponential search succeeds. Once the search succeeds, we terminate it and set . The total running time is , which is .
Lemma 16.
We can compute such that in time.
5.2 Finding an Optimal Strip
By Lemma 16, we can compute such that in time. Observe that for an integer , there exists a vertical segment that intersects no red lines and misses exactly blue lines if and only if . Thus, we find using binary search within as follows. At each binary step, let be the current range and its median. Initially, . We test if there exists a vertical segment intersecting no red lines and missing exactly blue lines. If so, update to . Otherwise, update to . Continue the binary search recursively.
Preprocessing
We compute, for every , the sorted list of points in in increasing order of their -coordinates. We also do this for every . We show that this can be done in time in total.
Lemma 17.
For every , the list of points in sorted in increasing order of their -coordinates can be computed in total time.
Proof.
We first compute the arrangement in time [15]. This allows us to store each chain explicitly for every by tracing the arrangement. Note that the complexity of is .
Then we compute all intersection points and sort them in increasing order of their -coordinates. By Lemma 14, this can be done in time.
We determine which chain contains each point of by sweeping the plane with a vertical line . For each , we maintain the edge of intersected by , sorted by increasing . Since the points for are sorted by their -coordinates, we can determine which chain contains the point of hit by by binary search in time. Since , it takes time in total.
Binary search
At each binary step with range , we test if there exists a vertical segment missing exactly blue lines and intersecting no red lines. If a vertical segment with endpoints in and misses exactly blue lines, then and . See Figure 7. Thus, for every , we check if there exists a vertical segment with endpoints in and that intersects no red lines.
By preprocessing, we have the sorted list of points in and for every . By Lemma 12, we can test in time whether there exists a vertical segment with endpoints in and that intersects no red lines. Thus, the total time is
which is , where denotes the union of -levels of for all . By Lemma 14, , and by symmetry. Thus, each binary-search step takes time.
Since the binary search takes steps, its total time is . Thus, the overall running time is .
Theorem 18.
We can solve MaxBlue and MaxBlue∗ in time.
Our output-sensitive algorithm is asymptotically faster than the -time algorithm for . We can guarantee the running time by terminating the exponential search immediately when exceeds and running the quadratic-time algorithm.
6 Algorithm for -MaxBlue
We present an -time algorithm for -MaxBlue. Note that is part of the input, but it does not affect the asymptotic running time.
Theorem 19.
We can solve -MaxBlue and -MaxBlue∗ in time.
Proof.
In -MaxBlue∗, we are given a set of lines in the plane and an integer , and find vertical segments with a common -coordinate whose union intersects the maximum number of lines in while intersecting no lines in . For convenience, we will refer to the lines in as blue lines and the lines in as red lines.
We first compute the arrangement in time. Then, we sweep the plane with a vertical line from left to right. For any fixed position, is subdivided by into segments (possibly open or degenerate to a point). By shrinking those segments, we consider the maximal vertical segments whose endpoints lie on and that do not intersect any lines of . See Figure 8. Let denote these segments, ordered by decreasing -coordinate, and let denote the number of blue lines intersected by .
During the sweep, we maintain two lists, and . List contains pairs , sorted by decreasing -coordinate of the segments. List contains the sorted numbers . Any combinatorial changes to the vertical segments in occur only when hits a vertex of . Any changes to the numbers occur only when hits an intersection of a blue line and a red line, which is a vertex of . At such an intersection, only two consecutive numbers and change, each by at most one. In Figure 8, has and at , but they change to and at due to the intersection . After , intersects no blue lines, and has . Let an event refer to a moment when hits a vertex of .
By maintaining a balanced binary search tree that stores in sorted order of their intersections with , as in a standard plane sweep algorithm, we can compute all events sorted in their -coordinates in total time. At an event with a blue line and a red line defining the event, we can update both and in time. Thus, the overall running time is .
To find an optimal solution, we maintain an additional value, the sum of the largest values in . The sum can be updated in time per event by maintaining . Let be the set of the largest values in , and let be the corresponding segments at a position of where the sum is maximized. The vertical segments in intersect blue lines but no red lines, and is an optimal solution to -MaxBlue∗. By the dual transform, the dual of the vertical segments in are parallel strips that contain blue points but no red points. Thus, the set of parallel strips, dual to , is an optimal solution to -MaxBlue.
7 Algorithm and 3SUM-hardness for -MinRed
We first show that -MinRed is SUM-hard even when . Then we show that -MinRed can be solved in time for and in time for .
Lemma 20.
2-MinRed is 3SUM-hard.
Proof.
We use a reduction from the GEOMBASE problem. Consider a set of red points on the horizontal lines , , and , each with an integer -coordinate satisfying for some integer . For each , and for each red point , we place two blue points on as in Theorem 11 in total time such that no line passing through any two red points , for intersects unless it passes through . We have red points and blue points in total. The reduction takes time.
Suppose that there exists a non-horizontal line containing three red points. Then there are two strips parallel to such that their union contains all blue points while containing exactly red points. If no non-horizontal line contains three red points, no two parallel strips can cover all blue points while excluding three or more red points. In particular, every pair of parallel strips whose union contains all blue points must contain at least red points.
In the dual plane, we are given a set of lines in the plane and an integer . Our goal is to find vertical segments with a common -coordinate whose union intersects all lines in while minimizing the number of lines in intersected by the union.
Theorem 21.
We can solve -MinRed in time.
Proof.
For a cell of , let and denote the upper hull and the lower hull of , respectively. Let and be an optimal pair of vertical segments where lies above . Since intersects all lines in , has its upper endpoint on , has its lower endpoint on , and both and are incident to a common cell in . See Figure 9(a).
Therefore, for each cell in , except the cell below and the cell above , we find two vertical segments and such that their endpoints are the intersections between a vertical line and , and the number of lines in intersected by is minimized.
To do this efficiently, we first compute in time, which also gives . For a vertex in , let denote the number of lines in lying above . We can compute for every vertex in in time by traversing the arrangement .
For a cell in , all points in have the same level in , and all points in have the same level in , if they are defined. Their levels differ by one in . Let denote the set of cells in whose lower hull lies on for . Then, is the set of cells in whose upper hull lies on . Note that is the set of all cells in , except the cell below and the cell above .
Consider for a fixed . We find two optimal vertical segments lying on a vertical line , restricted to the cells in as follows. Imagine we sweep the plane with a vertical line from left to right. At a fixed position of , let and be the vertical segments lying on whose endpoints are the intersections of and each of the four chains in . See Figure 9(b).
Let , , , and be the rightmost vertices in among the ones on or left to . Then, the number of lines in intersected by is . Thus, while we slide , the number changes only when encounters a vertex of contained in the four chains.
Since is computed for every vertex in in the preprocessing and the total number of vertices in the four chains is , this procedure can be done in time by traversing the four chains in the arrangement . We repeat this for every , which takes time in total.
Theorem 22.
We can solve -MinRed in time for .
Proof.
We give a reduction from -MinRed to -MaxBlue in time, which completes the proof by Theorem 19. Let be a set of points in the plane. Assume that there is an optimal solution for -MinRed whose strips have a positive slope. The other case can be handled symmetrically.
We first compute an axis-parallel square that contains in its interior. Let and be the upper-left and lower-right vertices of , respectively. Consider two translates and of , one with its lower-right corner at and one with its upper-left corner at . Let and denote the corners of and , respectively. For each , we place points on it. Let be the set of points placed on . Observe that the convex hull of contains the convex hull of . See Figure 10.
Let be an optimal solution for -MinRed whose strips have positive slope and contain no point in . Let denote the number of points in covered by . Let be a set of strips that are parallel and disjoint to the strips of and whose union covers all points in . Since covers all points in , covers no points in , and it covers points in total, from and from .
We now construct an instance of -MaxBlue with two point sets and . Here, an optimal solution consists of parallel strips whose union contains the maximum number of points of while containing no points of . Let be an optimal solution for the -MaxBlue instance. Let be a set of strips such that each strip is the region between two consecutive strips of .
We show that is an optimal solution for -MinRed for the instance. We first show three observations on : (1) every point in is covered by , (2) every point in is covered by , and (3) every point in is covered by either or .
For (1), suppose there is a point of not covered by . Then covers at most points of , and hence at most points of . This contradicts the optimality of , because covers points of while covering no point of .
For (2), suppose there is a point not covered by . By definition, is not covered by , so lies outside . This implies that some vertex in is not covered by , contradicting (1). See Figure 10(b).
For (3), suppose there is a point covered by neither nor . Then we could enlarge an outermost strip of so that it contains without including any point of , contradicting the optimality of .
By (2), covers all points of . Let be the number of points of covered by . Suppose is not optimal for -MinRed, that is, . By (3), covers points of , and by (1), it covers all points of . Thus covers points of , which is less than , contradicting the optimality of .
References
- [1] Pankaj K. Agarwal, Boris Aronov, Timothy M. Chan, and Micha Sharir. On levels in arrangements of lines, segments, planes, and triangles. Discrete & Computational Geometry, 19(3):315–331, 1998. doi:10.1007/PL00009348.
- [2] Noga Alon and E Györi. The number of small semispaces of a finite set of points in the plane. Journal of Combinatorial Theory, Series A, 41(1):154–157, 1986. doi:10.1016/0097-3165(86)90122-6.
- [3] Esther M. Arkin, Ferran Hurtado, Joseph S. B. Mitchell, Carlos Seara, and Steven S. Skiena. Some lower bounds on geometric separability problems. International Journal of Computational Geometry & Applications, 16(01):1–26, 2006. doi:10.1142/S0218195906001902.
- [4] Jonathan Backer and J. Mark Keil. The mono-and bichromatic empty rectangle and square problems in all dimensions. In Proceedings of the 9th Latin American Symposium on Theoretical Informatics (LATIN 2010), pages 14–25. Springer, 2010. doi:10.1007/978-3-642-12200-2_3.
- [5] Mark de Berg, Otfried Cheong, Marc Van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer, 2008.
- [6] Steven Bitner, Yam Cheung, and Ovidiu Daescu. Minimum separating circle for bichromatic points in the plane. In Proceedings of the 7th International Symposium on Voronoi Diagrams in Science and Engineering (ISVD 2010), pages 50–55. IEEE, 2010.
- [7] Gerth Stølting Brodal and Riko Jacob. Dynamic planar convex hull. In Proceedings of the 43rd Symposium on Foundations of Computer Science (FOCS 2002), pages 617–626. IEEE Computer Society, 2002. doi:10.1109/SFCS.2002.1181985.
- [8] Timothy M. Chan. Remarks on k-level algorithms in the plane. Manuscript, 1999.
- [9] Timothy M. Chan. Low-dimensional linear programming with violations. SIAM Journal on Computing, 34(4):879–893, 2005. doi:10.1137/S0097539703439404.
- [10] Kenneth L. Clarkson and Peter W. Shor. Applications of random sampling in computational geometry, II. Discrete & Computational Geometry, 4(5):387–421, 1989. doi:10.1007/BF02187740.
- [11] T. K. Dey. Improved bounds for planar k -sets and related problems. Discrete & Computational Geometry, 19(3):373–382, March 1998. doi:10.1007/PL00009354.
- [12] David P. Dobkin, Dimitrios Gunopulos, and Wolfgang Maass. Computing the maximum bichromatic discrepancy, with applications to computer graphics and machine learning. Journal of Computer and System Sciences, 52(3):453–470, 1996. doi:10.1006/JCSS.1996.0034.
- [13] Jonathan Eckstein, Peter L. Hammer, Ying Liu, Mikhail Nediak, and Bruno Simeone. The maximum box problem and its application to data analysis. Computational Optimization and Applications, 23(3):285–298, 2002. doi:10.1023/A:1020546910706.
- [14] Herbert Edelsbrunner. Algorithms in Combinatorial Geometry, volume 10. Springer Science & Business Media, 1987. doi:10.1007/978-3-642-61568-9.
- [15] Hazel Everett, Jean-Marc Robert, and Marc Van Kreveld. An optimal algorithm for computing ()-levels, with applications. International Journal of Computational Geometry & Applications, 6(03):247–261, 1996.
- [16] Anka Gajentaan and Mark H. Overmars. On a class of problems in computational geometry. Computational Geometry, 5(3):165–185, 1995. doi:10.1016/0925-7721(95)00022-2.
- [17] Erwin Glazenburg, Thijs van der Horst, Tom Peters, Bettina Speckmann, and Frank Staals. Robust bichromatic classification using two lines. In Proceedings of the 35th International Symposium on Algorithms and Computation (ISAAC 2024), volume 322, pages 33:1–33:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ISAAC.2024.33.
- [18] Dirk Helbing. Modeling multi-lane traffic flow with queuing effects. Physica A: Statistical Mechanics and its Applications, 242(1-2):175–194, 1997.
- [19] Michael E Houle and Godfried T Toussaint. Computing the width of a set. In Proceedings of the first annual symposium on Computational geometry, pages 1–7, 1985.
- [20] Michael F. Houle. Algorithms for weak and wide separation of sets. Discrete Applied Mathematics, 45(2):139–159, 1993. doi:10.1016/0166-218X(93)90057-U.
- [21] Ferran Hurtado, Marc Noy, Pedro A. Ramos, and Carlos Seara. Separating objects in the plane by wedges and strips. Discrete Applied Mathematics, 109(1-2):109–138, 2001. doi:10.1016/S0166-218X(00)00230-4.
- [22] Md Nazmuzzaman Khan, Adibuzzaman Rahi, Veera P Rajendran, Mohammad Al Hasan, and Sohel Anwar. Real-time crop row detection using computer vision-application in agricultural robots. Frontiers in Artificial Intelligence, 7:1435686, 2024. doi:10.3389/FRAI.2024.1435686.
- [23] Adam Kimura, Jon Scholl, James Schaffranek, Matthew Sutter, Andrew Elliott, Mike Strizich, and Glen David Via. A decomposition workflow for integrated circuit verification and validation. Journal of Hardware and Systems Security, 4(1):34–43, 2020. doi:10.1007/S41635-019-00086-6.
- [24] Sukanya Maji and Sanjib Sadhu. Geometric objects covering all red points and minimum blue points. Turkish Journal of Engineering, 9(1):47–55, 2025.
- [25] Jiri Matousek. Lectures on Discrete Geometry, volume 212. Springer Science & Business Media, 2013.
- [26] Nimrod Megiddo. On the complexity of polyhedral separability. Discrete & Computational Geometry, 3(4):325–337, 1988. doi:10.1007/BF02187916.
- [27] Joseph O’rourke, S. Rao Kosaraju, and Nimrod Megiddo. Computing circular separability. Discrete & Computational Geometry, 1(2):105–113, 1986.
- [28] Carlos Seara. On geometric separability. PhD thesis, Univ. Politecnica de Catalunya, 2002.
- [29] Csaba D. Toth, Joseph O’Rourke, and Jacob E. Goodman. Handbook of Discrete and Computational Geometry. CRC press, 2017.
- [30] Géza Tóth. Point sets with many -sets. Discrete & Computational Geometry, 26(2):187–194, 2001. doi:10.1007/S004540010022.
- [31] Godfried T Toussaint. Solving geometric problems with the rotating calipers. In Proc. IEEE Melecon, volume 83, page A10, 1983.
- [32] Vladimir Vapnik. The nature of statistical learning theory. Springer science & business media, 2013.
- [33] Chee-Keng Yap. Fundamental problems of algorithmic algebra, volume 49. Oxford University Press Oxford, 2000.
