3 ms·
This is indeed an interesting problem. If you just want to minimize the number of rectangles there is a neat solution on stackoverflow [1] that uses minimum ver
by 256 9y ago
This is indeed an interesting problem. If you just want to minimize the number of rectangles there is a neat solution on stackoverflow [1] that uses minimum vertex cover (equivalently, bipartite maximum matching).
[1] https://stackoverflow.com/a/6634668 https://stackoverflow.com/a/6634668
- mythas 9y agoBut the goal here really isn’t to minimize the number of pieces used. It is to minimize total cost of covering the space. This makes things much more complex as it turns into some weird variant of a knapsack problem.