07.01.2015 Views

COMP 547: Assignment 1 Solutions

COMP 547: Assignment 1 Solutions

COMP 547: Assignment 1 Solutions

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.

( ) ( ) (<br />

z<br />

z<br />

(b) If<br />

p<br />

= −1 and<br />

q<br />

= 1, then<br />

)<br />

so zx /∈ QR n . Also, =<br />

zyx /∈ QR n<br />

(<br />

zyx<br />

q<br />

)<br />

zx<br />

q<br />

(<br />

z<br />

q<br />

) (<br />

y<br />

q<br />

( ) ( )<br />

z x<br />

=<br />

q q<br />

= (1)(−1) = −1,<br />

) ( )<br />

= (1)(1)(−1) = −1, so<br />

This shows that such an integer x would not be included in our four<br />

categories. Again, this would manifest itself as the four amounts not<br />

adding up to 100. This argument would hold if n had than two factors.<br />

In summary, we can conclude that if ( y<br />

n)<br />

= 1,<br />

( z<br />

n)<br />

= −1 and the amounts<br />

in our four categories add up to 100 and are more or less evenly distributed<br />

in the four categories, then n, y and z will probably have been correctly<br />

chosen. The more one whishes to be convinced that n has only two factors,<br />

the more points can be included in the set X. The probability of being<br />

misled decreases exponentially quickly with the number of samples in X.<br />

x<br />

q<br />

Part B: Theory<br />

13. To prove that rootLV finds a square root of x if and only if it randomly<br />

chooses an integer a that gives the key to √ x, we must prove two directions.<br />

(a) First, we will show that if rootLV succeeds in finding a square root<br />

of x, then the integer a it chose gives the key to √ x. We will prove<br />

this by contrapositive.<br />

Suppose rootLV chooses an integer a that does not give the key to<br />

√ x. Then a 2 − x mod p ∈ QR p , so there exists an integer r such<br />

that<br />

r 2 ≡ a 2 − x ≡ (a + √ x)(a − √ x) (mod p).<br />

From this, it follows immediately that<br />

r p−1 ≡ (a + √ x) p−1<br />

2 (a −<br />

√ x)<br />

p−1<br />

2 (mod p).<br />

Using Fermat’s little theorem, we know, since r is in the correct<br />

range, that<br />

which shows that<br />

r p−1 ≡ 1 (mod p),<br />

(a + √ x) p−1<br />

2 (a −<br />

√ x)<br />

p−1<br />

2 ≡ 1 (mod p).<br />

Multiplying both sides by (a − √ x) p−1<br />

2 yields<br />

30

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

Saved successfully!

Ooh no, something went wrong!