Mathematics for Computer Science MIT 6.042J/18.062J Proof by Contradiction Proof by Cases Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.1 Proof by Contradiction Is 3 1332 11? (i) If so, 1332 / 1331 11 3 That’s not true, true so (i) better not be true either Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.2 Proof by Contradiction Is 3 1333 11? If so, 1333 1332 11 3 That’s not true, so 3 1332 11 Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.3 Proof by Contradiction If an assertion implies something false, then the assertion itself must be false! Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.4 Proof by Contradiction Theorem: 2 is irrational. • Suppose 2 was rational • So have n, d integers without common prime factors such that n 2= d • We will show that n & d are both even. This is contradicts no common factor. Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.5 Proof by Contradiction Theorem: 2 is irrational. so can assume n 2= d 2d = n 2d2 = 4k 2 2d2 = n2 d = 2k n = 2k n2 = 4k2 2 So n is even Copyright © Albert R. Meyer, 2009. All rights reserved. 2 So d is even February 5, 2009 lec 1R.6 Quickie Proof assumes that 2 if n is even, then n is even. Why is this true? Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.7 Mathematics for Computer Science MIT 6.042J/18.062J Proof by Cases Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.9 Java Logical Expression AND OR if ((x>0) || (x <= 0 && y>100)) (more code) better: if ((x>0) || y>100) (more code) Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.10 Case 1: x>0 true OR if ((x>0) || (x <= 0 && y>100)) true OR if ((x>0) || y>100) so both are true Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.11 Case 2: x falseOR 0 if ((x>0) || (x <= 0 && y>100)) falseOR if ((x>0) || y>100) Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.12 Case 2: x if 0 true AND (x <= 0 && y>100) ( if ((x>0) || y>100) Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.13 Case 2: x if 0 ( y>100) ( if ((x>0) || y>100) so both still the same Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.14 Proof by Cases Reasoning by cases can break a complicated problem into easier subproblems. Some philosophers* think reasoning this way is worrisome. *intuitionists Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.26 $1,000,000 Question Is P = NP ? Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 2M.29 $1,000,000 Question The answer is on my desk! (Proof by Cases) Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.31 Team Problems Problems 1―4 Copyright © Albert R. Meyer, 2009. All rights reserved. February 5, 2009 lec 1R.33
© Copyright 2026 Paperzz