10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

246 Chapter 5 EXPONENTIAL FACTORING ALGORITHMS<br />

ax 2 1 + b1x1y1 + c1y 2 1 is coprime to a2. TobringB1 and b2 into agreement,<br />

find integers r, s such that rA1 + sa2 =1,andletk = r(b2 − B1)/2. (Note<br />

that b2 and B1 have the same parity as D.) Set B = B1+2kA1,sothatB ≡ b2<br />

(mod 2a2). Then (see Exercise 5.18) (A1,B1,C ′ 1) is equivalent to (A1,B,C1)<br />

for some integer C1,and(a2,b2,c2) is equivalent to (a2,B,C2) for some integer<br />

C2. LetA2 = a2, and we are done. ✷<br />

Given two primitive quadratic forms (a1,b1,c1), (a2,b2,c2) of discriminant<br />

D, let(A1,B,C1), (A2,B,C2) be the respectively equivalent forms given in<br />

Lemma 5.6.6. We define a certain operation like so:<br />

〈a1,b1,c1〉∗〈a2,b2,c2〉 = 〈a3,b3,c3〉,<br />

where a3 = A1A2, b3 = B, c3 = C1/A2. (Note that A1C1 = A2C2 and<br />

gcd(A1,A2) = 1 imply that C1/A2 is an integer.) Then Lemma 5.6.5 asserts<br />

that “∗” is a well-defined binary operation on C(D). This is the composition<br />

operation that we alluded to above. It is clearly commutative, and the<br />

proof that it is associative is completely straightforward. If D is even, then<br />

〈1, 0,D/4〉 acts as an identity for ∗, while if D is odd, then 〈1, 1, (1−D)/4〉 acts<br />

as an identity. We denote this identity by 1D. Finally, if 〈a, b, c〉 is in C(D),<br />

then 〈a, b, c〉 ∗〈c, b, a〉 =1D (see Exercise 5.20). We thus have that C(D) is<br />

an abelian group under ∗. This is called the class group of primitive binary<br />

quadratic forms of discriminant D.<br />

It is possible to trace through the above argument and come up with an<br />

algorithm for the composition of forms. Here is a relatively compact procedure:<br />

it may be found in [Shanks 1971] and in [Schoof 1982].<br />

Algorithm 5.6.7 (Composition of forms). We are given two primitive<br />

quadratic forms (a1,b1,c1), (a2,b2,c2) of the same negative discriminant. This<br />

algorithm computes integers a3,b3,c3 such that 〈a1,b1,c1〉 ∗〈a2,b2,c2〉 =<br />

〈a3,b3,c3〉.<br />

1. [Extended Euclid operation]<br />

g =gcd(a1,a2, (b1 + b2)/2);<br />

Find u, v, w such that ua1 + va2 + w(b1 + b2)/2 =g;<br />

2. [Final assignment]<br />

Return the values:<br />

a3 = a1a2<br />

g2 , b3 = b2 +2 a2<br />

g<br />

b1 − b2<br />

2<br />

<br />

v − c2w , c3 = b23 − g<br />

.<br />

4a3<br />

(To find the numbers g, u, v, w in Step [Extended Euclid operation] first use<br />

Algorithm 2.1.4 to find integers U, V with h =gcd(a1,a2) =Ua1 + Va2,<br />

and then to find integers U ′ ,V ′ with g = gcd(h, (b1 + b2)/2)) = U ′ h +<br />

V ′ (b1 + b2)/2. Then u = U ′ U, v = U ′ V, w = V ′ .) We remark that even<br />

if (a1,b1,c1), (a2,b2,c2) are reduced, the form (a3,b3,c3) thatisgenerated<br />

by the algorithm need not be reduced. One can follow Algorithm 5.6.7 with<br />

Algorithm 5.6.2 to get the reduced form in the class 〈a3,b3,c3〉.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!