• davidgro@lemmy.world
      link
      fedilink
      English
      arrow-up
      16
      ·
      6 months ago

      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.

  • 9point6@lemmy.world
    link
    fedilink
    English
    arrow-up
    122
    arrow-down
    1
    ·
    6 months ago

    Oh so you’re telling me that my storage unit is actually incredibly well optimised for space efficiency?

    Nice!

    • tiramichu@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      106
      ·
      edit-2
      6 months ago

      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.

    • Devadander@lemmy.world
      link
      fedilink
      English
      arrow-up
      16
      ·
      6 months ago

      Any other configurations results in a larger enclosed square. This is the most optimal way to pack 17 squares that we’ve found

    • red_bull_of_juarez@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      8
      ·
      6 months ago

      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.

    • chuckleslord@lemmy.world
      link
      fedilink
      English
      arrow-up
      27
      ·
      6 months ago

      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).

      • Natanael@infosec.pub
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        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)

  • selokichtli@lemmy.ml
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 months ago

    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.

  • bitjunkie@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    6 months ago

    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.

    • jeff 👨‍💻@programming.dev
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      3
      ·
      6 months ago

      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.

      • Natanael@infosec.pub
        link
        fedilink
        English
        arrow-up
        12
        ·
        6 months ago

        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.

      • bitjunkie@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 months ago

        And the next perfect divisor one that would hold all the ones in the OP pic would be 5x5. 25 > 17, last I checked.

  • BlueFootedPetey@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    6 months ago

    Is this confirmed? Like yea the picture looks legit, but anybody do this with physical blocks or at least something other than ms paint?

    • deaf_fish@midwest.socialBanned
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 months ago

      It is confirmed. I don’t understand it very well, but I think this video is pretty decent at explaining it.

      https://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.