<<

ECOM 2311- Discrete Mathematics

Chapter # 4 : and Cryptography

Fall, 2013/2014

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 1/9 Outline

1 Divisibility and Modular

2 Greatest Common and Least Common Multiples

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 2/9 Divisibility and Modular Arithmetic

Number Theory The part of mathematics devoted to the study of the set of and their properties

Division If a and b are integers with a > 0, we say that a divides b if there is an c such that b = ac. The notation a|b denotes that a divides b. We write a 6 |b when a does not divide b.

THEOREM Let a, b, and c be integers, where a 6= 0. Then (i) if a|b and a|c, then a|(b + c); (ii) if a|b, then a|bc for all integers c; (iii) if a|b and b|c, then a|c.

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 3/9 Divisibility and Modular Arithmetic The Division The Division Algorithm Let a be an integer and d a positive integer. Then there are unique integers q and r, with 0 ≤ r < d, such that a = dq + r.

DEFINITION In the equality given in the division algorithm, d is called the , a is called the dividend, q is called the , and r is called the remainder. This notation is used to express the quotient and remainder: q = a div d, r = a mod d. Example: What are the quotient and remainder when 101 is divided by 11 and when -11 is divided by 3? 101 = 11 · 9 + 2 ⇒ q = 9 and r = 2. 1 − 11 = 3(−4) + 1 ⇒ q = −4 and r = 1. Note that the remainder cannot be negative. Consequently, the remainder is not −2, even though −11 = 3(−3) − 2.

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 4/9 Divisibility and Modular Arithmetic Modular Arithmetic Modular Arithmetic If a and b are integers and m is a positive integer, then a is congruent to b modulo m if m divides a − b. The notation a ≡ b( mod m) used to indicate that a is congruent to b modulo m [This notation is used indicates that two integers have the same remainder when they are divided by the positive integer m]. Example: Determine whether 17 is congruent to 5 modulo 6 and whether 24 is congruent to 14 modulo 6. Because 6 divides 17 − 5 = 12, we see that 17 ≡ 5( mod 6). Because 24 − 14 = 10 is not divisible by 6, we see that 24 6≡ 14( mod 6).

A positive integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite.

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 5/9 Primes and Greatest Common Divisors Primes Fundamental theorem of arithmetic Every positive integer can be written as a prime or as a product of √ primes. If n is composite, it has a prime divisor ≤ n. Example: Show that 101 is prime. √ The only primes not exceeding 101 are 2, 3, 5, and 7. Because 101 is not divisible by 2, 3, 5, or 7, it follows that 101 is prime. Example: Find the prime factorization of 7007. The prime factorization of 7007 is 7 × 7 × 11 × 13 = 72 × 11 × 13. A number is divisible by 7 if the difference is divisible by 7 [Drop the unit digit from the original number and subtract the double of the unit].

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 6/9 Greatest Common Divisors and Least Common Multiples Let a and b be integers, not both zero. The largest integer d such that d|a and d|b is called the greatest common divisor(gcd) of a and b. The greatest common divisor of a and b is denoted by gcd(a, b). Finding gcd(a, b) Express a, b as powers of products of primes. The products of lowest powers of all distinct primes is gcd(a, b) = intersection. Example: What is the greatest common divisor of 24 and 36?. The positive common divisors of 24 and 36 are 1, 2, 3, 4, 6, and 12. Hence, gcd(24, 36) = 12.

The integers a and b are relatively prime if their greatest common divisor is 1.

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 7/9 Greatest Common Divisors and Least Common Multiples Least Common Multiple Least Common Multiple of the positive integers a and b is the smallest positive integer that is divisible by both a and b. The least common multiple of a and b is denoted by lcm(a, b). Finding lcm(a, b) Express a, b as powers of products of primes. The products of the highest powers of all distinct primes is lcm(a, b) = union. Example: What is the least common multiple of 233572 and 2433?. lcm(233572, 2433) = 243572.

Let a and b be positive integers. Then ab = gcd(a, b) × lcm(a, b).

Let a = bq + r, where a, b, q, and r are integers. Then gcd(a, b) = gcd(b, r).

ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 8/9 A very good class as a whole. I enjoyed having you in my class. Good luck to all of you.

End of The Course