Mathematics for Computer Science MIT 6.042J/18.062J Proof by Contradiction Proof by Contradiction Proof by Cases Is 3 1332 ≤ 11? 3 1331 If so, 1332 ≤ 11 That’s not true, so Albert R Meyer lec 1F.1 February 5, 2010 Proof by Contradiction February 5, 2010 Albert R Meyer lec 1F.3 Proof by Contradiction Theorem: If an assertion implies something false, then the assertion itself must be false! • Suppose is irrational. was rational • So have n, d integers without common prime factors such that • We will show that n & d are both even. This contradicts no common factor. Albert R Meyer lec 1F.4 February 5, 2010 is irrational. Albert R Meyer lec 1F.5 Proof assumes that if n2 is even, then n is even. Why is this true? so can assume So n is even February 5, 2010 Quickie Proof by Contradiction Theorem: Albert R Meyer So d is even February 5, 2010 lec 1F.6 Albert R Meyer February 5, 2010 lec 1F.7 1 Mathematics for Computer Science MIT 6.042J/18.062J Java Logical Expression if ((x>0) || (x <= 0 && y>100)) AND OR Proof by Cases (more code) better: if ((x>0) || y>100) (more code) February 5, 2010 Albert R Meyer lec 1F.8 Case 1: x > 0 false if ((x>0) || (x <= 0 && y>100)) if ((x>0) || (x <= 0 && y>100)) AND AND OR true false if ((x>0) || y>100) if ((x>0) || y>100) OR OR so both are true Albert R Meyer lec 1F.9 Case 2: x ≤ 0 true OR February 5, 2010 Albert R Meyer February 5, 2010 lec 1F.10 Case 2: x ≤ 0 Albert R Meyer February 5, 2010 lec 1F.11 Case 2: x ≤ 0 true if (x <= 0 && y>100) if ( y>100) AND if ( y>100) if ((x>0) || y>100) if ( y>100) if ((x>0) || y>100) so both still the same Albert R Meyer February 5, 2010 lec 1F.12 Albert R Meyer February 5, 2010 lec 1F.13 2 $1,000,000 Question Proof by Cases Reasoning by cases can break a complicated problem into easier subproblems. Some philosophers* think reasoning this way is worrisome. Is P = NP ? *intuitionists Albert R Meyer February 5, 2010 lec 1F.25 $1,000,000 Question February 5, 2010 February 5, 2010 lec 2M.28 Team Problems Problems 1―4 The answer is on my desk! (Proof by Cases) Albert R Meyer Albert R Meyer lec 1F.30 Albert R Meyer February 5, 2010 lec 1F.31 3 MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.