Bauer-Joux algorithm

The Bauer-Joux algorithm (opens new window) is a technique for solving polynomial equations of the form p(x,y,z)=0p(x, y, z) = 0 over the integers Z\mathbb{Z}, given that the solutions lie within specific bounds: x<X|x| < X, y<Y|y| < Y, and z<Z.|z| < Z.

Consider the polynomial p(x,y,z)=1+axy+byzp(x, y, z) = 1 + a x y + b y z.

We choose a set of monomials SS by which we will shift the polynomial pp. Let's say S={1,x}S = \{1, x\}. We denote the length of SS by ss.

We define the set MM as the collection of all monomials of pp and all monomials of smpsm \cdot p for each smSsm \in S. In our case:

M={1,xy,yz,x,x2y,xyz}M = \{1, xy, yz, x, x^2y, xyz\}

We define the length of MM as mm.

Let M1M_1 represent the following matrix:

(110X1Y1a0Y1Z1b0X101X2Y10aX1Y1Z10b)\begin{pmatrix} 1 & & & & & & 1 & 0 \\ & X^{-1} Y^{-1} & & & & & a & 0 \\ & & Y^{-1} Z^{-1} & & & & b & 0 \\ & & & X^{-1} & & & 0 & 1 \\ & & & & X^{-2} Y^{-1} & & 0 & a \\ & & & & & X^{-1} Y^{-1} Z^{-1} & 0 & b \end{pmatrix}

Let x0<X,y0<Y,z0<Zx_0 < X, y_0 < Y, z_0 < Z be a root of p(x,y,z)p(x, y, z). We define the vector r0r_0 as follows:

r0=(1,x0y0,y0z0,x0,x02y0,x0y0z0)r_0 = (1, x_0 y_0, y_0 z_0, x_0, x_0^2 y_0, x_0 y_0 z_0)

Let

s0=r0M1s_0 = r_0 M_1

We can see that the last ss coordinates of rr are 00.

Let L1L_1 denote the lattice generated by the rows of M1M_1. By applying elementary row operations, we can transform M1M_1 into a matrix of the following form:

(100100000000)\begin{pmatrix} & & & & & & 1 & 0 \\ & & & & & & 0 & 1 \\ & & & & & & 0 & 0 \\ & & & & & & 0 & 0 \\ & & & & & & 0 & 0 \\ & & & & & & 0 & 0 \end{pmatrix}

That means there exists a sublattice L1L1L_1' \subset L_1 of dimension msm - s, where the vectors in L1L_1' have their last ss coordinates equal to zero.

Therefore, there exists a unimodular matrix UU such that:

U(100100000000)=M1U \begin{pmatrix} & & & & & & 1 & 0 \\ & & & & & & 0 & 1 \\ & & & & & & 0 & 0 \\ & & & & & & 0 & 0 \\ & & & & & & 0 & 0 \\ & & & & & & 0 & 0 \end{pmatrix} = M_1

We apply the LLL algorithm (opens new window) to the lattice L1L_1' and then perform Gram-Schmidt orthogonalization to obtain:

UU1(1001b100b200b300b400)=M1U U_1 \begin{pmatrix} & & & & & & 1 & 0 \\ & & & & & & 0 & 1 \\ & & & b_1 & & & 0 & 0 \\ & & & b_2 & & & 0 & 0 \\ & & & b_3 & & & 0 & 0 \\ & & & b_4 & & & 0 & 0 \end{pmatrix} = M_1

where b1b_1, b2b_2, b3b_3, and b4b_4 are obtained by first applying the LLL algorithm to LL' and then performing Gram-Schmidt orthogonalization on the resulting vectors.

We have:

r0UU1(1001b100b200b300b400)=r0M1=s0r_0 U U_1 \begin{pmatrix} & & & & & & 1 & 0 \\ & & & & & & 0 & 1 \\ & & & b_1 & & & 0 & 0 \\ & & & b_2 & & & 0 & 0 \\ & & & b_3 & & & 0 & 0 \\ & & & b_4 & & & 0 & 0 \end{pmatrix} = r_0 M_1 = s_0

