Cut rectangle in minimum number of squares

前端 未结 6 1457
-上瘾入骨i
-上瘾入骨i 2020-12-28 17:29

I\'m trying to solve the following problem:

A rectangular paper sheet of M*N is to be cut down into squares such that:

  1. The paper i
6条回答
  •  独厮守ぢ
    2020-12-28 18:26

    I think both the DP and greedy solutions are not optimal. Here is the counterexample for the DP solution:

    Consider the rectangle of size 13 X 11. DP solution gives 8 as the answer. But the optimal solution has only 6 squares.

    This thread has many counter examples: https://mathoverflow.net/questions/116382/tiling-a-rectangle-with-the-smallest-number-of-squares

    Also, have a look at this for correct solution: http://int-e.eu/~bf3/squares/

提交回复
热议问题