<p>This sounds like the minimum rectangle cover problem. </p>

<blockquote>
  <p>Given an orthogonal polygon with holes, find the minimum number of
  rectangles needed to cover the interior of the polygon without
  covering any of the holes.</p>
</blockquote>

<p>In your case, the red points mark the holes, and the blue points mark the interior of the polygon(s). In general, two blue regions might be disconnected, but then the minimum equals the sum of the minimum covers for the two disconnected regions. </p>

<p>Your problem can be easily mapped to the rectangle cover problem, and conversely the rectangle cover problem can be mapped to your problem assuming that all vertices of the polygon are on a grid, which can be assumed w.lo.g.</p>

<p>The bad news is that the minimum rectangle cover is NP-hard. It's also fairly hard to approximate in general (the best current approximation ratio is $O(\sqrt{\log n})$. However, if you had more information about the red and blue points, it's possible you might fall into one of the many special cases of rectangle cover that are easier to solve. </p>

CC BY-SA 3.0
2013-01-20T06:41:50.490Z
2013-01-20T06:41:50.490Z
Suresh Venkat
<p>There is a side problem in my research that I believe should be a known problem. I do not want to spend lots of time on a problem that already has been studied, but I do not have a name for the problem to search for it. I hope someone can help. The precise definition can be found on <a href="https://i.sstatic.net/xJRfp.jpg" rel="nofollow noreferrer">https://i.sstatic.net/xJRfp.jpg</a>. Here I explain it in an informal language. </p>

<p><strong>Problem definition:</strong> </p>

<p>There are two types of objects (say red and blue pieces) on a finite discrete 2-D space (the space is a closed subset of ZxZ). Number and locations of the pieces are arbitrary. Two pieces on the same coordinate are considered as one. It is not possible for a red piece and a blue piece to co-exist at the same coordinate. </p>

<p>In this space, we can define a rectangle by the coordinate of its upper-left and lower-right corners. The size and location of a rectangle can be anything but it is always parallel to X and Y axis. </p>

<p>I am looking for an algorithm to find the minimum number of rectangles that cover one type of the objects (say the blue pieces) only. Every and each blue piece should be inside or at the border of one or more rectangles, and no red piece can be on the border or inside any rectangle. The algorithm should return the coordinates of all such rectangles. </p>

<p>So, have you heard of this problem before? The first correct answer(s) will surely be acknowledged in my thesis.</p>

<p>Edit: I am searching for an algorithm of complexity smaller than exponential. The exhaustive search took forever to run and I had to stop the program. Also Evolutionary methods are not a good choice because of their long running time.</p>

<cg.comp-geom><optimization>
Covering only one of two types of objects in a cartesian space using minimum number of rectangles
user13376
# Covering only one of two types of objects in a cartesian space using minimum number of rectangles

(Asked by: username_0 on 2013-01-20)

There is a side problem in my research that I believe should be a known problem. I do not want to spend lots of time on a problem that already has been studied, but I do not have a name for the problem to search for it. I hope someone can help. The precise definition can be found on <https://i.sstatic.net/xJRfp.jpg>. Here I explain it in an informal language.

**Problem definition:**

There are two types of objects (say red and blue pieces) on a finite discrete 2-D space (the space is a closed subset of ZxZ). Number and locations of the pieces are arbitrary. Two pieces on the same coordinate are considered as one. It is not possible for a red piece and a blue piece to co-exist at the same coordinate.

In this space, we can define a rectangle by the coordinate of its upper-left and lower-right corners. The size and location of a rectangle can be anything but it is always parallel to X and Y axis.

I am looking for an algorithm to find the minimum number of rectangles that cover one type of the objects (say the blue pieces) only. Every and each blue piece should be inside or at the border of one or more rectangles, and no red piece can be on the border or inside any rectangle. The algorithm should return the coordinates of all such rectangles.

So, have you heard of this problem before? The first correct answer(s) will surely be acknowledged in my thesis.

Edit: I am searching for an algorithm of complexity smaller than exponential. The exhaustive search took forever to run and I had to stop the program. Also Evolutionary methods are not a good choice because of their long running time.

**Tags:** cg.comp-geom, optimization

---

## 1 answers

### Answer by username_1 on 2013-01-20. Score: 1

This sounds like the minimum rectangle cover problem.

> Given an orthogonal polygon with holes, find the minimum number of
> rectangles needed to cover the interior of the polygon without
> covering any of the holes.

In your case, the red points mark the holes, and the blue points mark the interior of the polygon(s). In general, two blue regions might be disconnected, but then the minimum equals the sum of the minimum covers for the two disconnected regions.

Your problem can be easily mapped to the rectangle cover problem, and conversely the rectangle cover problem can be mapped to your problem assuming that all vertices of the polygon are on a grid, which can be assumed w.lo.g.

The bad news is that the minimum rectangle cover is NP-hard. It's also fairly hard to approximate in general (the best current approximation ratio is $O(\sqrt{\log n})$. However, if you had more information about the red and blue points, it's possible you might fall into one of the many special cases of rectangle cover that are easier to solve.


---

