Propositional models. Historical models of computation. Application: binary addition. Boolean functions. Implementation using switches.

Similar documents
Boolean algebra.

Logic Synthesis and Verification

Boolean Algebra. Boolean Algebra

Hardware Verification 2IMF20

Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples

Implication Graphs and Logic Testing

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1. Logic verification

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

Exercise 3 Logic Control

EECS 141 Due 04/19/02, 5pm, in 558 Cory

Unit 4. Combinational Circuits

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

Solutions - Homework 1 (Due date: September 9:30 am) Presentation and clarity are very important!

Linear Algebra Introduction

Lecture 11 Binary Decision Diagrams (BDDs)

Overview of Today s Lecture:

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

System Validation (IN4387) November 2, 2012, 14:00-17:00

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

SECTION A STUDENT MATERIAL. Part 1. What and Why.?

KNOWLEDGE-BASED AGENTS INFERENCE

IST 4 Information and Logic

Boolean Algebra. Boolean Algebras

Engr354: Digital Logic Circuits

Combinational Logic. Precedence. Quick Quiz 25/9/12. Schematics à Boolean Expression. 3 Representations of Logic Functions. Dr. Hayden So.

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL:

Nondeterminism and Nodeterministic Automata

Foundations of Computer Science Comp109

Logical Algebra 1. By Vern Crisler Copyright 2000; 2013

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Section 1.3 Triangles

Review of Gaussian Quadrature method

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α

expression simply by forming an OR of the ANDs of all input variables for which the output is

Lecture 6. CMOS Static & Dynamic Logic Gates. Static CMOS Circuit. PMOS Transistors in Series/Parallel Connection

IST 4 Information and Logic

Green s Theorem. (2x e y ) da. (2x e y ) dx dy. x 2 xe y. (1 e y ) dy. y=1. = y e y. y=0. = 2 e

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Fall Notes - Unit 1

Math 32B Discussion Session Week 8 Notes February 28 and March 2, f(b) f(a) = f (t)dt (1)

Logic Synthesis and Verification

Bisimulation, Games & Hennessy Milner logic

Functions. mjarrar Watch this lecture and download the slides

( ) { } [ ] { } [ ) { } ( ] { }

Computing data with spreadsheets. Enter the following into the corresponding cells: A1: n B1: triangle C1: sqrt

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Lecture 2e Orthogonal Complement (pages )

Lecture Notes No. 10

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

PAIR OF LINEAR EQUATIONS IN TWO VARIABLES

Coalgebra, Lecture 15: Equations for Deterministic Automata

RELATIONAL MODEL.

Fast Boolean Algebra

f (x)dx = f(b) f(a). a b f (x)dx is the limit of sums

Solutions to Problem Set #1

Lecture 3: Equivalence Relations

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter Notes - Unit 1

Logic, Set Theory and Computability [M. Coppenbarger]

Lecture 6: Coding theory

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Dorf, R.C., Wan, Z. T- Equivalent Networks The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton: CRC Press LLC, 2000

Chapter Gauss Quadrature Rule of Integration

Discrete Structures Lecture 11

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

= state, a = reading and q j

University of Sioux Falls. MAT204/205 Calculus I/II

Linear Inequalities. Work Sheet 1

CS 330 Formal Methods and Models

First Midterm Examination

Parse trees, ambiguity, and Chomsky normal form

IST 4 Information and Logic

This enables us to also express rational numbers other than natural numbers, for example:

I 3 2 = I I 4 = 2A

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Chapter 8 Roots and Radicals

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

A Differential Approach to Inference in Bayesian Networks

Determinants Chapter 3

1 2 : 4 5. Why Digital Systems? Lesson 1: Introduction to Digital Logic Design. Numbering systems. Sample Problems 1 5 min. Lesson 1-b: Logic Gates

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

CHENG Chun Chor Litwin The Hong Kong Institute of Education

(a) A partition P of [a, b] is a finite subset of [a, b] containing a and b. If Q is another partition and P Q, then Q is a refinement of P.

Introduction to Electrical & Electronic Engineering ENGG1203

Bases for Vector Spaces

Automata and Regular Languages

Fachgebiet Rechnersysteme1. 1. Boolean Algebra. 1. Boolean Algebra. Verification Technology. Content. 1.1 Boolean algebra basics (recap)

