EE1J2 – Discrete Maths Lecture 5

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Propositional Equivalences. L32 Agenda Tautologies Logical Equivalences.
Logic Concepts Lecture Module 11.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 3 Syntax of Propositional Logic Parse trees revised Construction of parse trees Semantics of propositional.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Chapter 9: Boolean Algebra
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Discussion #10 1/16 Discussion #10 Logical Equivalences.
The Logic of Compound Statements
Adapted from Discrete Math
Normal or Canonical Forms Rosen 1.2 (exercises). Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
The Foundations: Logic and Proofs
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
Lecture 22 More NPC problems
Normal Forms, Tautology and Satisfiability 2/3/121.
CS1502 Formal Methods in Computer Science
Propositional Equivalences
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
3.3: Truth Tables. Types of Statements Negation: ~p Conjunction: p ˄ q (p and q) Disjunction: p V q (p or q, or both) Conditional: p → q (if p, then q)
Chapter 7 Logic, Sets, and Counting
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
CS203 Discrete Mathematical Structures
Chapter 1: The Foundations: Logic and Proofs
Logics for Data and Knowledge Representation
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Notes - Truth Tables fun, fun, and more fun!!!!. A compound statement is created by combining two or more statements, p and q.
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
The Logic of Boolean Connectives Chapter 4 Language, Proof and Logic.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Assign Yourself and Do Now Thursday, January 10, 2013.
Chapter 1 Logic and proofs
Introduction to Discrete Mathematics Lecture 1: Sep 6 AB C a = qb+r gcd(a,b) = gcd(b,r)
Truth Table to Statement Form
2. The Logic of Compound Statements Summary
Application: Digital Logic Circuits
DISCRETE MATHEMATICS CHAPTER I.
Lecture 1 – Formal Logic.
Truth Tables and Equivalent Statements
7/20/2018 EMR 17 Logical Reasoning Lecture 7.
(CSC 102) Discrete Structures Lecture 2.
Discussion #10 Logical Equivalences
Discrete Mathematics Lecture # 2.
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Discrete Mathematics CS 2610
Propositional Equivalences
Information Technology Department
NP-Completeness Proofs
Propositional Equivalences
Lecture 2: Propositional Equivalences
PROPOSITIONAL LOGIC - SYNTAX-
The Foundations: Logic and Proofs
Presentation transcript:

EE1J2 – Discrete Maths Lecture 5 Adequacy of a set of connectives Disjunctive and conjunctive normal form Adequacy of {, , , }, {, , }, {, } and {, } Every formula is logically equivalent to one in conjunctive normal form (or disjunctive normal form)

Truth tables So far we have seen how to build a truth table T for a given formula f in propositional logic Today we’ll look at the opposite problem: Given a set of atomic propositions p1,…,pN and a truth table T, can we construct a formula f such that T is the truth table for f ?

Adequacy A set of propositional connectives is adequate if For any set of atomic propositions p1,…,pN and For any truth table for these propositions, There is a formula involving only the given connectives, which has the given truth table.

Adequacy The goal of today’s lecture is to show that the set {, , , } is adequate and contains redundancy, in the sense that it contains subsets which are themselves adequate We shall also introduce other sets of adequate connectives

Some more definitions… f1, f2,…,fn a set of n formulae f1  f2 … fn is called the disjunction of f1, f2,…,fn f1  f2 … fn is called the conjunction of f1, f2,…,fn Let p be an atomic proposition. A formula of the form p or p is called a literal

Disjunctive Normal Form A formula is in Disjunctive Normal Form (DNF) if it is a disjunction of conjunctions of literals. Examples: (p, q, r and s atomic propositions) p  q (p)  (q) (p  q) (p  r  s) …

Conjunctive Normal Form A formula is in Conjunctive Normal Form (CNF) if it is a conjunction of disjunctions of literals Examples: p  q (p)  (q) (p  q)  (p) ….

Truth Functions A truth function is a function  which assigns to a set of atomic propositions {p1,…,pN} a truth table (p1,…,pN) in which one of the truth values T or F is assigned to each possible assignment of truth values to the atomic propositions {p1,…,pN}.

