CSC165 Mathematical Expression and Reasoning for Computer Science

Similar documents
2.2: Logical Equivalence: The Laws of Logic

CSC Discrete Math I, Spring Propositional Logic

Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 16, Mathematical Expression and Reasoning 1

We last time we began introducing equivalency laws.

Compound Propositions

3.1 Universal quantification and implication again. Claim 1: If an employee is male, then he makes less than 55,000.

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Introduction to Sets and Logic (MATH 1190)

Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 09, Mathematical Expression and Reasoning 1

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Logic: Propositional Logic (Part I)

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Propositional logic (revision) & semantic entailment. p. 1/34

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

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

Recitation Week 3. Taylor Spangler. January 23, 2012

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

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Learning Goals of CS245 Logic and Computation

Announcement. Homework 1

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Propositional Logic and Semantics

Chapter 2. Logical Notation. Bahar Aameri. Department of Computer Science University of Toronto. Jan 09, Mathematical Expression and Reasoning 1

CSE 20: Discrete Mathematics

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

1.1 Language and Logic

Introduction to Decision Sciences Lecture 2

Announcements CompSci 102 Discrete Math for Computer Science

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

2-4: The Use of Quantifiers

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Negations of Quantifiers

Boolean Logic. CS 231 Dianna Xu

software design & management Gachon University Chulyun Kim

MAT 243 Test 1 SOLUTIONS, FORM A

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

CSC165. Larry Zhang, September 23, 2014

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Math 3336: Discrete Mathematics Practice Problems for Exam I

EECS 1028 M: Discrete Mathematics for Engineers

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Logic and Discrete Mathematics. Section 3.5 Propositional logical equivalence Negation of propositional formulae

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Logic and Truth Tables

Mathematical Logic Part Two

UNIT-I: Propositional Logic

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

Propositional logic ( ): Review from Mat 1348

Propositional Logic. Spring Propositional Logic Spring / 32

Logic, Sets, and Proofs


Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

ICS141: Discrete Mathematics for Computer Science I

Section 1.1: Logical Form and Logical Equivalence

Equivalence and Implication

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

CISC-102 Winter 2016 Lecture 17

Today s Topic: Propositional Logic

1.1 Language and Logic

PHIL12A Section answers, 16 February 2011

Direct Proof and Proof by Contrapositive

Definition 2. Conjunction of p and q

Logic and Proof. Aiichiro Nakano

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Completeness for FOL

Propositional Equivalence

PLEASE HAND IN PLEASE HAND IN. Solutions Sample

Discrete Structures for Computer Science

Discrete Structures for Computer Science

Tautologies, Contradictions, and Contingencies

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Chapter 1 Elementary Logic

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

Part I: Propositional Calculus

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Chapter 1, Section 1.1 Propositional Logic

Propositional and Predicate Logic

The Logic of Compound Statements cont.

DISCRETE STRUCTURES WEEK5 LECTURE1

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

Propositional and Predicate Logic

Propositional Logic Not Enough

Logic and Propositional Calculus

AN INTRODUCTION TO MATHEMATICAL PROOFS NOTES FOR MATH Jimmy T. Arnold

Chapter 1: The Logic of Compound Statements. January 7, 2008

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

22c:145 Artificial Intelligence

A statement is a sentence that is definitely either true or false but not both.

Review: Potential stumbling blocks

Transcription:

CSC165 Mathematical Expression and Reasoning for Computer Science Lisa Yan Department of Computer Science University of Toronto January 21, 2015 Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 1 / 19

Announcements NEXT MONDAY REVIEWING SESSION: Piazza forum: vote for the troublesome topic(s) in Logical Notation; DUE DATE: This Friday before midnight on Piazza. MORNING Section: https://piazza.com/class/i4f701lgr0m75p?cid=56 AFTERNOON Section: https://piazza.com/class/i4f701lgr0m75p?cid=57 TOPICS: Logical Grammar, Venn Diagram, Predicates, Equivalence Conjunction, Disjunction, Negation, Quantifiers Truth Tables Implication, Logical Arithmetic Manipulation Rules Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 2 / 19

Today s Topics APPLICATION OF NEGATION TO LOGICAL SENTENCES LOGICAL ARITHMETIC MANIPULATION RULES Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 3 / 19

Implication rule P Q means: Every P is a Q Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 4 / 19

Implication rule P Q means: Every P is a Q P Q P Q T T T T F F F T T F F T Evaluate S 1: implication rule S 1 : (P Q) ( P Q) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 4 / 19

Implication rule P Q means: Every P is a Q P Q P Q T T T T F F F T T F F T Evaluate S 1: implication rule S 1 : (P Q) ( P Q) P Q P Q P P Q S 1 T T T F T T T F F F F T F T T T T T F F T T T T Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 4 / 19

Exercise #1 Use TRUTH TABLES to evaluate the following claims. Indicate which one is a TAUTOLOGY, which one is SATISFIABLE and which one is UNSATISFIABLE. 1 P Q is equivalent to its contrapositive. T 2 P Q is equivalent to its converse. S 3 P Q is equivalent to (P Q) (Q P ). T 4 P P. U 5 P P. T Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 5 / 19

CHAPTER 2: LOGICAL NOTATION APPLICATION OF NEGATION TO LOGICAL SENTENCES Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 6 / 19

Negation Negation of a Sentence The negation of a sentence inverts its TRUTH VALUE. The negation of a sentence P is written as P, P is TRUE if P was FALSE, P is FALSE if P was TRUE. P is equal with P. Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 7 / 19

