现在我们的分数是9减3,6分。
Now our score is 9 minus 3, or 6.
还不是最小值,但是比之前好了。
Still not optimal, but better.
对于这么小的画布,我们的选择不是很多。
With such a small canvas, there are only a few options.
但是让我们来看看当画布变大时会发生什么。
But let’s see what happens when the canvas gets bigger.
试一试8x8的,你能得到最低的分数是多少呢?
Try out an 8x8; what’s the lowest score you can get?
如果你想自己试一下的话就在这里暂停。
Pause here if you want to figure it out yourself.
答案在3秒后出现。
Answer in: 3
答案在2秒后出现。
Answer in: 2
答案在1秒后出现。
Answer in: 1
为了理解我们的想法,我们可以从之前开始:把画布先粗略的分成两半。
To get our bearings, we can start as before: dividing the canvas roughly in two.
这给我们一个5x8的长方形,有着40的面积,和一个3x8的长方形,有着24的面积,这样我们就有16分。
That gives us a 5x8 rectangle with area 40 and a 3x8 with area 24, for a score of 16.
这是个糟糕的分数。
That’s pretty bad.
把5x8的再分成5x5和5x3,我们就能得到10分。
Dividing that 5x8 into a 5x5 and a 5x3 leaves us with a score of 10.
好一点了,但是还不是最好的。
Better, but still not great.
我们可以继续分割最大的长方形。
We could just keep dividing the biggest rectangle.
但是这样就给我们留下越来越小的长方形,这会增加最大的和最小的长方形的面积差。
But that would leave us with increasingly tiny rectangles, which would increase the range between the largest and smallest.
我们真正想要的是让我们所有的长方形都处于一个很接近的范围。
What we really want is for all our rectangles to fall within a small range of area values.
因为画布的总面积是64,所以所有长方形的面积需要加起来是64。
And since the total area of the canvas is 64, the areas need to add up to that.
让我们把可能的长方形和面积列出来。
Let’s make a list of possible rectangles and areas.
为了提高之前的分数,让我们尝试去挑选一个在9或以下的值,然后加在一起等于64。
To improve on our previous score, we can try to pick a range of values spanning 9 or less and adding up to 64.
你会发现有些数字是要被舍弃的,因为像1x13和2x9的长方形并不能嵌入画布。
You’ll notice that some values are left out because rectangles like 1x13 or 2x9 won’t fit on the canvas.
你也有可能注意到如果你用了像是5,9或15这样奇数面积的长方形,你需要用另外一个奇数面积的长方形让它们的和为偶数。
You might also realize that if you use one of the rectangles with an odd area like 5, 9, or 15, you need to use another odd-value rectangle to get an even sum.
知道了这些,让我们来看看怎样能成功。
With all that in mind, let’s see what works.
这个问题没有什么巧妙地公式,全凭一点直觉。
There’s no trick or formula here – just a bit of intuition.