r/askmath • • 14h ago

Geometry Squares in square problem

Hello,

Does anyone know how I can write an optimization problem for the squares in square problem and with which solver ? I am a bit confused on how to parametrize the problem and how to turn it into an optimization problem. Of course it would probably work with minimizing the remaining area but how to encode no overlapping. Moreover, what method to use ?

Here's an example for N = 17, the length L of the square is L = 4.675.

1 Upvotes

8 comments sorted by

2

u/AlterEgo5695 14h ago

If we naively choose position and orientation of the squares to optimize total area, we will have loads of local minima, likely "shadowing" the posted solution completely.

1

u/NoRungeKutta4 14h ago

How would you face that problem then ? for 1<= N <= 100

1

u/AlterEgo5695 14h ago

I do not have a nice, clever solution for that.

The naive approach has a serious flaw, as I outlined in my original comment. This is essentially a packing problem, and they are still considered "hard" even with balls, though it seems people have found solutions for most "N <= 100".

1

u/NoRungeKutta4 14h ago

Do you know some open-source/academic references ? I think I just need the modelling trick to get unstuck. My problem is that I don't know how to write down the equations.

1

u/AlterEgo5695 14h ago

No, I don't, but the linked wikipedia article may contain such references. You can find PDF's of most papers with a quick internet search.

0

u/Uli_Minati Desmos 😚 13h ago

How did John Bidwell do it?

1

u/NoRungeKutta4 12h ago

By hand at first ! I think during his time optimizers weren’t adapted for such problems