Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Similar documents
COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Readings: Conjecture. Theorem. Rosen Section 1.5

CS 2336 Discrete Mathematics

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

Rules Build Arguments Rules Building Arguments

Predicate Logic. Andreas Klappenecker

Rules of Inference. Arguments and Validity

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

1 The Foundation: Logic and Proofs

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

software design & management Gachon University Chulyun Kim

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Intro to Logic and Proofs

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

ECOM Discrete Mathematics

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

1 The Foundation: Logic and Proofs

CSE 1400 Applied Discrete Mathematics Proofs

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

With Question/Answer Animations. Chapter 1, Part III: Proofs

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

CSE 20 DISCRETE MATH. Winter

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

CSE 20 DISCRETE MATH. Fall

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Discrete Mathematics

CSE Discrete Structures

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Review: Potential stumbling blocks

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Discrete Mathematics Basic Proof Methods

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. March 1, :00 pm Duration: 1:15 hs

Inference and Proofs (1.6 & 1.7)

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Introduction to proofs. Niloufar Shafiei

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

[Ch 3, 4] Logic and Proofs (2) 1. Valid and Invalid Arguments ( 2.3, 3.4) 400 lecture note #2. 1) Basics

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

Disjunction/Conjunction Normal Form

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

MAT 243 Test 1 SOLUTIONS, FORM A

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

2. Use quantifiers to express the associative law for multiplication of real numbers.

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Example ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Normal Forms Note: all ppts about normal forms are skipped.

First order Logic ( Predicate Logic) and Methods of Proof

Tutorial Obtain the principal disjunctive normal form and principal conjunction form of the statement

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Rules of Inference. Agenda. Rules of Inference Dr Patrick Chan. p r. p q. q r. Rules of Inference for Quantifiers. Hypothetical Syllogism

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

Mat2345 Week 2. Chap 1.5, 1.6. Fall Mat2345 Week 2. Chap 1.5, 1.6. Week2. Negation. 1.5 Inference. Modus Ponens. Modus Tollens. Rules.

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

Math 3336: Discrete Mathematics Practice Problems for Exam I

Full file at

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Chapter 3. The Logic of Quantified Statements

Anna University, Chennai, November/December 2012

Proofs of Mathema-cal Statements. A proof is a valid argument that establishes the truth of a statement.

Logic and Proof. Aiichiro Nakano

CITS2211 Discrete Structures Proofs

A. Propositional Logic

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

NOTES ON INTEGERS. 1. Integers

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Math 55 Homework 2 solutions

MATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Supplementary Logic Notes CSE 321 Winter 2009

(3,1) Methods of Proof

Logic Overview, I. and T T T T F F F T F F F F

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

DISCRETE MATHEMATICS BA202

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY MA DISCRETE MATHEMATICS

Section 1.1 Propositions

Proofs. Chapter 2 P P Q Q

Solutions to Exercises (Sections )

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Transcription:

Discrete Mathematics Logics and Proofs Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Resolution Theorem: p q p r (q r) p q p r q r p q r p q p p r q r T T T T F T T T T T T F T F F F T T T F T T F T T T T T F F T F F F T T F T T T T T T T T F T F T T T T T T F F T T T T T T T F F F T T T T F T

Resolution 123 is either irrational or rational 123 is not irrational or even 123 is either rational or even. p: 123 is irrational q: 123 is rational r: 123 is even (p q) ( p r) q r 123 is either rational or even

Examples It is not sunny this afternoon and it is colder than yesterday, We will go swimming only if it is sunny, If we do not go swimming, then we will take a canoe trip, If we take a canoe trip, then we will be home by sunset Conclusion: We will be home by sunset. p: It is sunny this afternoon q: It is colder than yesterday r: We will go swimming s: We will take a canoe trip t: We will be home by sunset

Examples Premises: p q; r p; r s; s t Conclusion: t p q premise p simplification r p premise r modus tollens r s premise s modus ponens s t premise t modus ponens

Examples If you send me an e-mail message, then I will finish writing the program If you do not send me an e-mail message, then I will go to sleep early If I go to sleep early, then I will wake up feeling refreshed If I do not finish writing the program, then I will wake up feeling refreshed. p: You send me an e-mail message q: I will finish writing the program r: I will go to sleep early s: I will wake up feeling refreshed Premises: p q; p r; r s; Conclsion: q s p q + p r q r + q r s

Examples Premises: p q; p r; r s; Conclsion: q s p q premise q premise p modus tollens p r premise r modus ponens r s premise s modus ponens

Rule of Inference Universal instantiation: x P(x) P(c) Every rational number is equal to a/b for some integers a, b 1.23 is a rational number 1.23 is equal to a/b for some integers a, b. R(x): x is rational F(x): x is equal to a/b for some integers a, b. x(r(x) F(x)) Domain=real numbers R 1.23 F(1.23) universal instantiation R(1.23) premise F 1.23 Modus ponens

Rule of Inference Universal generalization: P(c) for an arbitrary c D x P(x) The sum of any two odd integers is even. Domain=integers O x : x is odd E x : x is even x y (O x O y E(x + y)) O x premise x = 2k + 1 for an integer k definition O(y) premise y = 2l + 1 definition x + y = 2(k + l + 1) property of identities E x + y definition x y (O x O y E(x + y)) UG

Existential instantiation: x P(x) P c for some c D Existential generalization: P(c) for some c D x P(x) Rule of Inference

Examples x (P x Q(x)) x (Q x R(x)) x (P x R(x)) x (P x Q(x)) premise P a Q a universal instantiation x (Q x R(x)) premise Q a R(a) universal instantiation P a R(a) hypothetical syllogism x (P x R(x)) universal generalization

