# Geometric Separability using Orthogonal Objects

Given a bichromatic point set P=R ∪ B of red and blue points, a separator is an object of a certain type that separates R and B. We study the geometric separability problem when the separator is a) rectangular annulus of fixed orientation b) rectangular annulus of arbitrary orientation c) square annulus of fixed orientation d) orthogonal convex polygon. In this paper, we give polynomial time algorithms to construct separators of each of the above type that also optimizes a given parameter. Specifically, we give an O(n^3 log n) algorithm that computes (non-uniform width) separating rectangular annulus in arbitrary orientation, of minimum possible width. Further, when the orientation is fixed, we give an O(nlog n) algorithm that constructs a uniform width separating rectangular annulus of minimum possible width and an O(nlog^2 n) algorithm that constructs a minimum width separating concentric square annulus. We also give an optimal algorithm that computes a separating orthogonal convex polygon with minimum number of edges, that runs in O(nlog n) time.

## Authors

• 1 publication
• 2 publications
• ### On the Minimum-Area Rectangular and Square Annulus Problem

In this paper, we address the minimum-area rectangular and square annulu...
04/15/2019 ∙ by Sang Won Bae, et al. ∙ 0

• ### A Practical Algorithm with Performance Guarantees for the Art Gallery Problem

Given a closed simple polygon P, we say two points p,q see each other if...
07/14/2020 ∙ by Simon Hengeveld, et al. ∙ 0

• ### Empty Squares in Arbitrary Orientation Among Points

This paper studies empty squares in arbitrary orientation among a set P ...
11/29/2019 ∙ by Sang Won Bae, et al. ∙ 0

• ### Optimal Construction for Time-Convex Hull with Two Orthogonal Highways in the L1-metric

We consider the time-convex hull problem in the presence of two orthogon...
06/30/2021 ∙ by Jyun-Yu Chen, et al. ∙ 0

• ### Maximum-Width Empty Square and Rectangular Annulus

An annulus is, informally, a ring-shaped region, often described by two ...
11/15/2018 ∙ by Sang Won Bae, et al. ∙ 0

• ### Minimum-Width Double-Strip and Parallelogram Annulus

In this paper, we study the problem of computing a minimum-width double-...
11/18/2019 ∙ by Sang Won Bae, et al. ∙ 0

• ### Color spanning Localized query

Let P be a set of n points and each of the points is colored with one of...
05/13/2019 ∙ by Ankush Acharyya, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

In many applications, data is represented using points in

. In some of them, each data point belongs to a fixed number of categories or classes. In those cases, data from different classes can be represented by points of different colors. Thus the problems involving multicolored point sets are important in applications like data mining and machine learning.

In this paper, we study the separability problem for bichromatic point sets in the plane. Given a bichromatic point set , where R represents a set of red points and B represents a set of blue points, the separability problem asks whether there exists a geometric object of a particular type that separates R and B

. The separability problem is closely related to the classification problem in Machine Learning and has also found applications in areas like Data mining, Computer graphics, Pattern recognition, etc. An important question studied in separability is to decide whether a separator of a particular type exists for a given bichromatic point set. For example, the linear separability question is to decide whether there exists a straight line such that the blue points and red points are in different half-planes defined by the line. A generalization of this problem to higher dimensions is to check whether there exists a hyperplane that separates red and blue points. Both these problems can be solved in linear time

hyper . The separability problem is also studied when the separator is a geometric object like circle, rectangle, convex polygon, etc. Disk ; rectangle ; convex . Another set of questions studied in separability is to find a separator that optimizes a given parameter. Edelsbrunner and Preparata convex gave an algorithm to find a separating convex polygon with the minimum number of edges. However, it is NP-hard to find a separating simple polygon with the minimum number of edges hyper . O’Rourke et al. OKM86 gave algorithms for deciding separability using circles and to find the smallest and largest separating circles. Hurtado et al. wedge studied the separability problem for wedges and strips.

Motivated by applications in urban scene reconstruction using LiDAR data, many researchers  Van ; This ; Urban considered the separability problem for various rectangular shapes. Rectilinear shapes are particularly important in urban scene reconstruction as many entities like roads and buidings tend to have orthogonal edges. In addition to the papers mentioned above, Sheikhi et al. Farnaz studied the separability problem for a family of non-convex rectilinear objects called L-shapes and gave polynomial time algorithms. We consider a more general class of these objects, namely rectangular annulus. We also consider the separability problem for a class of objects called orthogonal convex objects, which is a restriction of classical convexity to an orthogonal setting.
Problems Studied and Related Work

Let be a point set in where R is a set of red points and B is a set of blue points and , throughout the paper. For simplicity of explanation, we assume no two points in have the same or coordinate. The separability problem is to find an object such that all the blue points lie inside or on the boundary of and all the red points lie outside or on the boundary of .

We study the separability problem for annuli. In general, an annulus refers to the region enclosed between two objects of the same type. In this paper, we study the separability problem for Rectangular and Square annuli of fixed and arbitrary orientation. We define the orientation of a line as the angle it makes with the -axis. A rectangle/square (and a rectangular/square annulus) has orientation if the line containing each of its edges has orientation either or . We will now define these objects that we are considering.
Rectangular Annulus: A rectangular annulus is a closed region between two rectangles and of same orientation such that is contained in . For a rectangular annulus , we shall call the larger rectangle and smaller rectangle that define as its outer rectangle and inner rectangle respectively. The width of a rectangular annulus on a given side is the perpendicular distance between the corresponding edges of the outer and inner rectangles. If the width is uniform on all the four sides of an annulus, we call it a uniform width rectangular annulus. Note that the center of inner and outer rectangles are the same in a uniform width rectangular annulus (The converse is not always true). When the width is not uniform on all the four sides, the width of the annulus is defined as the maximum width among the four sides.
Square Annulus: A square annulus is a closed region between two squares and of same orientation such that is contained in . The definition of the width of the square annulus is similar to that of the rectangular annulus. If the center (point of intersection of the diagonals) of the outer and inner squares are the same, or equivalently the width is uniform on all the four sides, then we call it a concentric square annulus.

For a given bi-chromatic point set, we aim to find separating rectangular and square annuli that minimize the width. A closely related problem that arises in the monochromatic setting is to find an annulus of minimum width that encloses a given point set. Enclosing a point set using a circular annulus of minimum width is studied in CircleAnnulus . Gluchshenko et al. Gluchshenko gave an algorithm to compute a minimum width enclosing rectilinear annulus. Mukherjee et al. joydeep gave an algorithm that computes minimum width enclosing axis-parallel rectangular annulus and an algorithm that computes minimum width enclosing rectangular annulus in arbitrary orientation. Bae square gave an algorithm that runs in time that computes the minimum width enclosing square annulus. Another closely related problem in the monochromatic setting is to find a maximum width empty annulus in a point set. Bae sang gave algorithms that run in and time respectively to compute the maximum width empty square and rectangular annulus. Many techniques used for solving the monochromatic problems can be extended for solving the minimum width separating annulus problem. However, the presence of red points poses certain challenges in the separability problem. For instance, it is easy to extend a nonuniform width annulus to a uniform width annulus in the monochromatic setting whereas the two cases are very different in the bichromatic setting. The algorithms presented in this paper makes non-trivial modifications to the existing techniques to solve the bichromatic separability problem.

We also consider the separability problem for orthogonal convex objects.

Orthogonal Convex Polygon: A polygon is said to be orthogonal convex if all the edges of are either horizontal or vertical and the intersection of any vertical or horizontal line with is either null, a point or a continuous line segment Burkay . An orthogonal convex polygon has alternate vertical and horizontal edges and alternate convex and reflex vertices (except for the vertices with highest and lowest and coordinates).

A polynomial time algorithm to find a separating convex polygon with the minimum number of edges is given in convex . We extend this result to orthogonal convexity.

A summary of the results of this paper are given below.

Object
Orientation Parameter Running time
Nonuniform width Rectangular Annulus Fixed width
Uniform width Rectangular Annulus Fixed width
Nonuniform width Rectangular Annulus Arbitrary width
Uniform width Square Annulus Fixed width
Orthogonal convex polygon Fixed edges

All the above results for the separability problem using minimum width annulus can be extended to the separability problem using maximum width annulus.

