Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

1.3 Predicates and Quantifiers
Nested Quantifiers Needed to express statements with multiple variables Example 1: “x+y = y+x for all real numbers”  x  y(x+y = y+x) where the domains.
The Logic of Quantified Statements
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
CS 285- Discrete Mathematics
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.
Propositions and Connectives Conditionals and Bi-conditionals Quantifiers.
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.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Discrete Structures Chapter 1 Part B Fundamentals of Logic Nurul Amelina Nasharuddin Multimedia Department 1.
Discrete Mathematics Math 6A Instructor: M. Welling.
Lecture # 21 Predicates & Quantifiers
Function: Definition A function is a correspondence from a first set, called the domain, to a second set, called the range, such that each element in the.
1 Predicates and Quantifiers CS 202, Spring 2007 Epp, Sections 2.1 and 2.2 Aaron Bloomfield.
Section 1.3: Predicates and Quantifiers
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Predicates and Quantifiers
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.
Review I Rosen , 3.1 Know your definitions!
1 Predicates and Quantifiers CS/APMA 202, Spring 2005 Rosen, section 1.3 Aaron Bloomfield.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
Nested Quantifiers Section 1.5.
How do I show that two compound propositions are logically equivalent?
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
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.
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.
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
Discrete Structures – CNS 2300
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
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.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Propositional and predicate logic
Discrete Mathematical الرياضيات المتقطعة. Example 12 June OR Q(x,y): x+y=x-y a) Q(1,1): 2=0 False b) Q(2,0): 2+0=2-0 True c) Q(1,y): 1+y=1-y False(take.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
3. The Logic of Quantified Statements Summary
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.
CS 220: Discrete Structures and their Applications
CHAPTER 1: LOGICS AND PROOF
Mathematics for Computer Science MIT 6.042J/18.062J
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 II
Week #2 – 4/6 September 2002 Prof. Marie desJardins
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
1.3 Propositional Equivalences
Presentation transcript:

Rosen 1.3

Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has no truth value until the variable x is bound by either –assigning it a value or by –quantifying it.

Assignment of values Let Q(x,y) denote x + y = 7. Each of the following can be determined as T or F. Q(4,3) Q(3,2) Q(4,3) Q(3,2) [Q(4,3) Q(3,2)]

Quantifiers Universe of Discourse, U: The domain of a variable in a propositional function. Universal Quantification of P(x) is the proposition:P(x) is true for all values of x in U. Existential Quantification of P(x) is the proposition: There exists an element, x, in U such that P(x) is true.

Universal Quantification of P(x) xP(x) for all x P(x) for every x P(x) Defined as: P(x 0 ) P(x 1 ) P(x 2 ) P(x 3 )... for all x i in U Example: Let P(x) denote x 2 x If U is x such that 0 < x < 1 then xP(x) is false. If U is x such that 1 < x then xP(x) is true.

Existential Quantification of P(x) xP(x) there is an x such that P(x) there is at least one x such that P(x) there exists at least one x such that P(x) Defined as: P(x 0 ) P(x 1 ) P(x 2 ) P(x 3 )... for all x i in U Example: Let P(x) denote x 2 x If U is x such that 0 < x 1 then xP(x) is true. If U is x such that x < 1 then xP(x) is true.

Quantifiers xP(x) True when P(x) is true for every x. False if there is an x for which P(x) is false. xP(x) True if there exists an x for which P(x) is true. False if P(x) is false for every x.

Negation (it is not the case) xP(x) equivalent to x P(x) True when P(x) is false for every x False if there is an x for which P(x) is true. xP(x) is equivalent to x P(x) True if there exists an x for which P(x) is false. False if P(x) is true for every x.

Examples 2a Let T(a,b) denote the propositional function a trusts b. Let U be the set of all people in the world. Everybody trusts Bob. xT(x,Bob) Could also say: x U T(x,Bob) denotes membership Bob trusts somebody. xT(Bob,x)

Examples 2b Alice trusts herself. T(Alice, Alice) Alice trusts nobody. x T(Alice,x) Carol trusts everyone trusted by David. x(T(David,x) T(Carol,x)) Everyone trusts somebody. x y T(x,y)

Examples 2c x y T(x,y) Someone trusts everybody. y x T(x,y) Somebody is trusted by everybody. Bob trusts only Alice. x (x=Alice T(Bob,x))

Bob trusts only Alice. x (x=Alice T(Bob,x)) Let p be x=Alice q be Bob trusts x pqp q TTT TFF FTF FFT True only when Bob trusts Alice or Bob does not trust someone who is not Alice

Quantification of Two Variables (read left to right) x yP(x,y) or y xP(x,y) True when P(x,y) is true for every pair x,y. False if there is a pair x,y for which P(x,y) is false. x yP(x,y) or y xP(x,y) True if there is a pair x,y for which P(x,y) is true. False if P(x,y) is false for every pair x,y.

Quantification of Two Variables x yP(x,y) True when for every x there is a y for which P(x,y) is true. (in this case y can depend on x) False if there is an x such that P(x,y) is false for every y. y xP(x,y) True if there is a y for which P(x,y) is true for every x. (i.e., true for a particular y regardless (or independent) of x) False if for every y there is an x for which P(x,y) is false. Note that order matters here In particular, if y xP(x,y) is true, then x yP(x,y) is true. However, if x yP(x,y) is true, it is not necessary that y xP(x,y) is true.

Examples 3a Let L(x,y) be the statement x loves y where U for both x and y is the set of all people in the world. Everybody loves Jerry. xL(x,Jerry) Everybody loves somebody. x yL(x,y) There is somebody whom everybody loves. y xL(x,y)

Examples 3b1 There is somebody whom Lydia does not love. x L(Lydia,x) Nobody loves everybody. (For each person there is at least one person they do not love.) x y L(x,y) There is somebody (one or more) whom nobody loves y x L(x,y)

Examples 3b2 There is exactly one person whom everybody loves. x yL(y,x)? No. There could be more than one person everybody loves x{ yL(y,x) w[( yL(y,w)) w=x]} If there are, say, two values x1 and x2 (or more) for which L(y,x) is true, the proposition is false. x{ yL(y,x) w[( yL(y,w)) w=x]}? x w[( y L(y,w)) w=x]?

Examples 3c There are exactly two people whom Lynn loves. x y{x y L(Lynn,x) L(Lynn,y)}? No. x y{x y L(Lynn,x) L(Lynn,y) z[L(Lynn,z) (z=x z=y)]} Everyone loves himself or herself. xL(x,x) There is someone who loves no one besides himself or herself. x y(L(x,y) x=y)

Thinking of Quantification as Loops Quantifications of more than one variable can be thought of as nested loops. For example, x yP(x,y) can be thought of as a loop over x, inside of which we loop over y (i.e., for each value of x). Likewise, x yP(x,y) can be thought of as a loop over x with a loop over y nested inside. This can be extended to any number of variables.

Quantification as Loops Using this procedure x yP(x,y) is true if P(x,y) is true for all values of x,y as we loop through y for each value of x. x yP(x,y) is true if P(x,y) is true for at least one set of values x,y as we loop through y for each value of x. …And so on….

Quantification of 3 Variables Let Q(x,y,z) be the statement x + y = z, where x,y,z are real numbers. What is the truth values of x y zQ(x,y,z)? z x yQ(x,y,z)?

Quantification of 3 Variables Let Q(x,y,z) be the statement x + y = z, where x,y,z are real numbers. x y zQ(x,y,z) is the statement, For all real numbers x and for all real numbers y, there is a real number z such that x + y = z. True

Quantification of 3 Variables Let Q(x,y,z) be the statement x + y = z, where x,y,z are real numbers. z x yQ(x,y,z) is the statement, There is a real number z such that for all real numbers x and for all real numbers y, x + y = z. False

Examples 4a Let P(x) be the statement: x is a Georgia Tech student Q(x) be the statement: x is ignorant R(x) be the statement: x wears red and U is the set of all people. No Georgia Tech students are ignorant. x(P(x) Q(x)) OK by Implication equivalence. x(P(x) Q(x)) Does not work. Why?

Examples 4a x(P(x) Q(x)) x (P(x) Q(x)) Negation equivalence x ( P(x) Q(x))Implication equivalence x ( P(x) Q(x))DeMorgans x ( P(x) Q(x))Double negation Only true if everyone is a GT student and is not ignorant. No Georgia Tech students are ignorant. x(P(x) Q(x))

Examples 4a P(x) be the statement: x is a Georgia Tech student Q(x) be the statement: x is ignorant R(x) be the statement: x wears red and U is the set of all people. No Georgia Tech students are ignorant. x(P(x) Q(x)) Also works. Why?

Examples 4a x(P(x) Q(x)) x (P(x) Q(x)) Negation equivalence x ( P(x) Q(x))DeMorgan x (P(x) Q(x))Implication equivalence No Georgia Tech students are ignorant. x(P(x) Q(x))

Examples 4b Let P(x) be the statement: x is a Georgia Tech student Q(x) be the statement: x is ignorant R(x) be the statement: x wears red and U is the set of all people. All ignorant people wear red. x(Q(x) R(x))

Examples 4c Let P(x) be the statement: x is a Georgia Tech student Q(x) be the statement: x is ignorant R(x) be the statement: x wears red and U is the set of all people. No Georgia Tech student wears red. x(P(x) R(x)) What about this? x(R(x) P(x))

Examples 4d If no Georgia Tech students are ignorant and all ignorant people wear red, does it follow that no Georgia Tech student wears red? x((P(x) Q(x)) (Q(x) R(x))) NO Some misguided GT student might wear red!! This can be shown with a truth table or Wenn diagrams