1 2006 310205 Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Nested Quantifiers Section 1.4.
Propositional Equivalences
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.
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 Mathematics Math 6A Instructor: M. Welling.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Predicates and Quantifiers
Chapter 1: The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements.
Review I Rosen , 3.1 Know your definitions!
Propositional Equivalences
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
CSci 2011 Discrete Mathematics Lecture 6
Chapter 1, Part II With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Lecture 1.2: Equivalences, and Predicate Logic* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren, Zeph.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
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.
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:
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Discrete Structures – CNS 2300
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CSci 2011 Recap ^Propositional operation summary not andorconditionalBi-conditional pq ppqqpqpqpqpqpqpqpqpq TTFFTTTT TFFTFTFF FTTFFTTF FFTTFFTT.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
Lecture 1.2: Equivalences, and Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
Discrete Mathematics Mathematical reasoning: think logically; know how to prove Combinatorial analysis: know how to count Discrete structures: represent.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
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.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Law of logic Lecture 4.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
2. The Logic of Compound Statements Summary
Lecture 1.2: Equivalences, and Predicate Logic
The Foundations: Logic and Proofs
Advanced Algorithms Analysis and Design
CSE15 Discrete Mathematics 01/23/17
CSNB 143 Discrete Mathematical Structures
(CSC 102) Discrete Structures Lecture 2.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Chapter 1 The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Propositional Equivalences
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
CSE 311 Foundations of Computing I
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Predicates and Quantifiers
Foundations of Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Presentation transcript:

Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers

Mathematics for Comter I 3.1. Propositional Equivalences Categories of compound propositions: A tautology is a proposition which is always true. Classic Example: P  P A contradiction is a proposition which is always false. Classic Example: P  P A contingency is a proposition which neither a tautology nor a contradiction. Example: (P  Q)  R

Mathematics for Comter I 3.1. Propositional Equivalences Two propositions P and Q are logically equivalent if P  Q is a tautology. We write P  Q

Mathematics for Comter I 3.1. Propositional Equivalences Example: (P  Q)  (Q  P)  (P  Q) Proof: Left side and the right side must have the same truth values, independent of the truth value of the component propositions. To show a proposition is not a tautology: use an abbreviated truth table try to find a counter example or to disprove the assertion. search for a case where the proposition is false.

Mathematics for Comter I 3.1. Propositional Equivalences Two possible cases: Case 1: Left side false, right side true. Case 2: Left side true, right side false. Case 1: Try left side false, right side true Left side false: only one of P  Q or Q  P need be false. 1a. Assume P  Q = F. Then P = T, Q = F. But then right side P  Q = F. Oops, wrong guess. 1b. Try Q  P = F. Then Q = T, P = F. But then right side P  Q = F. Another wrong guess. *Proof for (P  Q)  (Q  P)  (P  Q) PQ PQPQ PQ PQPQ

Mathematics for Comter I 3.1. Propositional Equivalences Case 2. Try left side true, right side false If right side is false, P and Q cannot have the same truth value. 2a. Assume P =T, Q = F. Then P  Q = F and the conjunction must be false so the left side cannot be true in this case. Another wrong guess. 2b. Assume Q = T, P = F. Then Q  P = F. Again the left side cannot be true. We have exhausted all possibilities and not found a counter- example. The two propositions must be logically equivalent. Note: Given such equivalence, if and only if or iff is also stated as is a necessary and sufficient condition for. *Proof for (P  Q)  (Q  P)  (P  Q) PQ PQPQ PQ PQPQ

Mathematics for Comter I 3.1. Propositional Equivalences Some important logical equivalences: EquivalencesName P  T  P P  F  P Identity laws P  T  T P  F  F Domination laws P  P  P P  P  P Idempotent laws  (  P)  P Double negation law PT PTPT PP PPPP

Mathematics for Comter I 3.1. Propositional Equivalences Some important logical equivalences: EquivalencesName P  Q  Q  P P  Q  Q  P Commutative laws (P  Q)  R  P  (Q  R) (P  Q)  R  P  (Q  R) Associative laws P  (Q  R)  (P  Q)  (P  R) P  (Q  R)  (P  Q)  (P  R) Distributive laws  (P  Q)   P  Q  (P  Q)   P  Q De Morgan’s laws

Mathematics for Comter I 3.1. Propositional Equivalences Other logical equivalences: EquivalencesName P  Q   P  Q Implication P  P  T Tautology P  P  F Contradiction (P  Q)  (Q  P)  (P  Q) Equivalence (P  Q)  (P  Q)   P Absurdity

Mathematics for Comter I 3.1. Propositional Equivalences Other logical equivalences: Equivalent expressions can always be substituted for each other in a more complex expression – useful for simplification. EquivalencesName (P  Q)  (  Q  P) Contrapositive P  (P  Q)  P P  (P  Q)  P Absorption (P  Q)  R  P  (Q  R) Exportation

Mathematics for Comter I 3.1. Propositional Equivalences Example:  (P  (  P  Q)) can be simplified by using the following series of logical equivalence:  (P  (  P  Q))   P  (  P  Q)) from the second De Morgan’s law   P  [  (  P)  Q]from the first De Morgan’s law   P  (P  Q)from the double negation law  (  P  P)  (  P  Q]from the distributive law  F  (  P  Q)since  P  P  F   P  Qfrom the identity law for F   (P  Q) from the second De Morgan’s law