Since s0s_0 has its last ss coordinates equal to zero, the vector r0UU1r_0 U U_1 must have its first ss coordinates equal to zero. For n=4n = 4 and s=2s = 2, this implies that r0UU1=(0,0,c1,c2,c3,c4)r_0 U U_1 = (0, 0, c_1, c_2, c_3, c_4) and:

s0=i=1ncibis_0 = \sum_{i=1}^n c_i b_i

Because of the Gram-Schmidt orthogonalization, the vectors b1b_1, ..., bnb_n are pairwise orthogonal. We observe that if s0<bn||s_0|| < ||b_n||, then cn=0c_n = 0, and s0s_0 is orthogonal to bnb_n. In this case, we compute the inner product of ss and bnb_n, which yields a new polynomial p2p_2 that has the same root as the polynomial pp.

Let's assume that the polynomial p2p_2 is not algebraically independent from p.p. Due to the construction, this would imply that p2p_2 is a linear combination of the columns on the right-hand side of the matrix M1M_1 (consisting of the polynomial pp and its shifts). However, since p2p_2 is also orthogonal to these polynomials, this assumption leads to a contradiction. Therefore, pp and p2p_2 are algebraically independent.

How to get a third independent polynomial?

We have an ideal I=(p,p2)I = (p, p_2). Bauer and Joux proved that if the ideal II is prime and p3Ip_3 \in I, then p,p2,p3p, p_2, p_3 are algebraically independent.

Let IMI_M be the set of polynomials from II that are defined over MM (i.e., consisting only of monomials from MM).

We compute the Gröbner basis of II and select only the polynomials that are defined over MM. This gives us a set F={r1,...,rn}F = \{r_1, ..., r_n\}.

We define a similar matrix as in the first step above, but this time the polynomials r1,...,rnr_1, ..., r_n are on the right-hand side of the matrix:

(1r1...rnX1Y1Y1Z1X1X2Y1X1Y1Z1)\begin{pmatrix} 1 & & & & & & r_1 & ... & r_n \\ & X^{-1} Y^{-1} & & & & & & & \\ & & Y^{-1} Z^{-1} & & & & & & \\ & & & X^{-1} & & & & & \\ & & & & X^{-2} Y^{-1} & & & & \\ & & & & & X^{-1} Y^{-1} Z^{-1} & & & \end{pmatrix}

In the same way that we constructed p2p_2 above, we construct a new polynomial p3p_3.

By construction, the polynomial p3p_3 is orthogonal to all the polynomials in the set F.F.

If p3Ip_3 \in I, then it must be a linear combination of the polynomials from FF. However, it is also orthogonal to all these polynomials, which implies p3=0p_3 = 0. Since this is not the case, we conclude that p3Ip_3 \notin I. Therefore, if II is prime, the polynomials pp, p2p_2, and p3p_3 are algebraically independent.

That means if we obtain p3p_3 through the above construction, it's algebraically indpendent from p1p_1 and p2p_2. But when does this construction succeed?

Remember, we get p2p_2 when s0<bn||s_0|| < ||b_n||.

Bauer and Joux use a similar estimation of bnb_n as Coppersmith in the bivariate case.

They use shifts of pp and p2p_2 as columns in the right-hand side matrix (as FF set). Similar to the bivariate case, they select the submatrix with the largest determinant, but here, the p2p_2 column must also be taken into account:

A=(1111p2xxxxp2xxxxp2xxxxp2xxxxp2)A = \begin{pmatrix} 1 & & & & & & & \\ & 1 & & & & & & \\ & & 1 & & & & & \\ & & & 1 & & & & \\ & & & & p_2 &x & x & x & x & \\ & & & & p_2& x & x & x & x & \\ & & & &p_2 &x & x & x & x & \\ & & & & p_2& x & x & x & x & \\ & & & & p_2 & & & & \end{pmatrix}