I have a rectangular area R in the coordinate system and a set of points P lying inside R. All sides are parallel to the axes and all points are integers. I want to divide R into smaller rectangles in such a way that
(a) the sides of the rectangles either stick to the sides of R or include at least one point from P and
(b) within each rectangle there is exactly one point from P
I have to find the smallest amount of rectangles which would cover all points from P. An example is drawn here: http://i5.minus.com/jC5LnVhjk6soT.png The purple line would indicate an incorrect division because the upper rectangle does not include a point from P. The blue line, however, is quite alright, because both rectangles have a point from P within, so the correct output would be: 2, because this is the minimum amount of rectangles.
Does anyone have an idea of an algorithm/method to find the smallest number?
2x2rectangle a valid one?) - artur grzesiak