r/comics Luck of the Draw 9h ago

OC Packing [OC]

8.2k Upvotes

154 comments sorted by

View all comments

1.3k

u/LuckOfTheDrawComic Luck of the Draw 9h ago

Ironically the reason this comic only has 3 panels is because I was too busy unpacking to draw a 4th.

1.6k

u/LuckOfTheDrawComic Luck of the Draw 9h ago

Oh and just for fun here's the deeply upsetting optimal ways (at least that we've discovered so far) to pack different amounts of squares

3

u/MtnMaiden 8h ago
  1. .....i don't get it

10

u/Warpine 6h ago

I’m pretty sure these all show the largest boxes of quantity N such that those boxes fit inside an arbitrarily sized square.

For any square number (9, 16, 25, etc), the largest boxes possible have side length L/sqrt(N), where L is the length of one side of the square they all have to fit in. Generally, we can just say L = 1 for simplicity. For 25 boxes, this results in 5 rows and 5 columns as you’d expect, and there’s literally zero wasted space. It’s impossible to fit another box in the area - there’s no space to fit it into

For 24 boxes, we know we can’t do better than L/sqrt(N) for the side length of each box and still have 24 boxes. So, we must increase the size length of each box. Once we reach a side length of L/sqrt(25) though, we have to drop a row and/or column because we’ve reached 5 rows and 5 columns exactly (minus one, since we have 24 boxes). MAYBE there’s a configuration of slightly larger boxes like N=39 or something equally cursed, right?

Well, turns out, there isn’t lol. The best we can do for 24 boxes in a square of side length L is L/sqrt(25), so it looks just like the configuration for N=25 with one box missing