There is a 6 by 6 dot-grid. You will draw two squares by joining the dots.

  • The squares cannot have common dots/points or areas.
  • Rotations or reflections of a drawing are considered distinct.

In How many ways can this drawing be accomplished?

enter image description here

The figure above demonstrates only two possible drawings.

  • 1
    $\begingroup$ @zixuan You can't make a square out of just any four points (for example, if you take 3 points from the top row and one from the bottom). Also the squares are not allowed to intersect, if I understand correctly. $\endgroup$
    – hexomino
    Dec 10, 2020 at 15:21
  • 1
    $\begingroup$ This is more of a mathematical problem than a puzzle tho. $\endgroup$ Dec 10, 2020 at 15:23
  • 1
    $\begingroup$ Unfortunately, this is a question from puzzleup.com/2020/?home, a competition which explicitly the use of outside help :( Shame on you, helloworldx! $\endgroup$ Dec 17, 2020 at 8:41

1 Answer 1


Computer says

1256 enter image description here


import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors
import shapely.geometry as sg

# plotting
col = it.cycle(colors.CSS4_COLORS)
def ps(Sq,c):

# grid
P = np.array([[sg.Point(i,j) for j in range(6)] for i in range(6)],"O")
# all squares on grid
S = [sg.Polygon([P[s+y,s+x-r],P[s+y-r,x],P[y,x+r],P[y+r,s+x]])
     for s in range(1,6) for y,x,r in it.product(*map(range,(6-s,6-s,s)))]

# pairs
sol = []
for j,S1 in enumerate(S):
    for i,S2 in enumerate(S):
        if not S1&S2: # no overlap
            if j<i: # no double counts

  • $\begingroup$ Your solution seems to include size 0 squares (e.g. in the last picture) ?! Nicely displayed . $\endgroup$
    – Retudin
    Dec 11, 2020 at 11:58
  • 1
    $\begingroup$ @Retudin It's actually 0 squares, not size 0 squares. I display each square once as the gray reference, even if there happen to be no possible partners. $\endgroup$ Dec 11, 2020 at 12:15
  • $\begingroup$ Beautiful answer. It should be printed on a large sheet of A2 paper and framed. $\endgroup$
    – Penguino
    Dec 12, 2020 at 9:49

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