236 Lattice Basis Reduction
=
0
0
gcd(gcd(v
1
, v
2
), v
3
)
.
This g eneralizes to the computation of d = gcd(v
1
, v
2
, . . . , v
m
); we have
U
v
1
v
2
.
.
.
v
m
=
0
.
.
.
0
d
,
where U is the m × m matrix of determina nt ±1 defined by
U =
I
m−2
O
O Q
m−1
···
I
i−1
O O
O Q
i
O
O O I
m−i−1
···
Q
1
O
O I
m−2
.
We can expres s this computation concisely as the equation
UV =
0 ··· 0 d
t
. (14.2)
Example 14.18. We use this method to compute gcd(105, 70, 42, 30):
1 0 0 0
0 1 0 0
0 0 −30 7
0 0 13 −3
1 0 0 0
0 6 −5 0
0 −1 1 0
0 0 0 1
−2 3 0 0
1 −1 0 0
0 0 1 0
0 0 0 1
105
70
42
30
=
0
0
0
1
Multiplying together the three 4 × 4 matrices gives
−2 3 0 0
6 −6 −5 0
30 −30 −30 7
−13 13 13 −3
105
70
42
30
=
0
0
0
1
From the last r ow of the matrix we obtain ...