For an experiment, I have to place magnets onto a rectangular board whose dimensions are 3 and 3.5 inches. Between each phase of the experiment, I have to shuffle these magnets around, but if two magnets get within 1 inch of each other, they'll stick together, and trying to separate magnets as strong as the ones I have is a real hassle. How many magnets can I place on a board such that I can switch any two without any sticking together? Other magnets can move, but they have to return to their original positions after the two are swapped.

I might be able to get as many as 13...

  • 5
    $\begingroup$ I assume that, since you didn't mention the dimensions of these magnets, they're the rare 0"×0"×0" variety? $\endgroup$
    – Deusovi
    Aug 13 '20 at 4:09

I can show the number is at least


This can be achieved placing the 15 magnets essentially on a square grid with one to spare. We can make all distances larger than $1$ by pulling columns slightly but not using all of the spare $0.5$ apart, slightly offsetting the first or last row and using the vertical wiggle room gained to pull the three other rows slightly apart.

We can now move like a 15 puzzle alternating between the top-row-offset, bottom-row-offset configurations as needed. To get around the 15 puzzle's parity constraint, move the gap to a corner, compressing the magnets to within an $\epsilon$ of a hexagonal packing that moves that corner as far as possible. Shift the row containing the gap back to the top/bottom edge, but leave its magnet opposite the gap where it is. This allows us to shift the rest of the row that crucial bit horizontally, nudging the distance between the two neighbors of the gap just above $2$. This permits to rotate the piece diagonally adjacent to the gap around the piece vertically adjacent to the gap into the gap's position, switching parity in the process. enter image description here

  • $\begingroup$ Very nice! This is essentially the solution I had in mind, except in the process of making "nice" dimensions for the board I must've added more wiggle room than I thought! $\endgroup$ Aug 13 '20 at 21:57
  • $\begingroup$ Interesting! The numbers line up so perfectly to just above $2$. Making it a quite pretty puzzle. $\endgroup$ Aug 14 '20 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.