# Arrange the wooden blocks in the box

Little Johnny is the naughtiest child in the kindergarden today. The kind who always wants more than the other children. When he saw that little Tim was playing with the same set of wooden blocks as he had, he stole one cube from Tim. Little Tim complains to the teacher.

The teacher comes to settle the problem. She asks Johnny:

• Did you take a wooden block from Tim?
• I did not!
• Let's see, it seems you have more blocks than those that were in the box I gave you.
• Not true. They were all in the box!
• Really? OK, show me how they all fit in the box. If they fit, you are forgiven. But if you can't put them back, you will be punished for stealing AND for lying.

Johnny is cornered. He has to find a solution fast. He starts to arrange the blocks in the box, ... very ... slowly ..., shuffling the blocks around. But Johnny is not only naughty, he is also clever. Even though it seemed impossible, he finds a way to fit all the blocks in the box.

Show me how he did.

Here are the blocks

And here is the box. At scale with the blocks.

Note: all blocks are one unit high, the same as the depth of the box. The small squares represent cubes. The narrow blocks at the right have the same height and cannot be stacked on top of each other to save space. Think of it as a 2D problem.

Disclaimer: being clever is no excuse for stealing and lying. These are still bad. Don't do it.

Addendum: I wasn't specific about the size of the box. Maybe I should have. The picture depicts a box of size 8.10 precisely, so that is what I was hoping for. But feel free to post your best solution, and upvote those you think are nice.

• One unit is the size of the small squares. These are supposed to be cubes. The box is 8x8 inits inside with a tiny gap and 1 unit in depth. You can rely on the size of the images. Commented Sep 9, 2021 at 18:25
• Not sure how, as it almost the reverse of the problem, but as we're trying to fit 65 units into 64, this must somehow be related to the 64 = 65 illusion, or the missing square problem. However this time its the other way round, trying to go into a 8x8 grid instead of from it... Commented Sep 9, 2021 at 18:54
• The blocks are multiples of 40 pixels wide (call it 1 unit) while the box is 324 pixels, or 8.1 units wide. The blocks cover 65 square units, while the box contains 8.1^2=65.61 square units, so there is technically enough space. Commented Sep 10, 2021 at 0:02
• @2012rcampion Exactly. In fact 323 pixels would already be enough. I just felt generous and offered a pixel for free. :-) Commented Sep 10, 2021 at 0:10

I'll give it a shot. Two shots, actually.

This comes out at just under 1% too large (in terms of length, area would be roughly twice that). More specifically, both width and height equal $$5\times\sqrt 2 + 1\approx 8.071068$$

Old, overly complicated solution:

Note that there is some wiggle room for trading height for width. If we use that to balance the excess lengths in x and y then each comes out at just under 2%.

• I have to say, I am impressed. Nice solution. If my calculations are correct this requires a box of size 8.157 x 8.157. This is probably within the margin of a usual wooden block box. So you are correct ... almost. The picture of the box allows for 4 extra pixels, that is a size 8.10. And there is a solution within 1% increase, i.e a box of size 8.08. Commented Sep 9, 2021 at 23:03
• @FlorianF It doesn't by any chance happen to be 8.07106781...? Commented Sep 9, 2021 at 23:16
• This is oddly specific. It cannot be this by chance. But I like that number. Commented Sep 9, 2021 at 23:20
• @FlorianF My eternal weakness, always omit to check the simple stuff first. I have to say, though, I was expertly misled by all those fancy shape red herrings. I'll be back once I've made a new picture. Commented Sep 9, 2021 at 23:34

Loopy got the solution.

Just for reference here is the solution I prepared.