We actually haven’t found a universal packing algorithm, so it’s on a case-by-case basis. This is the best we’ve found so far for this case (17 squares in a square).
It’s kinda hilarious when the best formula only handles large numbers, not small. You’d think it would be the reverse, but sometimes it just isn’t (something about the law of large numbers making it easier to approximate good solution, in many cases)
Do you know how inspiring documentaries describe maths are everywhere, telling us about the golden ratio in art and animal shells, and pi, and perfect circles and Euler’s number and natural growth, etc? Well, this, I can see it really happening in the world.
LoreleiSankTheShip@lemmy.ml
on 01 Jul 18:00
nextcollapse
Can someone explain to me in layman’s terms why this is the most efficient way?
Devadander@lemmy.world
on 01 Jul 18:06
nextcollapse
Any other configurations results in a larger enclosed square. This is the most optimal way to pack 17 squares that we’ve found
Thankfully the perceived hostility was then dispelled with a followup comment calling people cretins.
…wait.
tiramichu@sh.itjust.works
on 01 Jul 18:26
nextcollapse
These categories of geometric problem are ridiculously difficult to find the definitive perfect solution for, which is exactly why people have been grinding on them for decades, and mathematicians can’t say any more than “it’s the best one found so far”
For this particular problem the diagram isn’t answering “the most efficient way to pack some particular square” but “what is the smallest square that can fit 17 unit-sized (1x1) squares inside it” - with the answer here being 4.675 unit length per side.
Trivially for 16 squares they would fit inside a grid of 4x4 perfectly, with four squares on each row, nice and tidy. To fit just one more square we could size the container up to 5x5, and it would remain nice and tidy, but there is then obviously a lot of empty space, which suggests the solution must be in-between. But if the solution is in between, then some squares must start going slanted to enable the outer square to reduce in size, as it is only by doing this we can utilise unfilled gaps to save space by poking the corners of other squares into them.
So, we can’t answer what the optimal solution exactly is, or prove none is better than this, but we can certainly demonstrate that the solution is going to be very ugly and messy.
Another similar (but less ugly) geometric problem is the moving sofa problem which has again seen small iterations over a long period of time.
cyrano@lemmy.dbzer0.com
on 01 Jul 19:09
nextcollapse
Thanks for the explanation
DozensOfDonner@mander.xyz
on 01 Jul 19:28
nextcollapse
Requiem is the best movie that I’ve only wanted to watch once.
CascadianGiraffe@lemmy.world
on 01 Jul 21:59
collapse
It’s also a great name for a cover band.
Butt rock covers of gospel songs perhaps?
blackbrook@mander.xyz
on 01 Jul 23:03
nextcollapse
All this should tell us is that we have a strong irrational preference for right angles being aligned with each other.
DominatorX1@thelemmy.club
on 02 Jul 16:21
collapse
We have an interpreter in our head. It maps and makes sense of the mysterious whatever. Some of it cultural, some biological. It is vast. There might not even be things and space.
Well yes, and what it means for “there to be things” is a whole discussion in itself. But the concepts of space and time are rather deep and fundamental (to our mental models regardless of how or if that maps to objective reality). The preference for right angles is much less fundamental and we can see past and get over it.
DominatorX1@thelemmy.club
on 02 Jul 19:11
collapse
My point is, when we study our preference for right angles, what we’re studying is the interpreter. It has quirks.
DominatorX1@thelemmy.club
on 02 Jul 13:10
collapse
For A problem like this. If I was going to do it with an algorithm I would just place shapes at random locations and orientations a trillion times.
It would be much easier with a discreet tile type system of course
GenderNeutralBro@lemmy.sdf.org
on 01 Jul 18:29
nextcollapse
It’s not necessarily the most efficient, but it’s the best guess we have. This is largely done by trial and error. There is no hard proof or surefire way to calculate optimal arrangements; this is just the best that anyone’s come up with so far.
It’s sort of like chess. Using computers, we can analyze moves and games at a very advanced level, but we still haven’t “solved” chess, and we can’t determine whether a game or move is perfect in general. There’s no formula to solve it without exhaustively searching through every possible move, which would take more time than the universe has existed, even with our most powerful computers.
Perhaps someday, someone will figure out a way to prove this mathematically.
5 and 10 are interesting because they are one larger than a square number (2^2 and 3^2 respectively). So one might naively assume that the same category of solution could fit 4^2 + 1, where you just take the extra square and try to fit it in a vertical gap and a horizontal gap of exactly the right size to fit a square rotated 45°.
But no, 17 is 4^2 + 1 and this ugly abomination is proven to be more efficient.
a_party_german@hexbear.net
on 01 Jul 18:34
nextcollapse
It’s a problem about minimizing the side length of the outer rectangle in order to fit rectangles of side length 1 into it.
It’s somehow the most efficient way for 17 rectangles because math.
These are the solutions for the numbers next to 17:
red_bull_of_juarez@lemmy.dbzer0.com
on 01 Jul 18:58
collapse
It crams the most boxes into the given square. If you take the seven angled boxes out and put them back in an orderly fashion, I think you can fit six of them. The last one won’t fit. If you angle them, this is apparently the best solution.
What I wonder is if this has any practical applications.
7bicycles@hexbear.net
on 01 Jul 19:33
nextcollapse
yeah it vindicates my approach of packing stuff via just throwing it in there. no I’m not lazy and disorderly, this is optimal cargo space usage
Why are there gaps on either side of the upper-right square? Seems like shoving those closed (like the OP image) would allow a little more twist on the center squares.
superb@lemmy.blahaj.zone
on 01 Jul 19:14
nextcollapse
I think this diagram is less accurate. The original picture doesn’t have that gap
there’s a gap on both, just in different places and you can get from one to the other just by sliding. The constraints are elsewhere so wouldn’t allow you to twist.
avattar@lemmy.sdf.org
on 02 Jul 01:57
nextcollapse
If you can put the diagonal squares from the 17 solution in a 2-3-2 configuration, I can almost see a pattern. I wonder what other configurations between 17 and 132 have a similar solution?
WorldsDumbestMan@lemmy.today
on 02 Jul 19:21
collapse
Why can’t it be stacked up normally? I don’t understand.
You could arrange them that way, but the goal is to find the way to pack the small squares in a way that results in the smallest possible outer square. In the solution shown, the length of one side of the outer square is just a bit smaller than 12. If you pack them normally, the length would be larger than exactly 12. (1 = the length of one side of the smaller squares.)
Grandwolf319@sh.itjust.works
on 01 Jul 18:19
nextcollapse
But there are 7 squares in the middle with 10 around it, surely that counts for something
The outer square is not given or fixed, it is the result of the arrangement inside. You pack the squares as tightly as you can and that then results in an enclosing square of some size. If someone finds a better arrangement the outer square will become smaller
Melatonin@lemmy.dbzer0.com
on 01 Jul 18:58
nextcollapse
I love when I have to do research just to understand the question being asked.
Just kidding, I don’t really love that.
RustyNova@lemmy.world
on 01 Jul 19:39
nextcollapse
My point was that it doesn’t break my brain at all when considering there’s an artificial constraint that affects efficiency and there’s just not going to be a perfect solution for every number of squares when you consider the problem for more than just 17 squares
The proof is done with raw numbers and geometry so doing it with physical objects would be worse, even the MS paint is a bad way to present it but it’s easier on the eyes than just numbers.
Mathematicians would be very excited if you could find a better way to pack them such that they can be bigger.
So it’s not like there is no way to improve it. It’s just that we haven’t found it yet.
TimewornTraveler@lemmy.dbzer0.com
on 02 Jul 11:31
nextcollapse
the line of man is straight ; the line of god is crooked
stop quoting Nietzsche you fucking fools
SpongyAneurysm@feddit.org
on 02 Jul 14:01
nextcollapse
“fractal” just means “broken-looking” (as in “fracture”). see Benoît Mandelbrot’s original book on this
I assume you mean “nice looking self-replicating pattern”, which you can easily obtain by replacing each square by the whole picture over and over again
(Don’t ask about the glowing thing, just don’t let it touch your eyes.)
SpongyAneurysm@feddit.org
on 02 Jul 22:31
collapse
Good job. It’skinda what I expected, except for the glow. But I won’t ask about that.
BowtiesAreCool@lemmy.world
on 02 Jul 22:51
collapse
The glow is actually just a natural biproduct of the sheer power of the sq1ua7re
bitjunkie@lemmy.world
on 02 Jul 19:01
nextcollapse
It’s important to note that while this seems counterintuitive, it’s only the most efficient because the small squares’ side length is not a perfect divisor of the large square’s.
He’s saying the same thing. Because it’s not an integer power of 2 you can’t have a integer square solution. Thus the densest packing puts some boxes diagonally.
this is regardless of that. The meme explains it a bit wierdly, but we start with 17 squares, and try to find most efficient packing, and outer square’s size is determined by this packing.
Did you comment this because you think the people here are stupid?
dream_weasel@sh.itjust.works
on 03 Jul 11:20
nextcollapse
Bro, the people here, like the people everywhere, ARE stupid.
It’s always better to be explicit. I’m one of the stupid people who learned some things reading the comments here and I’ve got a doctoral degree in aero astro engineering.
That’s not more efficient because the big square is bigger
JackbyDev@programming.dev
on 03 Jul 20:46
nextcollapse
I think people have a hard time wrapping their heads around it because it’s very rare to have this sort of problem in the real world. Typically you have a specific size container and need to arrange things in it. You usually don’t get to pick an arbitrary size container or area for storage. Even if you for something like shipping, you’d probably want to break this into a 4x4 and a separate single box to better fit with other things being shipped as well. Or if it is storage you’d want to be able to see the sides or tops. Plus you have 3 dimensions to work with on the real world.
NigelFrobisher@aussie.zone
on 03 Jul 22:31
collapse
See, that’s the problem with people nowadays?They want to minimalise everything.
threaded - newest
if I ever have to pack boxes like this I’m going to throw up
I’ve definitely packed a box like this, but I’ve never packed boxes like this 😳
Oh so you’re telling me that my storage unit is actually incredibly well optimised for space efficiency?
Nice!
If there was a god, I’d imagine them designing the universe and giggling like an idiot when they made math.
Is this a hard limit we’ve proven or can we still keep trying?
It’s the best we’ve found so far
We actually haven’t found a universal packing algorithm, so it’s on a case-by-case basis. This is the best we’ve found so far for this case (17 squares in a square).
<img alt="" src="https://lemmy.world/pictrs/image/9ed0ba9e-dcf2-40e2-bdc7-83fdd7090e66.jpeg">
Figuring out 1-4 must have been sooo tough
It’s kinda hilarious when the best formula only handles large numbers, not small. You’d think it would be the reverse, but sometimes it just isn’t (something about the law of large numbers making it easier to approximate good solution, in many cases)
Do you know how inspiring documentaries describe maths are everywhere, telling us about the golden ratio in art and animal shells, and pi, and perfect circles and Euler’s number and natural growth, etc? Well, this, I can see it really happening in the world.
Can someone explain to me in layman’s terms why this is the most efficient way?
Any other configurations results in a larger enclosed square. This is the most optimal way to pack 17 squares that we’ve found
Source?
In the meme.
Bidwell, J. (1997)
Seriously?
lemmy.world/post/32326900
Try this page if you want to read more about it:
erich-friedman.github.io/papers/…/squares.html
Thank you, that’s very helpful - unlike cretins downvoting me for asking a question.
Upvoted.
That’s because when you just type “source?” and nothing else people perceive it as you challenging/denying the claim in a slightly hostile manner
Thankfully the perceived hostility was then dispelled with a followup comment calling people cretins.
…wait.
These categories of geometric problem are ridiculously difficult to find the definitive perfect solution for, which is exactly why people have been grinding on them for decades, and mathematicians can’t say any more than “it’s the best one found so far”
For this particular problem the diagram isn’t answering “the most efficient way to pack some particular square” but “what is the smallest square that can fit 17 unit-sized (1x1) squares inside it” - with the answer here being 4.675 unit length per side.
Trivially for 16 squares they would fit inside a grid of 4x4 perfectly, with four squares on each row, nice and tidy. To fit just one more square we could size the container up to 5x5, and it would remain nice and tidy, but there is then obviously a lot of empty space, which suggests the solution must be in-between. But if the solution is in between, then some squares must start going slanted to enable the outer square to reduce in size, as it is only by doing this we can utilise unfilled gaps to save space by poking the corners of other squares into them.
So, we can’t answer what the optimal solution exactly is, or prove none is better than this, but we can certainly demonstrate that the solution is going to be very ugly and messy.
Another similar (but less ugly) geometric problem is the moving sofa problem which has again seen small iterations over a long period of time.
Thanks for the explanation
Lol, the ambidextrous sofa. It’s a butt plug.
For two!
Now I want to rewatch Requiem for a dream.
Requiem is the best movie that I’ve only wanted to watch once.
It’s also a great name for a cover band.
Butt rock covers of gospel songs perhaps?
All this should tell us is that we have a strong irrational preference for right angles being aligned with each other.
We have an interpreter in our head. It maps and makes sense of the mysterious whatever. Some of it cultural, some biological. It is vast. There might not even be things and space.
Well yes, and what it means for “there to be things” is a whole discussion in itself. But the concepts of space and time are rather deep and fundamental (to our mental models regardless of how or if that maps to objective reality). The preference for right angles is much less fundamental and we can see past and get over it.
My point is, when we study our preference for right angles, what we’re studying is the interpreter. It has quirks.
For A problem like this. If I was going to do it with an algorithm I would just place shapes at random locations and orientations a trillion times.
It would be much easier with a discreet tile type system of course
It’s not necessarily the most efficient, but it’s the best guess we have. This is largely done by trial and error. There is no hard proof or surefire way to calculate optimal arrangements; this is just the best that anyone’s come up with so far.
It’s sort of like chess. Using computers, we can analyze moves and games at a very advanced level, but we still haven’t “solved” chess, and we can’t determine whether a game or move is perfect in general. There’s no formula to solve it without exhaustively searching through every possible move, which would take more time than the universe has existed, even with our most powerful computers.
Perhaps someday, someone will figure out a way to prove this mathematically.
They proved it for n=5 and 10.
And the solutions we have for 5 or 10 appear elegant: perfect 45° angles, symmetry in the packed arrangement.
5 and 10 are interesting because they are one larger than a square number (2^2 and 3^2 respectively). So one might naively assume that the same category of solution could fit 4^2 + 1, where you just take the extra square and try to fit it in a vertical gap and a horizontal gap of exactly the right size to fit a square rotated 45°.
But no, 17 is 4^2 + 1 and this ugly abomination is proven to be more efficient.
It’s a problem about minimizing the side length of the outer rectangle in order to fit rectangles of side length 1 into it.
It’s somehow the most efficient way for 17 rectangles because math.
These are the solutions for the numbers next to 17:
<img alt="" src="https://hexbear.net/pictrs/image/ee3a8fe0-2c61-4853-8af4-aa9cf20f2cfa.png">
It crams the most boxes into the given square. If you take the seven angled boxes out and put them back in an orderly fashion, I think you can fit six of them. The last one won’t fit. If you angle them, this is apparently the best solution.
What I wonder is if this has any practical applications.
yeah it vindicates my approach of packing stuff via just throwing it in there. no I’m not lazy and disorderly, this is optimal cargo space usage
There’s very likely applications in algorithms that try to maximize resource usage while minimizing cost
With straight diagonal lines.
<img alt="" src="https://lemmy.world/pictrs/image/93d9b6ad-78fc-4d3b-9637-1dd17d64f9df.png">
Why are there gaps on either side of the upper-right square? Seems like shoving those closed (like the OP image) would allow a little more twist on the center squares.
I think this diagram is less accurate. The original picture doesn’t have that gap
You have a point. That’s obnoxious. I just wanted straight lines. I’ll see if I can find another.
<img alt="" src="https://lemmy.world/pictrs/image/4d45c886-31de-431e-9f7a-a8c6ebe1020b.jpeg">
there’s a gap on both, just in different places and you can get from one to the other just by sliding. The constraints are elsewhere so wouldn’t allow you to twist.
Oh, I see it now. That makes sense.
Homophobe!
hey it’s no longer June, homophobia is back on the menu
<img alt="" src="https://hexbear.net/pictrs/image/4e473313-a9af-4ba5-8633-af217a3963d0.png">
Mathematics has played us for absolute fools
If you can put the diagonal squares from the 17 solution in a 2-3-2 configuration, I can almost see a pattern. I wonder what other configurations between 17 and 132 have a similar solution?
Why can’t it be stacked up normally? I don’t understand.
You could arrange them that way, but the goal is to find the way to pack the small squares in a way that results in the smallest possible outer square. In the solution shown, the length of one side of the outer square is just a bit smaller than 12. If you pack them normally, the length would be
larger thanexactly 12. (1 = the length of one side of the smaller squares.)But there are 7 squares in the middle with 10 around it, surely that counts for something
Bees seeing this: “OK, screw it, we’re making hexagons!”
Bestagons*
Texagons
Fun fact: Bees actually make round holes, the hexagon shape forms as the wax dries.
But fear not, bees are still smart! Mfs can do math!
Not only can they do math, they can fully percieve time
come on now, let them cook, trust the process
4-dimensional bees make rhombic dodecahedrons
To be fair, the large square can not be cleanly divided by the smaller square(s). Seems obvious to most people, but I didn’t get it at first.In other words: The size relation of the squares makes this weird solution the most efficient (yet discovered).Edit: nvm, I am just an idiot.
<img alt="" src="https://lemmy.world/pictrs/image/762a4ab2-2eaf-4bf8-8e68-03bfc7613e90.gif">
The outer square is not given or fixed, it is the result of the arrangement inside. You pack the squares as tightly as you can and that then results in an enclosing square of some size. If someone finds a better arrangement the outer square will become smaller
I love when I have to do research just to understand the question being asked.
Just kidding, I don’t really love that.
Not complete without the sounds
It is one prove more, why it is important to think literally out of the box. But too much people of this type
i.vgy.me/UVG654.gif
That tiny gap on the right is killing me
That’s my favorite part 😆
You may not like it but this is what peak performance looks like.
Unless I’m wrong, it’s not the most efficient use of space but if you impose the square shape restriction, it is.
That’s what he said. Pack 17 squares into a square
My point was that it doesn’t break my brain at all when considering there’s an artificial constraint that affects efficiency and there’s just not going to be a perfect solution for every number of squares when you consider the problem for more than just 17 squares
That’s what makes it a puzzle. That’s what a puzzle is.
I hate this so much
Here’s a much more elegant solution for 17
<img alt="" src="https://sh.itjust.works/pictrs/image/32b9bf97-9af0-4c05-b98e-f7fc101e1b8c.png">
Is this confirmed? Like yea the picture looks legit, but anybody do this with physical blocks or at least something other than ms paint?
Proof via “just look at it”
Visual proofs can be deceptive, e.g. the infinite chocolate bar.
I feel like the pixalation on the rotated squares is enough to say this picture is not proof.
Again I am not saying they are wrong, just that it would be extremely easy make a picture where it looks like all the squares are all the same size.
I was joking about the proof but there’s a non-pixelated version in the comments here
It is confirmed. I don’t understand it very well, but I think this video is pretty decent at explaining it.
youtu.be/RQH5HBkVtgM
The proof is done with raw numbers and geometry so doing it with physical objects would be worse, even the MS paint is a bad way to present it but it’s easier on the eyes than just numbers.
Mathematicians would be very excited if you could find a better way to pack them such that they can be bigger.
So it’s not like there is no way to improve it. It’s just that we haven’t found it yet.
the line of man is straight ; the line of god is crooked
stop quoting Nietzsche you fucking fools
Now, canwe have fractals built from this?
“fractal” just means “broken-looking” (as in “fracture”). see Benoît Mandelbrot’s original book on this
I assume you mean “nice looking self-replicating pattern”, which you can easily obtain by replacing each square by the whole picture over and over again
Fractal might have meant that when Mandelbrot coined the name, but that is not what it means now.
Say hello to the creation! .-D
<img alt="" src="https://lemmy.zip/pictrs/image/7f27470e-96da-4501-9eba-38d357642506.webp">
(Don’t ask about the glowing thing, just don’t let it touch your eyes.)
Good job. It’skinda what I expected, except for the glow. But I won’t ask about that.
The glow is actually just a natural biproduct of the sheer power of the sq1ua7re
It’s important to note that while this seems counterintuitive, it’s only the most efficient because the small squares’ side length is not a perfect divisor of the large square’s.
What? No. The divisibility of the side lengths have nothing to do with this.
The problem is what’s the smallest square that can contain 17 identical squares. If there were 16 squares it would be simply 4x4.
He’s saying the same thing. Because it’s not an integer power of 2 you can’t have a integer square solution. Thus the densest packing puts some boxes diagonally.
And the next perfect divisor one that would hold all the ones in the OP pic would be 5x5. 25 > 17, last I checked.
this is regardless of that. The meme explains it a bit wierdly, but we start with 17 squares, and try to find most efficient packing, and outer square’s size is determined by this packing.
Did you comment this because you think the people here are stupid?
Bro, the people here, like the people everywhere, ARE stupid.
It’s always better to be explicit. I’m one of the stupid people who learned some things reading the comments here and I’ve got a doctoral degree in aero astro engineering.
<img alt="" src="https://lemmy.world/pictrs/image/3f5698d4-c344-4264-8474-1077d6e75fbc.gif">
Why doesn’t he just make the square bigger? That’d be more efficient.
That’s not more efficient because the big square is bigger
I think people have a hard time wrapping their heads around it because it’s very rare to have this sort of problem in the real world. Typically you have a specific size container and need to arrange things in it. You usually don’t get to pick an arbitrary size container or area for storage. Even if you for something like shipping, you’d probably want to break this into a 4x4 and a separate single box to better fit with other things being shipped as well. Or if it is storage you’d want to be able to see the sides or tops. Plus you have 3 dimensions to work with on the real world.
See, that’s the problem with people nowadays?They want to minimalise everything.
They should just slow down and breathe.
Initially I thought 4x4 square but this is a square of 4.675 sides. Reasonable. Clever maths though.