CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.

Slides:



Advertisements
Similar presentations
Methods of Proof. Methods of Proof The Vicky Pollard Proof Technique Prove that when n is even n2 is even. Assume n is 0, then n2 is 0, and that is.
Advertisements

With examples from Number Theory
Introduction to Proofs
Chapter 3 Elementary Number Theory and Methods of Proof.
Section 7.5: Equivalence Relations Def: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive. Ex: Let.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
CS 173: Discrete Mathematical Structures Cinda Heeren Rm 2213 Siebel Center Office Hours: M 12:30-2:30p.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Direct Proof and Counterexample II Lecture 12 Section 3.2 Thu, Feb 9, 2006.
Copyright © Cengage Learning. All rights reserved.
Induction and recursion
Elementary Number Theory and Methods of Proof. Basic Definitions An integer n is an even number if there exists an integer k such that n = 2k. An integer.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
Copyright © Zeph Grunschlag,
1 Indirect Argument: Contradiction and Contraposition.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
Methods of Proof Lecture 4: Sep 16 (chapter 3 of the book)
Cardinality of a Set “The number of elements in a set.” Let A be a set. a.If A =  (the empty set), then the cardinality of A is 0. b. If A has exactly.
Properties of the Integers: Mathematical Induction
This section will discuss the symbolism and concepts of set theory
Methods of Proof & Proof Strategies
Induction and recursion
Introduction to Proofs
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
CS 173, Lecture B September 1, 2015 Tandy Warnow.
MATH 224 – Discrete Mathematics
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
CSci 2011 Discrete Mathematics Lecture 6
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
CompSci 102 Discrete Math for Computer Science
P. 270 #47-49.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Introduction to Proofs.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases.
Chapter 2 With Question/Answer Animations. Section 2.1.
Week 4 - Monday.  What did we talk about last time?  Rational numbers.
Mathematical Induction
CS104:Discrete Structures Chapter 2: Proof Techniques.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Introduction to Proofs
Week 4 - Wednesday.  What did we talk about last time?  Divisibility  Proof by cases.
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Section 1.8. Proof by Cases Example: Let b = max{a, b} = a if a ≥ b, otherwise b = max{a, b} = b. Show that for all real numbers a, b, c
EXAMPLE 3 Write an indirect proof Write an indirect proof that an odd number is not divisible by 4. GIVEN : x is an odd number. PROVE : x is not divisible.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Direct Proof by Contraposition Direct Proof by Contradiction
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
Indirect Proof by Contradiction Direct Proof by Cases
Applied Discrete Mathematics Week 2: Proofs
CS 220: Discrete Structures and their Applications
CS 220: Discrete Structures and their Applications
Lecture 43 Section 10.1 Wed, Apr 6, 2005
Mathematical Induction
Examples of Mathematical Proof
Presentation transcript:

CS 173, Lecture B August 27, 2015 Tandy Warnow

Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove it indirectly… we’ll show examples of each type of proof.

Example of direct proof Theorem: Every odd integer is the difference of two perfect squares. (In other words, for all odd integers x, there exist integers y and z such that x=y 2 -z 2.) Proof. Since x is odd, there is an integer L such that x = 2L+1. Note that x = (L 2 +2L+1) – L 2 = (L+1) 2 – L 2. q.e.d.

Example of direct proof Theorem: Every odd integer is the difference of two perfect squares. (In other words, for all odd integers x, there exist integers y and z such that x=y 2 -z 2.) Proof. Since x is odd, there is an integer L such that x = 2L+1. Note that x 2 = (L 2 +2L+1) – L 2 = (L+1) 2 – L 2. q.e.d. NOTE – THIS IS NOT CORRECT!!!

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B 2. Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B 2. Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

A proof by contradiction Theorem: The square root of 7 is irrational. Proof: Let x=√7. We know that x is a real number. Hence, we will prove x is irrational by contradiction. If x is rational, then x = A/B, where A and B are integers and gcd(A,B)=1. Hence, A and B do not share any prime factors. Then x 2 = 7. Hence A 2 /B 2 = 7. Hence, A 2 = 7B 2. Hence 7 divides A 2. Hence 7 divides A. Hence 7 2 divides A 2 = 7B 2 Hence 7 divides B 2. Hence 7 divides B. Hence A and B are both divisible by 7, contradicting the assumptions above. Therefore x must not be rational. Since we know x must be real, it follows that x must instead be irrational. q.e.d

