CS 220: Discrete Structures and their Applications

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Math Methods of proof 1.
Introduction to Proofs
Chapter 3 Elementary Number Theory and Methods of Proof.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Elementary Number Theory and Methods of Proof
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
More Number Theory Proofs Rosen 1.5, 3.1. Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd.
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
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(
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
Introduction to Proofs Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
C OURSE : D ISCRETE STRUCTURE CODE : ICS 252 Lecturer: Shamiel Hashim 1 lecturer:Shamiel Hashim second semester Prepared by: amani Omer.
Methods of Proof & Proof Strategies
Introduction to Proofs
Introduction to Proofs
MATH 224 – Discrete Mathematics
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.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
Conditional Statements CS 2312, Discrete Structures II Poorvi L. Vora, GW.
Section 1.8. Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness Proofs.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
Chapter 5 Existence and Proof by contradiction
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.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Introduction to Proofs
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
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.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
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)
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Proof Techniques CS160/CS122 Rosen: 1.5, 1.6, 1.7.
Lecture 2: Proofs and Recursion. Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample.
CS151: Mathematical Foundations of Computing Mathematical Induction.
Introduction to Proofs Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
The Foundations: Logic and Proofs
CS 2210:0001 Discrete Structures Logic and Proof
CSE15 Discrete Mathematics 02/01/17
CSE15 Discrete Mathematics 02/08/17
Chapter 4 (Part 1): Induction & Recursion
Argument An argument is a sequence of statements.
Direct Proof and Counterexample I: Introduction
Predicate Calculus Validity
Proof Techniques.
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CSE 311: Foundations of Computing
CS 220: Discrete Structures and their Applications
First Order Logic Rosen Lecture 3: Sept 11, 12.
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
Elementary Number Theory & Proofs
Copyright © Cengage Learning. All rights reserved.
Foundations of Discrete Mathematics
Introduction to Proofs
Copyright © Cengage Learning. All rights reserved.
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

CS 220: Discrete Structures and their Applications Proofs sections 2.1-2.3 in zybooks https://xkcd.com/1381/

Fermat’s last theorem Theorem: For every integer n > 2 there is no solution to the equation an + bn = cn where a,b, and c are positive integers This theorem was first conjectured by Pierre de Fermat in 1637 in the margin of a copy of Arithmetica where he claimed he had a proof that was too large to fit in the margin. The first successful proof was released in 1994 by Andrew Wiles, and formally published in 1995, after 358 years of effort by mathematicians.

Terminology Theorem: statement that can be shown to be true Proof: a valid argument that establishes the truth of a theorem Conjecture: statement believed to be a true e.g. Goldbach’s conjecture “Every even integer greater than 2 can be written as the sum of two primes.”

Example Goldbach’s conjecture: “Every even integer greater than 2 can be written as the sum of two primes” e.g. Goldbach’s conjecture “Every even integer greater than 2 can be written as the sum of two primes.” Image from https://en.wikipedia.org/wiki/Goldbach%27s_conjecture

Proofs What is a proof A valid argument that establishes the truth of a mathematical statement The rules of inference we saw: All the steps and rules were provided Not practical: formal proofs of useful theorems are long. In practice: ”informal proofs” (good for human consumption) We will see methods for constructing proofs

Theorems Theorem: If x is a positive integer, then x ≤ x2. What is meant is: For all positive integers x ≤ x2. Many theorems are universal statements.

Theorems Theorem: If x is a positive integer, then x ≤ x2. What is meant is: For all positive integers x ≤ x2. Many theorems are universal statements. And some theorems can be universal statements over multiple variables with different domains: Theorem: If x and y are positive real numbers and n is a positive integer, then (x + y)n ≥ xn + yn.

Proofs Theorem: If x is a positive integer, then x ≤ x2. Proof. Let x be a positive integer, i.e. x > 0. Since x is an integer and x > 0, x ≥ 1 Since x > 0, we can multiply both sides of the inequality by x to get: x * x ≥ 1 * x Simplifying the expression: x2 ≥ x ■ Name a generic object in the domain and give assumptions about the object End of proof symbol