Negation Negation of a Sentence The negation of a sentence inverts its TRUTH VALUE. The negation of a sentence P is written as P, P is TRUE if P was FALSE, P is FALSE if P was TRUE. P is equal with P. Example: Claim: All employees making over 80,000 are female. The negation is: Not all employees making over 80,000 are female. Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 7 / 19

Negation over Conjunction and Disjunction: DeMorgan s Law (S 1 S 2) ( S 1 S 2) Sentence S 1 S 2 is FALSE exactly when at least one of S 1 or S 2 is FALSE. (S 1 S 2) ( S 1 S 2) Sentence S 1 S 2 is FALSE exactly when both S 1 and S 2 are FALSE. Exercise: Recall that (P Q) ( P Q). (P Q) ((P Q) (Q P )) Now use DeMorgan s law to simplify the following sentences so that only P and Q are negated. 1 (P Q). 2 (P Q) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 8 / 19

Negation over Conjunction and Disjunction Solution: 1 2 (P Q) ( P Q) ( P Q) (P Q) (P Q) ((P Q) (Q P )) ( (P Q) (Q P )) ((P Q) (Q P )) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 9 / 19

Negation Negation over Quantifiers Example 1: ( x D, y D, P (x, y)) x D, ( y D, P (x, y)) x D, ( y D, P (x, y)) x D, y D, P (x, y) Example 2: ( x D, y D, P (x, y)) x D, ( y D, P (x, y)) ( x D, y D, P (x, y)) x D, y D, P (x, y) Example 3: ( x D, y D, (P (x, y) Q(x, y))) ( x D, y D, ( P (x, y) Q(x, y))) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 10 / 19

CHAPTER 2: LOGICAL NOTATION LOGICAL ARITHMETIC Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 11 / 19

Logical Arithmetic Precedence Rules Precedence DECREASES from TOP TO BOTTOM: 1 2 3 4 5 6 7 Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 12 / 19

Logical Arithmetic Precedence Rules Precedence DECREASES from TOP TO BOTTOM: 1 2 3 4 5 6 7 Arithmetic Rules 1 Commutative 2 Associative 3 Distributive 4 Identity 5 Idempotency 6 DeMorgan s Law 7 etc. These rules can be verified by a truth table. Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 12 / 19

Logical Arithmetic Commutative P Q Q P and P Q Q P Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 13 / 19

Logical Arithmetic Commutative P Q Q P and P Q Q P Associative P (Q R) (P Q) R and P (Q R) (P Q) R Distributive P (Q R) (P Q) (P R) and P (Q R) (P Q) (P R) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 13 / 19

Logical Arithmetic Commutative P Q Q P and P Q Q P Associative P (Q R) (P Q) R and P (Q R) (P Q) R Distributive P (Q R) (P Q) (P R) and P (Q R) (P Q) (P R) Identity P (Q Q) P P (Q Q) Idempotency P P P P P Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 13 / 19

Logical Arithmetic: implication, bi-implication, with,, and Implication: P Q P Q Negate implication (use DeMorgan s law): (P Q) ( P Q) ( P Q) (P Q) Bi-implication: P Q Written with,, and : (P Q) (( P Q) ( Q P )) ((P Q) ( P Q)) Negate bi-implication (use DeMorgan s law): (P Q) ((P Q) ( P Q)) (( P Q) (P Q)) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 14 / 19

Transitivity of Universally-quantified Implication ((P (x) Q(x)) (Q(x) R(x))) (P (x) R(x)) x D, (P (x) (Q(x) R(x))) x D, ((P (x) Q(x)) R(x)) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 15 / 19

Mixed Multiple Quantifiers Everybody has somebody who respects him/her.... Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 16 / 19

Mixed Multiple Quantifiers Everybody has somebody who respects him/her.... y is respected by somebody x P, r(x, y) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 16 / 19

Mixed Multiple Quantifiers y is respected by somebody x P, r(x, y) Everybody has somebody who respects him/her. y P, x P, r(x, y) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 17 / 19

Summary of manipulation rules - 1 The following is a summary of the basic laws and rules we use for manipulating formal statements. identity laws idempotency laws commutative laws P (Q Q) P P (Q Q) P P P P P P P P Q Q P P Q Q P (P Q) (Q P ) associative laws (P Q) R P (Q R) (P Q) R P (Q R) distributive laws P (Q R) (P Q) (P R) P (Q R) (P Q) (P R) contrapositive P Q Q P implication P Q P Q equivalence (P Q) (P Q) (Q P ) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 18 / 19

Summary of manipulation rules - 2 double negation ( P ) P DeMorgan s laws (P Q) P Q (P Q) P Q implication negation (P Q) P Q equivalence negation (P Q) (P Q) (Q P ) quantifier negation quantifier distributive laws (where R does not contain variable x) variable renaming (where y does not appear in P (x)) ( x D, P (x)) x D, P (x) ( x D, P (x)) x D, P (x) x D, P (x) Q(x) ( x D, P (x)) ( x D, Q x D, P (x) Q(x) ( x D, P (x)) ( x D, Q x D, R Q(x) R ( x D, Q(x)) x D, R Q(x) R ( x D, Q(x)) x D, R Q(x) R ( x D, Q(x)) x D, R Q(x) R ( x D, Q(x)) x D, P (x) y D, P (y) x D, P (x) y D, P (y) Lisa Yan (University of Toronto) Mathematical Expression and Reasoning January 21, 2015 19 / 19