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

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

CSC Discrete Math I, Spring Propositional Logic

AMTH140 Lecture 8. Symbolic Logic

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

Compound Propositions

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

THE LOGIC OF COMPOUND STATEMENTS

PROPOSITIONAL CALCULUS

Section 1.1: Logical Form and Logical Equivalence

The Logic of Compound Statements cont.

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

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

Propositional Logic. Spring Propositional Logic Spring / 32

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

PHI Propositional Logic Lecture 2. Truth Tables

Propositional Equivalence

Chapter 1, Section 1.1 Propositional Logic

THE LOGIC OF COMPOUND STATEMENTS

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.

DISCRETE STRUCTURES WEEK5 LECTURE1

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

1.1 Statements and Compound Statements

Logic. Def. A Proposition is a statement that is either true or false.

Discrete Mathematics and Its Applications

Logic and Truth Tables

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

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

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

CSE 20 DISCRETE MATH. Fall

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

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

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

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

2.2: Logical Equivalence: The Laws of Logic

Boolean Logic. CS 231 Dianna Xu

Proofs. Joe Patten August 10, 2018

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

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

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

Mat 243 Exam 1 Review

ANALYSIS EXERCISE 1 SOLUTIONS

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

1.1 Language and Logic

Definition 2. Conjunction of p and q

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

Math Assignment 2 Solutions - Spring Jaimos F Skriletz Provide definitions for the following:

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

1.1 Language and Logic

Propositional Logic. Fall () Propositional Logic Fall / 30

A Statement; Logical Operations

PHIL12A Section answers, 16 February 2011

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

Equivalence and Implication

Truth-Functional Logic

a. ~p : if p is T, then ~p is F, and vice versa

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

PL: Truth Trees. Handout Truth Trees: The Setup

Logic and Truth Tables

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

Introduction to Decision Sciences Lecture 2

Part I: Propositional Calculus

ICS141: Discrete Mathematics for Computer Science I

Lecture 02: Propositional Logic

Section 1.2: Propositional Logic

software design & management Gachon University Chulyun Kim

Mathematical Reasoning (Part I) 1

PHIL12A Section answers, 28 Feb 2011

We last time we began introducing equivalency laws.

Learning Goals of CS245 Logic and Computation

15414/614 Optional Lecture 1: Propositional Logic

Language of Propositional Logic

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Discrete Mathematics and Applications COT3100

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

Manual of Logical Style (fresh version 2018)

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

Solutions to Homework I (1.1)

Propositional logic ( ): Review from Mat 1348

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

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

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

Tautologies, Contradictions, and Contingencies

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

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Discrete Structures of Computer Science Propositional Logic I

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.

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

Logic and Propositional Calculus

CSE 20 DISCRETE MATH WINTER

Part Two: The Basic Components of the SOFL Specification Language

Chapter 4, Logic using Propositional Calculus Handout

Transcription:

Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1

Logic Logic is a system based on statements. A statement (or proposition) is a sentence that is true or false but not both. We say that the truth value of a statement is either true (T) or false (F). Corresponds to 1 and 0 in digital circuits Examples: 520 < 499 Is this a statement? Yes What is the truth value? x+ y = 5 Is this a statement? What is the truth value? x < y if and only if y > x Is this a statement? Yes What is the truth value? No? F T 2

Compound Statements One or more statements can be combined to form a single compound statement. We formalize this by denoting statements with letters such as p, q, r, s, and introducing several logical operators. We will examine the following logical operators: Logical Operator Denote Symbol Negation NOT ~ or Conjunction AND Disjunction OR Exclusive or XOR The order of operations can be overridden through the use of parentheses. These logical operators are used to build more complicated logical expressions out of simpler ones. 3

Truth Table A statement form is an expression made up of statement variables (such as p, q, and r) and logical connectives (such as ~,, and ). A Truth table for a given statement form displays the truth values that correspond to all possible combinations of truth values for its component statement variables. Truth table for NOT p ~p T F F T Truth table for AND p q p q T T T T F F F T F F F F Truth table for OR p q p q T T T T F T F T T F F F 4

