Today s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal

Similar documents
Transparencies to accompany Rosen, Discrete Mathematics and Its Applications Section 1.3. Section 1.3 Predicates and Quantifiers

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Section 1.5 9/9/2014

MAT2345 Discrete Math

Propositional Logic Not Enough

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

Discrete Structures for Computer Science

Mat 243 Exam 1 Review

Chapter 1, Part II: Predicate Logic

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

ICS141: Discrete Mathematics for Computer Science I

Recall that the expression x > 3 is not a proposition. Why?

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Introduction to Sets and Logic (MATH 1190)

Predicate Calculus lecture 1

Lecture 4. Predicate logic

Predicates, Quantifiers and Nested Quantifiers

Discrete Mathematics and Its Applications

Math.3336: Discrete Mathematics. Nested Quantifiers

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Predicate Logic & Quantification

Thinking of Nested Quantification

Discrete Structures Lecture 5

Announcements. CS311H: Discrete Mathematics. Introduction to First-Order Logic. A Motivating Example. Why First-Order Logic?

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

Predicate Logic. Predicates. Math 173 February 9, 2010

First order Logic ( Predicate Logic) and Methods of Proof

Review: Potential stumbling blocks

Logical equivalences 12/8/2015. S T: Two statements S and T involving predicates and quantifiers are logically equivalent

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

CS 220: Discrete Structures and their Applications. Predicate Logic Section in zybooks

Section 2.1: Introduction to the Logic of Quantified Statements

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof

Lecture 3 : Predicates and Sets DRAFT

Proposi'onal Logic Not Enough

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

STRATEGIES OF PROBLEM SOLVING

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

DISCRETE MATHEMATICS BA202

Announcements CompSci 102 Discrete Math for Computer Science

ICS141: Discrete Mathematics for Computer Science I

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

PREDICATE LOGIC. Schaum's outline chapter 4 Rosen chapter 1. September 11, ioc.pdf

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

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

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

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

Discrete Structures Lecture Predicates and Quantifiers

1.3 Predicates and Quantifiers

CSE 311: Foundations of Computing. Lecture 6: More Predicate Logic

ITS336 Lecture 6 First-Order Logic

Logic and Propositional Calculus

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Predicates and Quantifiers. CS 231 Dianna Xu

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Nested Quantifiers. Predicates and. Quantifiers. Agenda. Limitation of Propositional Logic. Try to represent them using propositional.

Chapter 2: The Logic of Quantified Statements. January 22, 2010

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

Predicate in English. Predicates and Quantifiers. Predicate in Logic. Propositional Functions: Prelude. Propositional Function

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

Propositional Logic: Syntax

Computer Science 280 Spring 2002 Homework 2 Solutions by Omar Nayeem

Logic and Proof. Aiichiro Nakano

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

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

Predicate logic. G. Carl Evans. Summer University of Illinois. Propositional Logic Review Predicate logic Predicate Logic Examples

Math 3336: Discrete Mathematics Practice Problems for Exam I

CSE 20 Discrete Math. Algebraic Rules for Propositional Formulas. Summer, July 11 (Day 2) Number Systems/Computer Arithmetic Predicate Logic

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

CS 1571 Introduction to AI Lecture 14. First-order logic. CS 1571 Intro to AI. Midterm

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

Chapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm

Logic. Propositional Logic: Syntax

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

Propositional and Predicate Logic

1 The Foundation: Logic and Proofs

Propositional and First-Order Logic

Rules Build Arguments Rules Building Arguments

Logic and Propositional Calculus

Statements and Quantifiers

Basic Logic and Proof Techniques

Propositional and Predicate Logic

For all For every For each For any There exists at least one There exists There is Some

Solutions to Homework I (1.1)

CS Module 1. Ben Harsha Apr 12, 2017

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

III. Elementary Logic

Introduction to Decision Sciences Lecture 2

Logical Structures in Natural Language: First order Logic (FoL)

Math Fundamentals of Higher Math

Proving logical equivalencies (1.3)

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Transcription:

