Give us a chance to get into… Number Theory CMSC 203 - Discrete Structures
Slide 2Introduction to Number Theory Number hypothesis is about whole numbers and their properties. We will begin with the fundamental standards of distinctness, most prominent normal divisors, slightest basic products, and measured number juggling and take a gander at some important calculations. CMSC 203 - Discrete Structures
Slide 3Division If an and b are numbers with a 0, we say that a partitions b if there is a whole number c so that b = air conditioning. At the point when a partitions b we say that a will be a variable of b and that b is a different of a. The documentation a | b implies that a partitions b. We compose a X b when a does not isolate b (see book for right image). CMSC 203 - Discrete Structures
Slide 4Divisibility Theorems For whole numbers a, b, and c the reality of the matter is that if a | b and a | c, then a | (b + c) Example: 3 | 6 and 3 | 9, so 3 | 15. in the event that a | b, then a | bc for all whole numbers c Example: 5 | 10, so 5 | 20, 5 | 30, 5 | 40, … if a | b and b | c, then a | c Example: 4 | 8 and 8 | 24, so 4 | 24. CMSC 203 - Discrete Structures
Slide 5Primes A positive number p more prominent than 1 is called prime if the main positive elements of p are 1 and p. A positive number that is more noteworthy than 1 and is not prime is called composite. The essential hypothesis of number juggling: Every positive whole number can be composed exceptionally as the result of primes , where the prime components are composed all together of expanding size. CMSC 203 - Discrete Structures
Slide 6Primes 15 = 3·5 Examples: 48 = 2·2·2·2·3 = 2 4 ·3 17 = 17 100 = 2·2·5·5 = 2 ·5 2 512 = 2·2·2·2·2·2·2·2·2 = 2 9 515 = 5·103 28 = 2·2·7 CMSC 203 - Discrete Structures
Slide 7Primes If n is a composite number, then n has a prime divisor not exactly or break even with . This is anything but difficult to see: if n is a composite whole number, it must have two prime divisors p 1 and p 2 with the end goal that p 1 p 2 = n. p 1 and p 2 can't both be more noteworthy than , on the grounds that then p 1 p 2 > n. CMSC 203 - Discrete Structures
Slide 8The Division Algorithm Let a be a number and d a positive whole number. At that point there are exceptional whole numbers q and r , with 0 r < d , to such an extent that a = dq + r . In the above condition, d is known as the divisor, an is known as the profit, q is known as the remainder, and r is known as the rest of. CMSC 203 - Discrete Structures
Slide 9The Division Algorithm Example: When we isolate 17 by 5, we have 17 = 53 + 2. 17 is the profit, 5 is the divisor, 3 is known as the remainder, and 2 is known as the rest of. CMSC 203 - Discrete Structures
Slide 10The Division Algorithm Another illustration: What happens when we isolate - 11 by 3 ? Take note of that the rest of be negative. - 11 = 3(- 4) + 1. - 11 is the profit, 3 is the divisor, - 4 is known as the remainder, and 1 is known as the rest of. CMSC 203 - Discrete Structures
Slide 11Greatest Common Divisors Let an and b be whole numbers, not both zero. The biggest whole number d to such an extent that d | an and d | b is known as the best basic divisor of an and b. The best normal divisor of an and b is signified by gcd(a, b). Case 1: What is gcd(48, 72) ? The positive normal divisors of 48 and 72 are 1, 2, 3, 4, 6, 8, 12, 16, and 24, so gcd(48, 72) = 24. Illustration 2: What is gcd(19, 72) ? The main positive basic divisor of 19 and 72 is 1, so gcd(19, 72) = 1. CMSC 203 - Discrete Structures
Slide 12Greatest Common Divisors Using prime factorizations: a = p 1 a 1 p 2 a 2 … p n a n , b = p 1 b 1 p 2 b 2 … p n b n , where p 1 < p 2 < … < p n and an i , b i N for 1 i n gcd(a, b) = p 1 min(a 1 , b 1 ) p 2 min(a 2 , b 2 ) … p n min(a n , b n ) Example: a = 60 = 2 3 1 5 1 b = 54 = 2 1 3 5 0 gcd(a, b) = 2 1 3 1 5 0 = 6 CMSC 203 - Discrete Structures
Slide 13Relatively Prime Integers Definition: Two numbers an and b are moderately prime if gcd(a, b) = 1. Cases: Are 15 and 28 generally prime? Yes, gcd(15, 28) = 1. Are 55 and 28 moderately prime? Yes, gcd(55, 28) = 1. Are 35 and 28 generally prime? No, gcd(35, 28) = 7. CMSC 203 - Discrete Structures
Slide 14Relatively Prime Integers Definition: The whole numbers a 1 , a 2 , … , a n are pairwise moderately prime if gcd(a i , a j ) = 1 at whatever point 1 i < j n. Illustrations: Are 15, 17, and 27 pairwise moderately prime? No, on the grounds that gcd(15, 27) = 3. Are 15, 17, and 28 pairwise moderately prime? Yes, in light of the fact that gcd(15, 17) = 1, gcd(15, 28) = 1 and gcd(17, 28) = 1. CMSC 203 - Discrete Structures
Slide 15Least Common Multiples Definition: The slightest basic numerous of the positive numbers an and b is the littlest positive whole number that is separable by both an and b. We indicate the minimum basic numerous of an and b by lcm(a, b). Illustrations: lcm(3, 7) = 21 lcm(4, 6) = 12 lcm(5, 10) = 10 CMSC 203 - Discrete Structures
Slide 16Least Common Multiples Using prime factorizations: a = p 1 a 1 p 2 a 2 … p n a n , b = p 1 b 1 p 2 b 2 … p n b n , where p 1 < p 2 < … < p n and an i , b i N for 1 i n lcm(a, b) = p 1 max(a 1 , b 1 ) p 2 max(a 2 , b 2 ) … p n max(a n , b n ) Example: a = 60 = 2 3 1 5 1 b = 54 = 2 1 3 5 0 lcm(a, b) = 2 3 5 1 = 4275 = 540 CMSC 203 - Discrete Structures
Slide 17GCD and LCM a = 60 = 2 3 1 5 1 b = 54 = 2 1 3 5 0 gcd(a, b) = 2 1 3 1 5 0 = 6 lcm(a, b) = 2 3 5 1 = 540 Theorem: ab = gcd(a,b)lcm(a,b) CMSC 203 - Discrete Structures
Slide 18Modular Arithmetic Let a be a number and m be a positive whole number. We indicate by a mod m the rest of an is isolated by m. Illustrations: 9 mod 4 = 1 9 mod 3 = 0 9 mod 10 = 9 - 13 mod 4 = 3 CMSC 203 - Discrete Structures
Slide 19Congruences Let an and b be numbers and m be a positive whole number. We say that an is harmonious to b modulo m if m isolates a – b. We utilize the documentation a b (mod m) to demonstrate that an is consistent to b modulo m. At the end of the day: a b (mod m) if and just if a mod m = b mod m . CMSC 203 - Discrete Structures
Slide 20Congruences Examples: Is it genuine that 46 68 (mod 11) ? Yes, since 11 | (46 – 68). Is it genuine that 46 68 (mod 22)? Yes, since 22 | (46 – 68). For which whole numbers z is it genuine that z 12 (mod 10)? It is valid for any z{… ,- 28, - 18, - 8, 2, 12, 22, 32, … } Theorem: Let m be a positive number. The whole numbers an and b are consistent modulo m if and just if there is a number k with the end goal that a = b + km. CMSC 203 - Discrete Structures
Slide 21Congruences Theorem: Let m be a positive whole number. On the off chance that a b (mod m) and c d (mod m), then a + c b + d (mod m) and air conditioning bd (mod m). Confirmation: We realize that a b (mod m) and c d (mod m) infers that there are whole numbers s and t with b = a + sm and d = c + tm. Along these lines, b + d = (a + sm) + (c + tm) = (a + c) + m(s + t) and bd = (a + sm)(c + tm) = air conditioning + m(at + cs + stm). Subsequently, a + c b + d (mod m) and air conditioning bd (mod m). CMSC 203 - Discrete Structures
Slide 22The Euclidean Algorithm The Euclidean Algorithm finds the best regular divisor of two whole numbers an and b. For instance, in the event that we need to discover gcd(287, 91), we partition 287 by 91: 287 = 913 + 14 We realize that for whole numbers a, b and c, if a | b and a | c, then a | (b + c). Accordingly, any divisor of 287 and 91 should likewise be a divisor of 287 - 913 = 14. Subsequently, gcd(287, 91) = gcd(14, 91). CMSC 203 - Discrete Structures
Slide 23The Euclidean Algorithm In the following stride, we partition 91 by 14: 91 = 146 + 7 This implies gcd(14, 91) = gcd(14, 7). So we partition 14 by 7: 14 = 72 + 0 We find that 7 | 14, and in this way gcd(14, 7) = 7. Subsequently, gcd(287, 91) = 7. CMSC 203 - Discrete Structures
Slide 24The Euclidean Algorithm In pseudocode , the calculation can be executed as takes after: method gcd(a, b: positive numbers) x := a y := b while y 0 start r := x mod y x := y y := r end {x is gcd(a, b)} CMSC 203 - Discrete Structures
Slide 25Representations of Integers Let b be a positive whole number more noteworthy than 1. At that point if n is a positive whole number, it can be communicated particularly in the shape: n = a k b k + a k-1 b k-1 + … + a 1 b + a 0 , where k is a nonnegative number, a 0 , a 1 , … , a k are nonnegative numbers not as much as b, and a k 0. Case for b=10: 859 = 810 2 + 510 1 + 910 0 CMSC 203 - Discrete Structures
Slide 26Representations of Integers Example for b=2 (parallel extension): (10110) 2 = 12 4 + 12 2 + 12 1 = (22) 10 Example for b=16 (hexadecimal development): (we utilize letters A to F to demonstrate numbers 10 to 15) (3A0F) 16 = 316 3 + 1016 2 + 1516 0 = (14863) 10 CMSC 203 - Discrete Structures
Slide 27Representations of Integers How would we be able to build the base b extension of a whole number n? To begin with, partition n by b to get a remainder q 0 and leftover portion a 0 , that is, n = bq 0 + a 0 , where 0 a 0 < b. The rest of 0 is the furthest right digit in the base b extension of n. Next, separation q 0 by b to get: q 0 = bq 1 + a 1 , where 0 a 1 < b. a 1 is the second digit from the privilege in the base b development of n. Proceed with this procedure until you get a remainder equivalent to zero. CMSC 203 - Discrete Structures
Slide 28Representations of Integers Example: What is the base 8 extension of (12345) 10 ? To begin with, gap 12345 by 8: 12345 = 81543 + 1 1543 = 8192 + 7 192 = 824 + 0 24 = 83 + 0 3 = 80 + 3 The outcome is: (12345) 10 = (30071) 8 . CMSC 203 - Discrete Structures
Slide 29Representations of Integers technique base_b_expansion(n, b: positive whole numbers) q := n k := 0 while q 0 start a k := q mod b q := q/b k := k + 1 end {the base b development of n is (a k-1 … a 1 a 0 ) b } CMSC 203 - Discrete Structures
Slide 30Addition of Integers Let a = (a n-1 a n-2 … a 1 a 0 ) 2 , b = (b n
SPONSORS
SPONSORS
SPONSORS