Lecture 1-3: Quantifiers and Predicates. Variables –A variable is a symbol that stands for an individual in a collection or set. –Example, a variable.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

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.
Predicates and Quantifiers
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Knowledge Representation Methods
Discrete Structures Chapter 3: The Logic of Quantified Statements
Ch 1.3: Quantifiers Open sentences, or predicates, are sentences that contain one or more variables. They do not have a truth value until variables are.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
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.
Predicates and Quantifiers
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
1st-order Predicate Logic (FOL)
CS 103 Discrete Structures Lecture 05
(CSC 102) Lecture 7 Discrete Structures. Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
PART TWO PREDICATE LOGIC. Chapter Seven Predicate Logic Symbolization.
Copyright © Cengage Learning. All rights reserved. CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS THE LOGIC OF QUANTIFIED STATEMENTS.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
(CSC 102) Lecture 8 Discrete Structures. Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal.
Predicates and Quantified Statements
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
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.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
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 Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
1 Outline Quantifiers and predicates Translation of English sentences Predicate formulas with single variable Predicate formulas involving multiple variables.
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.
1 Introduction to Abstract Mathematics Chapter 3: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 3.1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Logic.
3. The Logic of Quantified Statements Summary
Predicates and Quantified Statements I
Introduction to Logic for Artificial Intelligence Lecture 2
CSE15 Discrete Mathematics 01/23/17
Lecture 1 – Formal Logic.
Chapter 3 The Logic of Quantified Statements
Proposition & Predicates
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.
CS201: Data Structures and Discrete Mathematics I
Copyright © Cengage Learning. All rights reserved.
CHAPTER 1: LOGICS AND PROOF
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
Mathematical Structures for Computer Science Chapter 1
1st-order Predicate Logic (FOL)
Introduction to Predicates and Quantified Statements I
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
Discrete Mathematics Lecture 4 Logic of Quantified Statements
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
Predicates and Quantifiers
1st-order Predicate Logic (FOL)
Presentation transcript:

Lecture 1-3: Quantifiers and Predicates

Variables –A variable is a symbol that stands for an individual in a collection or set. –Example, a variable x stands for one of the days. We may let x = Monday or x = Tuesday, etc. –Use letters at the end of the alphabet as variables, such as x, y, z. A collection of objects is called the domain of a variable. –Above example: the days in the week is the domain of variable x.

Variable and Statements Incomplete Statements –A sentence containing a variable is called an incomplete statement. –An incomplete statement is about the individuals in a definite domain or set. –Example of an incomplete statement : “x has 30 days.” Complete Statements –When we replace the variable by the name of an individual in the set we obtain a statement about that individual. –Above example: x can be any month and substituting that, we will get a complete statement. –“April has 30 days” is a complete statement.

Quantifiers Quantifiers are phrases that refer to given quantities, such as “for some” or “for all” or “for every,” indicating how many objects have a certain property. Two kinds of quantifiers: Universal and Existential Universal Quantifier: represented by  –The symbol is translated as and means “for all”, “given any”, “for each,” or “for every,” and is known as the universal quantifier. Existential Quantifier: represented by  –The symbol is translated as and means variously “for some,” “there exists,” “there is a,” or “for at least one”.

Predicates Predicate –It is the verbal statement that describes the property of a variable. Usually represented by the letter P, the notation P(x) is used to represent some unspecified property or predicate that x may have –e.g. P(x) = x has 30 days. –P(April) = April has 30 days. Combining the quantifier and the predicate, we get a complete statement of the form  (x)P(x) or  (x)P(x). –We use also the form (  x)P(x) or (  x)P(x) The collection of objects that satisfy the property P(x) is called the domain of interpretation.

Quantifiers and Predicates Truth value of expressions formed using quantifiers and predicates –What is the truth value of  (x)P(x) where x is all the months and P(x) = x has less than 32 days. Undoubtedly, the above is true since no month has more than 32 days. –What is the truth value of  (x)Q(x) where x is all the months and Q(x) = x has less than 31 days. A: TrueB: False –What is the truth value of  (x)Q(x) where x is all the months and Q(x) = x has less than 31 days

Truth Value Truth of expression  (x)P(x) 1. P(x): x is yellow, and the domain of interpretation is the collection of all flowers. A. TrueB: False 2. P(x): x is a plant, and the domain of interpretation is the collection of all flowers. A: TrueB: False 3. P(x): x is positive, and the domain of interpretation consists of integers. A: TrueB: False Redo above for expression  (x)P(x) –Can you find one interpretation in which both  (x)P(x) is true and  (x)P(x) is false? –Can you find one interpretation in which both  (x)P(x) is true and  (x)P(x) is false?

