Intoduction Common Divisos Discete Mathematics Andei Bulatov
Discete Mathematics Common Divisos 3- Pevious Lectue Integes Division, popeties of divisibility The division algoithm Repesentation of numbes Pimes
Discete Mathematics Pimes 30-3 The Geatest Common Diviso Fo integes a and b, a positive intege c is said to be a common diviso of a and b if c a and c b Let a, b be integes such that a 0 o b 0. Then a positive intege c is called the geatest common diviso of a, b if (a) c a and c b (that is c is a common diviso of a, b) (b) fo any common diviso d of a and b, we have d c What ae the common divisos, and the geatest common diviso of 4 and 70? The geatest common diviso of a and b is denoted by gcd(a,b)
Discete Mathematics Pimes 30-4 The Geatest Common Diviso (cntd) Theoem Fo any positive integes a and b, thee is a uniue positive intege c such that c is the geatest common diviso of a and b Fist ty: Tae the lagest common diviso, in the sense of usual ode Does not wo: Why evey othe common diviso divides it? a 8 0 4 6 9 b gcd(a,b) 7 5 3
Discete Mathematics Pimes 30-5 The Geatest Common Diviso (cntd) Poof. Given a, b, let S { as + bt s,t Z, as + bt > 0 }. Since S, it has a least element c. We show that c gcd(a,b) We have c ax + by fo some integes x and y. If d a and d b, then d ax + by c. If c a, we can use the division algoithm to find a c +, whee, ae integes and 0 < < c. Then a c a (ax + by) a( x) + b(-y) S, a contadiction Theefoe c a, and by a simila agument c b.
Discete Mathematics Pimes 30-6 The Geatest Common Diviso (cntd) Poof. (cntd) Finally, if c and d ae geatest common divisos, then c d and d c. Thus c d. Q. E. D.
Discete Mathematics Pimes 30-7 Euclidean Algoithm: Small Example To wam up, let us find the geatest common diviso of 87 and 9 87 9 3 + 4 Note that any common diviso of 87 and 9 is also a diviso of 4 87 9 3. Convesely, evey common diviso of 9 and 4 is also a diviso of 87 9 3 + 4. Thus gcd(87,9) gcd(9,4). Next 9 4 6 + 7. By the same agument gcd(9,4) gcd(4,7). Finally, since 7 4, gcd(4,7) 7. Thus, gcd(87,9) 7.
Discete Mathematics Common Divisos 3-8 Euclidean Algoithm: Key Popety Lemma. Let a b +, whee a, b,, and ae integes. Then gcd(a,b) gcd(b,) Poof Let d be a common diviso of a and b. Then d also divides a b. Thus, d is a common diviso of b and. Now, let d be a common diviso of b and. Then d also divides a b +. Theefoe the pais a,b and b, have the same common divisos. Hence, gcd(a,b) gcd(b,).
Discete Mathematics Common Divisos 3-9 Euclidean Algoithm: The Algoithm Let a and b be positive integes with a b. Set and Successively apply the division algoithm until the emainde is 0 Eventually, the emainde is zeo, because the seuence of emaindes cannot contain moe than a elements. Futhemoe, Hence gcd(a,b) is the last nonzeo emainde in the seuence a 0 b 3 3 0 < + < + < + 0 0 0 M 0 > > > K 0 a 0,0) gcd( ), gcd( ), gcd( ), gcd( gcd(a,b) L
Discete Mathematics Common Divisos 3-0 Geatest Common Diviso Theoem. If a, b ae integes and d is thei geatest common diviso, then thee ae integes u, v such that d au + bv. Poof. We use the Euclidean algoithm and the notation We have 3 0 + + + M 0 d, b, a d 3 ) ( M 3 3 4 3 3 3 4 ) ) ( ( ) ( bv au v u 0 + +
Discete Mathematics Common Divisos 3- Example Find d gcd(8,3) and integes u and v such that d 8u + 3v
Discete Mathematics Common Divisos 3- Moe Pimes Pime numbes have some vey special popeties with espect to division Popeties of pimes. () If a,b ae integes and p is pime such that p ab then p a o p b. () Let ai be an intege fo i n, and p is pime and then p fo some i n a i p a K a an
Discete Mathematics Common Divisos 3-3 The Fundamental Theoem of Aithmetic Theoem. Evey intege n > can be epesented as a poduct of pimes uniuely, up to the ode of the pimes. Poof. Existence By contadiction. Suppose that thee is an n > that cannot be epesented as a poduct of pimes, and let m be the smallest such numbe. m is not pime, theefoe m st fo some s and t But then s and t can be witten as poducts of pimes, because s < m and t < m. Theefoe m is a poduct of pimes
Discete Mathematics Common Divisos 3-4 Example Find the pime factoization of 980,0
Discete Mathematics Common Divisos 3-5 Least Common Multiple A positive intege c is called a common multiple of integes a and b if a c and b c The numbe c is called the least common multiple of a and b, denoted lcm(a,b) if it is a common multiple and fo any common multiple d we have c d Theoem. Fo any integes a and b, the least common multiple exists.
Discete Mathematics Common Divisos 3-6 Least Common Multiple (cntd) Find lcm(3,455). Theoem Fo any integes a and b we have ab lcm(a,b) gcd(a,b)
Discete Mathematics Common Divisos 3-7 Relatively Pime Numbes a and b such that gcd(a,b) ae called elatively pime How many elatively pime numbes ae thee? Eule s totient function φ(n) is the numbe of numbes such that 0 < < n and n and ae elatively pime. If p is pime then evey < p is elatively pime with p. Hence, φ(p) p. Lemma. If a and b ae elatively pime then φ(ab) φ(a) φ(b) Coollay. s s su If n p p K is the pime factoization of n, then pu s s su ϕ (n) n p L p pu
Discete Mathematics Common Divisos 3-8 Homewo Execises fom the Boo: No. ab, 4, 5, 0, 5 (page 37) No. ab, 5, 7, 9 (page 4)