EECS 1028 M: Discrete Mathematics for Engineers

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

EECS 1028 M: Discrete Mathematics for Engineers

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

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

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

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

software design & management Gachon University Chulyun Kim

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

EECS 1028 M: Discrete Mathematics for Engineers

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

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Propositional Logic. Spring Propositional Logic Spring / 32

Boolean Algebra. Philipp Koehn. 9 September 2016

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

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

PROPOSITIONAL CALCULUS

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

Language of Propositional Logic

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

EECS 1028 M: Discrete Mathematics for Engineers

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

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

1 The Foundation: Logic and Proofs

02 Propositional Logic

Logic Gate Level. Part 2

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

Tecniche di Verifica. Introduction to Propositional Logic

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

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.

1 The Foundation: Logic and Proofs

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

The Logic of Compound Statements cont.

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Part I: Propositional Calculus

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Logic and Proof. Aiichiro Nakano

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

1.1 Statements and Compound Statements

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Predicate Logic. Andreas Klappenecker

Propositional Logic. Fall () Propositional Logic Fall / 30

A. Propositional Logic

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.

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

Deductive Systems. Lecture - 3

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

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

CHAPTER 11. Introduction to Intuitionistic Logic

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

DISCRETE MATHEMATICS BA202

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Chapter 2: Switching Algebra and Logic Circuits

THE LOGIC OF COMPOUND STATEMENTS

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

Rules Build Arguments Rules Building Arguments

CSE 20 DISCRETE MATH. Fall

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Review: Potential stumbling blocks

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

ICS141: Discrete Mathematics for Computer Science I

Section 1.2: Propositional Logic

CSE 20 DISCRETE MATH. Winter

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

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

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

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

Tautologies, Contradictions, and Contingencies

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

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Equational Logic: Part 2. Roland Backhouse March 6, 2001

CSE 20 DISCRETE MATH WINTER

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Todays programme: Propositional Logic. Program Fac. Program Specification

Chapter 11: Automated Proof Systems (1)

COS 140: Foundations of Computer Science

Logic, Sets, and Proofs

Mathematics for Computer Science Exercises from Chapter 3

Logic: Propositional Logic (Part I)

Intro to Logic and Proofs

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Readings: Conjecture. Theorem. Rosen Section 1.5

CSC Discrete Math I, Spring Propositional Logic

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

CITS2211 Discrete Structures Proofs

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

Boolean Algebra, Gates and Circuits

Discrete Structures for Computer Science

MATH 2001 MIDTERM EXAM 1 SOLUTION

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

UNIT-I: Propositional Logic

Informal Statement Calculus

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Transcription:

EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 12

Using the laws - 2 Q: Simplify (p q) q. We need to use analytic means simplify: (p q) q (p q) q equivalent form of ( p q) q equivalent form of (p q) q De Morgan s Law q Absorption Check using truth tables p q p q (p q) q F F T T F T T F T F F T T T T F S. Datta (York Univ.) EECS 1028 W 18 2 / 12

Inference in Propositional Logic Section 1.6 pages 71-75 Recall: the reason for studying logic was to formalize derivations and proofs. How can we infer facts using logic? Simple inference rule (Modus Ponens) : From (a) p q and (b) p is TRUE, we can infer that q is TRUE. Many other rules, see page 72. Understanding the rules is crucial, memorizing is not. You should be able to see that the rules make sense and correspond to our intuition about formal reasoning. S. Datta (York Univ.) EECS 1028 W 18 3 / 12

Inference Rules S. Datta (York Univ.) EECS 1028 W 18 4 / 12

Modus Ponens Example: (a) if these lecture slides are online then you can print them out (b) these lecture slides are online Can you print out the slides? ((p q) p) q is a TAUTOLOGY. From p q, q r and p is TRUE, we can infer that r is TRUE. S. Datta (York Univ.) EECS 1028 W 18 5 / 12

Other Inference Rules Modus Tollens and Disjunctive Syllogism can be seen as alternative forms of Modus Ponens Hypothetical syllogism is like the chain rule of implications Other rules like From p is true we can infer p q are very intuitive Resolution: From (a) p q and (b) p r, we can infer : q r Exercise: check that ((p q) ( p r)) (q r) is a TAUTOLOGY. Very useful in computer generated proofs. S. Datta (York Univ.) EECS 1028 W 18 6 / 12

Correctness of Inference, Proofs A Propositional Logic statement is correctly inferred iff it is made using one of the rules of inference listed before A proof is correct iff it is a sequence of statements that are either axioms, statements inferred earlier, or statements inferred using one of the rules of inference listed before, and the last conclusion is the assertion that needed to be proved. Terminology: An inferred fact is called a proposition, lemma or theorem depending on its importance; a special case of a proved statement is sometimes stated as a corollary. S. Datta (York Univ.) EECS 1028 W 18 7 / 12

Practice on Propositional Logic Inference Q3c, pg 78 If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool will be closed. Q3e, pg 78 If I go swimming, then I will stay in the sun too long. If I stay in the sun too long, then I will sunburn. Therefore, if I go swimming, then I will sunburm. Q9c, pg 78. I am either clever or lucky, I am not lucky, If I am lucky, then I will win the lottery. S. Datta (York Univ.) EECS 1028 W 18 8 / 12

Implementing Propositional Logic Statements in Hardware Typically assume AND, OR, NOT logic gates, sometimes NAND, NOR, XOR. E.g., A B C (A B) C Often OR and AND are written as +, respectively S. Datta (York Univ.) EECS 1028 W 18 9 / 12

More on Boolean Circuits Evaluating Boolean Circuits: Propagate values sequentially by levels, from input to output Making a circuit from a propositional logic expression: Disjunctive normal form - ORs of ANDs, e.g., f (x, y, z) = xyz + xyz + xyz The function f (x, y, z) simplifies to x(y + z). S. Datta (York Univ.) EECS 1028 W 18 10 / 12

Boolean Circuits from Truth Tables Truth Table to DNF: x y z f (x, y, z) 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 Disjunction of three terms, one for each 1 entry in the last column For each term, put each variable, negated iff it is zero in that row So first 1 corresponds to xyz DNF to circuit: Same as the previous slide So, f (x, y, z) = xyz + xyz + xyz (How) can this circuit be minimized? More advanced courses S. Datta (York Univ.) EECS 1028 W 18 11 / 12

Limitations of Propositional Logic What can we NOT express using predicates? E.g., : How do you make a statement about all even integers, like for all integers x, if x > 2 then x 2 > 4? A more general language: Predicate logic (Sec 1.4) S. Datta (York Univ.) EECS 1028 W 18 12 / 12