Independent sets and hitting sets of bicolored rectangular families^{1}^{1}1A preliminary version of this work appeared in IPCO 2011 under the name “Jump Number of TwoDirectional Orthogonal Ray Graphs” soto2011jump ().
Abstract
A bicolored rectangular family BRF is a collection of all axisparallel rectangles contained in a given region of the plane formed by selecting a bottomleft corner from a set and an upperright corner from a set . We prove that the maximum independent set and the minimum hitting set of a BRF have the same cardinality and devise polynomial time algorithms to compute both. As a direct consequence, we obtain the first polynomial time algorithm to compute minimum biclique covers, maximum crossfree matchings and jump numbers in a class of bipartite graphs that significantly extends convex bipartite graphs and interval bigraphs. We also establish several connections between our work and other seemingly unrelated problems. Furthermore, when the bicolored rectangular family is weighted, we show that the problem of finding the maximum weight of an independent set is hard, and provide efficient algorithms to solve it on certain subclasses.
keywords:
Independent Set, Hitting Set, Axisparallel rectangles, Biclique Cover, Crossfree Matching, Jump Number.1 Introduction
Suppose we are given a collection of axisparallel closed rectangles in the plane. A subcollection of rectangles that do not pairwise intersect is called an independent set, and a collection of points in the plane intersecting (hitting) every rectangle is called a hitting set. In this paper we study the problems of finding a maximum independent set (MIS) and a minimum hitting set (MHS) of restricted classes of rectangles arising from bicolored pointsets in the plane, and relate them to other problems in graph and poset theory.
Both the MIS and its weighted version WMIS are important problems in computational geometry with a variety of applications DoerschlerF1992 (); LentSW1997 (); AgarwalKS1998 (); FukudaMMT2001 (); LewinNO2002 (). Since MIS is hard FowlerPT1981 (); ImaiA1983 (), a significant amount of research has been devoted to heuristics and approximation algorithms. Charlermsook and Chuzhoy ChalermsookC2009 (), and Chalermsook Chalermsook2011 () describe two different approximation algorithms for the MIS problem on a family of rectangles, while Chan and HarPeled ChanHP2012 () provide an approximation factor for WMIS. The approximation factor achieved by these polynomial time algorithms are the best so far for general rectangle families. Nevertheless, very recently Adamaszek and Wiese AdamaszekW2013 () presented a pseudopolynomial algorithm achieving a approximation for WMIS in general rectangles. For special classes of rectangle families, the situation is better: there are polynomial time approximation schemes (PTAS) for MIS in squares Chan2003 (), rectangles with bounded width to height ratio ErlebachJS2001 (), rectangles of constant height AgarwalKS1998 (), and rectangles forming a pseudodisc family, that is, the intersection of the boundaries of any two rectangles consists of at most two points AgarwalM2006 (); ChanHP2012 ().
The MHS problem is the dual of the MIS problem, and therefore the value of an optimal solution of MHS is an upper bound for that of MIS. The MHS problem is also hard FowlerPT1981 (), but there are also PTAS for special cases, including squares Chan2003 (), rectangles of constant height ChanM2005 () and pseudodiscs MustafaR2010 (). More recently, Aronov, Ezra, and Sharir AronovES2010 () proved the existence of nets of size for axisparallel rectangle families. Using Brönnimann and Goodrich’s technique BronnimannG1995 (), this yields an approximation algorithm for any rectangle family that can be hit by at most points yielding the best approximation guarantee for MHS known.
1.1 Main results
In this article we study both the MIS and MHS problems on a special class of rectangle families. Given two finite sets and an arbitrary set of the plane, we define the bicolored rectangle family (BRF) induced by , and as the set of all rectangles contained in , having bottomleft corner in and topright corner in . When is the entire plane, we write and we call it an unrestricted BRF.
Our main result is an algorithm that simultaneously finds an independent set and a hitting set of with . By linear programming duality, and are a MIS and a MHS of , respectively; meaning in particular that we have a maxmin relation between both quantities.
Our algorithm is efficient: if is the number of points in , both the MIS and the MHS of can be computed deterministically in time. If we allow randomization, we can compute them with high probability in time , where is the exponent of square matrix multiplication. Here we implicitly assume that testing if a rectangle is contained in can be done in unit time (by an oracle); otherwise, we need additional time, where is the time for testing membership in . The bottleneck of our algorithm is the computation of a maximum matching on a bipartite graph needed for an algorithmic version of the classic Dilworth’s theorem.
We also show that a natural linear programming relaxation for the MIS of BRFs can be used to compute the optimal size of the maximum independent set. Using an uncrossing technique, we prove that one of the vertices in the optimal face of the underlying polytope is integral, and we show how to find that vertex efficiently. This structural result about this linear program relaxation gives a second algorithm to compute the maximum independent set of a BRF and should be of interest by itself.
1.2 Biclique covers, crossfree matchings and jump number
Our results have some consequences for two graph problems called the minimum biclique cover and the maximum crossfree matching. Before stating the relation we give some background on these problems.
A biclique of a bipartite graph is the edge set of a complete bipartite subgraph. A biclique cover is a collection of bicliques whose union is the entire edge set. Two edges and cross if there is a biclique containing both. A crossfree matching is a collection of pairwise noncrossing edges.
The problem of finding a minimum biclique cover arises in many areas (e.g. biology NauMWA1978 (), chemistry CohenS99 () and communication complexity KushilevitzN97 ()). Orlin Orlin77 () has shown that finding a minimum biclique cover of a bipartite graph is hard. Müller Muller96 () extended this result to chordal bipartite graphs. To our knowledge, the only classes of graphs for which this problem has been explicitly shown to be polynomially solvable before our work are free bipartite graphs Muller96 (), distance hereditary bipartite graphs Muller96 (), bipartite permutation graphs Muller96 (), dominofree bipartite graphs AmilhastreJV97 () and convex bipartite graphs Gyori84 (); FranzblauK84 (). The proof of polynomiality for this last class can be deduced from the statement that the minimum biclique cover problem on convex bipartite graphs is equivalent to finding the minimum basis of a family of intervals. The latter was originally studied and solved by Győri Gyori84 (), but its connection with the minimum biclique problem was only noted several years later AmilhastreJV97 () (See Section 6 for more details).
The maximum crossfree matching problem is often studied because of its relation to the jump number problem in Poset Theory. The jump number of a partial order with respect to a linear extension is the number of pairs of consecutive elements in that are incomparable in . The jump number of is the minimum of this quantity over all linear extensions. Chaty and Chein ChatyC1979 () show that computing the jump number of a poset is equivalent to finding a maximum alternatingcyclefree matching in the underlying comparability graph, which is hard as shown by Pulleyblank Pulleyblank82 (). For chordal bipartite graphs, alternatingcyclefree matching and crossfree matchings coincide, making the jump number problem equivalent to the maximum crossfree matching problem. Müller Muller90 () has shown that this problem is hard for chordal bipartite graphs, but there are efficient algorithms to solve it on important subclasses. In order of inclusion, there are linear and cuadratic algorithms for bipartite permutation graphs SteinerS1987 (); Branstadt1989 (); Fauck1991 (), a cuadratic algorithm for biconvex graphs Branstadt1989 () and an time algorithm for convex bipartite graphs Dahlhaus1994 ().
To relate our results with the problems just defined consider the following construction. Given a BRF , create a bipartite graph with vertex color classes and identifying every rectangle with bottomleft corner and topright corner with an edge connecting and . The resulting graph is the graph representation of . We call the graphs arising in this way BRF graphs.
It is an easy exercise to check that for an unrestricted BRF graph—i.e., a graph where is unrestricted—two edges and cross if and only if and intersect as rectangles. In particular, the crossfree matchings of are in correspondence with the independent sets of . Similarly, the maximal bicliques of (in the sense of inclusion) are exactly the maximal families of pairwise intersecting rectangles in . Using the Helly property^{2}^{2}2If a collection of rectangles pairwise intersect, then there is a point hitting all of them. for axisparallel rectangles we conclude that the minimum hitting set problem on is equivalent to the minimum biclique cover of .
Our results imply then that for unrestricted BRF graphs, the maximum size of a crossfree matching equals the minimum size of a biclique cover and both optimizers can be computed in polynomial time. Since unrestricted BRFs are chordal bipartite ShresthaTU2010 (), we also obtain polynomial time algorithms to compute the jump number of unrestricted BRFs.
1.3 Additional results for the weighted case
We also consider the natural weighted version of MIS, denoted WMIS, where each rectangle in the family has a nonnegative weight, and we aim to find a collection of disjoint rectangles with maximum total weight. For BRFs, this problem is equivalent to finding a maximum weight crossfree matching of the associated BRF graph.
We show that this problem is hard for unrestricted BRFs and weights in . Afterwards, we present some results for certain subclasses. For bipartite permutation graphs, we provide an algorithm for arbitrary weights and a specialized algorithm when weights are in . We also note how the algorithm of Lubiw Lubiw1991 () for the maximum weight set of pointinterval pairs readily translates into an algorithm for the WMIS of convex graphs that runs in time. Recent results of Correa et al. CorreaFS14 (); CorreaFPS14 () can be used to extend the hardness to interval bigraphs and to provide a 2approximation algorithm for WMIS on this class.
1.4 Relation with other works
The minmax result relating independent sets and hitting sets in BRFs can also be obtained as a consequence of a deep duality result of Frank and Jordán for setpairs FrankJ95 (). Because of the many nontrivial connections between our work and other problems indirectly related to setpairs, we defer the introduction of this concept and the discussion of these connections to Section 6, when all our results have been introduced. Although the minmax result is a consequence of an existent result, our algorithmic proof is significantly simpler than those for the larger class of setpairs. And because of its geometrical nature, it is also more intuitive.
2 Preliminaries
We denote the coordinates of the plane as and , so that a point is written as . Given two points , , we write if and only if and . For any set , the projection of onto the axis is denoted by . Given two sets and in , we write if the projection is to the left of the projection , that is, if for all , . We extend this convention to and , as well as to the projections onto the axis. For our purposes, a rectangle is the cartesian product of two closed intervals. In other words, we only consider axisparallel closed rectangles. We say that two rectangles and intersect if they have a nonempty geometric intersection. A point hits a rectangle if . A collection of pairwise nonintersecting rectangles is called an independent set of rectangles. A collection of points is a hitting set of a rectangle family if each rectangle in is hit by a point in . We denote by and the sizes of a maximum independent set of rectangles in and a minimum hitting set for respectively.
The intersection graph of a collection of rectangles is the graph on having edges between intersecting rectangles:
Note that the independent sets of rectangles in are exactly the stable sets of . Furthermore, since has the Helly property, we can assign to every clique in a unique witness point, defined as the leftmost and lowest point contained in all rectangles of the clique. Since different maximal cliques have different witness points, it is easy to prove that admits a minimum hitting set consisting only of witness points of maximal cliques. In particular, equals the minimum size of a cliquecover of .
For both MIS and MHS, we can restrict ourselves to the family of inclusionwise minimal rectangles in : any maximum independent set in is also maximum in and any minimum hitting set for is also minimum for . Since the size of every independent set is at most the size of any hitting set, we observe that for any family ,
(1) 
2.1 Bicolored Rectangular Families (BRFs)
In what follows, let and be finite sets of white and gray points on the plane, respectively, and be a set not necessarily finite.
We denote by the rectangle with bottomleft corner and upperright corner . The set
is called the bicolored rectangular family (BRF) associated to .
We denote and use to denote the set . To make the exposition simpler, we will assume without loss of generality that , that , that the points in have integral coordinates^{3}^{3}3This can easily be done by translating the plane and applying piecewise linear transformation on the axis in , and that no two points of share a common coordinate value. Under these assumptions, we only need to consider hitting sets in . We also assume that the set is given implicitly, i.e. its size is not part of the input, and that we can test if a rectangle is contained in either in unit time (using an oracle) or in a fixed time .
A nonempty intersection between two rectangles and in is called a corner intersection if either rectangle contains a vertex of the other rectangle in its interior. Otherwise, the intersection is called cornerfree. A cornerfree intersection (c.f.i.) family is a collection of rectangles such that every intersection is cornerfree. These intersections are generically shown in Figure 1.
Cornerfree intersections families have a special structure, as the next proposition shows.
Proposition 2.1.
If is a c.f.i. family then is a comparability graph.
Proof.
Consider the relation on . given by if and only if and . It is easy to check that is a partial order relation. Since is a c.f.i. family, and intersect if and only if they are comparable under . Therefore is the comparability graph of ). ∎
The following lemma will also be useful later.
Lemma 2.2.
Every rectangle in does not contain any point in other than its two defining corners.
Proof.
Direct. ∎
2.2 Comparability intersection graphs
Let be a family of rectangles such that is the comparability graph of an arbitrary partial order . Independent sets in correspond then to antichains in ; therefore the maximum independent set problem in is equivalent to the maximum cardinality antichain problem in .
Rectangles hit by a fixed point are trivially pairwise intersecting; therefore they are chains in . By the Helly property, any family of pairwise intersecting rectangles is hit by single point. It follows that finding a minimum hitting set of is equivalent to finding a minimum size family of chains in covering all the elements of . The latter is the description of the minimum chain covering problem.
Dilworth’s theorem states that for any partial order, the maximum cardinality of an antichain equals the size of a minimum chain cover. In our context, this directly translate to:
Lemma 2.3.
If is a comparability graph then .
From an algorithmic perspective, finding a maximum antichain and a minimum chain covering on a partial ordered set can be done by computing a minimum vertex cover and a maximum matching on a bipartite graph (see, e.g. FordF1962 ()). Since for bipartite graphs a minimum vertex cover can be obtained from a maximum matching in time proportional to the number of edges in the graph Schrijver2003 (), the following result holds:
Lemma 2.4.
(See, e.g., FordF1962 ()) The maximum antichain and the minimum chain covering of a partial order can be found in , where is the number of elements in , is the number of pairs of comparable elements in , and is the running time of an algorithm that solves the bipartite matching problem with nodes and edges.
3 An LP based algorithm for MIS on BRFs
In this section we provide an integrality result for the natural linear relaxations of the MIS problem on BRFs. Consider an arbitrary family of rectangles (not necessarily a BRF) whose members have integer vertices in . The fractional clique constrained independent set polytope associated to is the polyhedron
The next result follows directly from Lovasz’s Perfect Graph Theorem Lovasz1972 ().
Proposition 3.1.
Given a family of rectangles with vertices in , the polytope is integral if and only if is a perfect graph.
For example, this is the case (by Proposition 2.1), when is a c.f.i. family, as comparability graphs are known to be perfect. Unfortunately, the same does not hold for BRFs. Figure 2 shows a BRF for which has a nonintegral vertex. Because this polytope is not a full description of the convex hull of characteristic vectors of independent sets, linear optimization over may lead to nonintegral solutions.
Nevertheless, we will prove that the linear program obtained when we optimize on the allones direction:
has an optimal integral solution. Recalling that is the integral version of , this result can be stated as follows:
Theorem 3.2.
Let be a nonempty BRF. There is an optimal integral solution for . In other words, .
To prove Theorem 3.2, we look at optimal solutions for minimizing the geometric area. More precisely, we consider the modified linear program , where denotes the geometric area of a rectangle and denotes the optimal cost of :
Here we are using the function , given by , but the argument that follows works for any function satisfying (1) Nonnegativity: , (2) Strict monotonicity: If , then , and (3) Crossing bisubmodularity: If , are two cornerintersecting rectangles in then .
Let be an arbitrary optimal extreme point of and let be the support of . Since minimizes weighted area, is a subset of the collection of inclusionwise minimal rectangles .
By Lemma 2.2, the only type of cornerintersection that can occur in is the one depicted in Figure 3 (a). Next, we prove that those intersections never arise in .
Proposition 3.3.
The family is c.f.i.
Proof.
Suppose that and are rectangles in with cornerintersection as in Figure 3 (a).
In Figure 3 (b) we show two rectangles, and , that also belong to . We modify , first reducing the values of and by and then increasing the values of and by . Let be this modified solution.
Since the weight of the rectangles covering any point in the plane can only decrease (that is, ), all the constraints must hold. We also have , and therefore is a feasible solution for . But the total weighted area of is units smaller than the one of the original solution , contradicting its optimality. ∎
The fact that the support of forms a cornerfree intersection family is all we need to prove the integrality of :
Proposition 3.4.
The point is integral. In particular, is a maximum independent set of .
Proof.
Since is the support of , the linear program also has as optimal solution. But is a comparability graph by Proposition 2.1; therefore, is integral. To conclude, we show that is an extreme point of . Indeed, if this does not hold, then can be written as convex combination of two points in , contradicting the fact that is extreme of . ∎
The previous proposition concludes the proof of Theorem 3.2. Furthermore, since has polynomially many variables and constraints, we obtain the following algorithmic result.
Theorem 3.5.
We can compute a MIS of a BRF in polynomial time.
4 A combinatorial algorithm for MIS and MHS of a BRF
In this section we devise an algorithm that constructs a maximum independent set and a minimum hitting set of a given BRF . The overall description of our algorithm is as follows. We first construct the family of inclusionwise minimal rectangles of . Using a greedy procedure, we then find a maximal c.f.i. family of rectangles . Next, we use Lemma 2.4 to construct an independent set and a hitting set of the same size for the family . Afterwards, we use a flipping procedure to transform into a set of the same cardinality in such a way that is also a hitting set for , and therefore for . Since and have the same cardinality, they are both optimal.
The following notation will be useful to describe our algorithm. Given a rectangle , let , , and be the bottomleft corner, topright corner, topleft corner and bottomright corners of , respectively. The notation is chosen so that if is a rectangle of the BRF , then and are the two defining corners of .
Let be the set of inclusionwise minimal rectangles of . The construction of the c.f.i. family uses a specific order in : We say that a rectangle precedes a rectangle in righttop order if the topleft corner of is lexicographically smaller than the topleft corner of , this is,

