Exam 2 Solutions, Fall 2011

Math 326
Exam 2 Solutions
Fall ’11
Show all of your work.
1. True or False. If false, give a counterexample.
(a) Let p be an odd prime. If ā generates Z×
p then ā generates
Z×
for
all
r
>
0.
r
p
Solution: False. Take ā = 57 as below and take p = 5. 57
×
generates Z×
5 , but the order of 57 in Z52 is 4, which is not
equal to φ(52 ) = 20.
(b) All elements of Z×
16 square to 1̄.
Solution: False. 5̄ has order 4 in Z×
16 .
2. What is the order of 57 in Z×
n for the following choices of n:
9
(a) 2 . Solution: 57 = 1 + 23 · 7, so 57 has order 29−3 = 26 in
Z×
29 .
12
(b) 5 . Solution: 57 ≡ 2 mod 5 so 57 has order 4 in Z×
5.
4
×
Thus, the order of 57 in Z512 is 4 times the order of 57
there.
574 = 1 + 53 · 84448,
4
so 57 has order 512−3 = 59 there, giving 57 an order of 4·59 .
(c) 137 . Solution: 57 ≡ 5 mod 13, and 5 has order 4 in Z×
13 .
4
×
So the order of 57 in Z137 is 4 times the order of 57 there.
We have
574 = 1 + 131 · 812000,
4
and (812000, 13) = 1. So 57 has order 137−1 = 136 in Z×
137 ,
6
so the order of 57 has order 4 · 13 there.
(d) 29 512 137 . Solution: The order of 57 in Z×
29 512 137 is the least
×
×
common multiple of its orders in Z29 , Z512 and Z×
137 . Thus,
×
the order of 57 in Z29 512 137 is
[26 , 4 · 59 , 4 · 136 ] = 26 · 59 · 136 ,
as each of the 4’s gets absorbed into the 26 .
3. Find the smallest nonnegative solution for the following congruences.
x ≡ 49 mod 90
x ≡ 39 mod 380
2
Exam 2 Solutions
Solution: We solve 49 + 90k = 39 + 380`, i.e.,
10 = 380` + 90(−k).
We first solve Bezout’s identity for 380 and 90, getting
10 = 380(−4) + 90 · 17,
so we may take ` = −4 and k = −17. This gives
x ≡ 49 − 17 · 90 mod [380, 90] = 3420
≡ −1481 ≡ 1939 mod 3420.
4. Find all solutions of x2 ≡ 1 in
(a) Z256 . Solution: 256 = 28 , so the solutions are 1̄, 127, 129, −1.
(b) Z225 . Solution: 225 = 32 52 . We have
x2 ≡ 1 mod 225 ⇐⇒ x2 ≡ 1 mod 9
2
x ≡ 1 mod 25
⇐⇒ x ≡ ±1 mod 9
x ≡ ±1 mod 25.
Thus, there are four cases. To solve them, we want Bezout’s
identity for 25 and 9:
1 = 5 · 25 + (−11)9 = 100 − 99.
Case 1. x ≡ 1 mod 9 and x ≡ 1 mod 25. Here, x ≡ 1 mod
225.
Case 2. x ≡ 1 mod 9 and x ≡ −1 mod 25. Here,
x ≡ 1 · 100 + (−1)(−99) = 199 mod 225.
Case 3. x ≡ −1 mod 9 and x ≡ 1 mod 25. This is the
negative of Case 2, so x ≡ −199 ≡ 26 mod 225.
Case 4. x ≡ −1 mod 9 and x ≡ −1 mod 25. Here, x ≡ −1
mod 225.
2
5. Find an element of Z×
414 of order 4 · 41 .
Solution: We first find the order of 2̄ in Z×
414 . To do that,
×
we start by finding the order of 2̄ in Z41 , which must divide
φ(41) = 40. The first divisor of 40 giving a power of 2 greater
than 41 is 28 = 256 ≡ 10 mod 41. So 210 ≡ 40 mod 41. Hence
220 ≡ 1 mod 41. Since we’ve tested all divisors of 20, the order
of 2̄ in Z×
40 is 20.
Now, 220 = 1 + 411 · 25575, and (25575, 41) = 1, So the order
4−1
of 2̄ in Z×
= 20 · 413 . But then
414 is 20 · 41
|2̄5·41 | =
20 · 413
20 · 413
|2̄|
=
=
= 4 · 412 .
(|2̄|, 5 · 41)
(20 · 413 , 5 · 41)
5 · 41
Exam 2 Solutions
3
Alternate solution: We use 3 in place of 2. The first power
of 3 greater than 41 is 34 , which is −1 mod 41. So 38 ≡ 1 mod 41.
Since we’ve tested all divisors of 8, 3̄ has order 8 in Z×
41 . Now,
38 = 1 + 411 · 160, so 3̄8 has order 413 in Z×
.
Thus,
3̄
has
order
414
3
8 · 41 there. Thus,
|3̄|
8 · 413
8 · 413
|3̄2·41 | =
=
=
= 4 · 412 .
(|3̄|, 2 · 41)
(8 · 413 , 2 · 41)
2 · 41
6. Find a generator of Z×
41 .
Solution: Neither 2̄ nor 3̄ is a generator, nor is 5̄. 4̄ is a power of
2̄, so its order divides the order of 2̄. Thus, the smallest possible
generator is 6̄. We have
62 ≡ 36 ≡ −5
64 ≡ 25 ≡ −16
65 ≡ 150 ≡ 27
68 ≡ 256 ≡ 10
610 ≡ 360 ≡ −9
620 ≡ 81 ≡ −1,
So 6̄ has order 40, and hence is a generator. 7̄ is another generator.
7. Extra credit: Find a generator of Z×
417 using methods that work
in a small calculator, i.e., not requiring calculation of integers
with more than 10 decimal digits.
Solution: From problem 5, we se that 2̄ has order 20 · 417−1
and 3̄ has order 8 · 417−1 . Thus,
20 · 416
8 · 416
6
416
|2̄4 | =
=
5
·
41
,
|
3̄
= 8.
|
=
(20 · 416 , 4)
(8 · 416 , 416 )
6
Thus, 2̄4 and 3̄41 have relatively prime order, so
6
6
|2̄4 · 3̄41 | = |2̄4 | · |3̄41 | = 5 · 416 · 8 = 40 · 416 = φ(417 ),
6
so 2̄4 · 3̄41 is a generator.