CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.

Slides:



Advertisements
Similar presentations
Introduction to Proofs
Advertisements

PROOF BY CONTRADICTION
Review for CS1050. Review Questions Without using truth tables, prove that  (p  q)   q is a tautology. Prove that the sum of an even integer and an.
Chapter 3 Direct Proof and Proof by Contrapositive
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Elementary Number Theory and Methods of Proof
RMIT University; Taylor's College This is a story about four people named Everybody, Somebody, Anybody and Nobody. There was an important job to be done.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
Discrete Mathematics Math 6A Instructor: M. Welling.
Copyright © Cengage Learning. All rights reserved.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Predicates and Quantifiers
Section 1.3: Predicates and Quantifiers
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
Methods of Proof & Proof Strategies
Chapter 1: The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
CSCI 2110 Discrete Mathematics Tutorial 10 Chin 1.
Logical Equivalence & Predicate Logic
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Introduction to Proofs
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Review I Rosen , 3.1 Know your definitions!
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
4.1 Proofs and Counterexamples. Even Odd Numbers Find a property that describes each of the following sets E={…, -4, -2, 0, 2, 4, 6, …} O={…, -3, -1,
1 Sections 1.3 and 1.4 Predicates & Quantifiers. 2 Propositional Functions In a mathematical assertion, such as x < 3, there are two parts: –the subject,
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
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.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
Induction Practice CS1050. Prove that whenever n is a positive integer. Proof: Basis Case: Let n = 1, then.
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.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Introduction to Predicates and Quantified Statements I Lecture 9 Section 2.1 Wed, Jan 31, 2007.
ICS 6D Logic Overview Instructor: Sandy Irani. What is logic? Branch of mathematics in which variables and expressions have value true (T) or false (F)
Chapter 1 Logic and proofs
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
CSE15 Discrete Mathematics 01/23/17
Discrete Mathematics Logic.
Chapter 1: The Foundations: Logic and Proofs
Chapter 1 The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CS 220: Discrete Structures and their Applications
CHAPTER 1: LOGICS AND PROOF
Mathematics for Computer Science MIT 6.042J/18.062J
Introduction to Predicates and Quantified Statements I
Lecture 1.3: Predicate Logic
Discrete Mathematics Logic.
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
CS201: Data Structures and Discrete Mathematics I
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Lecture 1.3: Predicate Logic
Presentation transcript:

CSS342: Quantifiers1 Professor: Munehiro Fukuda

CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but not both Example: –1 < 4 is true. –2 > 5 is false. –3 is an odd number –Then, how about x is an odd number? The statement “X is an odd number”: –is true if x = 103 –is false if x = 8 –Most of the statements in math and CS use variables. We need to extend the system of logic!

CSS342: Quantifiers3 Propositional Functions P(x): a statement involving the variable x –Example: x is an odd number. –P(x) itself is not a proposition. –For each x in the domain D of discourse of P, if D is the set of positive integers, P(x) is a proposition P(1): 1 is an odd number (= true). P(2): 2 is an odd number (= false). … Either true or false X: a free variable, (i.e., free to roam over the domain D) How about for every x or for some x, P(x) is true/false? –Most statements in math and CS use such phrases.

CSS342: Quantifiers4 Universally Quantified Statements x, P(x) –Meaning:for every x, P(x), for all x, P(x), or for any x, P(x) – :a universal quantifier –P(x): a universally qualified statement –X: a bound variable, (i.e., bound by the quantifier ) –is true:if P(x) is true for every x in D –is false:if P(x) is false for at least one x in D A A A

CSS342: Quantifiers5 Universally Quantified Statements Example 1 For every real number x, if x > 1, then x + 1 > 1 is true. To be true, we need to consider all cases: x ≤ 1 and x > 1 Proof: (1 ) If x ≤ 1, the hypothesis x > 1 is false, thus the conditional proposition is true. (2) If x > 1, x + 1 > x (always true) since x > 1, x + 1 > x > 1 Thus, the conditional proposition is true. Therefore, this universally quantified statement is true.

CSS342: Quantifiers6 Universally Quantified Statements Example 2 For every real number x, x 2 – 1 > 0 is false. To be false, we only need to show a counterexample: x = 1 Proof: If x = 1, the proposition 1 2 – 1 > 0 is false The value 1 is a counterexample. Thus, this universally quantified statement is false

CSS342: Quantifiers7 Existentially Quantified Statements x, P(x) –Meaning:for some x, P(x), for at least one x, P(x), or there exists x such that, P(x) – :an existential quantifier –P(x): a existentially qualified statement –X: a bound variable, (i.e., bound by the quantifier ) –is true:if P(x) is true for at least one x in D –is false:if P(x) is false for every x in D E E E

CSS342: Quantifiers8 Existentially Quantified Statements Example 1 For some positive integer n, if n is prime, then n + 1, n + 2, n + 3, and n + 4 are not prime. is true. To be true, we only need to show at least one case makes it true: x = 1 Proof: If n = 23,n + 1 = 24 (=3 * 8) is not prime n + 2 = 25 (=5 * 5) is not prime n + 3 = 26 (=2 * 13) is not prime n + 4 = 27 (=3 * 9) is not prime Thus, the proposition is true. Therefor, this existentially quantified statement is true.

CSS342: Quantifiers9 Existentially Quantified Statements Example 2 For some real number x, 1 / (x 2 + 1) > 1 is false. To be false, we need to consider all cases: This in turn means that for all real number x, 1 / (x 2 + 1) ≤ 1 Proof: Since 0 ≤ x 2 for every real number x, 1 ≤ x By dividing both sides of this inequality expression by x / (x 2 + 1) ≤ 1 Is true. Therefore, 1 / (x 2 + 1) >1 is false for every real number x.

CSS342: Quantifiers10 xP(x) and xP(x) If it is not the case that P(x) is true for every x, there is a counterexample showing that P(x) is not true for at least one x. AE P(x) = true Domain D ≡ P(x) = true P(x) ≠ true(false)

CSS342: Quantifiers11 xP(x) and xP(x) AE P(x) = false Domain D ≡ P(x) = false P(x) = true If it is not the case that P(x) is true for some x, P(x) is false for every x.

CSS342: Quantifiers12 Generalized De Morgan Laws for Logic If P is a propositional funciton, each pair of propositions in (a) and (b) is logically equivalent, (i.e., has the same truth values.) A) xP(x)and xP(x) B) xP(x)and xP(x) E A A E

