documents6

2
Math 55 Worksheet Adapted from worksheets by Rob Bayer, Summer 2009. Divisibility and Modular Arithmetic 1. Evaluate each of the following: (a) -17 mod 2 1 (b) 144 mod 7 4 (c) 199 mod 19 9 (d) -101 div 13 8 - (Not 7)! 2. What is 111 ··· 1 | {z } 1000 1 0 s mod 11111111 | {z } 81 0 s ? Let’s try a simpler example to see what’s going on: Instead of 1000 1’s, let’s try just 16: 111 ··· 1 | {z } 16 1 0 s : What do we know about this number? Well let’s just write it down! 1111111111111111 = 1111111100000000 + 11111111 Do you see how I split it up? Into groups of 8 1’s? Do you believe that each term in the above is divisible by 11111111? Now what if we had 24 zeros? 11111111, 11111111, 11111111 = 11111111, 00000000, 00000000+11111111, 00000000+11111111? We could write this as 111 ··· 1 | {z } 24 1 0 s = 11111111 · 10 16 + 11111111 · 10 8 + 11111111. And now each term is clearly di- visible by 111 ··· 1 | {z } 81 0 s . So now in general, we have that 111 ··· 1 | {z } 1000 1 0 s = 111 ··· 1 | {z } 81 0 s ·10 992 + 111 ··· 1 | {z } 81 0 s ·10 984 + ··· + 111 ··· 1 | {z } 81 0 s . So I see that 111 ··· 1 | {z } 1000 1 0 s is 0 mod 111 ··· 1 | {z } 81 0 s Questions to think about? Where have I used that 1000 is divisible by 8? What if it were 995 1’s? 3. Prove that if a b (mod m) and c d (mod m), then ac bd (mod m) See the proof of Theorem 5 in section 4.1 4. Show that if n|m and a b (mod m), then a b (mod n) We are give that n|m, and that m|(a - b). We want to show that n|(a - b). So from the given, we know there are integers k 1 ,k 2 such that m = k 1 n, and (a - b)= k 2 m. But then (a - b)= k 2 (k 1 n), so that a - b is a multiple of n. Hence a b mod n. 5. Prove that if the last digit of n is 3, then n is not a perfect square. We can use the division algorithm to divide n by 10. We get n = 10q + r, for 0 r 10 Now then n 2 = (10q + r) 2 = 100q 2 + 10(2qr)+ r 2 , and we see that the last digit of n 2 is the same as the last digit of r 2 . (If this doesn’t make sense, think about it, until it does.) Thus we just need to make sure that the last digit of r 2 is never 3, for 0 r< 10. These numbers are 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, and none ends in 3.

Upload: bunga43

Post on 25-Dec-2015

2 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Documents6

Math 55 Worksheet

Adapted from worksheets by Rob Bayer, Summer 2009.

Divisibility and Modular Arithmetic

1. Evaluate each of the following:

(a) −17 mod 2 1

(b) 144 mod 7 4

(c) 199 mod 19 9

(d) −101 div 13 8 - (Not 7)!

2. What is 111 · · · 1︸ ︷︷ ︸1000 1′s

mod 11111111︸ ︷︷ ︸8 1′s

? Let’s try a simpler example to see what’s going on: Instead

of 1000 1’s, let’s try just 16: 111 · · · 1︸ ︷︷ ︸16 1′s

: What do we know about this number? Well let’s just

write it down!1111111111111111 = 1111111100000000 + 11111111 Do you see how I split it up? Into groupsof 8 1’s? Do you believe that each term in the above is divisible by 11111111? Now what if wehad 24 zeros?

11111111, 11111111, 11111111 = 11111111, 00000000, 00000000+11111111, 00000000+11111111?We could write this as

111 · · · 1︸ ︷︷ ︸24 1′s

= 11111111 · 1016 + 11111111 · 108 + 11111111. And now each term is clearly di-

visible by 111 · · · 1︸ ︷︷ ︸8 1′s

. So now in general, we have that

111 · · · 1︸ ︷︷ ︸1000 1′s

= 111 · · · 1︸ ︷︷ ︸8 1′s

·10992 + 111 · · · 1︸ ︷︷ ︸8 1′s

·10984 + · · ·+ 111 · · · 1︸ ︷︷ ︸8 1′s

.

So I see that 111 · · · 1︸ ︷︷ ︸1000 1′s

is 0 mod 111 · · · 1︸ ︷︷ ︸8 1′s

Questions to think about? Where have I used that 1000 is divisible by 8? What if it were 9951’s?

3. Prove that if a ≡ b (mod m) and c ≡ d (mod m), then ac ≡ bd (mod m) See the proof ofTheorem 5 in section 4.1

4. Show that if n|m and a ≡ b (mod m), then a ≡ b (mod n)We are give that n|m, and that m|(a− b). We want to show that n|(a− b).So from the given, we know there are integers k1, k2 such that m = k1n, and (a− b) = k2m.

But then (a− b) = k2(k1n), so that a− b is a multiple of n. Hence a ≡ b mod n.

5. Prove that if the last digit of n is 3, then n is not a perfect square.We can use the division algorithm to divide n by 10. We get

n = 10q + r, for 0 ≤ r ≤ 10

Now then n2 = (10q + r)2 = 100q2 + 10(2qr) + r2, and we see that the last digit of n2 is thesame as the last digit of r2. (If this doesn’t make sense, think about it, until it does.) Thus wejust need to make sure that the last digit of r2 is never 3, for 0 ≤ r < 10. These numbers are0, 1, 4, 9, 16, 25, 36, 49, 64, 81, and none ends in 3.

Page 2: Documents6

6. Give an example of integers a, k, l,m such that k ≡ l (mod m), but ak 6≡ al (mod m)Can youfind one?

7. (a) Find a solution to 5x ≡ 1 (mod 6). Your answer is called a “multiplicative inverse of 5,mod 6” because it behaves like 1

5. x = 5

(b) Show that 2 has no multiplicative inverse mod 6. This means that 12

has no meaning whenworking mod 6. Suppose that x is the multiplicative inverse of 2 mod 6. Then 2x ≡ 1mod 6. But this means that 2x − 1 is divisible by 6. (By the definition) But 2x − 1 isodd, so it cannot have 6 as a factor. Thus x has no multiplicative inverse.

8. Show that a natural number n is divisible by 3 iff the sum of the digits is also divisible by 3.On the homework

The Euclidean Algorithm

1. Find the gcd of each of the following pairs of numbers and write it as a sa+ tb for some integerss, t.(a) 21,55 Answer = 1(b) 123, 323 Answer = 1

2. Find the multiplicative inverse of 9 mod 20. On next worksheet

3. Solve the congruence 5x ≡ 16( mod 21) On next worksheet

4. * Show that log2 3 is irrational.