Brief introduction to sets A set S is just a collection of objects. Some sets are finite (e.g., {1,2,3,5}) and some are infinite (e.g., the set of integers, the set of functions from the integers to the open interval (0,1), etc.). We can specify a set explicitly, as in {1,2,3,5}, or implicitly, as in the “set-builder notation”: {x in Z: 0 < x < 6, x != 4}. These are the same set, represented differently. We can also write {f: Z -> (0,1)} to denote the set of functions from the set of integers (Z) to the open interval (0,1).

Brief introduction to sets Notation: – For a set A, and element x of A, we can write x ε A And in latex we write “$x \in A$” – A set B where all elements of B are elements of A is called a “subset” of A. In latex we write this as $B \subseteq A$ – Note therefore that if x ε A then {x} is a subset of A.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof: Suppose A is not the empty set but is finite. Then A = {a 1, a 2, …, a n } for some n. Let a* be the largest element in A. Then by assumption, b= a*+1 is an element of A. But then b>a*, contradicting our hypothesis. Hence, A must not be finite.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof: Suppose A is not the empty set but is finite. Then A = {a 1, a 2, …, a n } for some n. Let a* be the largest element in A. Then by assumption, b= a*+1 is an element of A. But then b>a*, contradicting our hypothesis. Hence, A must not be finite.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof: Suppose A is not the empty set but is finite. Then A = {a 1, a 2, …, a n } for some n. Let a* be the largest element in A. Then by assumption, b= a*+1 is an element of A. But then b>a*, contradicting our hypothesis. Hence, A must not be finite.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof: Suppose A is not the empty set but is finite. Then A = {a 1, a 2, …, a n } for some n. Let a* be the largest element in A. Then by assumption, b= a*+1 is an element of A. But then b>a*, contradicting our hypothesis. Hence, A must not be finite.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof: Suppose A is not the empty set but is finite. Then A = {a 1, a 2, …, a n } for some n. Let a* be the largest element in A. Then by assumption, b= a*+1 is an element of A. But then b>a*, contradicting our hypothesis. Hence, A must not be finite.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof: Suppose A is not the empty set but is finite. Then A = {a 1, a 2, …, a n } for some n. Let a* be the largest element in A. Then by assumption, b= a*+1 is an element of A. But then b>a*, contradicting our hypothesis. Hence, A must not be finite.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof. We have shown that if A is not the empty set, then A cannot be finite. We now want to show that it is possible for A to be the empty set.

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof. What happens if A is the empty set? Does A satisfy the constraint above? Yes!!

Another proof by contradiction Theorem: Let A be a subset of the integers that satisfies the following constraint: – x ε A => x+1 ε A Then if A is finite, it follows that A is the empty set. Proof. The constraint given above is the statement x ε A => x+1 ε A This is the same thing as saying “whenever x ε A, it follows that x+1 ε A”. Or, equivalent, “for all elements x of A, the real number x+1 is an element of A”. Or, “if x is an element of A, then x+1 is an element of A”. The only way this constraint can be violated is if there is *some* element x of A, where x+1 is not an element of A. If A is the empty set, then this constraint can never be violated. Note also – an “IF X THEN Y” statement cannot be False when X is False. The only way it can be false is if X is true and Y is false.

A logic problem Suppose we are in a city where there are two types of people – those who always tell the truth, and those who always lie. We meet two people, Sally and Tom, and we don’t know if they are both liars, both truth tellers, or one of each. – Sally says: “Exactly one of us is telling the truth.” – Tom says: “Sally is telling the truth.” Determine who is telling the truth and who is lying (and prove your answer is correct).

Homework and discussion section Homework (due Monday, 10 PM, on Moodle): – Prove that the square root of 5 is irrational – Prove that there is no largest real number less than 1 Discussion section problems – Prove that the square root of 11 is irrational – Prove that there is no smallest real number greater than 1 – Suppose A is a finite subset of the real numbers that satisfies: For all a in A, 2a is also an element of A. Find all the sets A that satisfy this constraint, and prove that there are no others. (Hint: there are only two such sets.) NOTE: Homeworks are easier than discussion section problems. But over time, your ability to solve harder problems will increase, and then the homeworks will also become more challenging!