Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Propositional Predicate
Section 1.3. More Logical Equivalences Constructing New Logical Equivalences We can show that two expressions are logically equivalent by developing.
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 
Propositions and Connectives Conditionals and Bi-conditionals Quantifiers.
Discrete Mathematics Math 6A Instructor: M. Welling.
CSE115/ENGR160 Discrete Mathematics 01/25/11 Ming-Hsuan Yang UC Merced 1.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 11 Introduction to Predicate Logic Limitations of Propositional Logic Predicates, quantifiers and propositions.
Lecture # 21 Predicates & Quantifiers
Predicates and Quantifiers
Section 1.3: Predicates and Quantifiers
Chapter 1: The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
Logical Equivalence & Predicate Logic
MATH 213 A – Discrete Mathematics for Computer Science Dr. (Mr.) Bancroft.
CS 103 Discrete Structures Lecture 05
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Chapter 1, Part II With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Math 51/COEN 19 Day 3, 1.4 Quantifiers 1. 3 Predicates A lot like functions that return booleans Let P(x) denote x
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
Nested Quantifiers Section 1.5.
CompSci 102 Discrete Math for Computer Science January 24, 2012 Prof. Rodger Slides modified from Rosen.
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.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
Lecture Predicates and Quantifiers 1.4 Nested Quantifiers.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
Discrete Structures – CNS 2300
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
Discrete Mathematics Mathematical reasoning: think logically; know how to prove Combinatorial analysis: know how to count Discrete structures: represent.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
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.
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
Introduction to Predicates and Quantified Statements I Lecture 9 Section 2.1 Wed, Jan 31, 2007.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Introduction to Discrete Mathematics Discrete Mathematics: is the part of mathematics devoted to the study of discrete objects. Discrete Mathematics is.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
CSE15 Discrete Mathematics 01/25/17
CSE15 Discrete Mathematics 01/23/17
Chapter 3 The Logic of Quantified Statements
Chapter 1 The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Predicate logic Also known as predicate calculus or First-Order-Logic(FOL) or First- Order-Predicate-Calculus (FOPC). Meant to overcome the weaknesses.
1.4 Predicates and Quantifiers
CS 220: Discrete Structures and their Applications
Nested Quantifiers Nested quantifiers are often necessary to express the meaning of sentences in English as well as important concepts in computer science.
Introduction to Predicates and Quantified Statements I
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
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
ICS 253: Discrete Structures I
Predicates and Quantifiers
The Foundations: Logic and Proofs
Lecture 1.3: Predicate Logic
Presentation transcript:

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 2 Predicates “x is greater than 3” This statement is neither true nor false when the value of the variable is not specified This statement has two parts:  The first part (subject) is the variable x.  The second (predicate) is “is greater than 3”.

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 3 Predicates We can denote this statement by P(x), where P denotes the predicate “is greater than 3”. Once a value has been assigned to x, the statement P(x) becomes a proposition and has a truth values P(x) is called Proposition function P at x  P(x1,x2,x3,………,xn).  P is called n-place or (n-ary) predicate.

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 4 Predicates Examples: Let P(x) denote “ x is greater than 3”. What are the truth values of P(4) and P(2)? Let Q(x, y) denote “x=y+3”. What are the truth values of Q(1,2) and Q(3,0)? Let A(c, n) denote “computer c is connected to network n”, suppose that the computer MATH1 is connected to network CAMPUS2, but not to network CAMPUS1, What are the truth values of A(MATH1, CAMPUS1) and A(MATH1, CAMPUS2)?

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 5 Quantifiers Universal quantification Which tell us that a predicate is true for every element under consideration( Domain / Discourse). The universal quantification of P(x) is the statement “P(x) for all values of x in the domain”  x P(x) read as “for all x P(x)” or “for every x P(x)”  is called universal quantifier

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 6 Quantifiers Existential quantification Which tell us that there is one or more element under consideration for which the predicate is true. The existential quantification of P(x) is the statement “there exists an element x in the domain such that P(x)”  x P(x) read as “there is an x such that P(x)” or “there is at least one x such that P(x)” or “for some x P(x)”  is called existential quantifier

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 7 Quantifiers The area of logic that deals with predicates and quantifiers is called predicate calculus.  x P(x) is True when: P(x) is true for every x False when: There is an x for which P(x) is false  x P(x) is True when: There is an x for which P(x) is true False when: P(x) is false for every x

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 8 Quantifiers Examples: Let Q(x) “x<2”. What is the truth value of  x Q(x) when the domain consists of all real numbers? Q(x) is not true for every real number x, for example Q(3) is false x =3 is a counterexample for the statement  x Q(x) Thus  x Q(x) is false

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 9 Quantifiers Examples: What is the truth value of  x (x 2  x) when the domain consists of: a) all real number? B) all integers? a ) is false because (0.5) 2  0.5, x 2  x is false for all real numbers in the range 0<x<1 b) is true because there are no integer x with 0<x<1

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 10 Quantifiers Examples: Let Q(x) “x>3”. What is the truth value of  x Q(x) when the domain consists of all real numbers? Q(x) is sometimes true, for example Q(4) is true Thus  x Q(x) is true

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Quantifiers Examples: Let Q(x) “x=x+1”. What is the truth value of  x Q(x) when the domain consists of all real numbers? Q(x) is false for every real number Thus  x Q(x) is false

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 12 Quantifiers  Note that :  x Q(x) is false if there is no elements in the domain for which Q(x) is true or the domain is empty.  When all the elements in the domain can be listed x 1, x 2, x 3, x 4, ……., x n :   x Q(x) is the same as the conjunction Q(x1)  Q(x2)  ….  Q(xn)   x Q(x) is the same as the disjunction Q(x1)  Q(x2)  ….  Q(xn)  Precedence of quantifiers   and  have higher precedence than all logical operators     

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 13 Quantifiers Examples: Let Q(x) “x 2 <10”. What is the truth value of  x Q(x) when the domain consists of the positive integers not exceeding 4?   x Q(x) is the same as the conjunction  Q(1)  Q(2)  Q(3)  Q(4).  Q(4) is false. Thus  x Q(x) is false.

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 14 Quantifiers Examples: Let Q(x) “x 2 <10”. What is the truth value of  x Q(x) when the domain consists of the positive integers not exceeding 4?   x Q(x) is the same as the disjunction  Q(1)  Q(2)  Q(3)  Q(4).  Q(4) is false. Thus  x Q(x) is false

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 15 Quantifiers If domain consists of n (finite) object and we need to determine the truth value of.  x Q(x)  Loop through all n values of x to see if Q(x) is always true  If you encounter a value x for which Q(x) is false, exit the loop with  x Q(x) is false  Otherwise  x Q(x) is true  x Q(x)  Loop through all n values of x to see if Q(x) is true  If you encounter a value x for which Q(x) is true, exit the loop with  x Q(x) is true  Otherwise  x Q(x) is false

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 16 Quantifiers with restricted domain  The restriction of a universal quantification is the same as the universal quantification of a conditional statement  x 0) same as  x (x 0) “The square of a negative real number is positive”  The restriction of a existential quantification is the same as the existential quantification of a conjunction  z >0 (z 2 =2) same as  z(z>0  z 2 =2) “There is a positive square root of 2”

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 17 Binding variables  When a quantifier is used on the variable x, we say that this occurrence of the variable is bound.  x (x+y=1) The variable x is bounded by the existential quantification  x and the variable y is free  All variable that occur in a propositional function must be bound or equal to particular value to turn it into proposition.

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 18 Binding variables  Examples:  x (P(x)  Q(x))   x R(x) All variables are bounded The scope of  the first quantifier  x is the expression P(x)  Q(x),  second quantifier  x is the expression R(x) Existential quantifier binds the variable x in P(x)  Q(x) Universal quantifier binds the variable x in R(x)

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 19 Quantifiers  Other Quantifiers Uniqueness Quantifier  ! or  1 “  ! x P(x)” = “There exists a unique x such that P(x) is true”

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 20 Negating Quantified Expressions “Every student in this class has taken a calculus course”  xP(x) where P(x) is “x has taken a calculus course” Domain = “Students in class” Negation is “There is a student that has not taken a calculus course”  x  P(x)  xP(x)   x  P(x)

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 21 Negating Quantified Expressions If domain of P(x) consists of n elements “x 1,x 2,x 3,…,x n ” then  xP(x)   (P(x 1 )  P(x 2 )  P(x 3 )  …  P(x n )) by DeMorgan’s laws   P(x 1 )   P(x 2 )   P(x 3 )  …   P(x n )   x  P(x) De Morgan’s Lwas for Quantifiers  xP(x)   x  P(x)   xP(x)   x  P(x)

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 22 Nested Quantifiers Two quantifiers are nested if one is within the scope of another e.g.  x  y (x+y=0) Examples:  x  y(x+y=y+x)  x  y((x>0)  (y<0)  (xy<0))

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 23 Order of Nested Quantifiers Order of nested quantifiers is important if they are different. Example: If Q(x,y) denotes x+y=0, what are the truth values of quantifications  x  y Q(x,y)  x  y Q(x,y)  y  x Q(x,y)  y  x Q(x,y)

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 24 Negating Nested Quantifiers Example: Express the negation of  x  y(xy=1)  x  y(xy=1) by DeMorgan’s laws  x  y(xy=1)  x  y  (xy=1)  x  y(xy  1)

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 25 Negating Nested Quantifiers Example: Express the statement (There does not exist a woman who has taken a flight on every airline in the world) Let P(w,f) be “w has taken f” and Q(f,a) be “f is a flight on a”, then  w  a  f(P(w,f)  Q(f,a))  w  a  f(P(w,f)  Q(f,a))  w  a  f(P(w,f)  Q(f,a))  w  a  f  (P(w,f)  Q(f,a))  w  a  f (  P(w,f)  Q(f,a))