Interpretation Formal definition: An interpretation for an expression involving predicates consists of the following: –A collection of objects, called the domain of interpretation, which must include at least one object. –An assignment of a property of the objects in the domain to each predicate in the expression. –An assignment of a particular object in the domain to each constant symbol in the expression. Predicate wffs can be built similar to propositional wffs using logical connectives with predicates and quantifiers. Examples of predicate wffs –(  x)[P(x)  Q(x)] –(  x) ((  y)[P(x,y) V Q(x,y)]  R(x)) –S(x,y) Λ R(x,y)

Scope Brackets are used wisely to identify the scope of the variable. –(  x) [  (y)[P(x,y) V Q(x,y)]  R(x)] –Scope of (  y) is P(x,y) V Q(x,y) while the scope of (  x) is the entire expression. –(  x)S(x) V (  y)R(y) –Scope of x is S(x) while the scope of y is R(y). –(  x)[P(x,y)  (  y) Q(x,y)] –Scope of variable y is not defined for P(x,y) hence y is called a free variable. Such expressions might not have a truth value at all. What is the truth of the expression –  (x)[A(x) Λ  (y)[B(x,y)  C(y)]] in the interpretation –A(x) is “x > 0”, B(x, y) is “x > y” and C(y) is “y  0” where the domain of x is positive integers and the domain of y is all integers

Translation: Verbal statements to symbolic form “Every person is nice” can be rephrased as “For any thing, if it is a person, then it is nice.” So, if P(x) is “x is a person” and Q(x) be “x is nice,” the statement can be symbolized as –(  x)[P(x)  Q(x)] –“All persons are nice” or “Each person is nice” will also have the same symbolic form. “There is a nice person” can be rewritten as “There exists something that is both a person and nice.” –In symbolic form, (  x)[P(x) Λ Q(x)]. –Variations: “Some persons are nice” or “There are nice persons.” What would the following form mean for the example above? (  x)[P(x)  Q(x)] –This will only be true if there are no persons in the world but that is not the case. –Hence such a statement is false, so almost always,  goes with Λ (conjunction) and  goes with  (implication).

Translation Hint: Avoid confusion by framing the statement in different forms as possible. The word “only” can be tricky depending on its presence in the statement. –X loves only Y  If X loves anything, then that thing is Y. –Only X loves Y  If anything loves Y, then it is X. –X only loves Y  If X does anything to Y, then it is love.

Translation: Examples Example for forming symbolic forms from predicate symbols –D(x) is “x is dog”; R(x) is “x is a rabbit”; C(x,y) is “x chases y” –All dogs chase all rabbits  For anything, if it is a dog, then for any other thing, if it is a rabbit, then the dog chases it  (  x)[D(x)  (  y)(R(y)  C(x,y)] –Some dogs chase all rabbits  There is something that is a dog and for any other thing, if that thing is a rabbit, then the dog chases it  (  x)[D(x) Λ (  y)(R(y)  C(x,y)] –Only dogs chase rabbits  For any two things, if one is a rabbit and the other chases it, then the other is a dog  (  y) (  x)[R(y) Λ C(x,y)  D(x)]

Quick Practice Which of the following is equivalent to the statement “all circles are round”. A.If it’s round, it is a circle B.Some round things are circles C.If it’s a circle, it is round. Cats are smarter than dogs A.Some cats are smarter than dogs B.There is a cat that is smarter than all dogs C.All cats are smarter than all dogs D.Only cats are smarter than dogs

Quick Practice Write each English statement as a predicate wff. (The domain is the whole world.) –D(x): x is a day, S(x): x is sunny, R(x): x is rainy –M: Monday 1.All days are sunny 2.Some days are not rainy 3. it is always a sunny day only if it is a rainy day 4.Monday was sunny; therefore every day will be sunny

Negation of statements A(x): Everything is fun Negation will be “it is false that everything is fun,” i.e. “something is non-fun.” In symbolic form, [(  x)A(x)]  (  x)[A(x)] Similarly negation of “Something is fun” is “Nothing is fun” or “Everything is boring.” Hence, [(  x)A(x)]  (  x)[A(x)]

Quick Practice Three forms of negation are given for each statement. Which is correct? –Some people like mathematics. A.Some people dislike mathematics B.Everybody dislikes mathematics C.Everybody likes mathematics –Some pictures are old or faded A.Every picture is neither old nor faded B.Some pictures are not old or faded C.All pictures are not old or not faded

Class Exercise What is the negation of “Everybody loves somebody sometime.” –Everybody hates somebody sometime –Somebody loves everybody all the time –Everybody hates everybody all the time –Somebody hates everybody all the time What is the negation of the following statements? –Some pictures are old and faded. –All people are tall and thin. –Some students eat only pizza. –Only students eat pizza.

Class exercise S(x): x is a student; I(x): x is intelligent; M(x): x likes music Write wffs that express the following statements: –All students are intelligent. –Some intelligent students like music. –Everyone who likes music is a stupid student. –Only intelligent students like music. –End of Lecture 1-3