Professional Documents
Culture Documents
Homework 1 Solns
Homework 1 Solns
Homework 1 Solns
Homework 1 Solutions
Section 1.2
Written problems
Let a,b,c ∈ Z . Use the definition of divisibility to directly prove the following properties of divisibility.
€ Substituting
€ (1) into (2): €
a = (ad )k ⇒ a − adk = 0 € [algebra]
If 1− dk = 0 , €
then dk =1 . € [algebra]
€ € d = k =1, then: a = bk = b ⋅1 = b
If ⇒ a = b. [sub k=1 into (2)]
€ a = ±b .
Thus, €
€ €
(c) If a|b and a|c , then a|(b + c ) and a|(b − c ) .
€
proof: Let a,b,c ∈ Z . Suppose a|b and a|c . [hypotheses]
And
€ since a|c , then € € that c = am .
∃m ∈ Z such (2) [def of a|c ]
Subtracting
€ (2) from (1): b − c = ak − am ⇒ b − c = a(k − m) (4) [algebra]
€ €
€
Math 373/578, Spring 2013 due: Friday, February 1, 2013
€
[2] (1€pt) p49, Problem 1.7 (calculator required) €
Use a calculator and the method described in Remark 1.9 to compute the following quotients and
remainders.
€ 18 = 3 ⋅ 6 + 0
€
(b) gcd(16261,85652):
€ 85652 =16261⋅ 5+ 4347
€ 966 =161⋅ 6 + 0
€
€
Math 373/578, Spring 2013 due: Friday, February 1, 2013
For each of the gcds in Exercise 1.9 ([3] above), use the extended Euclidean algorithm to find integers u, v
such that au + bv = gcd(a,b).
(a) gcd(291,252) = 3:
€
18 = 252 ⋅ 7 − 291⋅ 6
(a) Suppose that there are integers u & v satisfying au + bv =1 . Prove that gcd(a,b) =1.
Then
€ k is the largest €
positive integer such€that k|a and k|b . [def of gcd(a,b)=k]
So, there exist integers m and n such that a = km and b = kn . [def of k|a & k|b ]
Also, au = kmu and bv = knv . € € [multiply both sides of previous eqs by u,v]
€ ∈ Z , then mu + nv ∈ Z .
€ Since m,u,n,v [properties of integers]
€ € €
€ €
Math 373/578, Spring 2013 due: Friday, February 1, 2013
(b) Suppose that there are integers u, v satisfying au + bv = 6 . Is it necessarily true that gcd(a,b)=6? If not,
give a specific counterexample, and describe in general all of the possible values of gcd(a,b).
It is not true that gcd(a,b) must be 6 if there exist integers u, v such that au + bv = 6 .
€
For example, consider a = 4, b = 6, u = −3, v = 3 : au + bv = 4(−3) + 6(3) = −12 +18 = 6
Then
€ g|a and g|b , and also, g|au and g|bv . So, g|(au + bv ) ⇒ g|k . Thus, if au + bv = k , then
gcd(a,b) could be any factor of k.
€ € €
€ € € € € €
[6] (2 pts) Prove: Let a, b, and c be integers, and let gcd(a,b) =1. If a|bc , then a|c . [omitted]
Computational problems € € €
ans = ans =
1 43
[8] (1 pt) p49, Problem 1.10, parts (b), (c), & (d)
d =
161 €
u =
-79
v =
15
Math 373/578, Spring 2013 due: Friday, February 1, 2013
>> [d,u,v]=gcd(139024789,93278890)
d = €
1
u =
6944509
v =
-10350240
(d) gcd(16534528044,8332745927) = 43
>> [d,u,v]=gcd(16534528044,8332745927)
43
u = €
81440996
v =
-161602003
Section 1.3
Written problems
Let m ≥1 be an integer and suppose that a1 ≡ a 2 (mod m) and b1 ≡ b2 (mod m) . Prove that
(a) a1 ± a 2 ≡ b1 ± b2 (mod m) and (b) a1 ⋅ b1 ≡ a 2 ⋅ b2 (mod m) .
(a) proof: Let m ≥1 be an integer and suppose that a1 ≡ a 2 (mod m) and b1 ≡ b2 (mod m) . [hyps]
€ € €
€ Then, ∃c,d ∈ Z such that€a1 = a 2 + cm and b1 = b2 + dm . [def of congruence modm]
Add €
(or subtract) these two equations: a1€+ b1 = a 2 + b2 + cm + dm
€. [add eqs from previous line]
€ Then, (a + b ) − (a
€2 + b2 ) = m(c + d€
). [algebra; distributive prop]
1 1
€ €
Math 373/578, Spring 2013 due: Friday, February 1, 2013
(b) Let m ≥1 be an integer and suppose that a1 ≡ a 2 (mod m) and b1 ≡ b2 (mod m) . [hyps]
€ So, a b − a b = m(a ).
€ 2d + b2c + cmd € [algebra & distributive prop]
1 1 2 2
Since a 2d + b2c€+ cmd ∈ Z , then m|(a1b1 − a 2b2 ) . [properties of integers & def of divisibility]
€ €
€ [10] (2 pts) p52, Problem 1.23, parts (a), (b), & (c)
(a) Find a single value x that simultaneously solves the two congruences: x ≡ 3(mod 7) & x ≡ 4(mod 9) .
Every solution of the first congruence looks like x = 3 + 7 y for some integer y.
So the second congruence becomes: 3 + 7 y ≡ 4(mod 9) ⇒ 7 y ≡1(mod 9) .
€
The integer y that solves this congruence is the inverse of 7 mod9, which is 4:€7 ⋅ 4 ≡ 28 ≡1(mod 9) .
So if y equals 4, then x = 3 + 7(4) = 3 + 28 = 31.
€
€
(b) Find a single value x that simultaneously solves the two congruences: €x ≡13(mod 71) & x ≡ 41(mod 97)
€
Every solution of the first congruence looks like x =13 + 71y for some integer y.
So the second congruence becomes:
€ €
13 + 71y ≡ 41(mod 97) ⇒ 71y ≡ 28(mod 97) ⇒ y ≡ 28 ⋅ 71−1 ≡ 28 ⋅ 41 ≡1148 ≡ 81(mod 97) .
€
So if y equals 81, then x =13 + 71(81) = 5764 .
€
(c) Find a value x that simultaneously solves the congruences: x ≡ 4(mod 7) , x ≡ 5(mod 8) , x ≡11(mod15)
€
A solution to the first congruence has the form x = 4 + 7 y for some integer y and must satisfy both
the other congruences: 4 + 7 y ≡ 5(mod 8) and 4 + 7 y ≡11(mod15)
€ € €
⇒ 7 y ≡1(mod 8) and ⇒ 7 y ≡ 7(mod15) ⇒ y ≡1(mod15)
€
€ € So y has the form y =1+15z for some integer z.
€ ⇒ 7(1+15z ) ≡€
7 +105z ≡1(mod 8) ⇒ 105z ≡ −6 ≡ 2(mod 8)
⇒ z ≡ 2 ⋅105−1 ≡ 2 ⋅1 ≡ 2(mod 8) €
So is z equals €
2, then y =1+15(2) = 31 and x = 4 + 7(31) = 4 + 217 = 221 .
€ €
Math 373/578, Spring 2013 due: Friday, February 1, 2013
[11] (2 pts) p52, Problem 1.25 (use only square-and-multiply algorithm; you can use matlab mod function
within solution but you can only use powermod to check answer)
€
(b) 2 477 (mod1000) :
€
8 7 6 4 3 2 0
477 = 28 + 27 + 26 + 2 4 + 23 + 2 2 + 20 , so 2 477 ≡ 2 2 ⋅ 2 2 ⋅ 2 2 ⋅ 2 2 ⋅ 2 2 ⋅ 2 2 ⋅ 2 2 (mod1000)
€ i 0 1 2 3 4 5 6 7 8
i
2 2 (mod1000) 2 4 16 256 536 296 616 456 936
€ €
So, 2 477 ≡ 936 ⋅ 456 ⋅ 616 ⋅ 536 ⋅ 256 ⋅16 ⋅ 2 ≡ 816 ⋅176 ⋅192 ≡ 272(mod1000) .
€
(c) 11507 (mod1237):
€
507 = 28 + 27 + 26 + 25 + 2 4 + 23 + 21 + 20 , so
8 7 6 5 4 3 1 0
€ 11507 ≡112 ⋅112 ⋅112 ⋅112 ⋅112 ⋅112 ⋅112 ⋅112 (mod1237)
€ i 0 1 2 3 4 5 6 7 8
2i
11 (mod1237) 11 121 1034 388 867 830 1128 748 380
€
So, 11507 ≡ 380 ⋅ 748 ⋅1128 ⋅ 830 ⋅ 867 ⋅ 388 ⋅121⋅11 ≡ 967 ⋅1068 ⋅1169 ⋅ 94 ≡1098 ⋅1030 ≡ 322(mod1000)
€ Computational problems
€
[12] (1 pt) p51, Problem 1.16
>> mod(347+513,763)
€ ans =
97
Math 373/578, Spring 2013 due: Friday, February 1, 2013
>> mod(3274+1238+7231+6437,9254)
€ ans =
8926
>> mod(153*287,353)
€ ans =
139
>> mod(357*862*193,943)
€ ans =
636
(e) 5327 ⋅ 6135⋅ 7139 ⋅ 2187 ⋅ 5219 ⋅1873 ≡ 4203 ⋅ 495⋅ 3101(mod 8157)
€ ans =
4203
ans =
495
ans =
3101
>> mod(4203*495*3101,8157)
€ ans =
603
>> powermod(137,2,327)
€ ans =
130
Math 373/578, Spring 2013 due: Friday, February 1, 2013
>> powermod(373,6,581)
€ ans =
463
€ ans =
42
ans =
77
ans =
91
>> mod(42*77*91,97)
€ ans =
93
Find all values of x between 0 and m–1 that are solutions of the following congruences.
€ ⇒ x ≡ x ≡16(mod 35)
€ €