# Pythagorean bicliques

How many points on two perpendicular lines can all be at integer distances from each other? For instance, in the following drawing, we have five points on each line, all at integer distances.

The answer is: a lot more. In their paper “Two triads of squares” (*Math. Comp.* 1986), J. Lagrange and J. Leech find two point sets like this with seven points on one line and nine on the other. They’re harder to draw accurately, but the coordinates of the points in one of these sets are and The other one has coordinates of similar magnitude.
Lagrange and Leech also describe a construction for sets of five points on one line and infinitely many on the other, based on elliptic curves, which they credit to an earlier paper, “Elliptic curves and rational distance sets” (*Proc. AMS* 1954), by W. D. Peeples.

I was led to these papers by some computational experiments I ran today. One can define a graph whose vertices are integers and whose edges connect pairs of integers that form the legs of a Pythagorean triangle. Of course it’s infinite, but it’s easy to use the formula for Pythagorean triangles to generate large subgraphs of it. In graph-theoretic terms, point sets such as the ones above correspond to bicliques (complete bipartite subgraphs) of The vertices on one side of the biclique are used for the coordinates of the points on one line, and the vertices on the other side of the biclique are used for the points on the other line. For instance, the biclique corresponding to the drawing above is a copy of with and on one side, and and on the other.

As is somewhat sparse, I realized that it should be possible to find these bicliques by an algorithm I published some years ago for finding bicliques in sparse graphs (“Arboricity and bipartite subgraph listing algorithms”, *Inf. Proc. Lett.* 1994).
My new implementation of the biclique-finding algorithm is now in my Python library PADS as Bicliques.py. (Probably there’s still some more optimization possible; I wanted to get it run correctly first, before working on making it fast.) With it, I found several seven-by-seven integer-distance sets of points on two lines, although none as big as the seven-by-nine ones of Lagrange and Leech. (Maybe those would have been reachable with a longer search…) And by searching the web for the numbers in one of those sets, I found the paper of Lagrange and Leech.

It appears to be open how big these sets can be. I didn’t find any improvements to Lagrange and Leech among the later papers that cite them (of which there are not many). What I would like to be true is that for every one can find sets that have at least points on each line, but maybe that’s too optimistic, and I have no good reason to believe it’s true.

(G+)