Notations: For any point , let and respectively denote the -coordinate and -coordinate values of . We further use the same notation for vertical and horizontal lines. For a rectangle , let , , and denote the left, bottom, right and top edges of respectively. For a rectangular (square) annulus , we refer to the left boundary of i.e., the union of left edges of the outer and inner rectangles (squares) of , as the left side of (similar for other sides). For a point set , denotes the convex hull of .

## 2 Rectangular Annulus Separability in Fixed Orientation

In this section, we consider the Rectangular Annulus Separability problem. For a given bi-chromatic set P, we give an algorithm to find a non-uniform and uniform width separating axis-parallel rectangular annulus of minimum width.

Let be the smallest axis-parallel rectangle that contains all points of B. Let be the set of red points inside and be the smallest axis-parallel rectangle that contains . If contains blue points inside, then a separating rectangular annulus does not exist. If is empty, then the problem can be solved by the algorithm that computes the minimum width enclosing rectangular annulus given in joydeep .

###### Lemma 1.

A separating axis-parallel (non-uniform width)rectangular annulus of minimum width (if exists) can be constructed in time.

###### Proof.

Let (resp. ) be the set of all blue points inside such that and (resp. ). Let (resp. ) be the set of all blue points inside such that and (resp. ).

Define the set as the union of and the set of all points such that the perpendicular distance between and is not larger than the perpendicular distance between and any of the other three edges of . Similarly define the sets , , and corresponding to the bottom, right and left edges of (Fig 1). Let be the perpendicular distance between and , where is a point and is a vertical or horizontal line. Therefore where . Let be the element of such that . Similarly define , and from , and respectively. Construct as the rectangle that contains , , and on its top, bottom, right and left edges respectively. Now the annulus , defined by and is a separating rectangular annulus. Moreover, by construction, any other rectangular annulus with width less than that of cannot contain all points from {, , }, therefore is a separating rectangular annulus with minimum width. , and can be constructed in time.

We now consider the Rectangular Annulus Separability problem for uniform width axis-parallel rectangular annulus.

Let be the set of (at most) four blue points that lie on , , and . Similarly define the set for . Let . We call the points in as fixed points. Note that an input point lying on a corner can be considered to be lying on two sides. For example, an input point on the top-left corner of a rectangle is considered as a point on the top edge as well as a point on the left edge.

###### Theorem 2.

A separating uniform width axis-parallel rectangular annulus of minimum possible width (if exists) can be constructed in time.

###### Proof.

Let be a separating uniform width axis-parallel rectangular annulus of minimum possible width. Let and represent the outer and inner rectangles of respectively (Fig. 2). Then both and contain at least one blue point on the boundary. Otherwise, we can expand (shrink ) to get a rectangular annulus of smaller width. Consider any side of . If this side does not contain a fixed point on its boundary, then we can move this side parallel to itself, towards the centre of the annulus till it touches a point from or . It is easy to see that the annulus still contains the same set of points inside. Therefore, we can assume that contains a fixed point each on its four sides and a blue point on the boundary of . The set of four fixed points on the boundary of can be determined in time. The fifth input point that lie on the boundary of belongs to the set and can be determined in time. Thus the set of five points on the boundary can be correctly guessed in time. For a given set of five points, the uniform width rectangular annulus that contains them on the boundary can be constructed in constant time. By using a data structure like range tree, it can be checked whether a given rectangular annulus is a separating rectangular annulus by a constant number of orthogonal range searching queries (We need to check whether contains any blue point and contains any red point from ). A range tree can be constructed in time and each range searching query can be completed in time Berg . Thus all valid separating rectangular annuli can be constructed in time and we can return the one with the minimum width. ∎∎

## 3 Rectangular Annulus Separability in Arbitrary Orientation

In this section, we give an algorithm based on the rotating calipers method rotatingcalipers to find a separating (non-uniform width) rectangular annulus of arbitrary orientation of minimum width.

Let be a set of points and be the minimum enclosing rectangle of in orientation . in any orientation contain points from on its four edges.

###### Lemma 3.

Let be two sets of points such that points in lie outside . Then all values of where a given point lies inside form a continuous interval. Moreover, for all values of in this interval, contains the same set of points from the convex hull of on its edges.

###### Proof.