Mathematics for Comter I 3.1. Propositional Equivalences But Complexity (2 n )… REMEMBER! We can always use a truth table to show that the simplified proposition is equivalent to the original proposition.

Mathematics for Comter I 3.2. Predicates and Quantifiers 2+1=3: a proposition x+y=3: propositional functions or predicates A generalization of propositions Propositions which contain variables Predicates become propositions once every variable is bound - by assigning it a value from the Universe of Discourse U or quantifying it

Mathematics for Comter I Predicates Example 1: Let U = Z, the integers = , -2, -1, 0, 1, 2, 3,  P(x): x > 0, a predicate or propositional function. It has no truth value until the variable x is bound. Examples of propositions where x is assigned a value: P(-3) is false, i.e. -3 > 0 is false. P(0) is false. P(3) is true. The collection of integers for which P(x) is true are the positive integers.

Mathematics for Comter I Predicates Example 1 (continued): P(x): x > 0 is the predicate. P(y)  P(0) is not a proposition. The variable y has not been bound. However, P(3)  P(0) is a proposition which is true. Example 2: Let R be the three-variable predicate R(x, y, z): x + y = z. Find the truth value of R(2, -1, 5) R(3, 4, 7) R(x, 3, z)

Mathematics for Comter I Quantifiers Specific value vs. Range What range of values in U for which the bounded propositions are true? Two possibilities: Universal: For all values in U Existential: For some values in U

Mathematics for Comter I Quantifiers Universal P(x) is true for every x in the universe of discourse. Notation: universal quantifier  x P(x) For all x, P(x) or For every x, P(x) The variable x is bound by the universal quantifier producing a proposition. Example: U = { 1,2,3 }  x P(x)  P(1)  P(2)  P(3)

Mathematics for Comter I Quantifiers Existential P(x) is true for some x in the universe of discourse. Notation: existential quantifier  x P(x) There is an x such that P(x) or For some x, P(x) For at least one x, P(x) I can find an x such that P(x) Example: U = { 1,2,3 }  x P(x)  P(1)  P(2)  P(3)

Mathematics for Comter I Quantifiers Predicate equivalences: Equivalences involving the negation operator  x P(x)   x  P(x)  x P(x)   x  P(x) Distributing a negation operator across a quantifier changes a universal to an existential, and vice versa. REMEMBER! A predicate (propositional function) is not a proposition until all variables have been bound either by quantification or assignment of a value!

Mathematics for Comter I Quantifiers Helpful hints: To memorize the predicate equivalences – think about searching and looping: Assume there are n objects in U. To determine whether  x P(x) is true: Loop through all n values of x to see if P(x) is always true. If there is a value x for which P(x) is false, then we have shown that  x P(x) is false, i.e. we have shown  x P(x) or  x  P(x)

Mathematics for Comter I Quantifiers To determine whether  x P(x) is true: Loop through all n values of x searching for a value for which P(x) is true. If we find one, then  x P(x) is true. Otherwise  x P(x) is false, i.e.  x P(x) or  x  P(x)

Mathematics for Comter I Quantifiers Multiple Quantifiers: Read from left to right... Example 1: Let U = R, the real numbers, P(x,y): xy = 0  x  y P(x,y)  x  y P(x,y)  x  y P(x,y)  x  y P(x,y) The only one that is false is the first one. Why? Suppose P(x,y) is the predicate x/y=1?

Mathematics for Comter I Quantifiers Dangerous situations: Commutativity of quantifiers  x  y P(x, y)   y  x P(x, y)?YES!  x  y P(x, y)   y  x P(x, y)?NO! DIFFERENT MEANING!

Mathematics for Comter I Quantifiers Example of non-commutativity of quantifiers: Let Q(x, y) denote “x + y = 0.” Are the truth values of the quantifications  y  x P(x, y) and  x  y P(x, y) the same? The answer is NO since:  y  x P(x, y) means “There is a real number y such that for all real numbers x, Q(x, y) is true.” The statement is false. Why?  x  y P(x, y) means “For every real number x there is a real number y such that Q(x, y) is true.” The statement is true.

Mathematics for Comter I Converting from English (can be very difficult) Example 1: Express the statement “If somebody is female and is a parent, then this person is someone’s mother” as a logical expression. Let F(x): x is female. P(x): x is a parent M(x, y): x is the mother of y. The statement applies to all people.  x ((F(x)  (P(x))   y M(x, y))

Mathematics for Comter I Converting from English Example 2: Express the statement “Everyone has exactly one best friend” as a logical expression. Let B(x, y): y is the best friend of x. The statement says “exactly one best friend”. This means that if y is the best friend of x, then all other people z other than y can not be the best friend of x.  x  y  z (B(x, y)  ((z  y)   B(x, z)))

Mathematics for Comter I Converting from English Example 3: Consider the following statements. “All lions are fierce.” “Some lions do not drink coffee.” “Some fierce creatures do not drink coffee.” The first two are called premises and the third is called the conclusion. The entire set is called an argument.

Mathematics for Comter I Converting from English Example 3 (continued): We can express these statements as follows. LetP(x): x is a lion. Q(x): x is fierce. R(x): x drinks coffee. Then  x (P(x)  Q(x)).  x (P(x)   R(x)).  x (Q(x)   R(x)). Why can’t we write the second statement as  x (P(x)   R(x))?

Mathematics for Comter I 3.3. Further Readings Propositional Equivalences Rosen: Section 1.2. Predicates and Quantifiers Rosen: Section 1.3.