ICS 6B Boolean Algebra & Logic Today s Lecture Chapter 1 Sections 1.3 & 1.4 Predicates & Quantifiers 1.3 Nested Quantifiers 1.4 Lecture Notes for Summer Quarter, 2008 Michele Rousseau Set 2 Ch. 1.3, 1.4 Lecture Set 2 - Chpts 1.3, 1.4 2 Predicates Chapter 1: Section 1.3 Predicates & Quantifiers Not everything can be expressed as T/F so we use Predicate Logic The term predicate is used similarly in grammar Subject: What we make an assertion about Predicate: What we assert about the subject 4 For Example Socrates is Mortal What is the Subject? Socrates What is the Predicate? being mortal X is less than 20 What is the Subject? X What is the Predicate? less than 20 Predicates become propositions once we add variables which we then can quantify. Lecture Set 2 - Chpts 1.3, 1.4 5 Propositions X is less than 20 Variable: x Predicate: less than 20 So we say, Let P x denote the statement x 20 or P x : : x 20 P x has no truth value until the variable x is bound For example: P 3 Set x 3 so P 3 : 3 20 P 25 is False P 32 is Lecture Set 2 - Chpts 1.3, 1.4 6 1

Another Example The security alarm is beeping in DBH Let A x denote the statement The security alarm is beeping in building x So what would the truth value of A DBH be? How about A ELH? Lecture Set 2 - Chpts 1.3, 1.4 7 Multiple Variables You can also have multi variable predicates For example Let R be the 3 variable predicate R x,y,z :: x y z Find the truth value of R 2, 1,5 x 1, y 1, z 5 R 2, 1,5 is 2 1 5 which is false Now try R 3,4,7 R x,4,y x, y not bound Lecture Set 2 - Chpts 1.3, 1.4 8 Quantifiers Tell us the range of elements that the proposition is true over In other words over how many objects the predicate is asserted. Universal Quantifier The Universal Quantification of P(x) is the statement. P(x) for all values of x in the domain Notation : xp x is the universal quantifier In English for all x P x holds for every x P x holds for each x P x holds Lecture Set 2 - Chpts 1.3, 1.4 9 A counterexample of xp x is an element for which P x is false Lecture Set 2 - Chpts 1.3, 1.4 10 The Universe Propositions in predicate logic are statements on objects of a universe. The universe is thus the domain of the individual variables. It can be the set of real numbers the set of integers the set of all cars on a parking lot the set of all students in a classroom etc Lecture Set 2 - Chpts 1.3, 1.4 11 For Example: All cars have wheels xp x U All cars P x denotes x has wheels Lecture Set 2 - Chpts 1.3, 1.4 12 2

Universal Quantifier & Conjunction If you can list all of the elements in the universe of discourse Then xp x is equivalent to the conjunction P x 1 P x 2 P x 3 P x n If there were only 4 cars c 1, c 2, c 3, c 4 in our previous example U c 1, c 2, c 3, c 4 The we could translate the statement xp x to P c 1 P c 2 P c 3 P c 4 Lecture Set 2 - Chpts 1.3, 1.4 13 Truth value of Universal Quantification What is the truth value of xp x U 1,2,3,4 P x x * 25 100 FALSE Why? 4*25 is not 100 What is the truth value of xp x U 1,2,3 P x x 2 10 TRUE Lecture Set 2 - Chpts 1.3, 1.4 14 Existential Quantification The Existential Quantification of P(x) is the statement. There exists an element x in the domain such that P(x) Notation: xp x is the existential quantifier In English: There exists an x such that P x There is an x such that P x There is at least one x such that P x holds For some x P x I can find an x such that P x Lecture Set 2 - Chpts 1.3, 1.4 15 Existential Quantifier x means at least 1 object in the universe.. followed by P x means that P x is true for at least 1 object in the universe. For example: Somebody loves you xp x P x is the predicate meaning: x loves you U all living creatures Lecture Set 2 - Chpts 1.3, 1.4 16 Existential Quantifier & Disjunction If you can list all of the elements in the universe of discourse Then xp x is equivalent to the Disjunction P x 1 P x 2 P x 3 P x n If there were only 5 living creatures me, bear, cat, steve, pete in our previous example U me, bear, cat, steve, pete Then we could translate xp x to P me P bear P girl P steve P pete Lecture Set 2 - Chpts 1.3, 1.4 17 Truth value of Existential Quant. What is the truth value of xp x U 1,2,3 P x x * 25 100 4*25 is not 100 What is the truth value of xp x U 1,8,20 P x x 2 10 Why? Lecture Set 2 - Chpts 1.3, 1.4 18 3