Exclusive or (XOR) When or is used in its exclusive sense: P q means p or q but not both p q = (p q) ~(p q). Truth table for XOR p q p q p q ~(p q) p q T T T T F F T F T F T T F T T F T T F F F F T F Truth table for (r (~(p q))? 5

Logical Equivalence Two statement forms are called logically equivalent if, and only if, they have identical truth values for each possible substitution of statements for their statement variables. The logical equivalence of statement forms P and Q is denoted by writing P Q. (Showing equivalence) Are the statements of the forms ~(p q) and ~p ~q logically equivalent? p q ~p ~q p q ~(p q) ~p ~q T T F F T F F T F F T F T T F T T F F T T F F T T F T T De Morgan s Laws: ~(p q) ~p ~q and ~(p q) ~p ~q 6

Tautologies and Contradictions A tautology is a statement form that is always true. A statement whose form is a tautology is a tautological statement (denoted by t). A contradiction is a statement form that is always false. A statement whose form is a contradiction is a contradictory statement (denoted by c). p ~p p ~p p ~p T F T F F T T F 7

Simplifying Statement Forms ~(q t) ~(~q p) (p q) By De Morgan s Law By the Double negative law By the Identity Law By the Distributive Law By the Negation Law By the Identity Law By the Negation Law ~(q t) ( ~(~q) ~p) (p q) ~(q t) (q ~p) (p q) ~q (q ~p) (p q) ~q (q (~p p) ) ~q (q c) ~q q c 8

Conditional statements Implication (if - then): If pp then qq or pp implies qq and is denoted pp qq. It is false when pp is true and qq is false; otherwise it is true. We call pp the hypothesis of the conditional and qq the conclusion. Truth table for p q p q p q T T T T F F F T T F F T Construct a truth table for the statement form pp qq ~pp q. 9

Conditional statements Suppose a conditional statement of the form If pp then qq is given. The Negation of the conditional statement is logically equivalent to pp and not qq. Symbolically: ~(pp qq) pp ~q. The Contrapositive of the conditional statement is If ~qq then ~pp. Symbolically: pp qq iiii ~q ~p. The Converse of the conditional statement is If qq then pp. Symbolically: pp qq iiii q p. The Inverse of the conditional statement is If ~pp then ~qq. Symbolically: pp qq iiii ~p ~q. 10

Conditional statements Biconditional (if and only if): pp if, and only if, qq and is denoted pp qq. It is true if both p and q have the same truth values and is false if p and q have opposite values. Truth table for p q p q p q T T T T F F F T F F F T pp qq (pp qq) (qq pp) 11

Logical Equivalence involving, Are the statements of the forms pp qq and (pp qq) (q pp) logically equivalent? p q p q q p p q (pp qq) (q pp) T T T T T T T F F T F F F T T F F F F F T T T T Truth Table 12

Order of Logical Operators 1. ~ Evaluate negations first. 2., Evaluate and second. If both are present, parentheses may be needed. 3., Evaluate and third. If both are present, parentheses may be needed. 13

Arguments An argument is a sequence of statements, and an argument form is a sequence of statement forms. All statements in an argument and all statement forms in an argument form, except for the final one, are called premises. The final statement or statement form is called the conclusion. The symbol, which is read therefore, is normally placed just before the conclusion. To say that an argument form is valid means, if the resulting premises are all true (AND), then the conclusion is also true. 14

Determining Validity or Invalidity An argument form consisting of two premises and a conclusion is called syllogism. If p then q p q (pp qq) p It is a valid argument! premises p q p q p q T T T T T T F F T F T T F F F T F conclusion Critical row 15

Rules of Inference 16

Digital Logic Circuits 17

Boolean Expression for a Circuit A statement variable or an input signal, that can take one of only two values is called a Boolean variable. ~R P Q (P Q) (~R) Input Output P Q R V 1 1 1 0 1 1 0 1 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 18

Circuit for Boolean Expression (P ~Q) (P Q) Q Showing that two circuits are equivalent 19