Download presentation
Presentation is loading. Please wait.
1
Lecture 11 1.5, 3.1 Methods of Proof
2
Last time in 1.5 To prove theorems we use rules of inference such as: p, p q, therefore, q NOT q, p q, therefore NOT p. p AND q, therefore p FORALL x P(x), therefore for arbitrary c, P(c) EXISTS x P(x), therefore for some c, P(c) It is easy to make mistakes, make sure that: 1) All premises pi are true when you prove (p1 AND p2 AND...pn) q 2) Every rule of inference you use is correct. Some proof strategies: To proof p q 1) direct proof: assume p is true, use rules to prove that q is true. 2) indirect proof, assume q is NOT true, use rules to prove p is NOT true. To prove p is true: 3) By contradiction: assume p is NOT true, use rules to show that NOT p F i.e. it leads to a contradiction.
3
Vacuous –Trivial Proofs Lets say we want to prove p q but the premise p can be shown to be false! Then p q is always true because (F T) = T and (F F) = T. This is a vacuous prove. Old example: prove that for any set S: Proof: The following must be shown to be true: However: the empty set does not contain any elements and the premise is always false. Therefore the implication must always be true! Trivial Proof: We want to prove p q, and we can show that q is true. Then, because (T T) = T and (F T) = T we have proven the implication. Example: P(n): a>=b a^n >= b^n for positive integers. Is P(0) true? P(0): a^0 >= b^0 is equivalent to 1>=1. Therefore, q is true and thus p q is true.
4
Example Indirect Proof Prove that: if n is an integer and n^2 is odd, then n is odd. Direct prove is hard in this case. Indirect proof: Assume NOT q : n is even. n = 2k n^2 = 4k^2 = 2(2k^2) is even, is not odd. Thus NOT q NOT p, p q
5
Example of Proof by Contradiction def: rational number is a number that can be written as a/b for integers a,b, where b should not be 0. Reals that are not rational are irrational. sqrt(2) is irrational. (note: we are not proving an implication now, although we could have written it as: if x=sqrt(2) x = irrational.) Assume sqrt(2) is not irrational. sqrt(2) = a/b where there is no common divisor (otherwise divide by this number). 2 = a^2 / b^2 2b^2 = a^2 a^2 = even a = even a = 2c 2b^2 = 4c^2 b^2 = 2c^2 b^2 = even b=even both a and b can be divided by 2 (contradiction).
6
1.5 An indirect proof is in fact also a prove by contradiction: Assume p = T and (NOT q) = T indirect prove: (NOT q) (NOT p) Therefore: p AND (NOT p) = T, contradiction Proof by cases: (p1 OR p2 OR p3... OR pn) q (if at least one of the premises hold, q follows) This is equivalent to (p1 q) AND (p2 q) AND... AND (pn q) Example: Prove x^2 >= 0 p1: x =0 p2: x=0 x^2 >=0 p3: x>0 x^2 >=0
7
Equivalence Proofs These are bidirectional statements of the form p q. Equivalent to proving 2 cases: p q AND q p. Example: Prove integer n is odd if and only if (iff) n^2 is odd. Lecture 10: if n is odd n^2 is odd Lecture 11: if n^2 is odd n is odd.
8
Lists of Equivalences p1 p2 p3 ..... pn This means they are all equivalent. There are C(n,2) pairs to prove! There is however a smarter way: Design one path through all pi’s that can bring you from any pi to any other then you are done: p1 p2 p3 p4 p5 p6
9
Theorems with Quantifiers Existence proofs: Proofs of the form: There exists an element x such that..... these proofs may be constructive (construct some x) or non-constructive. Uniqueness: Proofs of the form: there exists a unique element x such that... Example: Prove that proof: for arbitrary x, y=-x makes the proposition true. Is it unique. Assume it is not true and show contradiction: Let say there is a r such that x+r=0 but r is not –x. Then it follows that x+r=x+y r=y which contradicts our assumption.
10
3.1 self reading
11
The Halting Problem Is it possible to design an algorithm that always predicts for a given program P and a given input to that program I, if it will stop or run forever? Proposition: there isn’t Proof. Assume there is such a predictor H(P,I). A program can be represented as a bit-string, and therefore as input to another program. Imagine a program P that can take itself as input. H(P,P) should predict if it stops: H = 1 if it stops, H=0 if it doesn’t stop. Define a new program K(P) as follows: that is K(P) loops forever if H(P,P) = 1 K(P) = stops if H(P,P) = 0 Can H(K,K) predict whether this program stops? K(K) loops forever if H(K,K) = 1 K(K) stops if H(K,K) = 0 So H(K,K) does not predict correctly which is in contradiction with the assumption!
12
Sequences & Summations definition: A sequence is a function from the set of integers to a set S: a1,a2,a3,.... (function from 1,2... a1,a2,...) an is a term in the sequence which is sometimes denoted with {an} (not a set!) Example: {an} with an= 1/n over n=1,.... 1,1/2,1/3,... Geometric progression: Sequence of the form: a,ar,ar^2,...,ar^n,... a = initial term, r = common ratio are real numbers 3,6,12,24,... (a=3,r=2): ratios are constant Arithmetic progression Sequence of the form a,a+d,a+2d,...,a+nd,... a = initial term and d = common difference are real numbers 3,5,7,9,11,...(a=3,r=2): differences are constant A string: finite sequence a1,...,an.
13
Sums Notation notation: single sum double sum
14
Summations Theorem proof trivial
15
Summations Theorem: sketch of proof: Split into 2 cases: even and odd n. In both cases argue as follows:
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.