Squares in Squares
erich-friedman.github.io
erich-friedman.github.io
As a former architect, it's tempting to see similarities in the way architects do space planning: continually re-arranging the various rooms/circulation elements to find the most efficient use of space. Seeing how counter-intuitive these solutions are (and the fact that most of them are not proved, only "found") makes me think that space-planning may not be "solvable" computationally.
Glad you did post it though because it’s a really nice visualization and a very good page and deserves to be seen by more people who like such things!
It isn't. The knapsack problem is NP-complete and roughly translates to "Given a space of size X and a set of items of sizes A, B, C, how do you pack X optimally?". Designing a room layout seems like it would fall squarely into that, with additional restrictions added on top to make it even harder.
https://en.wikipedia.org/wiki/Knapsack_problem
According to wikipedia we do have algorithms that are useful in practice, but that's not quite the same as "definitely optimal"
This made me scratch my head a bit. I'm aware of there being different types of infinities, but to call a "smaller" infinity "effectively finite" seems a bit odd. I'm not up-to-date on math terminology, though.
In truth, I'm not quite sure what you mean by "solvable" vs "not solvable" here, either. In the above discussion I thought it meant "not tractable in a reasonable amount of time" (i.e. NP-complete => "not solvable"). But you seem to have a different definition you're working from.
Could you elaborate on what you mean by "effectively finite => solvable" ?
The GP had put "solvable" in quotes. I understood the GP to say that for space planning, there may not be an algorithm that is guaranteed to produce an answer in finite time. For the knapsack problem there is such an algorithm (even if that finite time, due to NP-completeness, could be very long).
The formal term "solvable", as applied to decision problems, actually only means "semidecidable", a much weaker property, see https://en.wikipedia.org/wiki/Decision_problem#Decidability.
I'm not sure whether this problem is finite or not, given that you can place objects at any real-number coordinates and any real-number angle. But if you simply make those increments small enough (you can only put boxes a whole number of planck-lengths apart) then there are a finite number of possible arrangements, so it's possible to brute-force.
I particularly liked "squares in circles", found 8 pretty surprising
https://www.combinatorics.org/ojs/index.php/eljc/article/vie...
[1] https://erich-friedman.github.io/papers/squares/pic/s27b.gif
[0] https://erich-friedman.github.io/papers/squares/squares.html...
The linked paper has more details
https://erich-friedman.github.io/papers/squares/squares.html
Interesting to think that the universe is solving NP-complete problems in real-time all day everyday. Mad respect.
I can't find a good source with packing but a very similar phenomenon is a soap film on a wire frame. Sometimes it gets stuck in a non-optimal configuration until you blow on it to give it a kick needed to reconfigure. You can see it at 19:35 in this talk by Matt Parker[1]
I'm not saying, you put a tungsten cube in the hydraulic press and instantly the cube atoms go into min packing config...but I am saying that in small enough (but not insignificantly small!) regions you're going to see these global optima packing solutions. And it's going to be everywhere all the time. You cut a wire with some pliars? I guarantee that some region in that wire the metal atoms were rearranged into an optimal packing under stress. That right there is nature solving an NP-complete problem. Happens all the time, I bet.
That the whole cube doesn't become optima is no biggie, but that these form at all is amazing to me. But also logical. It's just cool that nature solves NP complete problems as a matter of course. And we need "mathematicians to prove it". Nature does it without a care! :P ;) xx ;p
But also what about crystals? Can you just consider a perfectly formed crystal matrix, like a pure silicon wafer, to be the atoms in a global optima configuration? That may not correlate with packing exactly with packing as the unit is not always a cube, but you see what I mean? I don't think global optima in nature is such an irregularity or rarity as you may think. I'm not saying nature isn't messy, it is, but there's sufficient microstates and energy to get these global optimas all the time.
At least that's my intuition about it. I understand if yours differs, but that's no worries. Maybe this line of thought, that nature has ways to solve global optima easily all the time, can lead to better algorithms--different to simulated annealing.
Consider the dance between order and chaos in this set of cramped squares. Deviating into chaos from numbers 53-55 only to return to a beautiful order in 56.
Would look like stuff from a "A New Kind of Science" I bet.
https://writings.stephenwolfram.com/2017/05/a-new-kind-of-sc...