Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;

Slides:



Advertisements
Similar presentations
First Order Logic Resolution
Advertisements

Logic Concepts Lecture Module 11.
Copyright © Cengage Learning. All rights reserved.
(CSC 102) Discrete Structures Lecture 14.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
Inference and Resolution for Problem Solving
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
From Chapter 4 Formal Specification using Z David Lightfoot
Knoweldge Representation & Reasoning
Chapter 9: Boolean Algebra
Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Discussion #10 1/16 Discussion #10 Logical Equivalences.
Propositional Calculus Math Foundations of Computer Science.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Adapted from Discrete Math
11.1 Boolean Functions. Boolean Algebra An algebra is a set with one or more operations defined on it. A boolean algebra has three main operations, and,
Boolean Algebra Computer Organization 1 © McQuain Boolean Algebra A Boolean algebra is a set B of values together with: -two binary operations,
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Extra slides for Chapter 3: Adequacy of connectives Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
Propositional Equivalences
Combinational Logic 1.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
Tautologies, contradictions, contingencies
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
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.
June 11, 2002© Howard Huang1 Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
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.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Section 3.4 Boolean Algebra. A link between:  Section 1.3: Logic Systems  Section 3.3: Set Systems Application:  Section 3.5: Logic Circuits in Computer.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
1 COMP541 Combinational Logic - II Montek Singh Jan 18, 2012.
Propositional Equivalence A needed step towards proofs Copyright © 2014 Curt Hill.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
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.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Boolean Algebra.
CHAPTER 2 Boolean algebra and Logic gates
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
2. The Logic of Compound Statements Summary
Advanced Algorithms Analysis and Design
DISCRETE MATHEMATICS CHAPTER I.
Lecture 1 – Formal Logic.
CHAPTER 2 Boolean Algebra
Discussion #10 Logical Equivalences
Proposition & Predicates
Boolean Algebra A Boolean algebra is a set B of values together with:
Mathematics for Computing
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Discrete Mathematics CS 2610
Information Technology Department
BASIC & COMBINATIONAL LOGIC CIRCUIT
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Propositional Equivalences
COMP541 Combinational Logic - II
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Lecture 2: Propositional Equivalences
From now on: Combinatorial Circuits:
ECE 352 Digital System Fundamentals
Foundations of Discrete Mathematics
Concepts of Computation
Presentation transcript:

Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;

Propositional calculus In standard algebra, expressions in which the variables and constants represent numbers are manipulated. Consider for instance the expression (A + B) – B One sees at a glance that this expressions yields a. In fact, we are so accustomed to performing such algebraic manipulations that we are no longer aware of what is behind each step. Here we used the identities (X+ Y) - Z = X + (Y - Z) Y- Y = 0 X + 0 = X

In logic we manipulate formulas in which the constants and the variables represent truth values. Consider the following formula This formula can be simplified in a similar way, except that (tauto)logical equivalences take place of algebraic identities. Specifically, the following equivalences are used: We can now apply these equivalences to conclude Propositional calculus

Since the symbolic treatment of conditionals and biconditionals is relatively cumbersome, one usually removes them before performing further formula manipulations. To remove the conditional, one uses the following logical equivalence: There are two ways to express the biconditional The first version expresses the fact that two formulas are equivalent if they have the same truth values. The second version stresses the fact that two formulas are equivalent if the first implies the second and the second implies the first. Since we want to remove all, we rewrite the last equivalence as Removing conditionals and biconditionals

Example. Remove and from the following formula: Solution Removing conditionals and biconditionals

Excluded middle law Commutative laws Contradiction law Identity laws Associative laws Domination laws Distributive laws Idempotent laws De Morgan's laws Double-negation law Essential laws for propositional calculus

All laws can be proved by the truth table method. With the exception of the double-negation law all laws come in pairs, called dual pairs. For each formula depending only on the connectives, the dual is found by replacing all 1 by 0 and all 0 by 1 and by replacing all by and all by. The laws allow one to simplify a formula and it is normally a good idea to apply them whenever it is possible. For instance, the formula is logically equivalent to p. The commutative, associative and distributive laws have their equivalents in standard algebra. In fact, the connective is often treated like +, and the connective is often treated like. (The analogy sometimes breaks down.) Essential laws for propositional calculus

From these laws one can derive further laws, for example, the absorption laws (Hint: use identity law, distributive law, domination law and identity law again.) Another important law: Essential laws for propositional calculus

Shortcuts for manipulating formulas Definition. A formula is called a literal if it is of the form p or ~p, where p is a propositional variable. The two formulas p and ~p are called complementary literals. The following rules are available to simplify conjunctions containing only literals. Before applying these rules, it is best to sort the literals lexicographically according to variable names. If a conjunction contains complementary literals or if it contains the propositional constant 0, it always yields 0; that is, it is a contradiction. All instances of the propositional constant 1 and all duplicate copies of any literal, may be dropped. To simplify disjunctions, the duals of these two rules can be used. If a disjunction contains complementary literals or if it contains the propositional constant 1, it always yields 1; that is, it is a tautology. All instances of the propositional constant 0 and all duplicate copies of any literal may be dropped.

