Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text)

Similar documents
Tautologies, Contradictions, and Contingencies

Propositional Logic 1

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

CSC Discrete Math I, Spring Propositional Logic

Announcements CompSci 102 Discrete Math for Computer Science

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

The Foundations: Logic and Proofs. Part I

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

1.3 Propositional Equivalences

2.2: Logical Equivalence: The Laws of Logic

Propositional Equivalence

Solutions to Homework I (1.1)

Introduction to Sets and Logic (MATH 1190)

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

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

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

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

Math.3336: Discrete Mathematics. Propositional Equivalences

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

Supplementary exercises in propositional logic

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

Compound Propositions

CSE 20: Discrete Mathematics

Boolean Algebra. Philipp Koehn. 9 September 2016

Part Two: The Basic Components of the SOFL Specification Language

CSE 20 DISCRETE MATH WINTER

Logic: Propositional Logic (Part I)

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

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

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

Logic: First Order Logic

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

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

We last time we began introducing equivalency laws.

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

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

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

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


Chapter 1, Section 1.1 Propositional Logic

Conjunctive Normal Form and SAT

Tecniche di Verifica. Introduction to Propositional Logic

Part 1: Propositional Logic

Propositional Logic: Equivalence

THE LOGIC OF COMPOUND STATEMENTS

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

Discrete Mathematics and its Applications

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity

PHIL12A Section answers, 16 February 2011

Comp487/587 - Boolean Formulas

Inference in Propositional Logic

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

EECS 1028 M: Discrete Mathematics for Engineers

Conjunctive Normal Form and SAT

Syntax of propositional logic. Syntax tree of a formula. Semantics of propositional logic (I) Subformulas

Conjunctive Normal Form and SAT

Discrete Mathematics and Its Applications

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

PROPOSITIONAL CALCULUS

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

C241 Homework Assignment 4

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

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

Truth-Functional Logic

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Propositional Logic: Semantics

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

The Logic of Compound Statements cont.

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

