In this paper, we study the following geometric problem. Given a set of geometric objects in the plane, we are interested in computing a maximum-size subset such that the intersection graph induced by the objects in is bipartite. We refer to this problem as the Maximum Bipartite Subgraph (MBS) problem. The MBS
problem is closely related to the Odd Cycle Transversal (OCT) problem: given a graph , the objective of the OCT problem is to compute a minimum-cardinality subset of such that the intersection of and the vertices of every odd cycle of the graph is non-empty. Notice that MBS and OCT are equivalent for the class of graphs on which OCT is polynomial-time solvable: an exact solution for OCT gives as an exact solution for MBS within the same time bound (see below for a summary of the main known results on the OCT problem). However, on classes of graphs for which OCT is NP-hard, an -approximation algorithm for OCT might not provide any information on the approximability of MBS on the same classes of graphs.
Another problem that is related to MBS is the Feedback Vertex Set (FVS) problem. The objective of FVS is the same as that of OCT except the set has a non-empty intersection with every cycle of the graph (not only the odd ones). The FVS problem has been extensively studied in graph theory from both hardness [28, 11] and algorithmic [4, 9, 16, 14] points of view.
We also study a simpler variant of MBS, called the Maximum Triangle-free Subgraph (MTFS) problem. Let be a set of geometric objects in the plane. Then, the objective of the MTFS problem is to compute a maximum-size subset such that the intersection graph induced by the objects in is triangle free (as opposed to being bipartite).
The MBS problem is NP-complete for planar graphs with maximum degree four . For graphs with maximum degree three, Choi et al.  showed that there is a vertex set of size or less whose removal leaves a induced bipartite subgraph if and only if there is an edge set of size or less whose removal leaves a bipartite spanning subgraph. As edge deletion graph bipartization problem is NP-complete for cubic graphs , the MBS problem is NP-complete for cubic graphs. Moreover, since maximum edge deletion graph bipartization problem is solvable in time for planar graphs [12, 1], this immediately implies that MBS is -time solvable for planar graphs with maximum degree three. For vertex-weighted version of the MBS problem, Baiou et al.  showed that the MBS problem can be solved in time for planar graphs with maximum degree three. Finally, Cornaz et al.  considered the maximum induced bipartite subgraph problem: given a graph with non-negative weights on the edges, the goal is to find a maximum-weight bipartite subgraph. An edge subset is called independent if there is an induced bipartite subgraph of whose edge set contains ; otherwise, it is called dependent. They showed that the minimum dependent set problem with non-negative weights can be solved in polynomial time.
The OCT problem is known to be NP-complete on bipartite graphs  and planar graphs with degree at most 6 . For planar graphs with degree at most 3, OCT can be solved in time  (even the weighted version of the problem). There are several results known concerning the parameterized complexity of OCT (i.e., given a graph on vertices and an integer , is there a vertex set in of size at most such that is bipartite). Reed et al.  first gave an algorithm with running time . Lokshtanov et al.  improved this running time to . Lokshtanov et al.  provide an algorithm with running time for planar graphs. Moreover, assuming the exponential time hypothesis, the running time cannot be improved to .
The MBS problem is also closely related to the Maximum Independent Set (MIS) problem. Observe that any feasible solution for MIS is also a feasible solution for MBS and, moreover, a feasible solution for the MBS problem provides a feasible solution of size at least for the MIS problem. Hence, . This implies that an -approximation algorithm for MIS on a class of graphs is a -approximation for MBS on the same class. In particular, the PTASes for MIS on unit disks and unit squares  imply polynomial-time -approximation algorithms for MBS on unit disks and unit squares. Moreover, we obtain a polynomial-time -approximation  (or, -approximation ) algorithm for MBS on rectangles.
In this paper, we present the following results.
On the hardness side, we show that the MBS problem is NP-hard on the intersection graph of geometric objects for which MIS is NP-hard (Section 2); this in particular includes unit disks and unit squares. We also extend this result to a corresponding W-hardness result.
On the algorithmic side, we give a linear-time algorithm for MBS on interval graphs, and an -time algorithm that computes a near-optimal solution for MBS on any circular-arc graph with vertices (Section 3).
On the approximation side, we obtain a PTAS for the MBS problem on unit disks and unit squares. For a set of unit-height rectangles in the plane, we give an -time 2-approximation algorithm for the problem. Moreover, we design an -time 4-approximation algorithm for the same problem on unit disks (Section 4).
Finally, we show that the MTFS problem is NP-hard on the intersection graph of axis-parallel rectangles in the plane (Section 5).
In this section, we show that the MBS problem is NP-complete on geometric graphs for which MIS is NP-complete. The MIS problem is known to be NP-complete on a wide range of geometric intersection graphs, even restricted to unit disks and unit squares , 1-string graphs , and B-VPG graphs . Let be an intersection graph induced by a set of geometric objects in the plane. We construct a new graph from the disjoint union of two copies of by adding edges as follows. For each vertex in , we add an edge from each vertex in one copy of to the corresponding vertex in the other copy. For each edge , we add four edges and to , where and are the corresponding vertices of and , respectively in the other copy. Graph is the intersection graph of 2 geometric objects , where each object has occurred twice in the same position. Clearly, the number of vertices and edges in are polynomial in the number of vertices of ; hence, the construction can be done in polynomial time.
has an independent set of size if and only if has a bipartite subgraph of size .
Let be an independent set of with . Let be the subgraph of induced by along with all the corresponding vertices of in the other copy. Then, is a bipartite subgraph with size . Conversely, if has a bipartite subgraph of size , then must have an independent set of size . By the construction of , if has an independent set of size , then must have an independent set of size .
It is easy to see that the graphs and belong to the same class of geometric intersection graphs. Hence, by Lemma 1, we have the following theorem.
The MBS problem is NP-complete for the geometric intersection graphs for which MIS is NP-complete.
By the definition of parameterized reduction , one can verify that the above reduction is in fact a parameterized reduction and so we have the following result.
The MBS problem is W-complete on the geometric intersection graphs for which MIS is W-complete.
3 Algorithmic Results
In this section, we present our algorithms for the MBS problem on interval graphs and circular-arc graphs. We start by interval graphs.
3.1 Interval graphs
In this section, we consider the MBS problem on a set of intervals and give a linear-time algorithm for the problem. Notice that for interval graphs, the MBS problem is the same as FVS. The best-known algorithm for solving FVS on interval graphs takes time . Since interval graphs are a subclass of chordal graphs, the MBS problem on interval graphs reduces to the problem of computing a maximum-size subset of intervals in whose induced graph is triangle free. Consequently, a point can “stab” at most two intervals in any feasible solution for the MBS problem on intervals. Algorithm 1 exploits this property to solve the problem exactly.
In the following, we assume that (i) the endpoints of intervals in are distinct points on the real line, and (ii) the intervals are sorted from left to right by the increasing order of their right endpoint; we denote them as . Moreover, the variable (resp., ) denotes the -coordinate of the rightmost point on the real line such that it is contained in two intervals (resp., one interval) of the current solution computed by the algorithm. For an interval , we denote the left and right endpoints of by and , respectively.
Let , for all , denote the set at the end of iteration of the for-loop. Consider the following invariant.
- Invariant I.
For all , at the end of iteration of the for-loop, the set is an optimal solution for the set of intervals .
We prove Invariant I by induction on . If , then by line 5 of the algorithm and we are done. Moreover, if , then there are two cases depending on whether form a clique or an independent set. In either case, and we are done. Now, suppose that Invariant I is true for all . Let be a set of intervals and consider the set (where is the interval with rightmost right endpoint in ). By induction hypothesis, let be the optimal solution for computed by the algorithm and consider the values of and before returning in line 13. We must have that either (i) , (ii) , or (iii) . In cases (i) and (ii), the algorithm adds to resulting in an optimal solution. In case (iii), the algorithm return without adding to the solution. Observe that this is optimal as no feasible solution can add .
The algorithm clearly runs in time linear in and so we have the following theorem.
The MBS problem on a set of intervals can be solved in time.
3.2 Circular-arc graphs
We now give a near-optimal solution for the MBS problem on circular-arc graphs. For an optimization problem, a near-optimal solution is a feasible solution whose objective function value is within a specified range from the optimal objective function value. A circular-arc graph is the intersection graph of arcs on a circle. That is, every vertex is represented by an arc, and there is an edge between two vertices if and only if the corresponding arcs intersect. Observe that interval graphs are a proper subclass of circular-arc graphs. For the rest of this section, let be a circular-arc graph and assume that a geometric representation of (i.e., a set of arcs on a circle ) is given as part of the input. First, we prove the following lemmas.
If is triangle-free, then it can have at most one cycle.
Suppose for the sake of contradiction that has more than one cycle. Let and be two cycles of . Now, since is a triangle-free circular-arc graph, the corresponding arcs of the vertices of any cycle in together cover the circle . So, there must exist three distinct vertices and such that are pairwise adjacent. Which is a contradiction to the fact that is triangle-free.
If and are optimal solutions for the MBS and MTFS problems on , respectively, then .
Since a bipartite subgraph contains no triangle, . Now, if (i.e., the subgraph of induced by ) is odd-cycle free, then it induces a bipartite subgraph. Otherwise, can have at most one cycle by Lemma 2. If this cycle is odd, then by removing any single vertex form the cycle, we obtain a bipartite subgraph of with size at least .
Since contains at most one cycle, following lemma trivially holds.
If is a maximum-size induced forest in , then .
By the above lemmas, our goal now is to find a maximum acyclic subgraph of . Notice that there must be a clique () in that is not in . Now, for each arc in the circular-arc representation of , let and denote the two endpoints of in the clockwise order of the endpoints . Then, we consider two vertex sets and . Both and are interval graphs. Since there are vertices in , we compute interval graphs in total. Then, for each of these interval graphs, we apply Algorithm 1 to compute an optimal solution for MBS, and will return the one with maximum size as the final solution. Since Algorithm 1 runs in time, the total time to find is ; so we have the following theorem.
Let be a maximum-size induced bipartite subgraph of a circular-arc graph with vertices. Then, there is an algorithm that computes an induced bipartite subgraph of such that . The algorithm runs in time.
4 Approximation Algorithms
Recall that since MIS is NP-complete on unit disks and unit squares, the MBS problem is NP-complete on these graphs by Theorem 2.1. In this section, we first give PTASes for MBS on both unit squares and unit disks, and will then consider the problem on unit-height rectangles.
4.1 Unit disks and unit squares
In this section, we give a PTAS for the MBS problem on unit disks and unit squares. We first show the result for unit disks and will then discuss it for unit squares and for the weighted MBS problem.
Let be a set of unit disks in the plane, and let be a fixed integer. A PTAS running in time (where is a computable function polynomial in ) is straightforward using the shifting technique of Hochbaum and Maass  and the following packing argument: for an instance of the MBS problem, where the unit disks lie inside a square, an optimal solution cannot have more than unit disks. Hence, we can compute an exact solution for such an instance of the problem in time. Consequently, we obtain a PTAS running in the same time bound. To improve the running time to , we rely on the shifting technique again, but instead of applying the plane partitioning twice, we only partition the plane into horizontal slabs and solve the MBS problem for each of them exactly. This gives us the desired running time for our PTAS. We next describe the details of how to solve MBS exactly for a slab.
Let be a horizontal slab of height and let be the set of disks that lie entirely inside . The idea is to build a vertex-weighted directed acyclic graph such that finding a maximum-weight path from the source vertex to the target vertex corresponds to an exact solution for the MBS problem . To this end, let and () be two integers such that every disk in lies inside the rectangle bounded by and the vertical lines and . Partition vertically into unit-width boxes , where the left side of has the -coordinate , for all integers ; let denote the set of disks whose centers lie inside . Since has height and width 1, we can compute all feasible (not necessarily exact) solutions for the MBS problem on in time, where is a computable function polynomial in ; let be the set of all such feasible solutions. We now build a directed vertex-weighted acyclic graph as follows. The vertex set of is , where has one vertex for each solution in , for all . Moreover, the weight of each vertex is the number of disks in the corresponding bipartite graph. For every pair , where , consider two solutions and . Then, there exists an edge from the vertex of to that of in if the intersection graph induced by the disks in is bipartite. Finally, for all and for all : there exists an edge from to , and there exists an edge from to . The weights of vertices and are zero.
The MBS problem has a feasible solution of size on if and only if there exists a directed path from to with the total weight .
For a given directed -path with total weight , let be the union of all the disks corresponding to the interval vertices of this path. Then, the intersection graph of is bipartite because the disks in are disjoint from the disks in when . Moreover, when , the disks in must form an induced bipartite graph by the definition of an edge in . Since the total weight of the vertices on the path is , we have . On the other hand, let be a feasible solution of size for the MBS problem on . Then, the intersection graph of disks in is bipartite, for all . Hence, selecting the vertices corresponding to for all gives us a path with total weight from to .
By Lemma 5, the MBS problem for reduces to the problem of finding the maximum-weighted path from to on . The number of vertices of that correspond to feasible solutions for the MBS problem on disks in is bounded by , which is the bound on the number of vertices of that correspond to these feasible solutions. Hence, we can compute the edge set of in time, where is a computable function polynomial in for checking whether a subset of disks form a bipartite graph. Since is directed and acyclic, the maximum-weighted -path problem can be solved in linear time; so we have the following theorem.
There exists a PTAS for MBS on unit disk graphs that runs in time, where is a computable function that is polynomial in .
Ptas on unit squares.
One can verify that the above algorithm can be applied to obtain a PTAS for MBS on a set of unit squares, as well. Moreover, the algorithm extends to the weighted MBS problem on unit disks and unit squares. The only modification is, instead of assigning the number of disks (resp., squares) in a solution as the weight of the corresponding vertex, we assign the total weight of the disks (resp., squares) in the solution as the vertex weight.
There exists a PTAS for the MBS problem on unit squares running in time. Moreover, the weighted MBS problem also admits a PTAS running within the same time bound on unit disks and unit squares.
A 4-approximation on unit disks.
4.2 Unit-height rectangles
Here, we give an -time 2-approximation algorithm for MBS on a set of unit-height rectangles. To this end, suppose that the bottom side of the bottommost rectangle has -coordinate and the top side of the topmost rectangle has -coordinate . Consider the set of horizontal lines for all , where is a small constant; we may assume w.l.o.g. that each rectangle intersects exactly one line. Ordering the lines from bottom to top, let be the set of rectangles that intersect the horizontal line . We now run BipartiteInterval, once for when and once for when , and will then return the largest of these two solutions. We perform an initial sorting that takes time, and BipartiteInterval runs in time. This gives us the following theorem.
There exists an -time 2-approximation algorithm for the MBS problem on a set of unit-height rectangles in the plane.
5 Np-hardness of Mtfs
Here, we show that MTFS problem is NP-hard when geometric objects are axis-parallel rectangles. We give a reduction from the independent set problem on 3-regular planar graphs, which is known to be NP-complete .
Rim et al.  proved that MIS is NP-hard for planar rectangle intersection graphs with degree at most 3. They also gave a reduction from the independent set problem on 3-regular planar graphs. Given a 3-regular planar graph , they construct an instance of MIS problem in rectangle intersection graphs. First we outline their construction of from . For any cubic planar graph , it is always possible to get a rectilinear planar embedding of such that each vertex is drawn as a point , and each edge is drawn as a rectilinear path, connecting the points and , having at most four bends, and thus consisting of at most five straight line segments. They  construct a family of rectangles in the following way. For each point where , a rectangle is placed surrounding the point . In each rectilinear path connecting and , they place six rectangles such that i) intersects , ii) intersects , iii) intersects for iv) do not intersect any other rectangles in . For an illustration see Figure 1.
Clearly, is an axis-parallel rectangle intersection graph with degree at most 3 where and . In their reduction, the following lemma holds.
 has an independent set of size if and only if has an independent set of size .