CSS342: Quantifiers13 Generalized De Morgan Laws for Logic (Cont’d) For every x, P(x) means –P(1) && P(2) && … && P(n) For some x, P(x) means –P(1) || P(2) || … || P(n) x, P(x) ≡ x, P(x) means –!(P(1) && P(2) && … && P(n)) ≡ !P(1) || !P(2) || … || !P(n) x, P(x) ≡ x, P(x) means –!(P(1) || P(2) || … || P(n)) ≡ !P(1) && !P(2) && … && !P(n)) AE AE

CSS342: Quantifiers14 Revisiting Existentially Quantified Statement Example 2 For some real number x, 1 / (x 2 + 1) > 1 is false. Let P(x) be 1 / (x 2 + 1) > 1, then x, P(x) According to De Morgan Laws, we may prove x, P(x) This in turn means that for all real number x, 1 / (x 2 + 1) > 1 is false, (i.e., 1 / (x 2 + 1) ≤ 1) Proof: A E Since 0 ≤ x 2 for every real number x, 1 ≤ x By dividing both sides of this inequality expression by x / (x 2 + 1) ≤ 1

CSS342: Quantifiers15 Two-Variable Propositional Function P(x, y): x + y = 0 x, y, x + y = 0 is true. –Proof:for any x, we can find at least y = -x. Thus, x + y = x – x = 0 y, x, x + y = 0 is false. –Proof: if it is true, the statement can be replaced with constant Y x, x + Y = 0 However, we can choose x = 1 – Y, such that x + Y = 1 – Y + Y = 1 ≠ 0. AE AE A

CSS342: Quantifiers16 The Logic Game Given a propositional function, P(x, y) You and your opponent play a logic game. –Your goal: make P(x, y) true –You can: choose a bound variable of to make it true –Your opponent, Farley’s goal: make P(x, y) false –Farley can: choose a bound variable of to make it false Play with P(x, y): x + y = 0 A E

CSS342: Quantifiers17 The Logic Game (Cont’d) x, y, P(x, y): –No matter what Farley chooses for x, you choose y = -x. –You win. P(x, y) is true. x, y, P(x, y): –Regardless of what you choose for x, Farley chooses y = 1- x. –Farley wins. P(x, y) is false. x, y, P(x, y): –Farley chooses x and y such that x + y ≠ 0, (e.g., x = 0, y = 1) –Farley wins. P(x, y) is false. x, y, P(x, y) –You choose x and y such that x + y = 0, (e.g., y = -x or x=1, y= -1) –You win. P(x, y) is true. A E A AA E E E