CSE 311 Foundations of Computing I Lecture 5 Predicate Logic Spring 2013 1.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Section 1.3. More Logical Equivalences Constructing New Logical Equivalences We can show that two expressions are logically equivalent by developing.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
CSE 321 Discrete Structures Winter 2008 Lecture 1 Propositional Logic.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
ENEE244-02xx Digital Logic Design Lecture 10. Announcements HW4 assigned, due 10/9.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Predicates and Quantifiers
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
Logical Equivalence & Predicate Logic
Lecture 4 Logic gates and truth tables Implementing logic functions
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
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.
Fallacies The proposition [(p  q)  q]  p is not a tautology, because it is false when p is false and q is true. This type of incorrect reasoning is.
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.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Nested Quantifiers Section 1.5.
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,
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,
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
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.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
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.
Lecture 1.3: Predicate Logic, and Rules of Inference* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
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 الرياضيات المتقطعة. 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.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
CSE15 Discrete Mathematics 01/23/17
Chapter 3 The Logic of Quantified Statements
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Predicate Calculus Discussion #14 Chapter 2, Section 1 1/20.
Discussion #14 Predicate Calculus
Chapter 1 The Foundations: Logic and Proofs
CSE 311 Foundations of Computing I
CS 220: Discrete Structures and their Applications
CSE 311 Foundations of Computing I
Predicate Calculus Discussion #14 Chapter 2, Section 1.
CSE 311: Foundations of Computing
CSE 311 Foundations of Computing I
First Order Logic Rosen Lecture 3: Sept 11, 12.
Introduction to Predicates and Quantified Statements I
Negations of quantifiers
CSE 321 Discrete Structures
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
CSE 321 Discrete Structures
Predicates and Quantifiers
CSE 321 Discrete Structures
Predicate Calculus. Predicate Calculus Topics Predicates Variables and instantiation Quantifiers Logical expressions Bound and free variables.
CSE 311: Foundations of Computing
Lecture 1.3: Predicate Logic
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 5 Predicate Logic Spring

Announcements Reading assignments – Predicates and Quantifiers 1.4, th Edition 1.3, th Edition Hand in Homework 1 now – Homework 2 is available on the website 2

Highlights from Last Lecture Sum-of-products canonical form Also known as Disjunctive Normal Form (DNF) Also known as minterm expansion ABCFF’ F = F’ = A’B’C’ + A’BC’ + AB’C’ F = A’BC+ AB’C+ ABC’ + ABC A’B’C 3

Highlights from Last Lecture Product-of-sums canonical form Also known as Conjunctive Normal Form (CNF) Also known as maxterm expansion ABCFF’ F = F = F’ = (A + B + C’) (A + B’ + C’) (A’ + B + C’) (A’ + B’ + C) (A’ + B’ + C’) (A + B + C)(A + B’ + C) (A’ + B + C) 4

Highlights from Last Lecture S-o-P, P-o-S, and de Morgan’s theorem Complement of function in sum-of-products form – F’ = A’B’C’ + A’BC’ + AB’C’ Complement again and apply de Morgan’s and get the product-of-sums form – (F’)’ = (A’B’C’ + A’BC’ + AB’C’)’ – F = (A + B + C) (A + B’ + C) (A’ + B + C) Complement of function in product-of-sums form – F’ = (A + B + C’) (A + B’ + C’) (A’ + B + C’) (A’ + B’ + C) (A’ + B’ + C’) Complement again and apply de Morgan’s and get the sum-of-product form – (F’)’ = ( (A + B + C’)(A + B’ + C’)(A’ + B + C’)(A’ + B’ + C)(A’ + B’ + C’) )’ – F = A’B’C + A’BC + AB’C + ABC’ + ABC 5

Predicate or Propositional Function – A function that returns a truth value “x is a cat” “x is prime” “student x has taken course y” “x > y” “x + y = z” or Sum(x, y, z) NOTE: We will only use predicates with variables or constants as arguments. 6 Predicate Logic

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 7

Statements with quantifiers  x Even(x)  x Odd(x)  x (Even(x)  Odd(x))  x (Even(x)  Odd(x))  x Greater(x+1, x)  x (Even(x)  Prime(x)) Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y) Domain: Positive Integers 8

Statements with quantifiers  x  y Greater (y, x)  x  y Greater (x, y)  x  y (Greater(y, x)  Prime(y))  x (Prime(x)  (Equal(x, 2)  Odd(x))  x  y(Sum(x, 2, y)  Prime(x)  Prime(y)) Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y) Sum(x,y,z) Domain: Positive Integers 9

Statements with quantifiers “There is an odd prime” “If x is greater than two, x is not an even prime”  x  y  z ((Sum(x, y, z)  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) Sum(x,y,z) Domain: Positive Integers 10

Cat(x) Red(x) LikesTofu(x) English to Predicate Calculus “Red cats like tofu” 11

Domain: Positive Integers 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) 12

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))) 13

Scope of Quantifiers  x (P(x)  Q(x)) vs  x P(x)   x Q(x) 14

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... 15

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) 16

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 17

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

De Morgan’s Laws for Quantifiers 19    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)