Given , we construct an instance of MTFS problem in axis-parallel rectangles intersection graphs. For sake of understanding, let all rectangles corresponding to vertices in , i.e., all rectangles in are colored black. To get , we insert a family of red rectangles in the following way. For each pair of adjacent rectangles and in , we place a red rectangle such that i) intersects both and , ii) does not intersect any other rectangles in . As per construction of , it is always possible to place such a rectangle for each pair of adjacent rectangles in . See Figure 2 for an illustration of this transformation. This completes the construction of our instance of the MTFS problem on axis-parallel rectangles intersection graphs. Since contains rectangles, the above transformation can be done in polynomial time. Now is an axis-parallel rectangle intersection graph with underlying geometric objects .
Clearly the number of vertices in is . We now prove the following lemma.
has an independent set of size if and only if has a triangle-free subgraph on vertices.
Let has an independent set of vertices. Let be the set of rectangles corresponding to these vertices. Note that the rectangles in are independent. We take the subgraph of induced by the vertices corresponding to the rectangles . Now is triangle-free. Because if is not triangle-free then there is an intersection between two black rectangles in , that leads to a contradiction. As , so the claim holds.
Now we show the other direction. Let has a triangle-free subgraph on vertices. Let be the set of rectangles corresponding to the vertices of , where and . Also, let be the set of those red rectangles which has at most one adjacent rectangle in . Then clearly the graph with underlying rectangles has no triangles. So each rectangle in has exactly two neighbours in . Let denotes the set of edges in the subgraph induced by the vertices corresponding to the rectangles . Note that if there is a pair of adjacent rectangles and in then the rectangle should be part of . It implies that so . Now , so . This implies , hence . Now in we repeatedly remove the rectangles from to get an independent set of rectangles. Finally, within at most steps, we are left with a set of independent rectangles in with size . So there exists an independent set of size in .
has an independent set of size if and only if has a triangle-free subgraph on vertices.
We can now conclude the following theorem.
The MTFS problem is NP-complete on axis-parallel rectangle intersection graphs.
In this paper, we studied the problem of computing a maximum-size bipartite subgraph on geometric intersection graphs. We showed that the problem is NP-hard on the geometric graphs for which maximum independent set is NP-hard. On the positive side, we gave polynomial-time algorithms for solving the problem on interval graphs and circular-arc graphs. We furthermore obtained several approximation algorithms for the problem on unit squares, unit disks, and unit-height rectangles. Finally, we showed the NP-hardness of a simpler problem in which the goal is to compute a maximum-size induced triangle-free subgraph. We conclude by the following open questions:
Is their a polynomial-time algorithm for MBS on a set of unit disks intersecting a common horizontal line?
Does MBS admit a PTAS on unit-height rectangles, or is it APX-hard?
-  (1977) Comments on F. Hadlock’s paper: Finding a maximum cut of a planar graph in polynomial time. SIAM Journal on Computing 6 (1), pp. 86. Cited by: §1.
-  (2016) Maximum weighted induced bipartite subgraphs and acyclic subgraphs of planar cubic graphs. SIAM J. Discrete Math. 30 (2), pp. 1290–1301. Cited by: §1.
-  (2019) Computing maximum independent set on outerstring graphs and their relatives. In proceedings of the 16th International Symposium on Algorithms and Data Structures (WADS 2019), Edmonton, AB, Canada, pp. . Cited by: §1.
-  (1992) On improved time bounds for permutation graph problems. In International Workshop on Graph-Theoretic Concepts in Computer Science, pp. 1–10. Cited by: §1.
-  (2009) Maximum independent set of rectangles. In proceedings of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2009), New York, NY, USA, January 4-6, 2009, pp. 892–901. Cited by: §1.
-  (1989) Graph bipartization and via minimization. SIAM J. Discrete Math. 2 (1), pp. 38–47. Cited by: §1, §1.
-  (1990) Unit disk graphs. Discrete mathematics 86 (1-3), pp. 165–177. Cited by: §2.
-  (2007) The maximum induced bipartite subgraph problem with edge weights. SIAM J. Discrete Math. 21 (3), pp. 662–675. Cited by: §1.
-  (1997) Minimum feedback vertex sets in cocomparability graphs and convex bipartite graphs. Acta Informatica 34 (5), pp. 337–346. Cited by: §1.
-  (1999) Parameterized complexity. Monographs in Computer Science, Springer. Cited by: §2.
-  (2002) Computers and intractability. Vol. 29, wh freeman New York. Cited by: §1, §5.
-  (1975) Finding a maximum cut of a planar graph in polynomial time. SIAM J. Comput. 4 (3), pp. 221–225. Cited by: §1.
-  (1985) Approximation schemes for covering and packing problems in image processing and VLSI. J. ACM 32 (1), pp. 130–136. Cited by: §1, §4.1.
-  (2016) An algorithm for the feedback vertex set problem on a normal helly circular-arc graph. Journal of Computer and Communications 4 (08), pp. 23. Cited by: §1.
-  (1990) Independent set and clique problems in intersection-defined classes of graphs. Commentationes Mathematicae Universitatis Carolinae 31 (1), pp. 85–93. Cited by: §2.
-  (2008) Feedback vertex set on AT-free graphs. Discrete Applied Mathematics 156 (10), pp. 1936–1947. Cited by: §1.
-  (2015) Maximum independent set on B-VPG graphs. In Combinatorial Optimization and Applications, pp. 633–646. Cited by: §2.
-  (2009) Simpler parameterized algorithm for OCT. In Combinatorial Algorithms, 20th International Workshop, IWOCA 2009, Hradec nad Moravicí, Czech Republic, June 28-July 2, 2009, Revised Selected Papers, pp. 380–384. Cited by: §1.
-  (2012) Subexponential parameterized odd cycle transversal on planar graphs. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2012, December 15-17, 2012, Hyderabad, India, pp. 424–434. Cited by: §1.
-  (1997) A linear-time algorithm for the weighted feedback vertex problem on interval graphs. Information Processing Letters 61 (2), pp. 107–111. Cited by: §3.1.
-  (2005) Efficient approximation schemes for geometric problems?. In Algorithms - ESA 2005, 13th Annual European Symposium, Palma de Mallorca, Spain, October 3-6, 2005, Proceedings, pp. 448–459. Cited by: §2.
-  (2006) Parameterized complexity of independence and domination on geometric graphs. In International Workshop on Parameterized and Exact Computation, pp. 154–165. Cited by: §2.
-  (1998) Approximation algorithms for maximum independent set problems and fractional coloring problems on unit disk graphs. In Japanese Conference on Discrete and Computational Geometry (JCDCG 1998), Tokyo, Japan, December 9-12, 1998, pp. 194–200. Cited by: §4.1.
-  (2017) Faster approximation for maximum independent set on unit disk graph. Inf. Process. Lett. 127, pp. 58–61. Cited by: §4.1.
-  (2004) Finding odd cycle transversals. Oper. Res. Lett. 32 (4), pp. 299–301. Cited by: §1.
-  (1995) On rectangle intersection and overlap graphs. IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications 42 (9), pp. 549–553. Cited by: §5, Lemma 6.
Node- and edge-deletion np-complete problems.
Proceedings of the 10th Annual ACM Symposium on Theory of Computing, May 1-3, 1978, San Diego, California, USA, pp. 253–264. Cited by: §1.
-  (1981) Node-deletion problems on bipartite graphs. SIAM Journal on Computing 10 (2), pp. 310–327. Cited by: §1, §1.