Proof by exhaustion If the domain of a universal statement is small, then all elements can be exhaustively checked. Theorem: If n ∈ {-1, 0, 1}, then n2 = |n|. Proof. Check the equality for each possible value of n: n = -1: (-1)2 = 1 = |-1|. n = 0: (0)2 = 0 = |0|. n = 1: (1)2 = 1 = |1|. ■

Counterexamples Consider the following statement: If n is an integer greater than 1, then (1.1)n < n10. Is it true? Let’s check some values… n=2: (1.1)2=1.21<1024=210. n=100: (1.1)100≈13780.61<100000000000000000000=10010. We might be tempted to think that this is true for all n.

Counterexamples Consider the following statement: If n is an integer greater than 1, then (1.1)n < n10. Is it true? Let’s check some values… n=2: (1.1)2=1.21<1024=210. n=100: (1.1)100≈13780.61<100000000000000000000=10010. However: (1.1)686>(686)10.

Counterexamples What is the counterexample for the following statement: The multiplicative inverse of a real number x, is a real number y such that xy = 1. Every real number has a multiplicative inverse.

Counterexamples Once we found a counterexample, we can sometimes fix the statement into a provable theorem: Theorem: Let x be a real number such that x ≠ 0, then there is a real number y such that xy = 1. e.g. statement if n is an odd integer then n*n is even counter example 1*1 = 1 is not even but we cannot fix the statement to make it true WHY? For every odd n n*n is odd

Proof techniques Proof techniques: Direct proof Proof by contrapositive Proof by contradiction Proof by cases Proof by induction – later in the course

direct proof Want to prove a statement of the form p q First step: assume p is true Next steps: apply inference rules using hypotheses and previously proven theorems Proceed until q is shown to be true

Example Theorem: For every integer n, if n is odd, then n2 is odd. Definition: an integer n is even if there exists an integer k such that n = 2k, and n is odd if there exists an integer k such that n = 2k + 1.

Example Theorem: For every integer n, if n is odd, then n2 is odd. Proof. If n is odd, then n = 2k+1 for some integer k. n2 = (2k+1)2 = 4k2 + 4k +1 Therefore, n2 = 2(2k2 + 2k) + 1, which is odd. apply definition of “odd” odd number from definition – found k such that n2 = 2k + 1

Proof by contrapositive A proof by contrapositive proves a conditional theorem of the form p → c by showing that the contrapositive ¬c → ¬p is true. Based on the logical equivalence of p  c and c  p Proceeds by assuming c and using the same method as direct proof, showing that p

Example Prove “If n is an integer and 3n + 2 is odd then n is odd.” Proof by contrapositive. Suppose the conclusion is false, i.e. n is even. We need to show that 3n + 2 is even. Then by the definition of an even integer, n = 2k for some integer k Therefore 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1) Hence, 3n + 2 is even. Can you produce a direct proof? Sure: 3n+2 is odd so 3n is odd so n is odd

Example Theorem: For every integer x, if x2 is even, then x is even. Which proof technique? Direct proof – express x2 as 2k for some k, i.e. x = √(2k) Not clear that sqrt(2k) is an even integer, or even an integer  Proof by contrapositive – prove that if x is odd then x2 is odd

Example Theorem: For every integer x, if x2 is even, then x is even. Proof by contrapositive. Suppose the conclusion is false, i.e. x is odd. We need to prove that x2 is odd. Then by the definition of an odd integer, x = 2k + 1 for some integer k Therefore x2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1. Therefore x2 can be expressed as 2k' + 1, where k' = 2k2 + 2k is an integer. Hence, x2 is odd. ■

Example Theorem: For every positive real number r, if r is irrational, then √r is also irrational. Proof. Proof by contrapositive. Let r be a positive real number. We assume that √r is not irrational and prove that r is not irrational. Since √r is not irrational and is real, then √r must be a rational number. Therefore √r=x/y for two integers, x and y, where y ≠ 0. Squaring both sides of the equation gives: (√r)2=r=x2/y2. We expressed r as the ratio of two integers, so r is a rational number. Therefore r is not irrational. ■ Do it on the board rather than walking through the proof.

Example Consider the following statement: If x and y are real numbers and x + y is irrational, then x is irrational or y is irrational. What is the contrapositive? Introduce predicates rational(x) and irrational(x) and express the theorem and its contrapositive that way.