Logic and Truth Tables

Similar documents
Logic and Truth Tables

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

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

Section 1.1: Logical Form and Logical Equivalence

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

2.2: Logical Equivalence: The Laws of Logic

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

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

Equivalence and Implication

Logic Review Solutions

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

PHIL12A Section answers, 16 February 2011

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

DeMorgan s Laws and the Biconditional. Philosophy and Logic Sections 2.3, 2.4 ( Some difficult combinations )

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Boolean Logic. CS 231 Dianna Xu

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

CSC Discrete Math I, Spring Propositional Logic

Compound Propositions

Section 1.2: Propositional Logic

Propositional Logic. Spring Propositional Logic Spring / 32

1.3 Propositional Equivalences

Chapter 4: Classical Propositional Semantics

Propositional Equivalence

Tautological equivalence. entence equivalence. Tautological vs logical equivalence

Math Final Exam December 14, 2009 Page 1 of 5

FUNDAMENTALS OF MATHEMATICS HANDOUT 1.3 DR. MCLOUGHLIN

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

PHI Propositional Logic Lecture 2. Truth Tables

Unit 6 Logic Math 116

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

We last time we began introducing equivalency laws.

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

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

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

DERIVATIONS AND TRUTH TABLES

Discrete Mathematics and Its Applications

PROPOSITIONAL CALCULUS

Truth-Functional Logic

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

Discrete Structures of Computer Science Propositional Logic I

CSC165 Mathematical Expression and Reasoning for Computer Science

Language of Propositional Logic

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

The Logic of Compound Statements cont.

Proofs. Joe Patten August 10, 2018

Propositional natural deduction

Chapter 5: Section 5-1 Mathematical Logic

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

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

CSE 20 DISCRETE MATH WINTER

Chapter 1 Logic Unit Math 114

Philosophy 220. Truth-Functional Equivalence and Consistency

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

AMTH140 Lecture 8. Symbolic Logic

Artificial Intelligence. Propositional logic

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

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

Maryam Al-Towailb (KSU) Discrete Mathematics and Its Applications Math. Rules Math. of1101 Inference 1 / 13

Chapter 1, Section 1.1 Propositional Logic

Midterm Exam Solution

Logic and Propositional Calculus

Examples. Example (1) Example (2) Let x, y be two variables, and denote statements p : x = 0 and q : y = 1. Solve. x 2 + (y 1) 2 = 0.

CS 340: Discrete Structures for Engineers

CSE 20 DISCRETE MATH WINTER

Section 1.1 Propositions

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

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

Proving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.

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

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Propositional Logic. Fall () Propositional Logic Fall / 30

1.1 Statements and Compound Statements

Logic and Propositional Calculus

Learning Goals of CS245 Logic and Computation

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

PS10.3 Logical implications

Propositional Languages

Propositional Logic and Semantics

3 The Semantics of the Propositional Calculus

THE LOGIC OF COMPOUND STATEMENTS

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

CSE 20: Discrete Mathematics

ANALYSIS EXERCISE 1 SOLUTIONS

CSE 20: Discrete Mathematics

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

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Propositional Resolution Introduction

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

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

Mat 243 Exam 1 Review

PHIL12A Section answers, 28 Feb 2011

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

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

PL: Truth Trees. Handout Truth Trees: The Setup

Unit 1 Logic Unit Math 114

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

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

CISC-102 Winter 2016 Lecture 17

Transcription:

Logic and Truth Tables What is a Truth Table? A truth table is a tool that helps you analyze statements or arguments in order to verify whether or not they are logical, or true. There are five basic operations that you will utilize when creating a truth table. These operations are the conjunction, disjunction, negation, conditional, and bi-conditional. These operations are also referred to as and, or, not, if-then, and if and only if. The rules for these operations are as follows: Logic Operations AND And Statements These statements are true only when both (conjunction) p and q are true (as the rigorous definition of and implies.) p q p q Example: I will bring both a pen AND a pencil to the tutoring T T T session. Only if I bring both is this true. OR Or Statements These statements are false only when both p (disjunction) and q are false (follows the definition of or.) p q p q Example: I will bring a pen OR a pencil to the tutoring T T T appointment. Only if I don t do either is this false. T NOT ~ (negation) Not Statements The not is simply the opposite or complement of its original value. p ~p Example: p = It is raining T F ~p = It is NOT raining IF-THEN If Then Statements These statements are false only when p is (conditional) true and q is false (because anything can follow from a false premise.) p q p q Example: IF I am elected THEN taxes will go down. T T T Only if I am elected and taxes don t go down is this false. Provided by Tutoring Services 1 Logic and Truth Tables Reviewed August 2017