Uniqueness Quantifier The Uniqueness Quantifier of P(x) is the statement. There exists a unique x in the domain such that P(x) AKA Unique Existential Quantifier Notation:! xp x or 1 xp x In English: There is a unique x such that P x There is one and only one x such that P x One can find only one x such that P x. Lecture Set 2 - Chpts 1.3, 1.4 19 Truth value of Uniqueness Quant. What is the truth value of! xp x U 1,2,3 P x x * 25 100 False 4*25 is not 100 What is the truth value of! xp x U 1,8,20 P x x 2 10 Lecture Set 2 - Chpts 1.3, 1.4 20 Some terms Bound if a specific value is assigned to it or if it is quantified Free if a variable is not bound. Scope the part of the logical expression to which the quantifier is applied Examples Bound xp x,y Bound Bound x yp x,y Q x,y Bound Lecture Set 2 - Chpts 1.3, 1.4 21 Free Free Reading Quantified Formulas Read Left to right Example let U the set of airplanes let F x,,y denote "x flies faster than y". x yf x, y can be translated initially as: "For every airplane x the following holds: x is faster than every any airplane y". Lecture Set 2 - Chpts 1.3, 1.4 22 More Examples Translate: x y F x, y For every airplane x the following holds: for some airplane y, x is faster than y". or "Every airplane is faster than some airplane". Note: These are not equivalen5 Translate: x yf x, y "There exist an airplane x which satisfies the following: or such that for every airplane y, x is faster than y". or "There is an airplane which is faster than every airplane or "Some airplane is faster than every airplane". Translate: x y F x, y For some airplane x there exists an airplane y such that x is faster than y" or Some airplane is faster than some airplane". 23 More Examples U R all the real numbers P x,y : x,* y 0 x yp x, y Which of these are? x y P x, y False x y P x, y x yp x, y x y P x, y 24 4

Negation of Quantifiers x P x x P x and x P x x P x For Example P x reprsents x is happy U people "There does not exist a person who is happy" is equivalent to "Everyone is not happy". Negation of Quantifiers x P x x P x and x P x x P x For Example P x reprsents x is happy U people "There does not exist a person who is happy" is equivalent to "Everyone is not happy". Lecture Set 2 - Chpts 1.3, 1.4 25 Lecture Set 2 - Chpts 1.3, 1.4 26 DeMorgan s Laws English to Logical Expressions F x : x is a fleegle S x : x is a snurd T x : x is a thingamabob U fleegles, snurds, thingamabobs Lecture Set 2 - Chpts 1.3, 1.4 27 Everything is a fleegle xf x x F x Nothing is snurd x S x x S x All fleegles are snurds x F x S x x F x S x x F x S x x F x S x 28 More English Translations Some fleegles are thingamabobs x F x T x x F x T x No snurd is a thingamabob x S x T x x S x T x If any fleegle is a snurd then it's also a thingamabob x F x S x T x x F x S x T x HOMEWORK for SECTION 1.3 1,3,5,7,19,23 Lecture Set 2 - Chpts 1.3, 1.4 29 Lecture Set 2 - Chpts 1.3, 1.4 30 5

What are Nested quantifiers? Chapter 1: Section 1.4 Nested Quantifiers If one quantifier is within the scope of the other. Eg. U:R x y x y 0 x y x y y x x y z x y z x y z Lecture Set 2 - Chpts 1.3, 1.4 32 Translating into English Translate: U:R x y x y y x x For every real number x y For every real number y x y y x x y is equal to y x Translating to English Translate: U: R x y x 0 y 0 xy 0 For every real number x and every real number y, if x 0 and y 0, then xy 0 For every real number x and for every real number y, x y is equal to y x Lecture Set 2 - Chpts 1.3, 1.4 33 Lecture Set 2 - Chpts 1.3, 1.4 34 Switching order If the quantifiers are the same switching order doesn t matter ie. All s or all s x y P x,y y x P x,y x y P x,y y x P x,y If the quantifiers are different then order matters x y P x,y y x P x,y NOT Equivalent Lecture Set 2 - Chpts 1.3, 1.4 35 6