From: rusin@vesuvius.math.niu.edu (Dave Rusin) Newsgroups: rec.puzzles Subject: Re: A mathematical puzzle Date: 24 Jun 1998 23:09:30 GMT Raz Uri wrote: > My grandfather, Herman Baer - an 85 years old mathematician, is working on > a problem of mathematical nature (as he always does). As he lacks > companions to discuss math with, he asked me to post the problem to the > Internet, in hope to get some feedback. [...] > Diophantic Spider and Fly > ------------------------- > > Given a rectangular room with three integer sides A<=B<=C, A+B+C=S, is it > possible that all three geodesic distances between extreme corners are > integers as well ? > > The answer is positive, and the three minimal solutions are for : > > A. S = 833 = 7 * 7 * 17 = 108 + 357 + 368 > B. S = 2737 = 7 * 17 * 23 = 564 + 748 + 1425 > C. S = 3703 = 7 * 23 * 23 = 348 + 975 + 2380 [...] > So, maybe, no other positive solutions exist. But contrary to > this fact, _reality_ may be otherwise. And besides, there well > may exist solution which dont fulfill the sufficient, but not > necessary, condition. All this was done with the aid of an H.P. > scientific pocket-calculator, and may be put on a broader base > by a program on a more adapted computer. Or maybe the problem > can be solved, or was even treated before, by classical methods ? There are other solutions, among them [a,b,c] = [243984, 689613, 675500]. for which the distances are {q = 1149355, r = 1152347, s = 1386745}. The integers sought are the {a,b,c} for which three expressions are all perfect squares, that is, we seek the integer points on the variety determined by the equations 2 2 2 2 2 2 2 2 {a + b + c + 2 a b - r , a + b + c + 2 b c - s , 2 2 2 2 a + b + c + 2 c a - q } These are homogeneous; we may set say q=1 and get three equations in five variables, which define a surface on which we seek positive, rational points. I don't think this is a rational surface, that is, I don't think it's possible to express a,b,c,r,s as rational functions of 2 independent parameters which will make these equations hold identically, giving a parameterization of the whole solution set. It's probably possible to find a rational curve in this surface, that is, one can probably find five rational functions of _one_ variable which make the equations vanish identically; I didn't try very hard to do so. What I did observe was that this surface includes curves of genus one with positive rank over the rational numbers, so that there are infinitely many rational points. With a bit of tinkering and density arguments, that should mean there are even infinitely many making all of a,b, and c positive. What follows is a summary of my Maple explorations of this surface. I won't claim that these are at all the most efficient analyses. We start with the original 3 quadratic equations in 5 variables. Following Baer's lead, we begin by parameterizing the solutions to the last equation: from (a+c)^2 + b^2 = 1 follows a + c = (2t)/(1+t^2) b = (1-t^2)/(1+t^2) for some t. Substituting into the other two equations shows that c and t are to be chosen so that these expressions are both squares: 2 2 2 2 4 3 2 4 4 2 c + 4 t c - 4 c t + 2 c t - 4 c t + 2 t + 1 + t - 2 c + 2 c t + 4 t 3 - 4 t and 2 2 2 2 2 2 (2 t c - 2 c t + t - 4 c t + 2 c + 1 + 2 c) (1 + t ) (These are actually ((1+t^2)*r)^2 and ((1+t^2)*s)^2. ) Call these R^2 and S^2 respectively. From these two equations we may eliminate c rationally: 2 3 2 R - 4 t + 4 t - S c = -------------------- 4 4(t - 1) leaving a single equation to be satisfied in R^2, S^2, and t. Maybe this is an improvement (fewer variables and equations than initially); maybe not (the polynomial is quartic in R and S and of degree 8 in t). Next we observer that this equation is symmetric in R^2 and S^2, so we express it in terms of the sum P1 and product P2 of these variables; the relation is then just 2 4 2 8 7 6 5 2 4 P2 = 2 P1 t - P1 t - P1 + 1/4 P1 + 2 t - 4 t - 4 t + 12 t - 4 t + 4 t 3 - 12 t + 4 t + 2 So our goal is to choose P1 and t so that with this choice of P2, the equation X^2 - P1 X + P2 = 0 has two roots, each a rational square. Well, the roots aren't even rational unless the discriminant P1^2-4P2 is a rational square. This becomes, with some simplification, the condition that 4 3 - 2 t + 4 t - 4 t + P1 - 2 is a square, say u^2. So now our variables are t and u, and we can satisfy all the previous equations as long as the two roots to X^2 - P1 X + P2 are rational squares. These roots are given as combinations of P1 and sqrt(discriminant), and hence are polynomials in u and t; I find them to be 2 2 2 2 1/2 ((t - 2 t - 1) + (u + 1 - t ) ) and 2 2 2 2 1/2 ((t - 2 t - 1) + (u - 1 + t ) ) Now, the solutions to 2*Y^2 = X^2 + 1 are easily parameterized with X = +-(4*m-m^2-2)/(m^2-2), so both these last two roots are squares iff there are choices of this parameter m making 2 2 (u + 1 - t ) /(t - 2 t - 1) = (4*m-m^2-2)/(m^2-2) and 2 2 (u - 1 + t ) /(t - 2 t - 1) = -(4*n-n^2-2)/(n^2-2). This lets us eliminate u and get a relation to be satisfied among m, n, and t. So we're back to a single equation in 3 variables; however, this one is now only _quadratic_ in m, n and t (separately). So now we can say something useful: for a given n and t we can solve for m rationally iff the discriminant of this quadratic-in-m is a square; but the discrimnant is only of degree 4 in n (and t). Thus the rational solutions to our original problem correspond to the rational points on the surface Y^2 = 4 4 4 3 4 4 3 2 3 3 2 4 t n + 4 t n - 24 t n + 20 t - 32 t n + 64 t n - 32 t + 2 t n 2 3 2 2 2 2 2 4 - 24 t n + 32 t n + 16 n t - 24 t + 32 t n - 64 n t + 32 t + n 3 + 4 n - 24 n + 20 of reasonably low degree. In particular, if we specialize to a specific value of t (say), we are looking for points on a curve of the form Y^2 = quartic in n. (The quartic even has leading coefficient a perfect square, and so there are points at infinity). Thus we have an elliptic curve, and we need rational points. Fortunately, Baer's given solutions imply that at least for some values of t, this elliptic curve _has_ rational points. The first solution {a,b,c} = {108,357,368} corresponds to t=1/2. This turns out to be a curve of rank 2 with torsion of order 4, so there are plenty of rational points. Also, the original solution implies there is a region in the real X-Y plane from which if we choose a point on the curve and trace back to compute {a,b,c} for it, these values will be positive. So we need only pick a point of infinite order on the curve and compute multiples of it until a multiple is found which lies in this region. In the case at hand I tried t=1/2, q=1, and wanted c to lie between 0 and 4/5; this required |R^2-S^2| < 3/2. The given solution corresponded to (m,n) = (25/27, 15/23); I found another with (m,n) = (261/386,1277/104). As I say, there is probably much more which can be said, and which can be said much more cleverly, but at least this is sufficient to show there are more positive integral solutions. This sort of thing -- an algebraic surface of low degree containing many (?) elliptic curves of positive rank -- seems to show up frequently, so I assume there's a more methodical treatment of it, but I don't know of one. I am pleased to see that Dr Baer continues to be active mathematically, and wish him continued success. dave ============================================================================== [Upon further reflection I found a better answer which I did not post to the newsgroups but did eventually post a URL to this material. -- djr ] ============================================================================== About that spider: It was asked if there are infinitely many rational vectors [a,b,c] for which each of (a+b)^2+c^2, (a+c)^2+b^2, and (b+c)^2+a^2 were squares. (Then a, b, c are the dimensions of a box for which the lengths of all three geodesic paths around the box to opposite corners are also rational.) I showed that this was true and remarked that there were perhaps even parameterized curves of solutions. I now show this is true; in fact there are infinitely many such curves. Here are what I believe to be the simplest three of the type I have found: take [a(t), b(t), c(t)] = [-7*t^6-58*t^5-148*t^4-184*t^3-124*t^2-40*t, 12*t^6+40*t^5+40*t^4-32*t^3-112*t^2-96*t-32, 12*t^6+66*t^5+134*t^4+152*t^3+120*t^2+72*t+24], or [-4*t^13-16*t^12-8*t^11+48*t^10+48*t^9-128*t^8-256*t^7+384*t^5+384*t^4+128*t^3, -2*t^13-10*t^12-16*t^11+24*t^10+152*t^9+184*t^8-160*t^7-480*t^6-64*t^5+ +576*t^4+384*t^3-256*t^2-384*t-128, t^14+6*t^13+4*t^12-24*t^11-44*t^10-40*t^9-80*t^8-32*t^7+288*t^6+ +448*t^5-512*t^3-448*t^2-128*t], or [3900*t^14+23608*t^13+52776*t^12+35168*t^11-55120*t^10-112352*t^9- 45536*t^8+23808*t^7-55488*t^6-191360*t^5-211072*t^4-125440*t^3- 46848*t^2-12800*t-2560, -2921*t^14-12106*t^13-19588*t^12-40808*t^11-163836*t^10-430616*t^9- 668128*t^8-657600*t^7-436592*t^6-217952*t^5-101440*t^4- 48768*t^3-18496*t^2-3712*t, 3900*t^14+31650*t^13+113930*t^12+251080*t^11+372984*t^10+367544*t^9+ +199128*t^8-21056*t^7-147200*t^6-143904*t^5-71328*t^4-2944*t^3+ +21888*t^2+13440*t+2688]. In the original problem it was asked that a,b,and c be positive; this is true for the first curve if t lies in the interval (-4.95, -2.68). For the second curve, t < -4.20 makes all three coordinates positive; if t is in (2.16, 2.27), all three are negative, which is also fine after a uniform sign change. For the third curve, use t<-2.68, t in (-1.41, -1.23), or t>sqrt(2). The method of deducing these curves is for the most part fairly elementary. We are to solve the initial equations (1) a^2+b^2+c^2+2ab=r^2 (2) a^2+b^2+c^2+2bc=s^2 (3) a^2+b^2+c^2+2ca=q^2 The equations are homogeneous, so it suffices to find solutions with, say, q=1 and then scale. Subtracting (2) from (1) leaves (4) 2b*(a-c) = r^2-s^2 which is true iff (5) b = (r+s)*alpha/2 and (6) a-c = (r-s)/alpha for some alpha. Likewise we may subtract (3) from (1) and so replace (3) with a pair of equations (7) a = (q+r)*beta/2 (8) b-c = (q-r)/beta These four equations are linear in a,b,c, and r (say) and so we may easily solve them to get rational expressions for these four variables in terms of s, alpha, and beta. But these are trivial changes to the problem; we simply express the same variety (up to birational equivalence) using the ideals generated by {(1),(2),(3)}, or {(1),(3),(4)}, or {(1),(3),(5),(6)}, or finally {(1),(5),(6),(7),(8)}. The statement that the last four are linear in four of the variables implies that the projection of the variety to "alpha-beta-s" space is a birational equivalence, that is, we may simply substitute our expressions for a,b,c,r into (1) and get a single equation (9) in alpha, beta, and s which describes the same variety. Now, I avoid writing (9) in full since it's not very informative, but the equation is easily seen to be quadratic in s . With then a substitution of the form s = A y + B (where A and B involve alpha and beta) the variety may be presented in the simpler form y^2=(polynomial in alpha and beta). (The polynomial is easily computed as the discriminant of (9) with respect to s, with perfect square factors removed.) The final result is a presentation of the variety as the algebraic surface defined by the equation (10) y^2 = (alpha^2-2)(beta^2-2)(4-2alpha^2-2beta^2-8alpha*beta+5alpha^2beta^2) Notice that the right side of (10) is of degree 4 in alpha. So if we view beta as a fixed parameter, then (10) determines an elliptic curve. It may even be brought into normal form using a fairly standard sequence of substitutions (see e.g. Cassel's little book on Elliptic Curves, London Math Soc.; or see http: //www.math.niu.edu/~rusin/known-math/known-math/elliptic.crv/quartic.maple for details.) The net result is that if we use the substitutions alpha = -2(beta^2-2)(3beta^4-4 beta^2+4-X) --------------------------------- (2beta^5-8beta^3+8beta-2beta X - Y) and y = (an even messier expression in terms of X and Y) then in these new variables, the variety may be written simply (11) Y^2 = (X-C)*(X^2-D) where C = (beta^2-2)*(3*beta^2-2) and D=(5 beta^4-4 beta^2+4)*(beta^2-2)^2. This is roughly the analysis I used in my previous solution: I showed that the original "spider" problem could be expressed as the search for rational points on an elliptic surface (i.e. an elliptic curve whose coefficients involved a free variable such as beta). I had taken a more roundabout approach to getting the equation similar to (11) ! Now, my approach at that time was to pick a specific value for the free variable so as to make the elliptic curve specified by (11) have positive rank, so that there were infinitely many rational points. Here I can do better: viewed as a curve over the function field Q(beta), the curve (11) has rank 2 ! Indeed, the two points P1 = [2 beta^2(beta^2-2), (beta^2-2)^3] and P2 = [3 beta^4-4 beta^2+4, 4 beta^5] are independent elements of infinite order. (There's torsion, too, of course, but it's only the element [C,0] of order 2.) This is equivalent to saying we can find 2 "generic" independent points on _all_ the elliptic curves obtained from (11) by specializing beta to a single value. This is where the rational curves come from: we may let beta vary and thus pick up a rational point in each fibre of this elliptic surface. Indeed, for each integers m and n we get a different curve by computing the point m P1 + n P2 in Q(beta), then treating beta as the curve parameter "t". For example, from P1 we may compute an additional point 2P1 = [(21 beta^4-20 beta^2+20)/4, (3 beta^2+2)(19 beta^4-12 beta^2+12)/8] and then 3P1, 4P1, etc., as well as P1+P2 and so on. (Evidently all the higher multiples m P1 + n P2 (+Torsion) involve rational functions of beta rather than polynomials.) For each such choice of m and n we get different functions of beta; letting beta vary over rational values then gives infinitely many different rational curves in the surface (11). For any such point [X,Y] in Q(beta) we change coordinates back and find points (alpha, y) on the quartic curve (10); for each, we may solve for s = A y + B and then compute a,b,c,r from (5)-(9). I tried a few small values of m and n and selected the simplest looking solutions for display above. (Here I have scaled a, b, c to remove the denominators for clarity, that is, it is no longer true that q=1.) I can't guarantee that there aren't other, simpler rational curves in the original surface; here I am only constructing curves P^1 -> S for which the composite with the particular projection onto the beta coordinate is an isomorphism. Of course the solutions can be trivially checked to be valid. More interestingly, one can with essentially no background compute more solutions using the chord-and-tangent construction on the elliptic curve (11). Of course it takes some more subtlety to recognize that all the solutions created will be distinct; even trickier is the question of which other solutions exist which are not in any of the curves. (One may specialize beta to specific rational values and discover the elliptic curve over Q often has rank 3 or more. This is typical of elliptic surfaces, but the situation is not really all that well understood.) dave ============================================================================== Maple input: subst:={ alpha = -2*(3*beta^4-4*beta^2+4-X5)*(beta^2-2)/(2*beta^5-8*beta^3+8*beta-2*beta*X5-Y5), y = -2*(beta^2-2)*(20*beta^10+18*beta^8*X5-96*beta^8+160*beta^6-72*beta^6*X5-8*beta^5*Y5-12*beta^4*X5^2-128*beta^4+112*beta^4*X5+64*beta^2-96*beta^2*X5+20*beta^2*X5^2-16*X5^2+32*X5+2*X5^3-Y5^2)/(2*beta^5-8*beta^3+8*beta-2*beta*X5-Y5)^2}: eq11:= Y5^2 = (X5-(beta^2-2)*(3*beta^2-2))*(X5^2-(5*beta^4-4*beta^2+4)*(beta^2-2)^2): Pt1:=[2*beta^2*(beta^2-2), (beta^2-2)^3]: Pt2:=[4-4*beta^2+3*beta^4, 4*beta^5]: Pt3:=[21/4*beta^4-5*beta^2+5, 1/8*(3*beta^2+2)*(19*beta^4-12*beta^2+12)]: Tors:=[3*beta^4-8*beta^2+4, 0]: ==============================================================================