Let , , , respectively be the points that lie on top, right, bottom and left edges of . The set of orientations where , , , are the points on also form a continuous interval, say , defined by the orientations of the edges of  joydeep . Consider two of these points which lie on adjacent sides of a minimum enclosing rectangle, say and . Then the top right corner of will lie on a semicircle with and as diameter points. We can consider three more similar semicircles such that any point of that lies inside will also lie in the interior of one of them. Let be a point that lie in the interior of . Consider the point where the line connecting and intersect the boundary of . Similarly let be the point where the line connecting and intersect the boundary of . Then, lies inside any whose top-right corner lies between and on the boundary of . This is precisely all orientations in the interval where are the orientations of lines and respectively. ∎∎

Computing All Orientations where a Separating Rectangular Annulus exists : Let be the set of red points inside . If contains any blue point inside then a separating rectangular annulus does not exist in any orientation.

Let be a separating rectangular annulus of minimum width in a fixed orientation and be the outer rectangle of . Then is and contains four blue points from on its boundary. Similar to the algorithms given in joydeep , we subdivide the interval into primary intervals such that for each orientation in a primary interval the set of blue points that lie on the boundary of is the same. The number of primary intervals is where is the number of points on .

Let be and , , and be the blue points on the boundary of , for . We define ,,. Let be the set of red points inside for a given . Assume is non empty (The case where is empty is discussed later). The set may vary in a primary interval based on the value of . This happens as some red points that lie outside may lie inside for some values of . For such a red point and a primary interval , the values of for which lies in forms a continuous subinterval of , by Lemma 3.

In the next step, we further subdivide the primary intervals based on the four points in with the smallest perpendicular distance to each side of . For , let denote the perpendicular distance between and a straight line of orientation that passes through . For a fixed and , this function is a continuous sinusoidal function. Based on this function, we define , for as follows:

 d′(r,tθb,θ)={∞ifr∉Rθ1d(r,tθb,θ),otherwise (1)

Now if we plot the function for all , the lower envelope gives the nearest point to for all . Similarly, repeat for other sides of . Thus for every , we get a set of four points that defines the smallest rectangle of orientation , , that contains all points in . We subdivide the primary intervals to secondary intervals, such that for every angle in a secondary interval, the set is the same.

For a given , if contains any blue point inside, then there is no separating rectangular annulus in orientation . In time we can verify that whether there exists a blue point inside or not. There may be some blue points lying outside and inside . Such points will also lie in the interior of a semicircle with two defining points from as diameter points. By lemma 3, for every blue point outside , we can compute the interval where lies inside within a secondary interval. Such an interval is now an invalid interval in that if belongs to that interval then there is no separating rectangular annulus of orientation . We remove the invalid interval corresponding to every blue point from the set of secondary intervals to get a set of valid sub-intervals. Now we can state the following result.

###### Lemma 4.

For all the orientations that belong to a valid sub-interval in , there exists a rectangular annulus of orientation which is a separating rectangular annulus for .

###### Proof.

Let belong to a sub-interval in . Then there exist eight points in that will define a rectangular annulus, . We will show that is a separating rectangular annulus for . The outer rectangle of is a minimum enclosing rectangle of B and contains all blue points inside. Also, the inner rectangle contains all red points of inside since we have selected the points with the smallest perpendicular distance to each side of the outer rectangle. Also for each blue point, we have excluded the angles where it comes inside the inner rectangle. ∎∎

Constructing a Rectangular Annulus of Minimum Width : Now, we will construct , the separating annulus of minimum width, for each orientation . Note that we know the outer rectangle of is same as . For each side of , we will define a set of blue points that will lie closer to that side in a minimum width separating rectangular annulus. Consider the side that contains the point . Let intuitively be the set of blue points that will lie closer to in a minimum width separating rectangular annulus. We will call the points that lie inside a rectangle defined by the lines containing edges , , and as special top points. Clearly, the special top points belong to the set . Similarly, we can define the sets and as special bottom points, special left points and special right points. Of the remaining blue points, contains all the points whose perpendicular distance to is smaller than the perpendicular distance to any other side of (Similarly for other sets). Thus at any valid orientation , the sets gives a partition of all blue points. For a given point , we can compute the angular interval where it is a special point in constant time. When a point is not a special point, it belongs to the set if . Now consider the following function,

 f1(p,t,θ)={d(p,tθb,θ)ifp∈TA0else (2)

The upper envelope of the set of functions for all gives the width of the top side of a separating annulus of minimum width for each . By similar methods, we can compute the width of all sides of a separating annulus of minimum width. The value of that minimizes the width can be returned.

###### Theorem 5.

For a bichromatic point set , a minimum width separating rectangular annulus of arbitrary orientation can be computed in time.

###### Proof.

The algorithm computes the set of primary intervals in time joydeep . In order to compute the set of secondary intervals, we compute the function for all in time and compute the lower envelope of these functions in time square . Computing all valid intervals in a secondary interval includes finding the invalid subintervals corresponding to each blue point and merging all those intervals, which can be done in time. Therefore, finding all the valid intervals over all secondary intervals can be done in time. Now, for a valid interval , we need to calculate the upper envelope of all the functions for all . Since the distance function is a sinusoidal function, this can be done in time square .

Now we will prove that the number of valid intervals is . Within a secondary interval, a blue point will create at most one invalid interval. Therefore, a secondary interval can contain valid intervals. Also, any secondary interval can be labeled with exactly one of the following events thus showing that there are secondary intervals.
1. Addition/Removal of a point from the set .
2. Addition/Removal of a red point that lies inside to the set .
3. Addition/Removal of a red point that lies outside to the set .
Since there are valid intervals, the total running time is .

## 4 Square Annulus Separability in Fixed Orientation

In this section, we consider the Square Annulus Separability problem. Given a point set , we show how to construct a concentric square annulus of minimum width that separates R and B. Let denote a separating concentric square annulus of minimum width. Let and respectively be the outer and inner squares that define . The definitions of , and fixed points are the same as given in section 2.

Both and contain at least one blue point on its boundary. Also, it can be assumed that contains four input points on the boundary. In other words, there exists a unique square annulus that contains these four points on the boundary. We say that the square annulus is defined by these four points.

###### Observation 6.

cannot be uniquely defined by four points if one of the following holds.
1. Two points are on adjacent edges of and the other two points are on adjacent edges of and no two of them are on the same side of .
2. There is a point each on the left (respectively top) edges of and and a point each on the right (respectively bottom) edges of and .

###### Proof.

To show case 1, consider a square annulus with points and respectively on the left and bottom edges of and points and respectively on the right and top edges of . We can construct another square annulus by moving the bottom and left edges of diagonally away/towards the center of and top and right edges of diagonally towards/away from the center of and still containing and on the boundary.

Similarly for case 2, let be a square annulus that contains the points and on the left and right edges of and . If and does not lie on the corners of or , then we can translate up/down such that it still contains and on its boundary.

###### Theorem 7.

For a given point set , a concentric square annulus of minimum width that separates R and B can be constructed in time.

###### Proof.

We start by sorting the blue points and red points by their x and y coordinates. We have seen that four input points are enough to define .

If there are more than two fixed points on the boundary of then we can find in time by correctly guessing the defining points in time and checking the validity of each of these in time. Therefore assume contains a fixed point each on two opposite sides. If not, there exist two adjacent sides that do not contain any fixed point. Then we can move these two sides inwards along the diagonal until touches a point in or touches a point in (Fig. 4). Without loss of generality assume that and lie respectively on the left and right sides of . There should be at least one point from . Assume . Now there are two cases based on the point .

1. The point is from : The third defining point is a blue point in . We can correctly guess this point in time.

1. lies on the left edge of : Now we know two defining points and , that lie on the same side of the annulus. This will give us the width of and thus we know the four vertical lines that contain the left and right edges of and . For a correct guess of defining points , and , lies between the slabs defined by these lines (Fig. 4(a)). By observation 6, we know that the fourth defining point lies on the top or bottom side of . If this is a blue point, then it lies on and is the nearest blue point vertically from . If this is a red point, then it lies on and is the nearest red point vertically from . In both the cases can be found in time.

2. lies on the top edge of : By and we know the top right corner of and hence the line containing one diagonal of . The point where this line intersects the vertical line containing is the bottom left corner of (Fig. 4(b)). By observation 6, if is a red point, then it lies on the top side or the right side of . In the former case, it is the red point with minimum y-coordinate in the region bounded by the lines and and in the latter case, it is the red point with minimum x-coordinate in the region bounded by the lines and . If it is a blue point in , then it is the blue point with the highest y-coordinate in the closed polygonal region formed by , and the vertical line contain .

The argument is symmetric if the third defining point that we guess lies on the bottom edge.

2. The point is from : The case where there are two blue defining points on and one of them lies on the left or right edge is similar to 1(a). Otherwise, we construct the rest of the annulus using a slightly different approach.

Instead of guessing a defining point we use a technique to find the center of and the defining point that lies on the top or bottom edge of . Let be the radius of which is given by half the difference of x-coordinates of the left and right edges of . Let be the vertical line at distance from left and right edges of . The center of the annulus, , should lie on on a segment of length at most .
We define a function for all , as follows.

 fp(c)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩∞ify(t(Rin))y(t(Rin))$and$y(c)>(y(p)+(y(b(Rin))))/2∞ify(p)

Intuitively, gives the radius of the square centered at and contains on the top or bottom edge and contains all red points in inside it. For a fixed , a square centered at that contains inside and all the blue points outside has radius at most . Moreover, a square that minimizes the width has radius .

It is easy to see that, for a given the graph of is a straight line segment of slope or . Hence is the maximum value of the lower envelope in the arrangement of , for all . Computing the lower envelope of an arrangement of line segments can be done in time square .

Thus, should have the defining points in one of a constant number of configurations. In the configuration as in case (1) above, we can correctly guess the defining points in time and each guess can be validated in time. Then the total running time for this case is . A configuration as in case (2) can be solved in time. Thus a separating square annulus of minimum width can be computed in time. ∎∎

## Degenerate cases in Annulus separability

The algorithms given in sections 2, 3 and 4 may need slight changes for some degenerate cases. The case where does not contain any red point becomes equivalent to the minimum enclosing rectangle/square annulus problem in monochromatic setting and can be solved by the algorithms given in joydeep ; square . Also, there are cases where one or more sides of the minimum width annulus are at infinity. Such cases can be solved by algorithms that compute separating unbounded L-shapes, separating strips, etc. These can be computed using the same ideas as given above without decreasing the overall efficiency of the algorithm.

## 5 Separability using Annulus of Maximum Width

We can use the algorithms described above with slight modifications to find the separating annulus of maximum width. For the sake of completeness, we now describe the algorithm to construct the separating concentric square annulus of maximum possible width. Other algorithms in sections 2 and 3 can be modified in a similar way for the corresponding maximum width annulus separability problem.

###### Theorem 8.

A separating concentric square annulus of maximum width can be constructed in time.

###### Proof.

Let be a separating concentric square annulus of maximum width. contains four input points on its boundary as specified in observation 6. Let be a separating concentric square annulus of maximum possible width. Let and represent the outer and inner square of respectively.
If there are more than two fixed points on the boundary of then we can find in time by correctly guessing the defining points in time and checking the validity of each of these in time. Therefore assume contains a fixed point each on two opposite sides. If not, there exist two adjacent sides that do not contain any fixed point. Then we can move these two sides outwards along the diagonal until touches a point in or touches a point in . Without loss of generality assume that and lie respectively on the left and right sides of . There should be at least one point from . Assume . Now there are two cases based on the point .

1. The point is from : A third defining point is a red point in . We can correctly guess this point in time. There are two cases,

1. lies on the left edge of : Now we know two defining points and that lie on the same side of the annulus. This will give us the width of and thus we know the four vertical lines that contain the left and right edges of and . For a correct guess of defining points , and , lies between the slabs defined by these lines. By observation 6, we know that the fourth defining point lies on the top or bottom side of . If this is a blue point, then it lies on and it is the nearest blue point vertically from . If this is a red point, then it lies on and it is the nearest red point vertically from . In both the cases can be found in time.

2. lies on the top edge of : Now by and we know the top right corner of and hence the line containing one diagonal of . The point where this line intersects the vertical line containing is the bottom left corner of . By observation 6, if is a red point then it lies on the top side or right side of .

The argument is symmetric if the third defining point that we guess lies on the bottom edge.

2. The point is from :

The case where there are two red defining points on and one of them lies on the left or right edge is similar to 1(a). Otherwise, we construct the rest of the annulus using similar function in concentric square annulus with minimum width.

Instead of guessing a defining point we use a technique to find the center of and the defining point that lies on the top or bottom edge of . Let be the radius of which is given by half the difference of x-coordinates of the left and right edges of . Let be the vertical line at distance from left and right edges of . The center of the annulus, , should lie on on a segment of length at most .
We define a function for all , as follows.

 fp(c)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩∞ify(t(Bout))y(t(Bout))$and$y(c)>(y(p)+(y(b(Bout))))/2∞ify(p)

intuitively, gives the radius of the square centered at and contains on the top or bottom edge and contains all red points in inside it. For a fixed , a square centered at that contains inside and all the blue points outside has radius at most . Moreover, a square that minimizes the width has radius .

It is easy to see that, for a given the graph of is a straight line segment of slope or . Hence is the maximum value of the lower envelope in the arrangement of , for all . Computing the lower envelope of an arrangement of line segments can be done in time square .

Thus, should have the defining points in one of a constant number of configurations. In the configuration as in case(1) above, we can correctly guess the defining points in time and each guess can be validated in time. Then the total running time for this case is . All other cases can be solved in less time. Thus a separating square annulus of minimum width can be computed in time.

## 6 Orthogonal Convex Separability

In this section, we give an algorithm to compute the separating orthogonal convex polygon that minimizes the number of edges.

Construct the orthogonal convex hull, , of B in time Karlsson . The orthogonal convex hull of a point set is defined as the smallest area orthogonal convex polygon that contains . The convex vertices of the orthogonal convex hull of are points from . If contains red points inside then a separating orthogonal convex polygon does not exist. For a given point , we can check whether lies inside in time. Thus the existence of a separating orthogonal convex polygon can be decided in time. We now discuss how to construct a separating orthogonal convex polygon, , that minimizes the number of edges.

###### Theorem 9.

For a given bichromatic point set with points, a separating orthogonal convex polygon with minimum number of edges can be computed in time.

###### Proof.

Let be the set of vertices of . Let , , and respectively be the leftmost, bottommost, rightmost and topmost points in . Let be the left-bottom chain in i.e., the orthogonal path in from to . We show how to minimize the number of edges in the left-bottom chain of a separating orthogonal convex polygon. The algorithm is as follows:

Let be the convex vertices in taken in counter-clockwise direction. Note that and . For the purpose of our algorithm, we are only considering the convex vertices of . Note that and are considered to be convex and the convex vertices can uniquely determine the chain . Let be a vertex in this chain. and are connected in by two axis-parallel line segments such that the horizontal line segment passes through the point and the vertical segment passes through the point . Let us denote this as the inward edge between and . Similarly, let the outward edge denote the path comprising of two axis-parallel edges such that the horizontal line segment passes through the point and the vertical segment passes through the point . Here, let denote the point of intersection of the two axis-parallel lines. Let be the rectangle with and as the diagonal points (see Fig. 6). Starting with , we iteratively check every vertex of and see if it can be deleted by replacing the inward edge by the outward edge. Specifically, for all , , we check if the rectangle contains red points inside. If not, we replace the inward edge between and by the outward edge. In this process, we delete the vertices and and add the vertex to the chain.   , .
while( )
.
if has a red point, then .
else
delete from and add to ,
. end while.

This algorithm returns the left-bottom chain of . To show the correctness, we prove that the left bottom chain of any separating orthogonal convex polygon has at least as many inward edges as returned by our algorithm. Consider a configuration of points such that , and is contained in a rectangle with and as diagonal vertices. For an orthogonal convex polygon to include and and exclude , it should have at least one inward edge. Let be the set of vertices returned by the algorithm. By the description of the algorithm, every vertex is a blue point or the vertical edge that contains has a blue point above . By this property, for an inward edge between and , there is a rectangle such that has two blue points as diagonal points and contains a red point inside. Moreover, for all , , and do not intersect in the interior. This shows that the algorithm returns a chain with the minimum possible number of inward edges possible.

We run similar algorithms for all other chains of - and . is given by the union of these four chains.

Constructing the orthogonal convex hull takes time Karlsson . At every step in the algorithm, we check a rectangle for red points where and are consecutive vertices in the separating polygon constructed so far. After every check, one of these points is deleted from the set of vertices to be considered. Therefore, the number of iterations is linear in the number of points in the orthogonal convex hull. Each check takes time. Therefore, the algorithm runs in time. ∎

The following lemma proves that the above algorithm is also optimal.

###### Lemma 10.

Computing a separating orthogonal convex polygon with minimum number of edges needs time.

###### Proof.

We give a reduction from the sorting problem. Let be an instance of sorting. We create an instance of separating orthogonal convex polygon problem corresponding to as described below.

• For every in , we add a blue point in to .

• For every in , we add a red point in , where .

It is easy to see that the separating orthogonal convex polygon of is given by a sorted order of . Since a sorting problem needs time, the result follows.

## References

• (1) Sang Won Bae. Computing a minimum-width square annulus in arbitrary orientation. Theoretical Computer Science, 718:2 – 13, 2018.
• (2) Sang Won Bae, Arpita Baral, and Priya Ranjan Sinha Mahapatra. Maximum-width empty square and rectangular annulus. Springer International Publishing. pages 69–81, Cham, 2019.
• (3) Thijs van Lankveld, M.J. Kreveld, and Remco Veltkamp. Identifying well-covered minimal bounding rectangles in 2d point data. Abstracts 25th Europ. Workshop Comput. Geom., 01 2009.
• (4) Thijs van Lankveld, Marc van Kreveld, and Remco Veltkamp. Identifying rectangles in laser range data for urban scene reconstruction. Computers & Graphics, 35(3):719 – 725, 2011. Shape Modeling International (SMI) Conference 2011.
• (5) Marc van Kreveld, Thijs van Lankveld, and Maarten de Rie. (, )-Sleeves for Reconstruction of Rectilinear Building Facets, pages 231–247. Springer Berlin Heidelberg, Berlin, Heidelberg, 2013.
• (6) Mark de Berg, Prosenjit Bose, David Bremner, Suneeta Ramaswami, and Gordon Wilfong. Computing constrained minimum-width annuli of point sets. Computer-Aided Design, 30(4):267 – 275, 1998.
• (7) Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars. Computational geometry: algorithms and applications, 3rd Edition. 1997.
• (8) H. Edelsbrunner and F.P. Preparata. Minimum polygonal separation. Information and Computation, 77(3):218 – 232, 1988.
• (9) S. Fisk. Separating point sets by circles, and the recognition of digital disks. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-8(4):554–556, 1986.
• (10) Burkay Genç, Cem Evrendilek, and Brahim Hnich. Covering points with orthogonally convex polygons. Computational Geometry, 44(5):249 – 264, 2011.
• (11) Olga N Gluchshenko, Horst W Hamacher, and Arie Tamir. An optimal o (nlogn) algorithm for finding an enclosing planar rectilinear annulus of minimum width. Operations Research Letters, 37(3):168–170, 2009.
• (12) Ferran Hurtado, Marc Noy, Pedro A. Ramos, and Carlos Seara. Separating objects in the plane by wedges and strips. 14th European Workshop on Computational Geometry. Discrete Applied Mathematics, 109(1):109 – 138, 2001.
• (13) Rolf G. Karlsson and Mark H. Overmars. Scanline algorithms on a grid. BIT Numerical Mathematics, 28(2):227–241, Jun 1988.
• (14) Nimrod Megiddo. On the complexity of polyhedral separability. In Discrete and computational geometry, pages 325–337, 1988.
• (15) Joydeep Mukherjee, Priya Ranjan Sinha Mahapatra, Arindam Karmakar, and Sandip Das. Minimum-width rectangular annulus. Theoretical Computer Science, 508:74–80, 2013.
• (16) Joseph O’rourke, S Rao Kosaraju, and Nimrod Megiddo. Computing circular separability. Discrete & Computational Geometry, 1(2):105–113, 1986.
• (17) Farnaz Sheikhi, Ali Mohades, Mark de Berg, and Mansoor Davoodi. Separating bichromatic point sets by L-shapes. Computational Geometry, 48:673–687, 2015.
• (18) G Toussaint. Applications of the rotating calipers to geometric problems in two and three dimensions. International Journal of Digital Information and Wireless Communications (IJDIWC), 4(3):372–386, 2014.
• (19) Marc van Kreveld, Thijs van Lankveld, and Remco Veltkamp. Identifying well-covered minimal bounding rectangles in 2d point data. In 25th European Workshop on Computational Geometry, pages 277–280, 1999.