, or

and .
Let be the rectangles in sorted in righttop order. Observe that the topleft corners of these rectangles are sorted from left to right and, in case of ties, from bottom to top, hence the notation righttop order. In Figure 4 there is an example of rectangles sorted in this way.
To construct , we process the rectangles in the sequence one by one. The rectangle being processed is added to if its addition keeps cornerfree. The set obtained by this simple greedy procedure is a maximal c.f.i. subfamily of . As stated before, we then use Lemma 2.4 to compute a maximum independent set and a minimum hitting set for . As we will prove later, is actually a maximum independent set of the entire family . We can further assume that the points in have integral coordinates in , because every rectangle hit by is also hit by .
The last step of the algorithm consists of a flipping procedure that essentially moves the points of around so that, in their new position, they not only hit but the entire family . As we discuss in Section 6, the underlying ideas for this flipping algorithm are already present in Frank’s algorithmic proof of Gyri’s minmax result on intervals Frank99 ().
Consider a set and two points with , and . By flipping and in we mean to move these two points to the new coordinates and . More precisely, this means replacing by . The following lemma states that flipping points of that are inside a rectangle of can only increase the family of rectangles of that are hit by .
Lemma 4.1.
Let be a rectangle in that contains and . If is hit by then it is also hit by .
Proof.
Assume by contradiction that is hit by but not by . Assume also that is hit by (the case where is hit by is analogous). Since does not contain nor , the point must be in the region . In particular, . By Lemma 2.2, this contradicts the inclusionwise minimality of . ∎
We can now describe the flipping procedure. Let be the sequence of rectangles in in righttop order, and be a set initially equal to . In the th iteration of this procedure, we find the point in of minimum coordinate and the point in of maximum coordinate (breaking ties arbitrarily). Since we maintain as a hitting set for , both points and exist. We then check if both points can be flipped (i.e. if and ) and in that case, we update by flipping and . The description of our entire algorithm is depicted as Algorithm 1.
To analyze the correctness of Algorithm 1 we need an auxiliary definition. Recall that if a rectangle in the sorted sequence is not included in then must have cornerintersection with a rectangle with . The rectangle with largest index that has cornerintersection with is denoted as the witness of , and written as . By Lemma 2.2, the fact that precedes in righttop order implies that and .
Lemma 4.2.
After iteration of the flipping procedure, the set hits every rectangle in and every rectangle in with witness in .
Proof.
Observe that the algorithm only flips pairs of points that are inside a given rectangle of . By Lemma 4.1, the collection of rectangles hit by increases in every iteration. So we only need to prove that after iteration all the rectangles witnessed by are hit. We do this by induction.
If every rectangle witnessed by is hit at the end of iteration , we are done. Suppose then, that at then end of iteration there is at least one rectangle in witnessed by that has not been hit. Let and so that and . Since precedes in righttop order and they have cornerintersection, the relative position of both rectangles must be as depicted in Figure 5.
Observe that the rectangles and are in . We claim that and that is already hit by .
Let us prove the first claim. Assume this is not the case; then must have a witness in . Let be the bottomright corner of . Since and have cornerintersection and precedes , the point is in the interior of . Furthermore, since and are both in , cannot be in the interior of . We conclude that . See Figure 5 for reference. But since contains the topleft corner of in its interior (because and have cornerintersection) and does not contain on its interior (as otherwise would not be inclusionwise minimal), we conclude that precedes in righttop order. But then, is a rectangle in having cornerintersection with and appearing after in righttop order. This contradicts the definition of as witness of , and concludes the proof of the first claim.
Let us prove the second claim. If is in then we are done as is a hitting set for . So assume that . Let and . Since and have cornerintersection and precedes , is in the interior of . Furthermore, since both and are in , is not in the interior of . We conclude that . Since contains the topleft corner of in its interior (because and have cornerintersection), we deduce that precedes in righttop order. But then for and so, by induction hypothesis, rectangle was hit at the end of iteration . This concludes the proof of the second claim.
Recall that is not hit by at the end of iteration . Since is hit by the set must be nonempty. In particular, the point chosen by the algorithm, of minimum coordinate in must be in the zone . Similarly, since , it must be hit by and so the set is nonempty. Therefore, the point chosen by the algorithm of maximum coordinate in is in the zone . In particular, , and the point is in . We conclude that after flipping and in , the rectangle is hit. ∎
Thanks to the previous lemma we obtain our main combinatorial result.
Theorem 4.3.
Algorithm 1 returns an independent set and a hitting set of of the same cardinality. In particular, they are both optimal and .
Proof.
The fact that is an independent set of follows by construction and the fact that . By Lemma 4.2, the set returned by the algorithm hits all the elements in . Since every rectangle in contains a rectangle in , is also a hitting set of . Finally, since was constructed from via a sequence of flips which preserve cardinality and since by Lemma 2.3, we obtain that . As every hitting set has cardinality as least as large as every independent set, we conclude that both are optimal. ∎
It is quite simple to give a polynomial time implementation of Algorithm 1. In Subsection 4.1, we discuss an efficient implementation that runs in time, where . Here we are assuming that testing containment in can be done in unit time. Otherwise, we need additional time, where is the time for testing containment in .
4.1 Implementation of the combinatorial algorithm
To implement our algorithm it will be useful to have access to a data structure for dynamic orthogonal range queries. That is, a structure to store a dynamic collection of points in the plane, supporting insertions, deletions and queries of the following type: given an axisparallel rectangle , is there a point in ? And if there is one, report any.
There are many data structures we can use. For our purposes, it would be enough to use any structure in which each operation takes polylogarithmic (or even subpolynomial) time. For concreteness, we use the following result of Willard and Lueker WillardL1985 (), specialized to twodimensional Euclidean space.
Theorem 4.4 ((Willard and Lueker)).
There is a point data structure for orthogonal range queries in the plane on points supporting insertion, deletion and queries in time , and using space .
Using this data structure, we can easily implement Algorithm 1. Indeed, let us first see how to construct .
Start by inserting the points in and to the point data structure and creating an empty list . For each point in sorted from left to right and each point in from bottom to top check if is a rectangle in (i.e., if and if ) and if it has no points of in its interior using the data structure. If both conditions hold, add to the end of . Note that by going through in this order, the list is sorted in righttop order. It is easy to see that the entire procedure takes time .
Constructing is similar. Start by creating an empty list and a point data structure containing the bottomright corners of all rectangles in . Then, go through the ordered list once again and add the current rectangle to the end of if does not contain a point of in its interior. It is easy to see that we obtain the sorted c.f.i. family described in our algorithm in this way and that the entire procedure takes time .
Afterwards, construct the intersection graph in time and then use Lemma 2.4 to get a maximum independent set and a minimum hitting set^{4}^{4}4More precisely, the algorithm gives a chain partition of . This can be transformed into a hitting set of by selecting on each chain returned the bottomleft point of the mutual intersection of all rectangles in the chain. The extra processing time needed is dominated by . of in time .
To implement the flipping procedure, we initialize a point data structure containing at every moment. Note that as is itself a hitting set of . In each of the iterations of the flipping procedure we need to find the lowest point and the rightmost point of a range query. This can be done using binary search and the query operation of the data structure losing an extra logarithmic factor, i.e., in time . To flip two points of , we perform two deletions and two insertions in time . The entire flipping procedure takes time .
In Subsection 4.2 we prove that and . By using these bounds and the previous discussion, we conclude that Algorithm 1 can be implemented to run in time
Hopcroft and Karp’s hopcroft1973n () algorithm for maximum matching on a bipartite graph with vertices and edges runs in time . Specializing this to and , is time . On the other hand, Mucha and Sankowski mucha2004maximum () have devised a randomized algorithm that returns with high probability a maximum matching of a bipartite graph in time , where is the exponent for square matrix multiplication. The current best upper bound for is approximately by Williams Williams12 (). From this discussion, we obtain the following result.
Theorem 4.5.
We can implement Algorithm 1 to run in time
where and is the time needed to test if a rectangle is contained in . Using Hopcroft and Karp’s implementation, this is
Using Mucha and Sankowski’s randomized algorithm, the running time can be reduced to
where is the exponent for square matrix multiplication.
4.2 Bounds for .
The bounds we prove on this section are valid for every cornerfree intersection subfamily of . Given one such family , define its lowerleft corner set and its upperright corner set . We start with a simple result.
Lemma 4.6.
If all the rectangles of intersect a fixed vertical (or horizontal) line , then
Proof.
Project all the rectangles in onto the line to obtain a collection of intervals in the line. Since is a c.f.i. family, the collection of intervals forms a laminar family: if two intervals intersect, then one is contained in the other. Let be the collection of extreme points of the intervals. Since by assumption no two points in share coordinates, and furthermore, every interval is a nonsingleton interval. To conclude the proof of the lemma we use the following known fact, which can be proved by induction: every laminar family of nonsingleton intervals with extreme points in has cardinality at most . ∎
Now we consider the situation where the family is not necessarily stabbed by a single line.
Lemma 4.7.
Let be a collection of vertical lines that intersect all the rectangles in , then
Proof.
Assume that is sorted from left to right. Consider the following collections of vertical lines:
The collections form a partition of . Include each rectangle in into the set , , of largest index such that contains a vertical line that intersects . See Figure 6 for an example illustrating this construction.
Fix an index . Every rectangle in intersect a unique line in (if it intersects two or more, then it would also intersect a line in ). For a given line , let be the family of rectangles in intersecting . By Lemma 4.6, the number of rectangles in is at most . Every point in belongs to exactly one set in . It belongs to the one corresponding to the first line is the first line on or to the right of . Therefore, , and similarly, . Altogether we get . Summing over we obtain .∎
If is the c.f.i. family obtained with Algorithm 1, then vertical lines are enough to intersect all rectangles in . Therefore, . Let us now bound the number of edges of the intersection graph .
Lemma 4.8.
Proof.
Let . Let also be the maximum possible value of as a function of . Recall that the vertices of all rectangles in are in the grid . Consider the vertical line that divides the grid in two roughly equal parts. Count the edges in as follows. Let be the edges connecting pairs of rectangles that are totally to the left of , be the edges connecting pairs of rectangles that are totally to the right of , and be the remaining edges. We trivially get that and . We bound the value of in a different way.
Let be the rectangles intersecting the vertical line . Then, is exactly the collection of edges in having an endpoint in . By Lemma 4.6, . Now we bound the degree of each element of in . Consider one rectangle . Every rectangle intersecting must intersect one of the four lines defined by its sides. By using again Lemma 4.6, we conclude that the degree of in is at most . Therefore, the number of edges having an endpoint in is at most .
We conclude that satisfies the recurrence from which, .∎
To finish this section, we note that it is is very easy to construct a family , for which . See Figure 7 for an example. In this example, was obtained using the greedy procedure. Also, if we let , then and .
On the other hand, it is not clear if there are examples achieving . In particular, we give the following conjecture
Conjecture 4.9.
For any c.f.i. family with vertices in , .
If this conjecture holds, it is easy to get better bounds for the running time of Algorithm 1.
5 WMIS of BRFs and maximum weight crossfree matching
We now consider the problem of finding a maximum weight independent set of the rectangles in a BRF with weights . This problem is significantly harder than the unweighted counterpart.
Theorem 5.1.
The maximum weight independent set problem is hard for unrestricted BRFs even for weights in .
Proof.
We reduce from the maximum independent set of rectangles problem, which is hard even if the vertices of the rectangles are all distinct FowlerPT1981 (). Given an instance with the previous property, let (resp. ) be the set of lowerleft (resp. upperright) corners of rectangles in . Note that so we can find a maximum independent set of by finding a maximum weight independent set in , where we give unit weight to each rectangle , and zero weight to every other rectangle. ∎
Despite this negative result, we can still provide efficient algorithms for some interesting subclasses of BRFs graphs . Since independent sets of are in one to one correspondence with crossfree matchings of , the problem we are studying in this section is equivalent to finding a maximum weight crossfree matching of .
5.1 A hierarchy of subclasses of BRFs
We recall the following definitions of a nested family of bipartite graph classes. We keep the notation since they are all BRF graphs.
A bipartite permutation graph (or bipartite 2dimensional graph) is the comparability graph of a two dimensional partially ordered set of height 2, where is the set of minimal elements and is the complement of this set. For our purposes, a two dimensional partially ordered set is simply a collection of points in with the relation if and .
A convex bipartite graph is a bipartite graph admitting a labeling of so that the neighborhood of each is a set of consecutive elements of . A biconvex graph is a convex bipartite graph for which there is also a labeling for so that the neighborhood of each is consecutive in .
In an interval bigraph, each vertex is associated to a real closed interval (w.l.o.g. with integral extremes) so that and are adjacent if and only if .
A two directional orthogonal ray graph (2dorg) is a bipartite graph on where each vertex is associated to a point , so that and are connected if and only the rays and intersect each other. Since this condition is equivalent to , two directional orthogonal ray graphs are exactly the unrestricted BRFs graphs.
It is known that the following strict inclusions hold for these classes BrandstadtLS1999 (); ShresthaTU2010 (): bipartite permutation biconvex convex interval bigraph 2dorg. There are also polynomial time algorithms to recognize if a graph belongs to any of these classes ShresthaTU2010 (); spinrad2003efficient (); muller1997recognizing (). On the other hand, the problem of recognizing general (restricted) BRF graphs is open.
We give a simple geometrical interpretation of some of the classes presented above as unrestricted BRFs. The equivalence between the definitions below and the ones above are simple so the proof of equivalence is omitted. Bipartite permutation graphs are simply the unrestricted BRF graphs where no two points in the same color class are comparable under . Let be the integer points of the diagonal line . Similarly, let and be the points weakly above and weakly below . Convex bipartite graphs are those unrestricted BRF graphs where and . Interval bigraphs are those unrestricted BRF graphs where and .
In the following subsections we investigate the maximum weight crossfree matching problem on these subclasses.
5.2 Bipartite permutation graphs
Every bipartite permutation graph is the graph representation of a BRF such that no two points in the same color class ( or ) are comparable under . In this case we say that is a bipartite permutation BRF and we can define a partial order on its rectangles. We say that if and are disjoint and at least one of and holds. It is not hard to verify (see, e.g., Brandstädt Branstadt1989 ()) that is a partial order whose comparability graph is the complement of . In what follows, we use this fact to devise polynomial time algorithms for the maximum weight independent set of bipartite permutation BRFs.
Observe that is a perfect graph (because so is its complement Lovasz1972 ()); therefore, using Proposition 3.1 we can compute a maximum weight independent set of in polynomial time by finding an optimal vertex of