Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Proofs

Similar presentations


Presentation on theme: "Introduction to Proofs"— Presentation transcript:

1 Introduction to Proofs

2 Introduction A proof is a valid argument establishing the truth of a mathematical statement. We (CS) are interested in proof to establish the correctness of an algorithm the correctness of a program a property of a system (e.g., Java can be parsed efficiently) AI, automated theorem proving the consistency of a specification . . .

3 Methods for Proving Theorems
The theorem typically is of the form x, ( P(x)  Q(x) ). The proof method typically is of the form Let c be an arbitrary c in the domain.. Show that P(c)  Q(c) is true. (The essence.) Therefore, x, ( P(x)  Q(x) ).

4 Direct Proof of p  q Assume that p is true. Show that q is true.
Let the integers, Z, be the domain. Prove that x (( 3 | x – 2 )  ( 3 | x2 – 1 )) 3 | x – 2 (Assumption) x – 2  0 modulo 3. x  2 modulo 3. 4. x2  1 mod 3. x2 – 1  0 mod 3. 3 | x2 – 1.

5 Proof by Contraposition of p  q
Direct proof of the contrapositive: Assume ~q is true. Show that ~p is true.

6 Proof by Contraposition of p  q
Example Let the domain be the integers. Prove: (ab is even)  (a is even  b is even) Assume (a is even  b is even). a is odd  b is odd. m, a = 2m + 1; n, b = 2n + 1. ab = (2m + 1)(2n + 1) = 4mn + 2m + 2n + 1 = 2(2mn + m + n) + 1 is odd.

7 Proof by Contradiction of p  q
Show p  q is true by showing that (p  q) ≡ ( p  q) ≡ (p  q) is false.

8 Example If , 2, …, 10 are placed randomly in a circle then the sum of some 3 adjacent numbers  17. 1. Assume that 1, 2, …, 10 are placed randomly in a circle and that the sum of no 3 adjacent numbers  17. 2. Then x1 + x2 + x3  16 x2 + x3 + x4  16 x10 + x1 + x2  16. 3. Summing, 3( x1 + x x10 )  16  10 = 160. 4. But, 3 (x1 + x x10 ) = 3( … + 10) = 3  55 = 165, a contradiction.

9 Proving p  q p  q means p if and only if q p if q means q  p
p only if q means if q then p, which means p  q. So, p  q means p  q  q  p. To prove p  q it thus is necessary and sufficient to show that p  q  q  p.

10 Characters    ≥ ≡                         


Download ppt "Introduction to Proofs"

Similar presentations


Ads by Google