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.

Combining these two directions proves that f(a) ∈ QR p if and only<br />

if a does not give the key to √ x.<br />

Lemma 2: f is a one-to-one function.<br />

Proof: Suppose, for the sake of deriving a contradiction, that there exist<br />

two elements i, j ∈ {1, 2, . . . , p − 1}\{ √ x, p − √ x}, i ≠ j, such that<br />

f(i) = f(j) = g. Then, by the definition of f, (i − √ x)g ≡ i +<br />

√ x (mod p) and (j −<br />

√ x)g ≡ j +<br />

√ x (mod p). Combining these<br />

two results, we obtain the following sequence of statements: (NB:<br />

Here, we use some multiplicative cancellation. This is valid, since<br />

gcd(p, x) = 1 for any integer x, given that p is prime. We also know<br />

that it is not the case that i− √ x ≡ 0 (mod p) or j− √ x ≡ 0 (mod p),<br />

since i, j /∈ { √ x, p − √ x} and it is not the case that g ≡ 0 (mod p),<br />

since f’s range is {2, 3, . . . , p − 1}.)<br />

(i − √ x)(j + √ x)g ≡ (i + √ x)(j − √ x)g (mod p)<br />

(i − √ x)(j + √ x) ≡ (i + √ x)(j − √ x) (mod p)<br />

ij + i √ x − j √ x − x ≡ ij − i √ x + j √ x − x (mod p)<br />

i √ x − j √ x ≡ −i √ x + j √ x (mod p)<br />

√ x(i − j) ≡<br />

√ x(j − i) (mod p)<br />

i − j ≡ j − i (mod p)<br />

2i ≡ 2j (mod p)<br />

i ≡ j (mod p)<br />

Since i, j ∈ {1, 2, . . . , p − 1}, this last result can occur only if i = j.<br />

This contradicts our assumption that i ≠ j. Therefore, we conclude<br />

that there cannot exist two elements i, j ∈ {1, 2, . . . , p−1}, i ≠ j, such<br />

that f(i) = f(j). This establishes that f is a one-to-one function.<br />

Lemma 3: If p ≡ 1 (mod 4), then p − 1 ∈ QR p .<br />

Proof: We know that x ∈ QR p if and only if x p−1<br />

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

p−1. Then p−1 ∈ QR p if and only if (p−1) p−1<br />

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

p ≡ 1 (mod 4), we know that 4|p−1, so 4k = p−1 for some integer k.<br />

Then p − 1 ∈ QR p if and only if (4k) 2k ≡ 1 (mod 4k + 1). Note that<br />

for any integer b, (b + 1)(b − 1) = b 2 − 1. So (b + 1)|(b 2 − 1). So b 2 ≡<br />

1 (mod b + 1). Thus, (4k) 2 ≡ 1 (mod 4k + 1), and it immediately<br />

follows that (4k) 2k ≡ 1 (mod 4k + 1). This was our condition for<br />

p − 1 being in QR p . Thus, we can conclude that p − 1 ∈ QR p .<br />

34

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

Saved successfully!

Ooh no, something went wrong!