CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
CSE 321 Discrete Structures Winter 2008 Lecture 1 Propositional Logic.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
1 Predicates and Quantifiers CS 202, Spring 2007 Epp, Sections 2.1 and 2.2 Aaron Bloomfield.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Predicates and Quantifiers
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Predicates and Quantifiers
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
Logical Equivalence & Predicate Logic
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
Foundations of Computing I CSE 311 Fall bit Binary Adder Inputs: A, B, Carry-in Outputs: Sum, Carry-out A B Cin Cout S
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CSE 311 Foundations of Computing I Lecture 5, Boolean Logic and Predicates Autumn 2012 CSE 3111.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
CSE 311 Foundations of Computing I Lecture 5 Predicate Logic Spring
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.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Math 51/COEN 19 Day 3, 1.4 Quantifiers 1. 3 Predicates A lot like functions that return booleans Let P(x) denote x
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Nested Quantifiers Section 1.5.
CompSci 102 Discrete Math for Computer Science January 24, 2012 Prof. Rodger Slides modified from Rosen.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
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,
Chapter 1: The Foundations: Logic and Proofs
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 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
1 CMSC 250 Chapter 2, Predicate Logic. 2 CMSC 250 Definitions l Subject / predicate John / went to the store. The sky / is blue. l Propositional logic-
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
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.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
CSE 311 Foundations of Computing I
CSE15 Discrete Mathematics 01/23/17
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Chapter 1 The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CS 220: Discrete Structures and their Applications
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
CSE 311 Foundations of Computing I
First Order Logic Rosen Lecture 3: Sept 11, 12.
Negations of quantifiers
CSE 321 Discrete Structures
CSE 321 Discrete Structures
Predicates and Quantifiers
CSE 321 Discrete Structures
CS201: Data Structures and Discrete Mathematics I
CSE 311: Foundations of Computing
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111

Announcements Reading assignments – Predicates and Quantifiers 1.4, th Edition 1.3, th and 6 th Edition See clarification for HW 2 problem 4 (b) – F(x, y, z) = x(yz + y z) Autumn 2011CSE 3112

Highlights from last lecture Predicate Calculus – Predicate: A function that returns a truth value – Quantifiers  x P(x) : P(x) is true for every x in the domain  x P(x) : There is an x in the domain for which P(x) is true e.g.  x (Even(x)  Odd(x) ) – Multiple Quantifiers  x  y Greater (y, x) Autumn 2011CSE Notlargest(x)

Statements with quantifiers “There is an odd prime” “If x is greater than two, x is not an even prime”  x  y  z ((Equal(z, x+y)  Odd(x)  Odd(y))  Even(z)) “There exists an odd integer that is the sum of two primes” Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y) Domain: Positive Integers

English to Predicate Calculus “Red cats like tofu” Cat(x) Red(x) LikesTofu(x)  x ((Cat(x)  Red(x))  LikesTofu(x))  x (Cat(x)  (Red(x)  LikesTofu(x)))

Goldbach’s Conjecture Every even integer greater than two can be expressed as the sum of two primes Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y) Domain: Positive Integers

Scope of Quantifiers Notlargest(x)   y Greater (y, x)   z Greater (z, x) – Value doesn’t depend on y or z “bound variables” – Value does depend on x “free variable” Quantifiers only act on free variables of the formula they quantify –  x (  y (P(x,y)   x Q(y, x))) Autumn 2011CSE 3117

Scope of Quantifiers  x (P(x)  Q(x)) vs  x P(x)   x Q(x) Autumn 2011CSE 3118

Nested Quantifiers Bound variable name doesn’t matter –  x  y P(x, y)   a  b P(a, b) Positions of quantifiers can change –  x (Q(x)   y P(x, y))   x  y (Q(x)  P(x, y)) BUT: Order is important...

Quantification with two variables ExpressionWhen trueWhen false  x  y P(x, y)  x  y P(x, y)  x  y P(x, y)  y  x P(x, y)

Negations of Quantifiers Not every positive integer is prime Some positive integer is not prime Prime numbers do not exist Every positive integer is not prime Autumn 2011CSE 31111

De Morgan’s Laws for Quantifiers Autumn 2011CSE  x P(x)   x  P(x)   x P(x)   x  P(x)

De Morgan’s Laws for Quantifiers Autumn 2011CSE    x  y ( x ≥ y)  x  y ( x ≥ y)  x  y  x ≥ y)  x  y (y > x) “There is no largest integer” “For every integer there is a larger integer”  x P(x)   x  P(x)   x P(x)   x  P(x)

Logical Inference So far we’ve considered – How to understand and express things using propositional and predicate logic – How to compute using Boolean (propositional) logic – How to show that different ways of expressing or computing them are equivalent to each other Logic also has methods that let us infer implied properties from ones that we know – Equivalence is a small part of this Autumn 2011CSE 31114

Applications of Logical Inference Software Engineering – Express desired properties of program as set of logical constraints – Use inference rules to show that program implies that those constraints are satisfied AI – Automated reasoning Algorithm design and analysis – e.g., Correctness, Loop invariants. Logic Programming, e.g. Prolog – Express desired outcome as set of constraints – Automatically apply logic inference to derive solution Autumn 2011CSE 31115

Proofs Start with hypotheses and facts Use rules of inference to extend set of facts Result is proved when it is included in the set

An inference rule: Modus Ponens If p and p  q are both true then q must be true Write this rule as Given: – If it is Monday then you have a 311 class. – It is Monday. Therefore: – You have a 311 class Autumn 2011CSE p, p  q ∴ q