y = c 2 MULTIPLE CHOICE QUESTIONS (MCQ's) (Each question carries one mark) is...

Chapter 4 State-Space Planning

Eigenvectors and Eigenvalues

Boolean Algebra cont. The digital abstraction

Lesson 2.1 Inductive Reasoning

NFAs continued, Closure Properties of Regular Languages

Instructions. An 8.5 x 11 Cheat Sheet may also be used as an aid for this test. MUST be original handwriting.

Part 4. Integration (with Proofs)

A Study on the Properties of Rational Triangles

Metodologie di progetto HW Technology Mapping. Last update: 19/03/09

On Implicative and Strong Implicative Filters of Lattice Wajsberg Algebras

Digital Control of Electric Drives

6.5 Improper integrals

Transcription:

Propositionl models Historil models of omputtion Steven Lindell Hverford College USA 1/22/2010 ISLA 2010 1 Strt with fixed numer of oolen vriles lled the voulry: e.g.,,. Eh oolen vrile represents proposition, for exmple "tody it is rining". A propositionl model is n ssignment from those vriles to the vlues {T, F}. E.g. symol vlue 1/22/2010 ISLA 2010 2 T F T A Boolen funtion is mp from the set of ll proposition models to the set {F, T}. This representtion is lled truth-tle. In the exmple, f = the prity g = the mjority Boolen funtions f g F F F F F F F T T F F T F T F F T T F T T F F T F T F T F T T T F F T T T T T T Applition: inry ddition Exmple: 1100 + 1110 = 11010 Crry = 1 1 0 0 0 deiml A = 1 1 0 0 = 12 B = + 1 1 1 0 = 14 Sum = 1 1 0 1 0 = 26 1/22/2010 ISLA 2010 3 1/22/2010 ISLA 2010 4 Sum nd Crry Derive equtions for Sum nd Crry s funtion of,,. no. of 1's = 0 1 2 3 = + + Sum = 0 1 0 1 = + + (mod 2) Crry = 0 0 1 1 = ( + + 2) Using logil opertions: Sum = PARity Crry = ( ) ( ) ( ) MAJority Implementtion using swithes Output true iff onnetivity etween terminls. Due to Shnnon the most influentil mster's thesis of 20th entury [f. opposite hindrnes ] Boolen Connetion Piture Flse Open Closed 1/22/2010 ISLA 2010 5 1/22/2010 ISLA 2010 6 1

N.O. rely Off On Normlly Open SPST rely Boolen input Flse funtion formul 2-wy swith digrm gte digrm swithing iruit Connetion Open Closed Monotone Boolen funtions funtionl onnetion OR is prllel AND is series formul gte digrm swithing iruit ID 1/22/2010 ISLA 2010 7 1/22/2010 ISLA 2010 8 Mjority Normlly Closed SPST rely funtion formul MAJ(,, ) ( ) ( ) ( ) gte digrm swithing iruit N.C. rely Off On Boolen input Flse funtion formul gte digrm 2-wy swith digrm swithing iruit Connetion Closed Open T 1/22/2010 ISLA 2010 9 1/22/2010 ISLA 2010 10 3-wy (hngeover) swith Exlusive-OR An SPDT rely equivlent to n N.O. nd n N.C. rely mehnilly gnged together. ommon funtion formul gte digrm swithing iruit rely position Boolen input 3-wy swith digrm N.O. N.C. XOR Up Flse ommon Open Closed XR Down ommon Closed Open 1/22/2010 ISLA 2010 11 1/22/2010 ISLA 2010 12 2

Mjority revisited 4-wy swith There re four monotone symmetri funtions of three vriles: f 0 (,, ) = f 1 (,, ) = f 2 (,, ) = f 3 (,, ) = f 4 (,, ) = + + 0 + + 1 + + 2 + + 3 + + 4 lwys size: O(kn) k fixed O(n) depth n sme s OR the mjority sme s AND lwys Flse 0 1 2 3 Two 3-wy swithes omined together to form 4-wy swith. Input A Input B rely position Boolen input 4-wy swith digrm stright-thru ross-over Flse Input A Input B Input A Input B Output A Output A Output B Output A Output B Output B 1/22/2010 ISLA 2010 13 1/22/2010 ISLA 2010 14 Prity Multiple-input XOR Prtil use: ontrol light on stirwy 4-it dder Digrm of 4-it full dder funtion formul gte digrm swithing iruit PAR(,, ) Use this iruit to solve lter prolems. Sum i = s i = PAR( i, i, i ) Crry i = i+1 = MAJ( i, i, i ) 1/22/2010 ISLA 2010 15 1/22/2010 ISLA 2010 16 Crry look-hed rry generte 1 + 1 g i = i i rry propgte 0 + 1 = 1 + 0 p i = i i Mnhester Chin i = j < i [ j j ] ( k, i > k > j)[ k k ] rry terminte 0 + 0 t i = i i i 1 + G = i i s i = PAR( i, i, i ) nd ll i omputed simultneously g i 1.......... p i 1 p j+1 g j onstnt depth iruit T = i i 0 P = i i 1/22/2010 ISLA 2010 17 1/22/2010 ISLA 2010 18 3

Red-one sequentil omputtion Reson: reful mesure of red/write storge Memory: red-only; write-only; olivious ursor Conept: reds re destrutive for working memory (not input); sort of no-loning property Exmple: rry omputtion re-prenthesiztion := + + = + ( + ) Vlidity in ll (propositionl) models: trivil Form implition onsisting of the onjuntion of the premises rrows the onlusion. This is Boolen funtion too. Exmple: premises, ; onlusion (rry-out). Chek to see if ll rows of the truth-tle re true. 1/22/2010 ISLA 2010 19 1/22/2010 ISLA 2010 20 Summry Swithing iruits re omputtionl model for propositionl Boolen logi Propositionl vlidity is finite proedure. I.e. in fixed voulry V, there re finitely mny propositionl models, nd finitely mny Boolen funtions. It is simple mtter to determine whih of them re tutologies (just try out 2 V ). However, prmeterized y the voulry, this is o-np-omplete (the opposite of stisfiility). Predite models for term logi Fix voulry of predites: e.g. A, B, C. Eh predite represents some lss of elements, suh s "the set of ll students". A predite model onsists of domin (sometimes lled the universe) long with n ssignment whih interprets eh of the predites s suset of the domin. If the domin is ll people, then one of the predites ould represent the set of students. 1/22/2010 ISLA 2010 21 1/22/2010 ISLA 2010 22 Exmple Consider the model M = <D, S, M, W, L> given y Domin Students Men Women Logiins Ed Tnvi John Jne Lis Ashok Mollie Bo Mry Tnvi Ashok Mollie Ed John Ashok Bo Tnvi Jne Lis Mollie Mry Ed Tnvi Lis Bo 1/22/2010 ISLA 2010 23 Terms & Propositions Term: Tke model nd return derived predite. mle students: {, Ashok} non-logiins: {John, Jne, Ashok, Mollie, Mry} Proposition: ompre two terms Sttement Eqution Tehnilly, proposition ould e ny funtion from onstnts nd terms to {, Flse}. All P re Q No Women re Logiins W L = P Q Some P re Q P Q No P re Q Flse Mollie is student Mollie S P Q 1/22/2010 ISLA 2010 24 4

Vlidity Syllogism Exmple Symolilly Mjor premise Minor premise No helthy food is No P re M. fttening. All kes re fttening. All S re M. Conlusion No kes re helthy. No S re P. Cn use Ldd-Frnklin's Rule of Syllogism Terms Simple terms Atomi predites A, B, in originl voulry Complement T T is simple term Joining them together Union T 1 T 2 T 1 nd T 2 re terms Intersetion T 1 T 2 T 1 nd T 2 re terms Exmple: W L = women non-logiins 1/22/2010 ISLA 2010 25 1/22/2010 ISLA 2010 26 Bsi Sttements Given sujet nd predite terms S nd P: I $S P Some S re P. A "S P All S re P. If P is negted, we get the other two forms: O $S P Some S re not P. E "S P No S re P. Compound sttements Exmple: onsider T 1 nd T 2 to e the sttements "S (W L) All students re women or logiins. $L (M S) Some logiins re mle students. Cn omine sttements with disjuntion nd onjuntion to form: T 1 T 2 nd T 1 T 2. Exerise (negtion unneessry): Show O nd E forms re unneessry. Hint: push negtions down. 1/22/2010 ISLA 2010 27 1/22/2010 ISLA 2010 28 Numeril quntifiers Definition: A quntifier is monotone symmetri funtion from sets to Boolen. $ k S P " k S P there re t lest k S s whih re P ll exept t most k 1 S s stisfy P Exmple: k = 1 is ordinry $ / " quntifition Exerise: show there re no more Threshold gtes k or more inputs re one: for k = 1 this is OR. for k = n this is AND. Exerise : Show tht for fixed k, they n e implemented y depth 2, size n k iruits. Hint: use multiple input AND/OR gtes. However, Shnnon s ldder digrm: liner depth nd size. : n : k 1/22/2010 ISLA 2010 29 1/22/2010 ISLA 2010 30 5

Complexity of evlution Where do we go from here? Given predite model M nd formul φ, sk if M stisfies φ. The size of the input is M, or O( D ), proportionl to size of the domin. 1. Evlute ll terms using,,. 2. Quntify: numeril ordinry k S P S P k S P k S P S P < k S P = 3. Compute Boolen omintions Extend voulry, preserving liner size. How? llow mondi funtions (invertile) Chse the lure of liner-time omputtion. Insure: ompositionlity with queries of rity > 1 Find effiient norml forms for logi formule. Use: numeril quntifiers tht re not nested 1/22/2010 ISLA 2010 31 1/22/2010 ISLA 2010 32 6