Shortcuts for manipulating formulas Example. Simplify Solution

Formulas can be transformed into standard forms so that they become more convenient for symbolic manipulations and make identification and comparison of two formulas easier. There are two types of normal forms in propositional calculus: the disjunctive and the conjunctive normal form. Definition. A formula is said to be in disjunctive normal form if it is written as a disjunction, in which all the terms are conjunctions of literals. Example: are in disjunctive normal forms. The disjunction : is not in normal form. In general a formula in disjunctive normal form is Normal forms

Definition. Disjunctions (conjunctions) with literals as disjuncts (conjuncts) are called disjunctive (conjunctive) clauses. Disjunctive and conjunctive clauses are simply called clauses. Definition. A conjunction with disjunctive clauses as its conjuncts is said to be in conjunctive normal form. Example: and are in conjunctive normal form. However is not in conjunctive normal form. In general, a formula in conjunctive normal form is Normal forms

Examples: Observe the following formulas: (1) is an atom, and therefore a literal. It is a disjunction with only one disjunct. It is also a conjunction with only one conjunct. Hence it is a disjunctive or conjunctive clause with one literal. It is a formula in disjunctive normal form with one conjunctive clause P. It is also a formula in conjunctive normal form with one disjunctive clause P. (2) is a disjunction with two disjuncts, and a disjunctive normal form with two clauses, each with one literal. It is also a conjunction with one conjunct, and a formula in conjunctive normal form which consists of two literals. Normal forms

(3) is a conjunction and a formula in conjunctive normal form. It is also a disjunction and a formula in disjunctive normal form. (4) is a formula in disjunctive normal form, but not in conjunctive normal form. (5) is a formula in conjunctive normal form but not in disjunctive normal form. If is exchanged for in (4) and (5), then (4) becomes a formula in conjunctive normal form and (5) a formula in disjunctive normal form. Normal forms

Theorem. Any formula is tautologically equivalent to some formula in disjunctive normal form. Theorem. Any formula is tautologically equivalent to some formula in conjunctive normal form. Existence of normal forms

How to obtain normal forms? Use the following tautological equivalences:

By the replaceability of tautological equivalences, we can replace the preceding formulas on the left with the corresponding ones on the right to yield a formula tautologically equivalent to the original one. By (1)-(3) we eliminate and. By (4){(6) we eliminate from the scope of such that any has only an atom as its scope. By (7) we eliminate from the scope of. By (8) we eliminate from the scope of. This method leads to obtaining the disjunctive or conjunctive normal forms. How to obtain normal forms?

Example. Convert the following formula into a conjunctive normal form. The conjunctive normal form can be found by the following derivations:

Example Convert the following formula into conjunctive normal form. Solution: Once a conjunctive normal form is obtained, it pays to check if further simplifications are possible. Example. Simplify the following conjunctive normal form: Solution:

Disjunctive normal forms from truth tables So far we have shown how to find the truth table of a logical formula. The reverse is also possible. One can convert any given truth table into a formula. The formula obtained in this way is already in disjunctive normal form. In fact, the conceptually easiest method to find the normal form of a formula is by using truth tables. Unfortunately, truth tables grow exponentially with the number of variables, which makes this method unattractive for formulas with many variables.

Generally, a truth table gives truth values of some formula for all possible assignments. The table below gives an example of truth table for a certain formula F. The truth values of F depends on the three variables P, Q, R. This makes F a truth function, or a Boolean function with arguments P, Q, R and range Truth (Boolean) functions

To convert a Boolean function into a formula, one makes use of minterms. Definition. A minterm is a conjunction of literals in which each variable is represented exactly once. Example: If a Boolean function has the variables P, Q, R then is a minterm but and are not. Each minterm is true for exactly one assignment. For example, is true if p is 1, Q is 0 and r is 1. Any deviation from this assignment would make this particular minterm false. A disjunction of minterms is true only if at least one of its constituents minterms is true. For example, is only true if at least one of true Boolean functions

If a function, such as F, is given by truth table, we know exactly for which assignments it is true. Consequently, we can select the minterms that make the function true and form the disjunction of these minterms. The function f, for instance, is true for three assignments: 1. are all true. 2. are all true. 3. are all true. The disjunction of the corresponding minterms is tautologically equivalent to F, which means that we have the following formula for F: Since the minterms are conjunctions, we have expressed the function in question in disjunctive normal form. Actually, we have a special type of normal form, the full disjunctive normal form. Definition. If a Boolean function is expressed as a disjunction of minterms, it is said to be in full disjunctive normal form. Boolean functions

Complementation can be used to obtain conjunctive normal forms from truth tables. If A is a formula containing only the connectives then its complement is formed by replacing all by, all by and all atoms by their complements. Example: Find the complement of the formula Complementation can be used to find the conjunctive normal form from the truth table of some truth function (Boolean function) F. One first determines the disjunctive normal form for. If the resulting disjunctive normal form is A, then, and the complement of A must be logically equivalent to F. Conjunctive normal form and complementation

Example Find the full conjunctive normal form for f1 given by the table Solution: is true for the following assignments: The disjunctive normal form of :f1 is therefore This formula has the complement which is the desired conjunctive normal form.