A brief introduction to Logic. (slides from

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

Normal Forms of Propositional Logic

ICS141: Discrete Mathematics for Computer Science I

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

Language of Propositional Logic

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Section 1.1: Logical Form and Logical Equivalence

The statement calculus and logic

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

Foundations of Artificial Intelligence

Section 1.1: Propositions and Connectives

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

Solutions to Sample Problems for Midterm

Computation and Logic Definitions

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

ECE473 Lecture 15: Propositional Logic

Logic and Inferences

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

Introduction to Decision Sciences Lecture 2

Topic 1: Propositional logic

Deductive Systems. Lecture - 3

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

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

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

THE LOGIC OF COMPOUND STATEMENTS

Propositional Logic Resolution (6A) Young W. Lim 12/12/16

Propositional Logic. Spring Propositional Logic Spring / 32

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

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

Transcription:

Section 1.3 1

Sec$on Summary Tautologies, Contradictions, and Contingencies. Logical Equivalence Important Logical Equivalences Showing Logical Equivalence Normal Forms (optional, covered in exercises in text) Disjunctive Normal Form Conjunctive Normal Form Propositional Satisfiability Sudoku Example 2

Tautologies, Contradic$ons, and Con$ngencies A tautology is a proposition which is always true. Ex: p p A contradiction is a proposition which is always false. Ex: p p A contingency is a proposition which is neither a tautology nor a contradiction Ex: p P p p p p p T F T F F T T F 3

Logically Equivalent Two compound propositions p and q are logically equivalent if p q is a tautology. We write this as p q or as p q Two compound propositions p and q are equivalent if and only if the columns in a truth table giving their truth values agree. This truth table shows p q p q p q p p q p q T T F T T T F F F F F T T T T F F T T T 4

De Morgan s Laws Augustus De Morgan 1806-1871 Show using a truth table that De Morgan s Second Law holds. p q p q (p q) (p q) p q T T F F T F F T F F T T F F F T T F T F F F F T T F T T 5

Use De Morgan s laws to find the nega$on of the statement Jan is rich and happy. p: Jan is rich q: Jan is happy (p q) (p q) p q Jan is not rich or not happy. Carlos will bicycle or run tomorrow. (p q) p q p: Carlos will bicycle tomorrow q: Carlos will run tomorrow Carlos will not bicycle and will not run (p q) tomorrow. 6

Key Logical Equivalences Double Negation Law: Negation Laws: Identity Laws:, Domination Laws:, Idempotent laws:, 7

Key Logical Equivalences (cont) Commutative Laws:, Associative Laws: Distributive Laws: Absorption Laws:, 8

More Logical Equivalences 9

Construc$ng New Logical Equivalences We can show that two expressions are logically equivalent by developing a series of logically equivalent statements. To prove that A B we produce a series of equivalences beginning with A and ending with B. A A 1 A 2 A 3 B 10

Equivalence Proofs Example: Show that is logically equivalent to Solution: 11

Equivalence Proofs Example: Show that is a tautology. Solution: 12

DNF (op&onal) A propositional formula is in disjunctive normal form if it consists of a disjunction of conjunctive clauses Yes (p q r) (r s) No p (p q) Disjunctive Normal Form is important for the circuit design methods discussed in Chapter 12. 13

DNF (op&onal) Example: Show that every compound proposition can be put in disjunctive normal form. Solution: Construct the truth table for the proposition. Then an equivalent proposition is the disjunction with n disjuncts (where n is the number of rows for which the formula evaluates to T). Each disjunct has m conjuncts where m is the number of distinct propositional variables. Each conjunct includes the positive form of the propositional variable if the variable is assigned T in that row and the negated form if the variable is assigned F in that row. This proposition is in disjunctive normal from. 14

DNF (op&onal) Example: Find the Disjunctive Normal Form (DNF) of (p q) r Solution: This proposition is true when r is false or when both p and q are false. ( p q) r 15

CNF (op&onal) A compound proposition is in Conjunctive Normal Form (CNF) if it is a conjunction of disjunctions. Yes p ( q r) No p (q r) Every proposition can be put in an equivalent CNF, through repeated application of the logical equivalences covered earlier (eliminating implications, moving negation inwards, and using distributive/associative laws). Important in resolution theorem proving used in AI. 16

CNF (op&onal) Example: Put the following into CNF: Solution: 1. Eliminate implication signs: 2. Move negation inwards; eliminate double negation: 3. Convert to CNF using associative/distributive laws 17

Proposi$onal Sa$sfiability A compound proposition is satisfiable if there is an assignment of truth values to its variables that make it true. When no such assignments exist, the compound proposition is unsatisfiable. A compound proposition is unsatisfiable if and only if its a contradiction (i.e., always false). 18

Ques$ons on Proposi$onal Sa$sfiability Example: Determine the satisfiability of the following compound propositions: Solution: Satisfiable. Assign T to p, q, and r. Solution: Satisfiable. Assign T to p and F to q. Solution: Not satisfiable. Check each possible assignment of truth values to the propositional variables and none will make the proposition true. 19

Nota$on Needed for the next example. 20

Sudoku A Sudoku puzzle is represented by a 9 9 grid made up of nine 3 3 subgrids, known as blocks. Some of the 81 cells of the puzzle are assigned one of the numbers 1,2,, 9. The puzzle is solved by assigning numbers to each blank cell so that every row, column and block contains each of the nine possible numbers. 21

Encoding as a Sa$sfiability Problem Let p(i,j,n) denote the proposition that is true when the number n is in the cell in the ith row and the jth column. There are 9 9 9 = 729 such propositions. In the sample puzzle p(5,1,6) is true, but p(5,j,6) is false for j = 2,3, 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 22

Encoding (cont) row column value For each cell with a given value n, assert p(i,j,n). Assert that every row contains every number. Assert that every column contains every number. 23

Encoding (cont) Assert that each of the 3 x 3 blocks contain every number. (this is tricky - ideas from chapter 4 help) Assert that no cell contains more than one number. Take the conjunction over all values of n, n, i, and j, where each variable ranges from 1 to 9 and, of 24

Solving Sa$sfiability Problems To solve a Sudoku puzzle, we need to find an assignment of truth values to the 729 variables of the form p(i,j,n) that makes the conjunction of the assertions true. Those variables that are assigned T yield a solution to the puzzle. A truth table can always be used to determine the satisfiability of a compound proposition. Too complex even for modern computers for large problems. There has been much work on developing efficient methods for solving satisfiability problems as many practical problems can be translated into satisfiability problems. 25