Solving quadratic equations using reduced unimodular quadratic forms
Denis Simon · Mathematics of Computation · 2005
Let Q Q be an n × n n\times n symmetric matrix with integral entries and with det Q ≠ 0 \det Q eq 0 , but not necesarily positive definite. We describe a generalized LLL algorithm to reduce this quadratic form. This algorithm either reduces the quadratic form or stops with some isotropic vector. It is proved to run in polynomial time. We also describe an algorithm for the minimization of a ternary quadratic form: when a quadratic equation q ( x , y , z ) = 0 q(x,y,z)=0 is solvable over Q \mathbb {Q} , a solution can be deduced from another quadratic equation of determinant ± 1 \pm 1 . The combination of these algorithms allows us to solve efficiently any general ternary quadratic equation over Q \mathbb {Q} , and this gives a polynomial time algorithm (as soon as the factorization of the determinant of Q Q is known).