Download presentation

Presentation is loading. Please wait.

Published byMelinda Farmer Modified over 4 years ago

2
Divisibility October 8, 2014 1

3
Divisibility If a and b are integers and a 0, then the statement that a divides b means that there is an integer c such that b = ac. The notation is a | b. If a does not divide b, we write a | b. Note that every integer divides 0, 1 divides every integer and every integer divides itself. 2

4
Divisibility For all integers a, b and c, if c | a and c | b, then c | (a + b). Why? For all integers a, b and c, if a | b, then a | bc. Why? For all integers a, b and c, if a | b and b | c, then a | c. Why? 3 a = cx; b = cy Then, a + b = c(x + y) So, c divides (a + b)

5
Division Theorem Let a be an integer and d be a positive integer. Then, there exists unique integers q and r with 0 r < d such that a = dq + r. r is called the remainder of a divided by d and q is called the quotient. 4

6
Greatest Common Divisor Suppose that a and b are integers and not both zero. The largest integer d such that d | a and d | b is called the greatest common divisor of a and b. We write d = gcd (a, b) If gcd(a, b) = 1, then a and b are relative prime of each other. 5

7
Properties of gcd Some properties of gcd: gcd(a, b) = gcd (b, a) gcd(a, b) = gcd (-a, b) gcd(a, b) = gcd (|a|, |b|) gcd(a, 0) = |a| gcd(a, ka) = |a| where k is an integer Why each of the above? 6

8
Properties of gcd If a = bq + r for integers a, b, q and r, then gcd(a, b) = gcd(b, r) Why? (Hint: Try to show that every common divisor of a and b is also a common divisor of b and r and vice versa.) 7 Let x = cd(a, b) a = xh; b = xk Then, r = a – bq = x(h – kq) So, x | r and x = cd(a, r) Let y = cd(b, r) b = ys; r = yt Then, a = bq + r = y(qs + t) So, y | a and y = cd(a, b)

9
Euclid’s Algorithm gcd(a, b) if a = 0 return |b| if b = 0 return |a| repeat r := a mod b a := b b := r until r = 0 return a Why is this algorithm correct (i.e., will terminate and give a correct answer)? (Try to show that when a or b is 0, it is correct. Otherwise, the steps taken in the repeat- until loop reduce the value of b and keep the gcd between a and b invariant.) 8

10
GCD Identity If gcd(a, b) = d, then there exists integers m and n such that d = am + bn. That is, the gcd of two numbers can be written as a linear combination of the two numbers. This is found by a French mathematician called É tienne Bézout. Thus, this is also called the Bézout’s Identity. 9

11
A Game on Water Jugs Suppose you are given two jugs, one of 5 gallons and one 3 gallons. Now you are standing beside a fountain and is asked to fill one of the jugs with exactly 4 gallons of water. Can you do it? If so, how? How about making 9 gallons of water from 2 jugs of 10 gallons and 14 gallons? Can you do it? How or why? 10 Any volume one can measure using the 2 jugs is a linear combination of the sizes of the 2 jugs. E.g., here, any volume measurable x can be written as 10m + 14n. Since the gcd(10, 14) = 2, x must also be divisible by 2. But now, we want to measure 9. So, this is impossible.

12
Prime Numbers An integer n > 1 is a prime number means that if n = rs for positive integers r and s, then r = 1 or s = 1. That is, the only divisors of n are 1 and itself. 2, 3, 5, 7, …, 19, …, 2 57,885,161 -1, … Discovered in 2013. This number has 17,425,170 digits. Till January 2014, it’s still the largest one found. 11

13
Fundamental Theorem of Arithmetic Every positive integer greater than 1 can be written uniquely as the product of primes. That is, any positive integer n can be written as p 1 e 1 p 2 e 2 … p k e k For example, 540 =2 2 3 3 5 12

14
Composite Numbers An integer n > 1 is composite means that n is not a prime. Theorem: If p is a prime and p|ab, then p|a or p|b. Theorem: If p is a prime and p|a 1 a 2 …a n, then p|a i for some i. 13

15
Modulus Operations If a and m are integers with m > 0, then the remainder of a divided by m is denoted by a mod m. That is, when a = qm + r for 0 r < m, then r = a mod m. Easy to see that the only possible values for a mod m for any integer a is 0, 1, …, m-1. a -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 a mod 7 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 14

16
Modulus Operations For any integers a and b and positive integer m, if a mod m = b mod m, we say that a is congruent to b modulo m, or a and b are in the same congruence class. We can also write a b mod m. This is equivalent to the fact that m divides a-b. Why? 15

17
Modulus Operations a a (mod m) If a b (mod m), then b a (mod m) If a b (mod m) and b c (mod m), then a c (mod m) a b (mod m) iff a + k b + k (mod m) If a b (mod m), then ak bk (mod m) If a b (mod m) and c d (mod m), then a + c b + d (mod m) 16

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google