Casio Classpad: Theorem of Sós
Introduction: The Theorem of Sós
A set of triple rational numbers (a, b, λ) is considered to be a H-triple if
c = √(a^2 - 2 λ a b + b^2) is also a rational number. (I)
Heron Triple
Should the set of rational numbers (a, b, λ) can be further test to see if to is also a Heron triple. That criteria (see source) requires for some numbers λ' and A (area):
λ' = √(1 - λ^2) is a positive rational number, and
A = λ' * abs(a * b) / 2 is a natural number (positive integer)
This implies for all cases for Heron Triples that abs(λ) < 1, or -1 < λ < 1.
If the H-triple passes, then it becomes a Heron triple and the sides (a, b, c) (see (I) above) are the lengths of a Heron triangle.
It is possible that an H-triple is not a Heron triple.
Today's blog focuses on H-triples.
Generating H-Triples
Given relatively prime integers m and n (where gcd(m,n) = 1) and μ, an H-triple can be generated by the following equations:
(II)
a = μ * (m^2 - n^2)
b = μ * (2*m * (n + λ*m))
c = μ * (m^2 + 2*λ*m*n + n^2)
For a > 0, this requires that m > n. In the program htrigen, I assume that μ = 1. In the program, u = λ
Casio Classpad Program: htrigen
(fx-CP400 and fx-CG500)
'2020-09-15 EWS
'H Triple
Local a,b,c,m,n,u
Input m, "m > n", "m?"
Input n, "m > n", "n?"
Input u, "λ? (rational)"
If gcd(m,n)≠1
Then
Print "m and n are not"
Print "relatively prime."
Stop
IfEnd
(m^2 - n^2) ⇒ a
(2 × m × (n + u × m)) ⇒ b
(m^2 + 2 × u × m × n + n^2) ⇒ c
Print "H-Triple:", ColorMagenta
Print "{a,b,λ}="
Print {a,b,u}, ColorBlue
Print "c="
Print c
Example:
m = 7, n = 3, λ = 2/3
Result:
a = 40, b = 322/3, c = 86
Testing the Theorem of Sós
The program htrist tests the criteria for the triple (a, b, λ).
Testing numbers in a program to see that they are rational is not as easy as it appears. Thankfully, the functions numerator and denominator can be used on the Classpad. The numerator function converts the number into an exact fraction and extracts its numerator. Similarly, the denominator function converts the number into an exact fraction and extracts its denominator.
For an irrational number such as √2, the Classpad determines the exact fraction to be
√2/1.
Casio Classpad Program: htrist
(fx-CP400 and fx-CG500)
'2020-09-15 EWS
'H Triple test
Local a,b,c,n,d,u
Input a
Input b
Input u, "λ? (rational)"
√(a^2 - 2 × u × a × b + b^2) ⇒ c
numerator(c) ⇒ n
denominator(c) ⇒ d
ClrText
Print {n, d}
If frac(n) = 0 and frac(d) = 0
Then
Print "H Triple", ColorGreen
Print {a, b, u}
Print "c ="
Print c
Else
Print "No Solution", ColorRed
IfEnd
Example:
a = 85, b = 374, λ = 1
Results:
c = 289, n = 289, d = 1
Source:
Halbeisen, Lorezn and Hungrebühler, Nobert. "Heron triangles and their elliptic curves" Journal of Number Theory 213 (2020) 232-253. https://doi.org/10.1016/j.jnt.2019.12.005
Eddie
All original content copyright, © 2011-2020. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.