• Admetus@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours ago

    Initially I thought 4x4 square but this is a square of 4.675 sides. Reasonable. Clever maths though.

  • bitjunkie@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    2 days 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
      13
      ·
      2 days 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.

      • bitjunkie@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        23 hours 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.

      • Natanael@infosec.pub
        link
        fedilink
        English
        arrow-up
        14
        ·
        2 days 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.

      • dream_weasel@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 day ago

        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.

    • sga@lemmings.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

      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.

      • NigelFrobisher@aussie.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        16 hours ago

        See, that’s the problem with people nowadays?They want to minimalise everything.

        They should just slow down and breathe.

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        18 hours ago

        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.

  • 9point6@lemmy.world
    link
    fedilink
    English
    arrow-up
    152
    ·
    3 days ago

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

    Nice!

    • Midnitte@beehaw.org
      link
      fedilink
      English
      arrow-up
      15
      ·
      3 days ago

      I’ve definitely packed a box like this, but I’ve never packed boxes like this 😳

      • Bilb!@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        10 hours ago

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

    • avattar@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 days ago

      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?

    • tiramichu@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      144
      ·
      edit-2
      3 days 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.

      • blackbrook@mander.xyz
        link
        fedilink
        English
        arrow-up
        8
        ·
        3 days ago

        All this should tell us is that we have a strong irrational preference for right angles being aligned with each other.

        • DominatorX1@thelemmy.club
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 days ago

          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.

          • blackbrook@mander.xyz
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 days ago

            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
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 days ago

              My point is, when we study our preference for right angles, what we’re studying is the interpreter. It has quirks.

      • DominatorX1@thelemmy.club
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        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
      link
      fedilink
      English
      arrow-up
      23
      ·
      3 days ago

      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.

        • exasperation@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          11
          ·
          3 days ago

          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.

    • Devadander@lemmy.world
      link
      fedilink
      English
      arrow-up
      20
      ·
      3 days 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
      14
      ·
      3 days 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.

    • a_party_german [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      3 days ago

      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:

    • Lemmisaur@lemmy.zip
      link
      fedilink
      English
      arrow-up
      17
      ·
      2 days ago

      Say hello to the creation! .-D

      (Don’t ask about the glowing thing, just don’t let it touch your eyes.)

    • mEEGal@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      “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

      • psud@aussie.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        21 hours ago

        Fractal might have meant that when Mandelbrot coined the name, but that is not what it means now.

  • BlueFootedPetey@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    12
    ·
    3 days 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.social
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      2 days 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.

      • BlueFootedPetey@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        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.

        • Drew@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          I was joking about the proof but there’s a non-pixelated version in the comments here