Truth functions p, q and r atomic propositions Example truth function in {p, q} p q   T F 22 rows

Truth functions p q r   T F Example truth function in 3 atomic propositions {p, q, r} 23 rows

First Theorem (Disjunctive Normal Form) Theorem: Let  be a truth function. Then there is a formula in disjunctive normal form whose truth table is given by  Corollary: Any formula is logically equivalent to a formula in disjunctive normal form Corollary: {, ,} is an adequate set of connectives

Proof of theorem Let p1, p2,…,pn be the atomic propositions Want a formula  in disjunctive normal form whose truth table is given by  If  assigns the value F to every row of the truth table, just choose  =  Otherwise, there will be at least one row for which the truth value is T. Let that row be row r

Proof (continued) let be the formula defined by: Let fr be the conjunction f(r)1 f(r)2 f(r)3 …f(r)n fr takes the truth value T for the rth row of the truth table and F for all other rows.

Proof (continued) Suppose that there are R rows r1,…,rR for which the truth value is T. Define  = Clearly  is in disjunctive normal form By construction  has the truth table defined by 

Corollary 1 Any formula is logically equivalent to a formula in disjunctive normal form Any formula g defines a truth table By the above theorem there is a formula f in disjunctive normal form which has the same truth table as g Hence f is logically equivalent to g

Corollary 2 {, ,} is an adequate set of connectives From the theorem, any truth table can be satisfied by a formula in disjunctive normal form. By definition, such a formula only employs the connectives ,  and .

Corollary 3 {, } is an adequate set of connectives Enough to show that  and  can both be expressed in terms of the symbols  and . To see this, note that if f and g are formulae in propositional logic: f  g is logically equivalent to (f  g) f  g is logically equivalent to f  g

Corollary 4 {, } and {, } are both adequate sets of connectives Proof – homework

The symbol  The symbol  means logical equivalence Next look at some standard equivalences using the set {, ,}

Standard equivalences f  g  g  f, f  g  g  f Commutativity (b) (f  g)  h  f  (g  h) (f  g)  h  f  (g  h) Associativity (c) f  (g  h)  (f  g)  (f  h) f  (g  h)  (f  g)  (f  h) Distributivity (d) (f  g)  (f)  (g) (f  g)  (f)  (g) De Morgan’s Laws (e) f  f Rule of double negation (f) f  f is a tautology f  f is a contradiction  

Theorem 2 Let  be a truth function. Then there is a formula in Conjunctive Normal Form (CNF) whose truth table is given by 

DNF - Example Let p, q and r be atomic propositions Consider f = (p(q  r))  ((p  q)  r) How do we put this in disjunctive normal form? Use the construction from the proof of the theorem.

Truth table for f (p  (q r)) ((p q) r) T F

Example (continued) From row 1: (pq r) From row 2: (pq r) Hence the desired formula is: (pq r)(pq r)(pqr)(pqr) (pqr)(pqr)

Switching Circuits Connections between propositional logic and switching circuits Can think of a truth table as indicating the ‘output’ of a particular circuit once its inputs have been set to ‘On’ or ‘Off’ Now know that any desired behaviour can be obtained provided that the gates of the circuit can instantiate the connectives ,  and 

nand and nor gates Most common gates are nand gates and nor gates. Their truth tables are given by Truth tables for nand and nor p q p nand q p nor q T F

Theorem 3 Adequacy of nand and nor Theorem: The sets {nand} and {nor} are both adequate Proof {nand}: Since {, } is adequate, enough to show that  and  can be expressed in terms of nand. Let p and q be atomic propositions. Then: p  p nand p and p  q  (p nand q) nand (p nand q)

Proof (continued) For {nor}: It is enough to notice that: p  p nor p p  q  (p nor p) nor (q nor q)

Summary of Lecture 5 Adequacy of a set of connectives defined Disjunctive and conjunctive normal form defined Adequacy of {, , , }, {, , }, {, }, {, }, {nand} and {nor} Every formula is logically equivalent to one in disjunctive normal form (DNF)