Propositional Equivalence Goal: Show how propositional equivalences are established & introduce the most important such equivalences.

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Propositional Equivalences
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Disjunctive Normal Form CS 680: Formal Methods Jeremy Johnson.
Set Operators Goals Show how set identities are established Introduce some important identities.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Chapter 9: Boolean Algebra
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Digital Design.
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Propositional Calculus Math Foundations of Computer Science.
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,
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Lecture 7 Topics –Boolean Algebra 1. Logic and Bits Operation Computers represent information by bit A bit has two possible values, namely zero and one.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Propositional Equivalences
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Set Operators. Copyright © Peter Cappello Union Let A and B be sets. A union B, denoted A  B, is the set A  B = { x | x  A  x  B }. Draw a.
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.
Disjunctive Normal Form CS 270: Math Foundation of CS Jeremy Johnson.
Boolean Algebra and Logic Gates CSE-1108 Ahsanullah University of Science and Technology (AUST)
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patternson and Hennessy Text.
Set Operators Goals Show how set identities are established
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Computer Science 210 Computer Organization
The Foundations: Logic and Proofs
Lecture 11: Hardware for Arithmetic
Propositional Equivalence
Logical Equivalence of Propositions
(CSC 102) Discrete Structures Lecture 2.
Boolean Algebra.
Boolean Algebra A Boolean algebra is a set B of values together with:
Boolean Algebra A Boolean algebra is a set B of values together with:
Disjunctive Normal Form
Propositional Calculus: Boolean Functions and Expressions
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Propositional Equivalences
Information Technology Department
Basic Logic Gates 1.
Week 7: Gates and Circuits: PART II
Digital Logic.
Propositional Equivalences
CSE 311 Foundations of Computing I
Disjunctive Normal Form
Digital Logic.
XOR Function Logic Symbol  Description  Truth Table 
1.3 Propositional Equivalences
Digital Circuits.
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
Propositional Satisfiability
Presentation transcript:

Propositional Equivalence Goal: Show how propositional equivalences are established & introduce the most important such equivalences.

Copyright © Peter Cappello2 EquivalenceName p  T ≡ p; p  F ≡ p Identity p  T ≡ T; p  F ≡ F Domination p  p ≡ p; p  p ≡ p Idempotent  (  p) ≡ p Double negation p  q ≡ q  p; p  q ≡ q  p Commutative

Copyright © Peter Cappello3 EquivalenceName (p  q)  r ≡ p  (q  r ) (p  q)  r ≡ p  (q  r ) Associative p  (q  r ) ≡ (p  q)  (p  r ) p  (q  r ) ≡ (p  q)  (p  r ) Distributive  (p  q) ≡  p   q  (p  q) ≡  p   q DeMorgan p  (p  q ) ≡ p p  (p  q ) ≡ p Absorption p   p ≡ T p   p ≡ F Negation

Copyright © Peter Cappello4 Exercise A tautology is a compound proposition that always is true. Is the following a tautology? ( (p  q)  (  p  r) )  (q  r)

Copyright © Peter Cappello5 The Satisfiability Problem Satisfiability Problem Given a function of boolean variables, is there an assignment of values to its variables that makes it true? Is f( p, q, r ) = ( (p  q)  (  p  r) )  (q  r) satisfiable? Satisfiability is important in CS theory, algorithms, program correctness, AI, hardware design, etc. Algorithm 1.Construct the truth table. 2.If any assignment (row) evaluates to true, return true; 3.Else return false. If the formula has n variables, how many rows does the truth table have?

An example satisfiability problem Let p( row, col, n ) denote the proposition “Box( row, col ) contains number n.” Using such propositions, design a compound proposition that is satisfiable if & only if n appears in some box, for 1 ≤ n ≤ 4. Copyright © Peter Cappello

7 Problem Give logical expressions for a 2-bit adder, where true corresponds to 1 false corresponds to 0 For example, = 100. Input: Operand 1: a 1 a 0 Operand 2: b 1 b 0 Output s 2 s 1 s 0 That is, define 3 Boolean functions: s 0 ( a 1, a 0, b 1, b 0 ) = ? s 1 ( a 1, a 0, b 1, b 0 ) = ? s 2 ( a 1, a 0, b 1, b 0 ) = ?

Copyright © Peter Cappello8 Can you define a Boolean function in the C programming language? boolean[] adder( boolean a1, boolean a0, boolean b1, boolean b0 ) {... } Or, for an n-bit adder: boolean[] adder( boolean[] a, boolean[] b ) {... } For an n-bit adder, it may be useful to compute, for 0 ≤ i ≤ n, a sum bit, s i and a carry bit, c i. For the sum bit, s i, we may use: s i = a i  b i  c i-1, where c -1 = 0 and s n = c n-1. The equation above is called a recurrence equation. What is a recurrence equation for the carry bit, c i ?

Copyright © Peter Cappello9 Unraveling the for loop, suggests a diagram: Each box above has 3 inputs & 2 outputs, and is called a full adder.full adder A harder problem: Compute these sum & carry bits in parallel. s n-1 s0s0 s1s1 s2s2 snsn a n-1 b n-1 a2a2 b2b2 a1a1 b1b1 a0a0 b0b0 c0c0 0 c1c1 c2c2 c n-2 c n-1

END Copyright © Peter Cappello