homework 1 solns - math.wvu.edukristakay/homework 1 solns.pdfwithin solution but you can only use...

9
Math 373/578, Spring 2013 due: Friday, February 1, 2013 Homework 1 Solutions Section 1.2 Written problems [1] (2 pts) p49, Problem 1.6, parts (b) & (c) Let a, b, c Z . Use the definition of divisibility to directly prove the following properties of divisibility. (b) If a|b and b |a , then a b . proof : Let a, b Z . Suppose a|b and b |a . [hypotheses] Since a|b , then d Z such that b = ad . (1) [def of a|b ] And since b |a , then k Z such that a = bk . (2) [def of b |a ] Substituting (1) into (2): a = ( ad ) k a adk = 0 [algebra] a(1 dk ) = 0 (3) [algebra] So by (3), either a = 0 or 1 dk = 0 . [if xy = 0 , then x=0 or y=0] If a = 0, then: b = ad = 0 d = 0 b = 0 . So a = b (when a = 0). [sub a=0 into (1)] If 1 dk = 0, then dk = 1 . [algebra] Since d & k Z , the only way for dk = 1 is if d = k = 1 or d = k = 1 . [properties of integers] If d = k = 1, then: a = bk = b 1 = b a = b . [sub k=1 into (2)] If d = k = 1 , then: a = bk = b (1) = b a = b . [sub k=–1 into (2)] Thus, a b . (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] Since a|b , then k Z such that b = ak . (1) [def of a|b ] And since a|c , then m Z such that c = am . (2) [def of a|c ] Adding (1) and (2): b + c = ak + am b + c = a( k + m) (3) [algebra] Since k, m Z , then k + m = n Z . [properties of integers] So, b + c = an , where n is an integer. [sub k+m=n into (3)] Thus, a|(b + c ) . [def of a|(b + c ) Subtracting (2) from (1): b c = ak am b c = a( k m) (4) [algebra]

Upload: dangnhu

Post on 28-May-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Math 373/578, Spring 2013 due: Friday, February 1, 2013

Homework 1 Solutions

Section 1.2

Written problems

[1] (2 pts) p49, Problem 1.6, parts (b) & (c)

Let

a,b,c ∈ Z . Use the definition of divisibility to directly prove the following properties of divisibility.

(b) If

a|b and

b|a , then

a = ±b .

proof: Let

a,b ∈ Z . Suppose

a|b and

b|a . [hypotheses]

Since

a|b , then

∃d ∈ Z such that

b = ad . (1) [def of

a|b ]

And since

b|a , then

∃k ∈ Z such that

a = bk . (2) [def of

b|a ]

Substituting (1) into (2):

a = (ad )k ⇒ a −adk = 0 [algebra]

⇒ a(1−dk ) = 0 (3) [algebra]

So by (3), either a = 0 or

1−dk = 0. [if

xy = 0 , then x=0 or y=0]

If a = 0, then:

b = ad = 0 ⋅d = 0 ⇒ b = 0 . So a = b (when a = 0). [sub a=0 into (1)]

If

1−dk = 0, then

dk =1. [algebra]

Since d & k

∈ Z , the only way for

dk =1 is if

d = k =1 or

d = k = −1. [properties of integers]

If

d = k =1, then:

a = bk = b ⋅1 = b ⇒ a = b . [sub k=1 into (2)]

If

d = k = −1, then:

a = bk = b ⋅ (−1) = −b ⇒ a = −b . [sub k=–1 into (2)]

Thus,

a = ±b .

(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]

Since

a|b , then

∃k ∈ Z such that

b = ak . (1) [def of

a|b ]

And since

a|c , then

∃m∈ Z such that

c = am . (2) [def of

a|c ]

Adding (1) and (2):

b + c = ak + am ⇒ b + c = a(k + m) (3) [algebra]

Since

k,m∈ Z , then

k + m = n ∈ Z . [properties of integers]

So,

b + c = an , where n is an integer. [sub k+m=n into (3)]

Thus,

a|(b + c ). [def of

a|(b + 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

Since

k,m∈ Z , then

k −m = d ∈ Z . [properties of integers]

So,

b − c = ad , where d is an integer. [sub k–m=d into (4)]

Thus,

a|(b − c ). [def of

a|(b − c )]

[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.

(a) 34787 divided by 353:

34787 = 353 ⋅98q

+193r

(b) 238792 divided by 7843:

238792 = 7843 ⋅30q

+ 3502r

(c) 9829387493 divided by 873485:

9829387493 = 873485 ⋅11253q

+ 60788r

(d) 1498387487 divided by 76348:

1498387487 = 76348 ⋅19625q

+ 57987r

[3] (1 pt) p49, Problem 1.9, parts (a) & (b)

Use the Euclidean algorithm to compute the following gcds.

(a) gcd(291,252):

291= 252 ⋅1+ 39 (1)

252 = 39 ⋅6 +18 (2)

39 =18 ⋅2 + 3 ← gcd(291,252) = 3 (3)

18 = 3 ⋅6 + 0

(b) gcd(16261,85652):

85652 =16261 ⋅5+ 4347

16261= 4347 ⋅3 + 3220

4347 = 3220 ⋅1+1127

3220 =1127 ⋅2 + 966

1127 = 966 ⋅1+ 161 ← gcd(16261,85652) = 161

966 =161 ⋅6 + 0

Math 373/578, Spring 2013 due: Friday, February 1, 2013

[4] (1 pt) p49, Problem 1.10, part (a)

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:

From (1):

39 = 291−252 ⋅1 (4)

Sub into (2) after solving for 18:

18 = 252− 291−252 ⋅1( ) ⋅6 (5)

18 = 252 ⋅7−291⋅6

Rearrange (3) and sub in (4)&(5):

3 = 39−18 ⋅2 = 291−252( )− 252 ⋅7−291⋅6( ) ⋅2

3 = 291−252−252 ⋅14 + 291⋅12

3 = 291⋅13u

+ 252 ⋅ (−15)v

[5] (2 pts) p49, Problem 1.11, parts (a) & (b)

Let a, b be positive integers.

(a) Suppose that there are integers u & v satisfying

au + bv =1. Prove that

gcd(a,b) =1.

proof: Let

a,b ∈ Z+. Suppose

∃u,v ∈ Z such that

au + bv =1. [hypotheses]

Suppose that gcd(a,b) is some positive integer, say k.

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]

Adding these:

au + bv = kmu + knv = k(mu + nv ) =1. [assumption that

au + bv =1]

Since

m,u,n,v ∈ Z , then

mu + nv ∈ Z . [properties of integers]

Since

k(mu + nv ) =1 and

k ∈ Z+, then it must be true that

k = mu + nv =1. [properties of integers]

So, since

k =1, then

gcd(a,b) =1.

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

but

gcd(a,b) = gcd(4,6) = 2 .

Suppose

∃u,v ∈ Z such that

au + bv = k , where k is an integer larger than 1. Let

gcd(a,b) = g .

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

[7] (1 pt) p49, Problem 1.9, parts (c) & (d)

(c) gcd(139024789,93278890) (d) gcd(16534528044,8332745927)

>> gcd(139024789,93278890) >> gcd(16534528044,8332745927)

ans = ans =

1 43

[8] (1 pt) p49, Problem 1.10, parts (b), (c), & (d)

(b) gcd(16261,85652) = 161

>> [d,u,v]=gcd(16261,85652) so,

161=16261 ⋅ (−79)u

+ 85652 ⋅ (15)v

d =

161

u =

-79

v =

15

Math 373/578, Spring 2013 due: Friday, February 1, 2013

(c) gcd(139024789,93278890) = 1 so,

1 =139024789 ⋅ (6944509)u

+ 93278890 ⋅ (−10350240)v

>> [d,u,v]=gcd(139024789,93278890)

d =

1

u =

6944509

v =

-10350240

(d) gcd(16534528044,8332745927) = 43

>> [d,u,v]=gcd(16534528044,8332745927)

d = so,

43 =16534528044 ⋅ (81440996)u

+ 8332745927 ⋅ (−161602003)v

43

u =

81440996

v =

-161602003

Section 1.3

Written problems

[9] (2 pts) p50, Problem 1.14

Let

m ≥1 be an integer and suppose that

a1 ≡ a2(mod m) and

b1 ≡ b2(mod m). Prove that (a)

a1 ± a2 ≡ b1 ± b2(mod m) and (b)

a1 ⋅b1 ≡ a2 ⋅b2(mod m).

(a) proof: Let

m ≥1 be an integer and suppose that

a1 ≡ a2(mod m) and

b1 ≡ b2(mod m). [hyps]

Then,

∃c ,d ∈ Z such that

a1 = a2 + cm and

b1 = b2 + dm . [def of congruence modm]

Add (or subtract) these two equations:

a1 + b1 = a2 + b2 + cm + dm . [add eqs from previous line]

Then,

(a1 + b1 )− (a2 + b2 ) = m(c + d ) . [algebra; distributive prop]

So,

m| (a1 + b1 )− (a2 + b2 )( ), which means

a1 + b1 ≡ a2 + b2(mod m). [def of divisibility & congr. modm]

Math 373/578, Spring 2013 due: Friday, February 1, 2013

(b) Let

m ≥1 be an integer and suppose that

a1 ≡ a2(mod m) and

b1 ≡ b2(mod m). [hyps]

Then,

∃c ,d ∈ Z such that

a1 = a2 + cm and

b1 = b2 + dm . [def of congruence modm]

Multiplying both sides:

a1b1 = a2b2 + a2dm + b2cm + cmdm . [multiply both sides of previous eqs]

So,

a1b1 −a2b2 = m(a2d + b2c + cmd ) . [algebra & distributive prop]

Since

a2d + b2c + cmd ∈ Z , then

m|(a1b1 −a2b2 ) . [properties of integers & def of divisibility]

Thus,

a1b1 ≡ a2b2(mod m). [def of congruence modm]

[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 + 7y for some integer y. So the second congruence becomes:

3 + 7y ≡ 4(mod 9)⇒ 7y ≡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 + 7y for some integer y and must satisfy both the other congruences:

4 + 7y ≡ 5(mod 8) and

4 + 7y ≡11(mod15)

⇒ 7y ≡1(mod 8) and

⇒ 7y ≡ 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)

Use the square-and-multiply method to compute the following powers.

(a)

17183(mod 256) :

183 = 27 + 25 + 24 + 22 + 21 + 20, so

17183 ≡1727

⋅1725

⋅1724

⋅1722

⋅1721

⋅1720

(mod 256)

i 0 1 2 3 4 5 6 7

172 i

(mod 256) 17 33 65 129 1 1 1 1

So,

17183 ≡1 ⋅1 ⋅1 ⋅65 ⋅33 ⋅17 ≡ 36465≡113(mod 256).

(b)

2477(mod1000) :

477 = 28 + 27 + 26 + 24 + 23 + 22 + 20 , so

2477 ≡ 228

⋅227

⋅226

⋅224

⋅223

⋅222

⋅220

(mod1000)

i 0 1 2 3 4 5 6 7 8

22 i

(mod1000) 2 4 16 256 536 296 616 456 936

So,

2477 ≡ 936 ⋅ 456 ⋅616 ⋅536 ⋅256 ⋅16 ⋅2 ≡ 816 ⋅176 ⋅192≡ 272(mod1000).

(c)

11507(mod1237):

507 = 28 + 27 + 26 + 25 + 24 + 23 + 21 + 20 , so

11507 ≡1128

⋅1127

⋅1126

⋅1125

⋅1124

⋅1123

⋅1121

⋅1120

(mod1237)

i 0 1 2 3 4 5 6 7 8

112 i

(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

Do the following modular computations.

(a)

347+ 513 ≡ 97(mod 763)

>> mod(347+513,763)

ans =

97

Math 373/578, Spring 2013 due: Friday, February 1, 2013

(b)

3274 +1238+ 7231+ 6437 ≡ 8926(mod 9254)

>> mod(3274+1238+7231+6437,9254)

ans =

8926

(c)

153 ⋅287 ≡139(mod 353)

>> mod(153*287,353)

ans =

139

(d)

357 ⋅862 ⋅193≡ 636(mod 943)

>> mod(357*862*193,943)

ans =

636

(e)

5327 ⋅6135⋅7139 ⋅2187 ⋅5219 ⋅1873 ≡ 4203 ⋅ 495 ⋅3101(mod 8157)

>> mod(5327*6135,8157), mod(7139*2187,8157), mod(5219*1873,8157)

ans =

4203

ans =

495

ans =

3101

and

4203 ⋅ 495⋅3101≡ 603(mod 8157)

>> mod(4203*495*3101,8157)

ans =

603

(f)

1372 ≡130(mod 327)

>> powermod(137,2,327)

ans =

130

Math 373/578, Spring 2013 due: Friday, February 1, 2013

(g)

3736 ≡ 463(mod 581)

>> powermod(373,6,581)

ans =

463

(h)

233 ⋅195 ⋅114 ≡ 42 ⋅77 ⋅91(mod 97)

>> powermod(23,3,97), powermod(19,5,97), powermod(11,4,97)

ans =

42

ans =

77

ans =

91

and

42 ⋅77 ⋅91≡ 93(mod 97)

>> mod(42*77*91,97)

ans =

93

[13] (2 pts) p51, Problem 1.17

Find all values of x between 0 and m–1 that are solutions of the following congruences.

(a)

x +17≡ 23(mod 37) ⇒ x ≡ 6(mod 37)

(b)

x + 42≡19(mod 51) ⇒ x ≡ −23 ≡ 28(mod 51)

(c)

x 2 ≡ 3(mod11) ⇒ x ≡ 5(mod11) & x ≡ 6(mod11)

(d)

x 2 ≡ 2(mod13) ⇒ no solution

(e)

x 2 ≡1(mod 8) ⇒ x ≡1,3,5,7(mod 8)

(f)

x3 − x 2 + 2x −2 ≡ 0(mod11) ⇒ x ≡1,3,8(mod11)

(g)

x ≡1(mod 5) &

x ≡ 2(mod 7) (find all solutions mod35)

⇒ x ≡ x ≡16(mod 35)