Download 1. (a) Find and describe all integers x such that the conditions x ≡ 9

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Collatz conjecture wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

List of prime numbers wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

Transcript
Name:
Math 4130/5130
Test #2 (in-class section)
Read the problems carefully. Please show all work.
One sheet of notes (maximum size 8.5” × 11”) is permitted.
If you brought a cell phone, pager, laptop, calculator, or other electronic device,
be sure that it is disabled and stashed away.
_ Note: The take-home portion of this exam is available on-line.
1. (a) Find and describe all integers x such that the conditions
x≡9
x≡2
mod 51
mod 41
Solution #1: Since x ≡ 9 mod 51, we have x = 9 + 51k for some integer k.
Since x ≡ 2 mod 41, we have 9 + 51k ≡ 2 mod 41. Computing mod 41 yields,
9 + 10k ≡ 2
10k ≡ −7
40k ≡ −28
−k ≡ −28
k ≡ 28
mod 41,
so that k = 28 + 41s for some integer s,
and x = 9 + 51(28 + 41s) = 1437 + 2091s, or
x ≡ 1437
mod 2091
Solution #2: Set M = 41 · 51 = 2091, and compute
51y2 ≡ 1
mod 41
mod 41
mod 41
mod 41
41y1 ≡ 1
mod 51
205y1 ≡ 5
mod 51
10y2 ≡ 1
40y2 ≡ 4
y1 ≡ 5
mod 51
−y2 ≡ 4
y2 ≡ −4
mod 41
so that
x ≡ (41y1 · 9) + (51y2 · 2) ≡ (41 · 5 · 9) + (51 · −4 · 2) ≡ 1437
mod 2091
as in the previous solution.
(b) What is the largest possible (i.e. closest to zero) negative value of x from part (a)?
Solution: Since x ≡ 1437 mod 2091, the largest negative value will be
1437 − 2091 = -654
3/30/2017
2. Alice chooses to create RSA keys using primes p = 23 and q = 29 and using public key
exponent e = 13. What is her decryption key exponent d?
Note: Your answer should give the smallest positive integer that correctly functions as the
decryption exponent d.
Solution: We need to solve for d in the equation
de ≡ 1
mod φ(n),
where e = 13 and n = 23 · 29, so that φ(n) = φ(23)φ(29) = 22 · 28 = 616. in other words, we need to
solve
13d ≡ 1 mod 616.
Euclid’s algorithm yields
616 = 13 · 47 + 5
13 = 5 · 2 + 3
5=3·1+2
3=2·1+1
2=1·1+0
The associated continued fraction calculation is
47 +
2
237
1
=
,
= 47 +
5
5
2 + 1+1 1
1
so that
13 · 237 + 616 · (−5) = 1,
and
13 · 237 ≡ 1
Hence, d = 237
mod 616.
3. Compute the following. For each modular arithmetic calculation, determine the smallest
non-negative value. In other words, for each example mod m, your answer should be a value
from the set {0, 1, . . . , m − 1}. If no solution exists, then say so (no proof is needed).
(a) 3664 mod 61 ≡ 20
(d) φ(4100) = 1600
By Fermat, 360 ≡ 1 mod 61,
so 3664 ≡ (360 )11 · 34 ≡ 1 · 81 ≡ 20.
φ(4100) = φ(22 · 52 · 41)
= φ(22 )φ(52 )φ(41)
= (22 − 2)(52 − 5)(41 − 1)
= 2 · 20 · 40
= 1600
(b) 3664 mod 50 ≡ 31
(e) 26! mod 29 ≡ 14
Note that φ(50) = φ(25)φ(2) = (25 − 5)(2 − 1) = 20.
By Euler, 320 ≡ 1 mod 50,
so 3664 ≡ (320 )33 · 34 ≡ 1 · 81 ≡ 31.
(c) φ(22 · 54 · 7) = 6000
φ(22 · 54 · 7) = φ(22 )φ(54 )φ(7)
= (22 − 2)(54 − 53 )(7 − 1)
= 2 · 500 · 6
= 6000
By Wilson’s Theorem, 28! ≡ −1 mod 29.
Since 28 ≡ −1, we have
−1 ≡ 28! ≡ 27! · 28 ≡ 27! · (−1),
so that 27! ≡ 1 mod 29.
Therefore,
1 ≡ 27! ≡ 26! · 27 ≡ 26! · (−2) mod 29.
This means that
26! ≡ (−2)−1 ≡ −2−1 mod 29.
Since 2 · 15 = 30 ≡ 1 mod 29,
we have 2−1 ≡ 15, so that
26! ≡ −15 ≡ 14 mod 29.
Name:
Math 4130/5130
Test #2
Take-Home Section
Detach this sheet from the rest of the exam and take it home with you.
Your solutions are due at the beginning of class on Thursday, April 6, 2017.
Please note the due date. Late work will not be accepted. You may hand in your exam early,
however. If I am not in my office, please slide your exam under my door (Olney 428V).
Please show your work, and write your final solutions neatly on this exam. You may use
the book and your notes, but do not ask other people for help, and do not collaborate with
anyone else on these exam problems. Do not use computers to solve any of these problems.
If you need another copy of this exam you can download the pdf file at:
http://faculty.uml.edu/dklain/numtest2home.pdf
4. Find the smallest non-negative integer solution (if any exist) to the equation
2
x(2017 ) + x2017 + 1 ≡ 0
mod 2017
Hint: You may use the fact that 2017 is a prime number. Fermat’s Theorem can help with this
problem.
Be sure to show your work, explaining how the solutions can be found without a computer or
unreasonably tedious calculations. Brute force guesswork (checking all the values 0, 1, . . . 2016)
is not an acceptable solution for this problem.
Solution: Since 2017 is prime, we know from Fermat’s Theorem (and Corollary) that
x2017 ≡ x
mod 2017
for all integers x. It follows that
2
x(2017 ) = x2017·2017 ≡ (x2017 )2017 ≡ x2017 ≡ x
so that
2
x(2017 ) + x2017 + 1 ≡ x + x + 1 ≡ 2x + 1
mod 2017,
mod 2017.
To solve the given equation we need now to solve
2x + 1 ≡ 0
mod 2017
or
2x ≡ −1
mod 2017.
Since 1009 · 2 = 2018 ≡ 1 mod 2017, we have
x ≡ 1009 · 2x ≡ −1009 ≡ 1008
So the only possible solution is x ≡ 1008 mod 2017
mod 2017.
5. Suppose that the positive integer n is divisible by 7.
(a) Prove that 7φ(n) ≤ 6n.
Give a clear proof (i.e. a clear step-by-step logical explanation that anyone in the class should easily
understand).1
Solution #1: Since 7|n, we know that
1
φ(n) = n 1 −
7
!
!
!
1
1
1−
··· 1 −
,
p2
pk
where n has prime factorization n = 7a1 pa22 · · · pak k . Since each pi > 1, we have 0 ≤ 1 −
It follows that
!
!
1
1
7φ(n) = n(7 − 1) 1 −
··· 1 −
p2
pk
!
!
1
1
= 6n 1 −
··· 1 −
p2
pk
1
pi
< 1.
≤ 6n · 1 · · · 1
= 6n,
so that 7φ(n) ≤ 6n.
Solution #2: Since 7|n, we know that n = 7k m where gcd(7, m) = 1 and k ≥ 1. Therefore,
φ(n) = φ(7k )φ(m) = (7k − 7k−1 )φ(m) ≤ (7k − 7k−1 )m,
since φ(m) ≤ m.
(Recall that φ(m) ≤ m because φ(m) counts the size of a subset of the numbers {1, . . . , m}.)
It now follows that
7φ(n) ≤ 7 · (7k − 7k−1 )m = 7k · (7 − 1)m = 6 · 7k m = 6n,
so that 7φ(n) ≤ 6n.
(b) When exactly does equality hold and why?
From Solution #1: Since each pi > 1, we have 0 ≤ 1 − p1i < 1 in Solution #1 above, we have strict
inequality (<) if there are any primes pi dividing n besides the prime 7. So equality holds iff n is a
power of 7; that is, iff n = 7k for some integer power k ≥ 1.
From Solution #2: Equality holds Solution #2 above iff φ(m) = m, which occurs iff m = 1. So
equality holds iff n is a power of 7; that is, iff n = 7k for some integer power k ≥ 1.
1
An answer without a persuasive well-written explanation gets no credit.
6. (Extra Credit) Consider the following variation of the Caesar cipher: Let a and b be integers
chosen to form a secret key. Encryption takes each plaintext alphabetic character x (encoded as
a number from 0 to 25) and returns a cipher text character c(x) via the function
c(x) ≡ ax5 + b
mod 26.
For the problems below it’s ok to use a calculator, but you must explain your how you obtained
your answers in order to get credit.
(a) Suppose a = 1 and b = 3. How is the word YES encrypted using this scheme?
(Your final answer should be given using alphabetic letters, not numbers.)
Show your work.
Solution: The message YES is encoded as the plaintext number list (24, 4, 18). Compute
c(24) = 245 + 3 ≡ 23
mod 26
c(4) = 4 + 3 ≡ 13
mod 26
c(18) = 18 + 3 ≡ 21
mod 26
5
5
yielding the ciphertext number list (23, 13, 21) which corresponds to the ciphertext message XNV
(b) Suppose that a and b are unknown. The intercepted message ZG is known to correspond to
the plaintext NO. What are the values of a and b?
Show your work.
Solution: We are given that N encodes to Z and O encodes to G. Using the numerical encoding of the
alphabet mod 26, this is equivalent to
c(13) ≡ 25
and
c(14) ≡ 6
mod 26,
so that
a · 135 + b ≡ 25
a · 145 + b ≡ 6
Since 135 ≡ 13 and 145 ≡ 14 mod 26 (wasn’t that nice?), we need only to solve
13a + b ≡ 25
14a + b ≡ 6
Subtracting the top equation from the bottom yields
a ≡ 6 − 25 ≡ −19 ≡ 7
mod 26.
Substituting a = 7 into the second equation yields,
14 · 7 + b ≡ 6
so that
b ≡ 6 − 98 ≡ −92 ≡ 12
It follows that
c(x) = 7x5 + 12
mod 26.