CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.

Slides:



Advertisements
Similar presentations
Discrete Math Methods of proof 1.
Advertisements

Introduction to Proofs
PROOF BY CONTRADICTION
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
Copyright © Zeph Grunschlag,
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
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
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 03: PROOFS Section 1.5 Jarek Rossignac CS1050: Understanding.
MATH 224 – Discrete Mathematics
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
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
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
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.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
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.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
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.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Chapter 1: Introduction
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
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 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
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.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
CS 2210:0001 Discrete Structures Logic and Proof
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Advanced Algorithms Analysis and Design
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Predicate Calculus Validity
Chapter 1: The Foundations: Logic and Proofs
CSE 311: Foundations of Computing
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
CSE 311: Foundations of Computing
CS 220: Discrete Structures and their Applications
MA/CSSE 474 More Math Review Theory of Computation
Negations of quantifiers
This Lecture Substitution model
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
CSE 311 Foundations of Computing I
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111

Announcements Reading assignments – Logical Inference 1.6, th Edition 1.5, th Edition 1.5, th Edition Autumn 2011CSE 3112

Highlights from last lecture Logical Inference – Law of excluded middle – Introduction and elimination rules for ,  – Introduction and elimination rules for  Modus Ponens and Direct Proof rule – Introduction and elimination rules for ,  Proofs Autumn 2011CSE 311 3

Simple Propositional Inference Rules Excluded middle Two inference rules per binary connective one to eliminate it, one to introduce it. Autumn 2011CSE 3114 p  q ∴ p, q p, q ∴ p  q p ∴ p  q, q  p p  q,  p ∴ q p, p  q ∴ q p  q ∴ p  q Direct Proof Rule ∴ p  p

Direct Proof of an Implication p  q denotes a proof of q given p as an assumption The direct proof rule – if you have such a proof then you can conclude that p  q is true E.g. 1. p Assumption 2. p  q Intro for  from 1 3. p  (p  q) Direct proof rule Autumn 2011CSE 3115 Proof subroutine

General Proof Strategy A.Look at the rules for introducing connectives to see how you would build up the formula you want to prove from pieces of what is given B.Use the rules for eliminating connectives to break down the given formulas so that you get the pieces you need to do A. C.Write the proof beginning with B followed by A. Autumn 2011CSE 3116

Example Prove ((p  q)  (q  r))  (p  r) Autumn 2011CSE 3117

Inference Rules for Quantifiers Autumn 2011CSE 3118 P(c) for some c ∴  x P(x)  x P(x) ∴ P(a) for any a “Let a be anything * ”...P(a) ∴  x P(x)  x P(x) ∴ P(c) for some special c * in the domain of P

Proofs using Quantifiers “There exists an even prime number” Autumn 2011CSE 3119 Prime(x): x is an integer > 1 and x is not a multiple of any integer strictly between 1 and x

Even and Odd Prove: “The square of every even number is even” Formal proof of:  x (Even(x)  Even(x 2 )) Autumn 2011CSE Even(x)   y (x=2y) Odd(x)   y (x=2y+1) Domain: Integers

Even and Odd Prove: “The square of every odd number is odd” English proof of:  x (Odd(x)  Odd(x 2 )) Let x be an odd number. Then x=2k+1 for some integer k (depending on x) Therefore x 2 =(2k+1) 2 = 4k 2 +4k+1=2(2k 2 +2k)+1. Since 2k 2 +2k is an integer, x 2 is odd. Autumn 2011CSE Even(x)   y (x=2y) Odd(x)   y (x=2y+1) Domain: Integers

“Proof by Contradiction”: One way to prove  p If we assume p and derive False (a contradiction) then we have proved  p. 1. p Assumption F 4. p  F Direct Proof rule 5.  p  F Equivalence from 4 6.  p Equivalence from 5 Autumn 2011CSE 31112

Even and Odd Prove: “No number is both even and odd” English proof:   x (Even(x)  Odd(x))  x  (Even(x)  Odd(x)) Let x be any integer and suppose that it is both even and odd. Then x=2k for some integer k and x=2n+1 for some integer n. Therefore 2k=2n+1 and hence k=n+½. But two integers cannot differ by ½ so this is a contradiction. Autumn 2011CSE Even(x)   y (x=2y) Odd(x)   y (x=2y+1) Domain: Integers

Rational Numbers A real number x is rational iff there exist integers p and q with q  0 such that x=p/q. Prove: – If x and y are rational then xy is rational Autumn 2011CSE Rational(x)   p  q ((x=p/q)  Integer(p)  Integer(q)  q  0)  x  y ((Rational(x)  Rational(y))  Rational(xy)) Domain: Real numbers

Rational Numbers A real number x is rational iff there exist integers p and q with q  0 such that x=p/q. Prove: – If x and y are rational then xy is rational – If x and y are rational then x+y is rational Autumn 2011CSE Rational(x)   p  q ((x=p/q)  Integer(p)  Integer(q)  q  0)

Rational Numbers A real number x is rational iff there exist integers p and q with q  0 such that x=p/q. Prove: – If x and y are rational then xy is rational – If x and y are rational then x+y is rational – If x and y are rational then x/y is rational Autumn 2011CSE Rational(x)   p  q ((x=p/q)  Integer(p)  Integer(q)  q  0)

Counterexamples To disprove  x P(x) find a counterexample – some c such that  P(c) – works because this implies  x  P(x) which is equivalent to  x P(x) Autumn 2011CSE 31117

Proofs Formal proofs follow simple well-defined rules and should be easy to check – In the same way that code should be easy to execute English proofs correspond to those rules but are designed to be easier for humans to read – Easily checkable in principle Simple proof strategies already do a lot – Later we will cover a specific strategy that applies to loops and recursion (mathematical induction) Autumn 2011CSE 31118