* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Chapter 4.7 & 4.8 - Help-A-Bull
Survey
Document related concepts
Approximations of Ο wikipedia , lookup
Location arithmetic wikipedia , lookup
Abuse of notation wikipedia , lookup
List of prime numbers wikipedia , lookup
Mathematics of radio engineering wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Factorization wikipedia , lookup
Quadratic reciprocity wikipedia , lookup
Collatz conjecture wikipedia , lookup
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
Fermat's Last Theorem wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Factorization of polynomials over finite fields wikipedia , lookup
Mathematical proof wikipedia , lookup
Transcript
Quotient-Remainder Theory, Div and Mod If π and π are integers and π > 0, then π πππ£ π = π and π πππ π = π βΊ π = ππ + π where π and π are integers and 0 β€ π < π. Quotient: q = π πππ£ π = π π Reminder: r = π πππ π = π β ππ 1 Exercise Prove that for all integers a and b, if a mod 7 = 5 and b mod 7 = 6 then ab mod 7 = 2. What values are π, π, and π? 2 Exercise Prove that for all integers a and b, if a mod 7 = 5 and b mod 7 = 6 then ab mod 7 = 2. Hint: π = 7 π = 7π + 5, b = 7π +6 ππ = 7π + 5 7π + 6 = 49ππ + 42π + 35π + 30 = 7 7ππ + 6π + 3π + 4 + 2 3 Floor & Ceiling Definition: β’ Floor: If π₯ is a real number and π is an integer, then π₯ =π βΊ π β€π₯ <π+1 β’ Ceiling: if π₯ is a real number and π is an integer, then π₯ =π βΊ πβ1<π₯ β€π π₯ π+1 π floor of π₯ = π₯ π₯ πβ1 π ceiling of π₯ = π₯ 4 Relations between Proof by Contradiction and Proof by Contraposition β’ To prove a statement βπ₯ in π·, if π π₯ then π(π₯) β’ Proof by contraposition proves the statement by giving a direct proof of the equivalent statement βπ₯ in π·, if π π₯ is false then π π₯ is false Suppose π₯ is an arbitrary element of π· such that ~π(π₯) Sequence of steps ~π(π₯) β’ Proof by contradiction proves the statement by showing that the negation of the statement leads logically to a contradiction. Suppose βπ₯ in π· such that π(π₯) and ~π(π₯) Same sequence of steps Contradiction: π(π₯) and ~π(π₯) 5 Summary of Chapter 4 β’ Number theories: β Even, odd, prime, and composite β Rational, divisibility, and quotient-remainder theorem β Floor and ceiling β The irrationality of 2 and gcd β’ Proofs: β Direct proof and counterexample β Indirect proof by contradiction and contraposition 6 The Irrationality of 2 How to proof: β’ Direct proof? β’ Proof by contradiction? β’ Proof by contraposition? If π is a real number, then π π is rational β β integers π and π such that π = and π β 0. π A real number that is not rational is irrational. 7 The Irrationality of 2 Proof by contradiction: Starting point: Negation: 2 is rational. To show: A contradiction. π 2 = , where π and π are integers with no common factors and π β 0, π by definition of rational. π2 = 2π2 , by squaring and multiplying both sides with π2 π2 is even, then π is even. Let π = 2π for some integer π. (2π)2 = 4π 2 = 2π2 , by substituting π = 2π into π2 = 2π2 . π2 is even, and so π is even. Hence both π and π have a common factor of 2. 8 Irrationality of 1 + 3 2 Proof by contradiction: Starting point: Negation: 1 + 3 2 is rational. To show: A contradiction. 9 Irrationality of 1 + 3 2 Proof by contradiction: By definition of rational, π 1 + 3 2 = π for some integers π and π with π β 0. It follows that π π π π =πβπ πβπ = π 3 2= β1 by subtracting 1 from both sides by substitution by the rule for subtracting fractions with a common denominator Hence, 2= πβπ 3π by dividing both sides by 3. π β π and 3π are integers and 3π β 0 by the zero product property. Hence 2 is quotient of the two integers π β π and 3π with 3π β 0, so 2 is rational by the definition of rational. This contradicts the fact that 2 is irrational. 10 Property of a Prime Divisor Proposition 4.7.3 For any integer π and any prime number π, if π|π then π | (π + 1) If a prime number divides an integer, then it does not divide the next successive integer. Starting point: there exists an integer π and a prime number π such that π | π and π | (π + 1). To show: a contradiction. π = ππ and π + 1 = ππ for some integers π and π by definition of divisibility. It follows that 1 = (π + 1) β π = ππ β ππ = π(π β π ), π β π = 1/π, by dividing both sides with π. π > 1 because π is prime, hence, 1/π is not an integer, thus π β π is not an integer, which is a contradict π β π is an integer since π and π are integers. if π and π are integers and π β 0: π|π βΊ β an integer π such that π = π β π Infinitude of the Primes Theorem 4.7.4 Infinitude of the Primes The set of prime numbers is infinite. Proof by contradiction: Starting point: the set of prime number is finite. To show: a contradiction. Assume a prime number π is the largest of all the prime numbers 2, 3, 5, 7, 11, . . . , π. Let π be the product of all the prime numbers plus 1: π = (2 · 3 · 5 · 7 · 11 · · · π) + 1 Then π > 1, and so, by Theorem 4.3.4 (any integer larger than 1 is divisible by a prime number) , π is divisible by some prime number q. Because q is prime, q must equal one of the prime numbers 2, 3, 5, 7, 11, . . . , π. Thus, by definition of divisibility, π divides 2 · 3 · 5 · 7 · 11 · · · π, and so, by Proposition 4.7.3, π does not divide (2 · 3 · 5 · 7 · 11 · · · π) + 1, which equals π. Hence N is divisible by q and N is not divisible by q, and we have reached a contradiction. [Therefore, the supposition is false and the theorem is true.] 12 Greatest Common Divisor (GCD) β’ The greatest common divisor of two integers a and b is the largest integer that divides both π and π. Definition Let π and π be integers that are not both zero. The greatest common divisor of π and π, denoted gcd(a, b), is that integer π with the following properties: 1. π is common divisor of both a and b, in other words, π | π, and π | π. 2. For all integers π, if π is a common divisor of both π and π, then π is less than or equal to π. In other words, for all integers π, if π | π, and π |π, then c β€ π. Exercise: β’ gcd 72,63 = 9, since 72 = 9 β 8 and 63 = 9 β 7 β’ gcd 1020 , 630 = 220 , since 1020 = 220 β 520 and 630 = 230 β 330 13 Greatest Common Divisor (GCD) Lemma 4.8.1 If π is a positive integer, then gcd(π, 0) = π. Proof: Suppose π is a positive integer. [We must show that the greatest common divisor of both π and 0 is π.] 1. π is a common divisor of both π and 0 because r divides itself and also π divides 0 (since every positive integer divides 0). 2. No integer larger than π can be a common divisor of π and 0 (since no integer larger than π can divide π). Hence π is the greatest common divisor of π and 0. 14 Greatest Common Divisor (GCD) Lemma 4.8.2 If π and π are any integers not both zero, and if π and π are any integers such that π = ππ + π, then gcd(π, π) = gcd(π, π) Proof: [The proof is divided into two sections: (1) proof that gcd(π, π) β€ gcd(π, π ), and (2) proof that gcd(π, π ) β€ gcd(π, π). Since each gcd is less than or equal to the other, the two must be equal.] 1. gcd(π, π) β€ gcd(π, π): a. [We will first show that any common divisor of π and π is also a common divisor of π and π.] Let π and π be integers, not both zero, and let π be a common divisor of π and π. Then π | π and π | π, and so, by definition of divisibility, π = ππ and π = ππ, for some integers π and π. Now substitute into the equation π = ππ + π to obtain ππ = (ππ)π + π. 15 Greatest Common Divisor (GCD) Lemma 4.8.2 If π and π are any integers not both zero, and if π and π are any integers such that π = ππ + π, then gcd(π, π) = gcd(π, π) Proof (contβ): 1. gcd(π, π) β€ gcd(π, π): a. [We will first show that any common divisor of π and π is also a common divisor of π and π.] ππ = (ππ)π + π. Then solve for π : π = ππ β (ππ)π = (π β ππ)π. But π β ππ is an integer, and so, by definition of divisibility, π | π . Because we already know that π | π, we can conclude that π is a common divisor of π and π [as was to be shown]. 16 Greatest Common Divisor (GCD) Lemma 4.8.2 If π and π are any integers not both zero, and if π and π are any integers such that π = ππ + π, then gcd(π, π) = gcd(π, π) Proof (contβ): 1. gcd(π, π) β€ gcd(π, π): b. [Next we show that gcd(π, π) β€ gcd(π, π).] By part (a), every common divisor of π and π is a common divisor of π and π . It follows that the greatest common divisor of π and π is defined because π and π are not both zero, and it is a common divisor of π and π . But then gcd(π, π) (being one of the common divisors of π and π) is less than or equal to the greatest common divisor of π and π : gcd(π, π) β€ gcd(π, π ). 2. gcd(π, π) β€ gcd(π, π): The second part of the proof is very similar to the first part. It is left as an exercise. 17 The Euclidean Algorithm β’ Problem: β Given two integer A and B with π΄ > π΅ β₯ 0, find gcd(π΄, π΅) β’ Idea: β The Euclidean Algorithm uses the division algorithm repeatedly. β If B=0, by Lemma 4.8.1 we know gcd(π΄, π΅) = π΄. β If B>0, division algorithm can be used to calculate a quotient π and a remainder π: π΄ = π΅π + π where 0 β€ π < π΅ β By Lemma 4.8.2, we have gcd(π΄, π΅) = gcd(π΅, π), where π΅ and π are smaller numbers than π΄ and π΅. β’ gcd(π΄, π΅) = gcd(π΅, π) = β― = gcd(π₯, 0) = π₯ π = π΄ πππ π΅ 18 The Euclidean Algorithm - Exercise Use the Euclidean algorithm to find gcd(330, 156). 19 The Euclidean Algorithm - Exercise Use the Euclidean algorithm to find gcd(330, 156). Solution: gcd(330,156) = gcd(156, 18) 330 mod 156 = 18 = gcd(18, 12) 156 mod 18 = 12 = gcd(12, 6) 18 mod 12 = 6 = gcd(6, 0) 12 mod 6 = 0 =6 20 An alternative to Euclidean Algorithm If π β₯ π > 0, then gcd(π, π) = gcd(π, π β π) 21 An alternative to Euclidean Algorithm If π β₯ π > 0, then gcd(π, π) = gcd(π, π β π) Hint: Part 1: proof gcd(π, π) β€ gcd(π, π β π) every common divisor of a and b is a common divisor of b and a-b Part 2: proof gcd(π, π) β₯ gcd(π, π β π) every common divisor of b and a-b is a common divisor of a and b. 22 Homework #5 Problems Converting decimal to rational numbers. 4.2.2: 4.6037 4.2.7: 52.4672167216721β¦ 23 Homework #5 Problems 1. Converting decimal to rational numbers. 4.2.2: 4.6037 Solution: 4.6037 = 4.6037 10000 β 10000 = 46037 10000 4.2.7: 52.4672167216721β¦ Solution: let X = 52.4672167216721 . . . 100000x = 5246721.67216721β¦. 10x = 524.67216721β¦ 100000x β 10x = 5246197 X = 5246197 / 99990 24 Exercise Prove that for any nonnegative integer π, if the sum of the digits of π is divisible by 9, then π is divisible by 9. Hint: by the definition of decimal representation π = ππ 10π + ππβ1 10πβ1 + β― + π1 101 + π0 where π is nonnegative integer and all the ππ are integers from 0 to 9 inclusive. π = ππ 10π + ππβ1 10πβ1 + β― + π1 101 + π0 = ππ (9999 β― 999 + 1) + ππβ1 (9999 β― 999 + 1) + β― + π1 (9 + 1) + π0 π 9β² π πβ1 9β² π = 9 ππ 11 β― 11 + ππβ1 11 β― 11 + β― + π1 + ππ + ππβ1 + β― + π1 + π0 π 1β² π πβ1 1β² π = an integer divisible by 9 + the sum of the digits of π 25 Homework #5 Problems Theorem: The sum of any two even integers equals 4k for some integer k. βProof: Suppose m and n are any two even integers. By definition of even, m = 2k for some integer k and n = 2k for some integer k. By substitution, m + n = 2k + 2k = 4k. This is what was to be shown.β Whatβs the mistakes in this proof? 26