0
$\begingroup$

Looking for a way to find solutions for this problem formally and computationally (using program) without pen and paper or plotting.

Find all the ways to arrange four points so that only two distances occur between any two points

In other words, how many ways are there to draw four dots on a piece of paper such that whichever two dots you choose, the distance between these two points is one of two values?

Source : https://www.theguardian.com/science/series/alex-bellos-monday-puzzle

Edit 1: Not looking for the solutions themselves. Looking for the formal and computational approaches to arrive at the solution.

$\endgroup$
5
  • 1
    $\begingroup$ In the vertices of a perfect square. $\endgroup$
    – Cesareo
    Oct 26, 2019 at 18:39
  • 2
    $\begingroup$ Split into two cases based on the first three points forming either an equilateral or an isosceles triangle. It is pretty easy to see two "ways" from an equilateral triangle. For isosceles you know a square has to be one possibility (starting with isosceles right triangle) - there may be more $\endgroup$
    – WW1
    Oct 26, 2019 at 18:44
  • $\begingroup$ Hey guys. Thanks for the replies. I'm not looking for the solutions themselves. Looking for the formal and computational approaches to arrive at the solution. $\endgroup$ Oct 26, 2019 at 18:47
  • $\begingroup$ Eventually want to model a program that can solve the problem, $\endgroup$ Oct 26, 2019 at 18:50
  • $\begingroup$ Maybe you should ask on StackExhange? $\endgroup$
    – Milten
    Oct 26, 2019 at 18:51

1 Answer 1

0
$\begingroup$

By scaling or permutations of letters (and rotation, translation, etc.), we may require that $A=(0,0)$, and $B=(1,0)$, and another distance $d>1$. Then the following SAGE program lists all such solutions. I will leave the counting problem to you once you get the configurations. (Beware of indentations when you run the program in SAGE.)

def dis((x1,y1),(x2,y2)):

return (x1-x2)^2+(y1-y2)^2

var('x1,y1,x2,y2,d')

S={1,d^2}

for i in S:

for j in S:
    for k in S:
        for l in S:
            for m in S:
                eq1=dis(A,C)-i 
                eq2=dis(A,D)-j
                eq3=dis(B,C)-k
                eq4=dis(B,D)-l
                eq5=dis(C,D)-m
                sol=solve([eq1,eq2,eq3,eq3,eq4,eq5],x1,y1,x2,y2,d)
                for p in sol:
                          if p[4].rhs()>1:
                              p
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .