1 00:00:00,530 --> 00:00:03,040 PROFESSOR: It's doubtful if you really understand something 2 00:00:03,040 --> 00:00:05,680 if you can explain why it's true. 3 00:00:05,680 --> 00:00:09,020 That's what proofs are about in mathematics 4 00:00:09,020 --> 00:00:10,750 and in computer science. 5 00:00:10,750 --> 00:00:14,130 So we're going to be talking about proofs of lots of things 6 00:00:14,130 --> 00:00:16,040 that we're trying to understand. 7 00:00:16,040 --> 00:00:17,980 And in particular, we're going to look 8 00:00:17,980 --> 00:00:22,430 at a proof technique now called proof by contradiction, which 9 00:00:22,430 --> 00:00:24,930 is probably so familiar that you never 10 00:00:24,930 --> 00:00:27,340 noticed you were using it. 11 00:00:27,340 --> 00:00:30,870 And now we're going to call explicit attention to it, 12 00:00:30,870 --> 00:00:32,150 and think about it. 13 00:00:32,150 --> 00:00:35,250 So let's do an example first to see what's going on. 14 00:00:35,250 --> 00:00:40,420 Suppose that I wanted to prove that the cube root of 1,332 15 00:00:40,420 --> 00:00:42,010 was less than or equal to 11. 16 00:00:42,010 --> 00:00:44,160 Or more precisely, suppose I didn't know 17 00:00:44,160 --> 00:00:48,280 and I'm asking this question, is the cube root of 1,332 18 00:00:48,280 --> 00:00:49,980 less than or equal to 11? 19 00:00:49,980 --> 00:00:52,310 Well, one way to do it would be to simply compute 20 00:00:52,310 --> 00:00:58,290 the cube root of 1,332, which is a small bother, but manageable. 21 00:00:58,290 --> 00:01:02,460 But there's a simpler way than figuring out 22 00:01:02,460 --> 00:01:06,320 how to compute a cube root of a four-digit number. 23 00:01:06,320 --> 00:01:07,990 Let's just suppose that this inequality 24 00:01:07,990 --> 00:01:11,700 was true-- that is, that the cube root of 1,332 25 00:01:11,700 --> 00:01:13,990 was less than or equal to 11. 26 00:01:13,990 --> 00:01:17,120 Well, if that was true, then what I could do 27 00:01:17,120 --> 00:01:19,002 is cube both sides. 28 00:01:19,002 --> 00:01:24,910 And I'll conclude that 1,332 is less than or equal to 11 cubed. 29 00:01:24,910 --> 00:01:27,290 Now, 11 cubed is a lot easier to compute 30 00:01:27,290 --> 00:01:30,610 than the cube root of 1,332. 31 00:01:30,610 --> 00:01:35,600 As a matter of fact, 11 cubed is 1,331. 32 00:01:35,600 --> 00:01:38,150 Wait a minute, I've just concluded 33 00:01:38,150 --> 00:01:42,840 that 1,332 is less than 1,331. 34 00:01:42,840 --> 00:01:46,080 That's obviously not true, which means 35 00:01:46,080 --> 00:01:49,760 that my assumption that this inequality held 36 00:01:49,760 --> 00:01:50,720 doesn't make sense. 37 00:01:50,720 --> 00:01:53,060 It leads to this immediate contradiction, 38 00:01:53,060 --> 00:01:56,180 which means that in fact, the inequality doesn't hold. 39 00:01:56,180 --> 00:01:59,400 And I have now precisely and unambiguously-- I 40 00:01:59,400 --> 00:02:03,930 hope clearly-- proved that the cube root of 1,332 41 00:02:03,930 --> 00:02:08,050 is greater than 11, even though we never actually computed 42 00:02:08,050 --> 00:02:11,550 the cube root of 1,332. 43 00:02:11,550 --> 00:02:14,940 This is kind of a [? toy ?] and simple-minded example 44 00:02:14,940 --> 00:02:16,560 to illustrate proof by contradiction. 45 00:02:16,560 --> 00:02:20,510 So let's step back and explain, and say what it is in general. 46 00:02:20,510 --> 00:02:23,580 If an assertion implies something false, 47 00:02:23,580 --> 00:02:25,910 then the assertion itself must be false. 48 00:02:25,910 --> 00:02:27,790 That's what's going on here. 49 00:02:27,790 --> 00:02:31,220 If you're reasoning step by step, and at every step 50 00:02:31,220 --> 00:02:35,970 your reasoning is good-- which means that if you had something 51 00:02:35,970 --> 00:02:39,920 true and then you reached a conclusion from it in one step, 52 00:02:39,920 --> 00:02:43,510 the conclusion that you reached was also true-- then if you 53 00:02:43,510 --> 00:02:45,630 start off with some assumption, you 54 00:02:45,630 --> 00:02:49,230 keep proving things step by step in a way that preserves truth, 55 00:02:49,230 --> 00:02:51,840 and you arrive at something false, 56 00:02:51,840 --> 00:02:53,940 it's inevitable that what you started with 57 00:02:53,940 --> 00:02:55,320 must have been false. 58 00:02:55,320 --> 00:02:57,760 Or else the thing you finished with would have been true. 59 00:02:57,760 --> 00:03:01,610 OK, let's look at a real example of this-- 60 00:03:01,610 --> 00:03:04,230 an amazing fact that was known thousands of years 61 00:03:04,230 --> 00:03:07,930 ago to the ancient Greeks, which is that the square root of 2 62 00:03:07,930 --> 00:03:10,690 is irrational. 63 00:03:10,690 --> 00:03:14,340 Now, let's remember that a rational number is a fraction. 64 00:03:14,340 --> 00:03:18,070 A rational number is a quotient of integers. 65 00:03:18,070 --> 00:03:20,790 And the way we're going to prove that the square root of 2 66 00:03:20,790 --> 00:03:25,250 is not a quotient of integers is by assuming that it was. 67 00:03:25,250 --> 00:03:27,710 So let's assume that the square root of 2 68 00:03:27,710 --> 00:03:31,530 was a rational number, which means that we've 69 00:03:31,530 --> 00:03:35,920 got integers n and d without common prime factors, such 70 00:03:35,920 --> 00:03:39,244 that the square root of 2 is equal to n over d. 71 00:03:39,244 --> 00:03:41,160 What I'm doing here is I'm saying squared of 2 72 00:03:41,160 --> 00:03:43,250 as a fraction, n over d. 73 00:03:43,250 --> 00:03:45,660 And we know that you can always reduce a fraction 74 00:03:45,660 --> 00:03:47,490 to lowest terms, which means there 75 00:03:47,490 --> 00:03:49,070 are no common prime factors. 76 00:03:49,070 --> 00:03:50,610 So let's get that done. 77 00:03:50,610 --> 00:03:52,610 We have the square root of 2 is equal to n over 78 00:03:52,610 --> 00:03:57,390 d, with no prime that divides both n and d. 79 00:03:57,390 --> 00:04:00,270 From this assumption, I'm going to prove to you 80 00:04:00,270 --> 00:04:03,500 that both n and d are even. 81 00:04:03,500 --> 00:04:05,900 And that, of course, is an immediate contradiction, 82 00:04:05,900 --> 00:04:09,580 because then both n and d have the common factor 2. 83 00:04:09,580 --> 00:04:11,790 So all I've got to do in order to conclude 84 00:04:11,790 --> 00:04:15,450 that the square root of 2 is an irrational number-- it's not 85 00:04:15,450 --> 00:04:19,610 a fraction-- is prove to you that n and d are both 86 00:04:19,610 --> 00:04:24,160 even if the square root of 2 is equal to n over d. 87 00:04:24,160 --> 00:04:25,760 Let's do that. 88 00:04:25,760 --> 00:04:28,570 We'll start off with what I'm assuming-- square root of 2 89 00:04:28,570 --> 00:04:29,340 is n over d. 90 00:04:29,340 --> 00:04:31,150 And let's get rid of the denominator. 91 00:04:31,150 --> 00:04:33,492 So let's multiply through both sides by d, 92 00:04:33,492 --> 00:04:36,829 and get that the square root of 2 times d is equal to n. 93 00:04:36,829 --> 00:04:38,370 Let's get rid of the square root of 2 94 00:04:38,370 --> 00:04:39,980 now by squaring both sides. 95 00:04:39,980 --> 00:04:43,400 And I get 2d squared is n squared. 96 00:04:43,400 --> 00:04:46,570 Well, that's great, because look-- the left-hand side is 97 00:04:46,570 --> 00:04:47,540 divisible by 2. 98 00:04:47,540 --> 00:04:48,520 There it is. 99 00:04:48,520 --> 00:04:50,960 Which means that n squared is divisible by 2. 100 00:04:50,960 --> 00:04:53,080 The right-hand side is even. 101 00:04:53,080 --> 00:04:58,690 But if n squared is even, then n is even, and I'm halfway there. 102 00:04:58,690 --> 00:05:00,710 I've shown that the numerator is even. 103 00:05:00,710 --> 00:05:02,850 OK, let's keep going. 104 00:05:02,850 --> 00:05:06,090 Now, since n is even, it's equal to twice something. 105 00:05:06,090 --> 00:05:08,450 So n is 2k for some number k. 106 00:05:08,450 --> 00:05:10,960 I don't care what k is. 107 00:05:10,960 --> 00:05:16,620 Let's square both sides of that, and conclude that n squared 108 00:05:16,620 --> 00:05:18,610 is equal to 4k squared. 109 00:05:18,610 --> 00:05:20,000 Why did I square it? 110 00:05:20,000 --> 00:05:24,397 So that I could connect up here with the other question 111 00:05:24,397 --> 00:05:25,980 that I had about it n squared-- that n 112 00:05:25,980 --> 00:05:27,580 squared it was 2d squared. 113 00:05:27,580 --> 00:05:29,620 So combining these two, what I get 114 00:05:29,620 --> 00:05:34,050 is that 2d squared is equal to 4k squared. 115 00:05:34,050 --> 00:05:36,820 And of course, I can cancel 2, and get that d 116 00:05:36,820 --> 00:05:39,300 squared is equal to 2k squared. 117 00:05:39,300 --> 00:05:42,990 And again, I've got the right-hand side divisible by 2. 118 00:05:42,990 --> 00:05:45,920 So the left-hand side is divisible by 2. 119 00:05:45,920 --> 00:05:49,115 d squared is even, and therefore, d is even. 120 00:05:49,115 --> 00:05:52,130 And we've completed the proof as claimed. 121 00:05:52,130 --> 00:05:54,580 n and d both have 2 as a common factor, 122 00:05:54,580 --> 00:05:59,310 contradicting the fact that their in lowest terms. 123 00:05:59,310 --> 00:06:04,790 Now, I did assume something that is kind of obvious-- namely, 124 00:06:04,790 --> 00:06:07,710 that if n squared is even, then n is even. 125 00:06:07,710 --> 00:06:09,530 Why is this true? 126 00:06:09,530 --> 00:06:11,650 Well, you might think about it for a moment. 127 00:06:11,650 --> 00:06:13,690 There's a simple way to see it, and it's 128 00:06:13,690 --> 00:06:15,150 a proof by contradiction. 129 00:06:15,150 --> 00:06:17,840 We're going to use the fact that you can verify easily 130 00:06:17,840 --> 00:06:20,890 enough by doing a little arithmetic-- namely, 131 00:06:20,890 --> 00:06:25,340 the product of two odd numbers is odd. 132 00:06:25,340 --> 00:06:26,140 Let's assume that. 133 00:06:26,140 --> 00:06:29,490 So if the product of two numbers is odd, 134 00:06:29,490 --> 00:06:33,320 if I tell you that n squared is even, 135 00:06:33,320 --> 00:06:38,460 and suppose that n was not even, well, that means it's odd. 136 00:06:38,460 --> 00:06:41,040 But that would mean that n squared was odd, contradicting 137 00:06:41,040 --> 00:06:42,940 the fact that n is even. 138 00:06:42,940 --> 00:06:45,960 Therefore, it's a contradiction to assume that n is odd. 139 00:06:45,960 --> 00:06:47,845 It must be even 140 00:06:47,845 --> 00:06:49,890 That's an ad hoc proof that has to do 141 00:06:49,890 --> 00:06:51,450 with evenness and oddness. 142 00:06:51,450 --> 00:06:54,090 There's a more general way to understand this that actually 143 00:06:54,090 --> 00:06:58,320 will come in handy-- namely, that what I know 144 00:06:58,320 --> 00:07:01,700 is that numbers factor into primes in a unique way. 145 00:07:01,700 --> 00:07:04,150 So if I tell you that n squared is even, 146 00:07:04,150 --> 00:07:07,040 what I know about n squared is that all the primes that 147 00:07:07,040 --> 00:07:09,940 divide n squared come from n. 148 00:07:09,940 --> 00:07:13,350 So if there's a 2 among the primes that divide n squared, 149 00:07:13,350 --> 00:07:17,380 it has to be a 2 that is one of the prime divisors of n. 150 00:07:17,380 --> 00:07:20,970 And that would work even if I told you 151 00:07:20,970 --> 00:07:24,330 that n squared was divisible by 3. 152 00:07:24,330 --> 00:07:26,100 It would follow by that reasoning 153 00:07:26,100 --> 00:07:28,100 that n is divisible by 3. 154 00:07:28,100 --> 00:07:29,430 Now, that's a powerful fact. 155 00:07:29,430 --> 00:07:32,380 I'm assuming the prime factorization of integers. 156 00:07:32,380 --> 00:07:34,784 And it's not obvious at all that that's true, 157 00:07:34,784 --> 00:07:35,950 although it's very familiar. 158 00:07:35,950 --> 00:07:37,050 It's OK to assume. 159 00:07:37,050 --> 00:07:39,150 In a few weeks we'll actually look back 160 00:07:39,150 --> 00:07:41,430 at how to carefully prove that. 161 00:07:41,430 --> 00:07:43,430 But for now, it's OK to assume. 162 00:07:43,430 --> 00:07:45,440 And we also have the simple argument 163 00:07:45,440 --> 00:07:48,480 that worked based on properties of even and odd-- 164 00:07:48,480 --> 00:07:51,050 that if n squared is even, then n is even. 165 00:07:51,050 --> 00:07:55,680 That's the last gap in the proof, and so we're done.