# Help me, I hate squares!

There is $$5$$x$$5$$ equidistance matrix dot given as below;

You need to remove dots from the figure where it will be impossible to form a square by drawing lines between dots at the end.

So what is the least number of dots you need to remove where forming a square by drawing lines between dots will be impossible?

Clarification: Dots need to be vertices of a square.

• I interpreted this as "impossible to pick four dots that form a square", is this what is intended? (The way the puzzle is now written, it would also be possible to pick 8 points, and connect them pairwise with 4 lines that intersect so that the lines form a square) – Bass Aug 1 at 15:05
• I'd like to point out that this is a special case of the hitting set problem, which is known to be NP-complete in general – Agnishom Chattopadhyay Aug 2 at 15:19
• How many dots am allowed to removed??? I may remove all the dots, or I may remove all the dots except 2 or 3. Wont that be too easy??? – Always Confused Sep 8 at 7:26

Here's one with 10 dots removed. I tried for a long time to find one with 9, but I didn't succeed.

• fwiw, I wrote a python script to iterate through all possible combinations of dots and check for all the squares, and it agrees that the minimum number of dots is 10. There are 636 of those, out of 33554432 total possible squares, or 0.001895%. – IronEagle Aug 2 at 1:48
• @IronEagle 636? I got less, my number is odd though, so I'm almost sure it's wrong, can you post a list of all your answers somewhere? gist or pastebin - so that I can find one that I did not find and correct my mistake. – Andrew Savinykh Aug 2 at 1:57
• @Andrew Savinykh I can, although it might not be that human-readable. I used a 25-element list to represent the grid (right to left, top to bottom. 0 at the top left, 4 at the top right, etc.). Each grid that I tested is represented in binary (so grid #1 just has a dot in the top left, #16 has one in the top right, etc.). Pastebin link to code and list of answers: pastebin.com/JMTg1P4x Answer interpretation: 0's are missing dots, 1's are the dots that are left. Perhaps I missed a square position. I also don't account for rotationally identical or symmetrical answers. – IronEagle Aug 2 at 2:37
• @IronEagle thank you, found my mistake. – Andrew Savinykh Aug 2 at 6:12

Here's an answer with the removal of

$$11$$ dots

If we interpret the question as Bass did, then I think we can remove

$$13$$ dots

• row 4 col 3 could be added back, no? – jafe Aug 1 at 15:52
• @jafe I was answering the question as clarified by Bass. If we add this point back then the horizontal and vertical lines through it are achievable which together with the horizontal and vertical lines through point (2,5) would form a square. – hexomino Aug 1 at 15:55
• @jafe Oray had commented confirming Bass' assumption but has since deleted the comment. – hexomino Aug 1 at 15:55
• this is a valid answer, but not the least number of dots to remove. – Oray Aug 1 at 16:15
• @Oray Is Bass' interpretation correct? – hexomino Aug 1 at 16:19

Since I cannot post pictures in a comment, here's my question in clearer terms:

Did I form a square by drawing lines between dots? (I know I did. Does it count, though?)

(For better visibility, I deviated from the apparent standard of using near-imperceptible shade changes, and marked the relevant dots with bell peppers instead.)

• I see your point with some peppers :D I put a clarification for that :) AS "dots need to be vertices of a square." but good point though. – Oray Aug 1 at 16:29

I tried it with 9 dots removed.

• There's a diagonal square with vertices C1,D3, B4, A2 – StephenTG Aug 2 at 13:10
• B4 is deleted though. – blanche_chat Aug 2 at 13:12
• I realize now that my notation has the order of numbers reversed from chess notation. I was assuming A-E indicating columns going left to right, 1-5 indicating rows from top to bottom – StephenTG Aug 2 at 13:22
• But I found another diagonal square on B3 D2 E4 C5 (or C2 B4 D5 E3) depending on how you see it. – blanche_chat Aug 2 at 13:23

I have an attempt with 9 dots. It looks like the minimum is 10, but I can't find my mistake. Is there a square here I'm missing?

• yes there is one square exist A4-B1-E2-D5 – Oray Aug 2 at 14:21
• Oray, good catch, I didn't think to look for that type of square. – makajawan Aug 2 at 14:32
• I see four of them: A4-B1-E2-D5, A2-D1-E4-B5, A2-C2-C4-A4, and C2-E2-E4-C4. – plasticinsect Aug 2 at 16:42