Direct Proof – Division into Cases Lecture 16 Section 4.4 Robb T. Koether Hampden-Sydney College Mon, Feb 11, 2013 Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 1 / 20 1 The Quotient-Remainder Theorem 2 The Operators / and % in C 3 Proof by Cases 4 Leap Years 5 Assignment Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 2 / 20 Outline 1 The Quotient-Remainder Theorem 2 The Operators / and % in C 3 Proof by Cases 4 Leap Years 5 Assignment Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 3 / 20 The Quotient-Remainder Theorem Theorem Let n and d be integers, d 6= 0. Then there exist unique integers q and r such that n = qd + r and 0 ≤ r < |d|. q is the quotient and r is the remainder. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 4 / 20 Outline 1 The Quotient-Remainder Theorem 2 The Operators / and % in C 3 Proof by Cases 4 Leap Years 5 Assignment Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 5 / 20 The Operators / and % in C The operators / and % in C are based on this theorem. If a and b are positive integers, then q = a/b; and r = a % b; where 0 ≤ r < b. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 6 / 20 The Operators / and % in C Thus, a == (a/b)*b + (a % b) is true for all positive integers a and b. Therefore, a % b == a - (a/b)*b is true for all positive integers a and b. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 7 / 20 The Operators / and % in C What are a/b and a % b when a or b is negative? C requires that the expression a % b == a - (a/b)*b be true for all integers (where b != 0)). Certainly, a/b < 0 if a < 0 and b > 0 or if a > 0 and b < 0. a/b > 0 if a < 0 and b < 0. Thus, the value of a % b is determined by the expression a % b == a - (a/b)*b Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 8 / 20 The Operators / and % in C Determine the values of the following expressions. 52 % 11 -52 % 11 52 % -11 -52 % -11 Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 9 / 20 Outline 1 The Quotient-Remainder Theorem 2 The Operators / and % in C 3 Proof by Cases 4 Leap Years 5 Assignment Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 10 / 20 Proof by Cases Theorem If n is odd, then 8 | (n2 − 1). Proof. Let n be an odd integer. Then n = 8q + r for some integers q and r with 0 6= r < 8. First, note that n2 − 1 = (8q + r )2 − 1 = 64q 2 + 16qr + r 2 − 1 = 8(8q 2 + 2qr ) + (r 2 − 1). Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 11 / 20 Proof by Cases Proof. Thus we need only show that 8 | (r 2 − 1). Because n is odd, we know that r = 1, 3, 5 or 7. We will consider these four cases. Case 1: Case 2: Case 3: Case 4: If r If r If r If r = 1, then r 2 − 1 = 1 − 1 = 0 = 8 · 0. = 3, then r 2 − 1 = 9 − 1 = 8 = 8 · 1. = 5, then r 2 − 1 = 25 − 1 = 24 = 8 · 3. = 7, then r 2 − 1 = 49 − 1 = 48 = 8 · 6. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 12 / 20 Proof by Cases Proof. In every case, 8 | (r 2 − 1). Therefore, 8 | (n2 − 1) for all odd integers n. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 13 / 20 Proof by Cases Theorem For any odd integer n, n3 − n is a multiple of 12. Proof. Let n be an odd integer. Then n = 12q + r for some integers q and r with 0 6= r < 12. First, note that n3 − n = (12q + r )3 − (12q + 4) = (123 q 3 + 3 · 122 q 2 r + 3 · 12qr 2 + r 3 ) − (12q + r ) = 12(122 q 3 + 3 · 12q 2 r + 3qr 2 − q) + (r 3 − r ). Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 14 / 20 Proof by Cases Proof. Thus we need only show that 12 | (r 3 − r ). Because n is odd, we know that r = 1, 3, 5, 7, 9 or 11. We will consider these six cases. Case 1: Case 2: Case 3: Case 4: Case 5: Case 6: If r If r If r If r If r If r = 1, then r 3 − r = 1 − 1 = 0 = 12 · 0. = 3, then r 3 − r = 27 − 3 = 24 = 12 · 2. = 5, then r 3 − r = 125 − 5 = 120 = 12 · 10. = 7, then r 3 − r = 343 − 7 = 336 = 12 · 28. = 9, then r 3 − r = 729 − 9 = 720 = 12 · 60. = 11, then r 3 − r = 1331 − 11 = 1320 = 12 · 120. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 15 / 20 Proof by Cases Proof. In every case, 12 | (r 3 − r ). Therefore, 12 | (n3 − n) for all odd integers n. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 16 / 20 Outline 1 The Quotient-Remainder Theorem 2 The Operators / and % in C 3 Proof by Cases 4 Leap Years 5 Assignment Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 17 / 20 Leap Years A year y is a leap year if y is a multiple of 4, but not a multiple of 100 (a century year), or y is a multiple of 400, but not a multiple of 100. Write an expression that will be true if and only if y is a leap year. Today (Feb 11, 2013) is a Monday. What day of the week will be Feb 11, 2113? Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 18 / 20 Outline 1 The Quotient-Remainder Theorem 2 The Operators / and % in C 3 Proof by Cases 4 Leap Years 5 Assignment Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 19 / 20 Assignment Assignment Read Section 4.4, pages 180 - 189. Exercises 1, 2, 5, 6, 14, 15, 19, 21, 23, 29, 36, 41, 47, 48, page 189. Robb T. Koether (Hampden-Sydney College) Direct Proof – Division into Cases Mon, Feb 11, 2013 20 / 20
© Copyright 2025 Paperzz