Suppose I have a grid containing 1's and 0's... How can I find the shortest list of rectangles (really, boundaries) that, together, cover all of the 1's and don't cover any 0's?
Currently, I'm repeatedly finding the largest rectangle in the grid, storing it's dimensions, and setting all of the cells in the area to 0, until they are all set to 0.
My two issues with this are: it seems very efficient, and I can't seem to prove that it actually covers the area in the fewest rectangles but I can't find any scenarios to disprove it either.
Update: I found a grid that disproves the method I described...
0000000
0000010
0111110
0000010
0000000
The horizontal string of 1's is the largest existing rectangle, but once removed, it splits the vertical string of 1's into two small rectangles... Clearly, this could be solved in just 2 rectangles.