Examples x P x x(p x Q x R(x)) x P(x) x y (R x R(y)) x P x x(p x Q x R(x)) premise P(x) premise x(p x Q x R(x)) modus ponens P(a) existential instantiation P a Q a R(a) universal instantiation P a Q(a) addition R(a) modus ponens x R(x) existential generalization y R(y) existential generalization x R x y R(y) conjunction x y (R x R(y))? Easy to prove

Rule of Inference Universal Modus Ponens x(p(x) Q(x)) P(a) Q(a) Universal Modus Tollens x(p(x) Q(x)) Q(a) P(a)

Examples For all positive integers n, if n > 4, then n 2 < 2 n. Show that 100 2 < 2 100 P n : n > 4 Q(n) n 2 < 2 n n(p (n) Q(n)) P(100) Q(100)

Notions Definition: axioms: the statements we assume to be true theorem: a statement that can be shown to be true propositions: less important theorems lemma: a less important theorem used to prove other results corollary: a theorem established directly from a proven theorem proof: a valid argument that establishes the truth of a theorem conjecture: a statement that is proposed to be true partial evidence, heuristic argument, intuition of an expert

Axioms Axiom of Choice: Given a family S of non-empty sets, there is a function f: S S S S such that f S S for every S S Well-Ordering Axiom: Every non-empty subset of {0,1, } has a least element

Theorem Division Algorithm: Let a, b > 0 be integers. Then there exist unique integers q, r [0, b) such that a = bq + r Greatest Common Divisor: Let a, b be integers. Then there exist an integer d > 0 such that d a, d b For every d s. t. d a, d b, it holds that d d

Corollary Number of Residue Classes: Let b > 0 be integers. Then there are b different remainders when integers are divided by b. Uniqueness of Greatest Common Divisor: Any two integers have a unique greatest common divisor.

Lemma Euclid s Lemma: If p ab and p a, then p b. Bézout s Lemma: Let a, b be integers. Then there exist integers s, t such that as + bt = gcd(a, b), the greatest common divisor of a and b.

Conjecture Goldbach's conjecture: Every even integer greater than 2 can be expressed as the sum of two primes. Fermat's Last Theorem: The equation x n + y n = z n has no solutions in positive integers as long as n 3.

Notions How to State Theorems A property holds for all elements in a domain, such as the integers or the real numbers. The statements used in a proof axioms; premises; previously proven theorems How to prove rules of inference definitions of terms conclusions from other assertions

Direct Proofs Strategy (of proving p q) The first step: assume that p is true The final step: q is true Intermediate steps: constructed using rules of inference If n is an odd integer, then n 2 is odd. P n : n is an odd integer Q n : n 2 is odd. n (P n Q(n)) P(n) premise n = 2k + 1 definition n 2 = 2 2k 2 + 2k + 1 property of identity Q(n) definition n (P n Q(n)) universal generalization

Direct Proofs if m and n are perfect squares, then nm is a perfect square P x : x is a perfect square m n (P m P n P(mn)) P m P(n) premise m = k 2 ; n = l 2 definition mn = kl 2 property of identity P(mn) definition m n (P m P n P(mn)) universal generalization

Proof by Contraposition Strategy: (of proving p q) p q ( q p) The first step: assume q is true The final step: conclude p is true Intermediate steps: axioms, definitions, proven theorems, rules of inference.

Proof by Contraposition if n is an integer and 3n + 2 is odd, then n is odd P n : 3n + 2 is odd Q n : n is odd n (P n Q(n)) Q(n) premise n = 2k definition 3n + 2 = 6k + 2 property of identity P(n) definition n ( Q n P(n)) universal generalization n (P n Q(n)) contraposition

Proof by Contraposition if n = ab, where a, b Z +, then a n or b n. P a, b, n : n = ab Q a, n : a n n a b (P a, b, n Q a, n Q(b, n)) Q a, n Q(b, n) a > n b > n ab > n P(a, b, n) n a b ( Q a, n Q b, n P a, b, n ) n a b (P a, b, n Q a, n Q(b, n))

Vacuous and Trivial Proof Vacuous Proof (of p q): Show that p is false P(n): If n > 1, then n 2 > n. Show that P(0) is true. p: 0 > 1 ; q: 0 2 > 0 Trivial Proof (of p q): Show that q is true without using p. P(n): If a, b and a b, then a n b n, Domain= N Show that P(0) is true. P 0 : If a, b and a b, then a 0 b 0

Proofs by Contradiction Proofs by Contradiction (of p) Show that p (r r) is true for some proposition r. p: 2 is irrational -- What is r? p 2 = a for two integers a, b s.t. gcd a, b = 1 b 2 = a2 b 2 a 2 = 2b 2 2 a a = 2k 4k 2 = 2b 2 2k 2 = b 2 2 b 2 gcd(a, b)

Proofs by Contradiction Proof by Contradiction (of p q): The first step: assume that q is true. The final step: a contradiction like r r The intermediate steps: based on premises and q. The proof by contraposition is also by contradiction. If 3n + 2 is odd, then n is odd. p: 3n + 2 is odd q: n is odd p q n = 2k 3n + 2 = 6k + 2 p

Proof of Equivalence Proof of Equivalence (p q) Show that p q and q p are both true. Prove Many Equivalences (p 1 p 2 p n ): Prove that p 1 p 2, p 2 p 3,, p n 1 p n, p n p 1 Show that p 1 p 2 p 3, where p 1 : n is even p 2 : n 1 is odd p 3 : n 2 is even

Proof of Equivalence p 1 p 2 p 1 n = 2k n 1 = 2k 1 p 2 p 2 p 3 p 2 n 1 = 2k 1 n = 2k n 2 = 4k 2 p 3 p 1 p 3 n 2 = 2k 2 n n = 2l p 1 p 3