IF AND ONLY IF If and Only If Statements These statements are true only when (bi-conditional) both p and q have the same truth values. p q p q Example: Taxes will go down IF AND ONLY IF I am elected. T T T Only if I am elected and taxes go down, or I am not elected and taxes do not go down is this true. Constructing Truth Tables To create a truth table, follow these steps: 1. Determine the number of variables; for n variables, create a table with 2 n rows. If there are two variables (p, q), then you will need 2 2 or 4 rows. If there are three variables (p, q, and r), you will need 2 3 or 8 rows. 2. List the variable and every combination of T and F for the given variables. TWO VARIABLE THREE VARIABLE p q p q r T T T T T T F F F 3. Then start with negations ( nots or ~ ), create a new column for each piece of the statement or argument, filling in the truth values as you go. Work from simple pieces to more difficult pieces until you have the truth values for the whole problem. 4. If two statements have the same truth values, then they are equivalent. Equivalents There are a number of equivalents in logic. This means that these statements have been proven true, and you can use these statements without having to prove them. The symbol for equivalent is. The following are the most commonly used equivalents: p T p p F F p T T p F p p q ~p q p q ~q ~p p p p p p p p ~p F p ~p T p (q r) (p q) (p r) ~(p q) ~p ~q DeMorgan s Law #1 ~(p q) ~p ~q DeMorgan s Law #2 p (q r) (p q) (p r) Provided by Tutoring Services 2 Logic and Truth Tables

Truth Table Example Statement: (p q) (~p q) p q T T T F F F p q ~p T T F Step 1: Determine the number of variables and rows needed, then write down all possible combinations of p and q. Step 2: Write down values of ~p (or not p ) p q ~p p q T T F F F Step 3: Left Side: Is (p q) true? Use values from p and q columns. p q ~p p q ~p q T T F F Step 4: Right Side: Is (~p q) true? Use values from ~p and q columns. p q ~p p q ~p q T T T Step 5: Is the entire statement true? No. The entire statement is true only when the last column s truth values are all True. In this case, (p q) is not equivalent to (~p q) because they do not have the same truth values. If every cell in the last column is True, then the entire statement is true. This is called a tautology. Provided by Tutoring Services 3 Logic and Truth Tables

Truth Tables for Arguments A logical argument is made up of two parts: the premises and the conclusion. Arguments are usually written in the following form: Arguments of this form can be turned into a logical statement. First, assign variables to each premise and conclusion. It is cold = p It is not cold = ~p My motorcycle will start = q My motorcycle will not start = ~q You can now re-write the argument using logical operators. Look for keywords like if and not. p ~q q ~p Finally, the argument can be rewritten as a logical statement. Arguments can always be written in the following form: [Premise One Premise Two] Conclusion Our example would be rewritten as: This statement can then be proven valid or invalid using a truth table, as shown on the following page. Provided by Tutoring Services 4 Logic and Truth Tables

Truth Table Example Statement: p q T T T F F F p q ~p T T F Step 1: Determine the number of variables and rows needed, then write down all possible combinations of p and q. Step 2: Write down values of ~p (or not p ) p q ~p ~q T T F T p q ~p ~q (p ~q) T F T T T T Step 3: Write down values of ~q (or not q ) Step 4: p q ~p ~q (p ~q) (p ~q) q T F F T T F T T F Left Side: Start within the inner most parentheses. Is (p ~q) true? Use values from p and ~q columns. Step 5: Left Side: Work outwards towards the outer most parentheses. Is [ (p ~q) q ] true? Use values from (p ~q) and q columns. p q ~p ~q (p ~q) (p ~q) q [ (p ~q) q ] ~p T T T T T T Step 6: [ (p ~q) q ] ~p Is the entire statement true? Yes. This is a tautology Provided by Tutoring Services 5 Logic and Truth Tables