CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Logic The study of correct reasoning.
Propositional Equivalences
Foundations of Computing I CSE 311 Fall 2014 Foundations of Computing I Fall 2014.
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
IB Math Studies – Topic 3. IB Course Guide Description.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
Discussion #10 1/16 Discussion #10 Logical Equivalences.
Propositional Logic 7/16/ Propositional Logic A proposition is a statement that is either true or false. We give propositions names such as p, q,
The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Discrete Maths 2. Propositional Logic Objective
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Foundations of Computing I CSE 311 Fall CSE 311: Foundations of Computing I Fall 2014 Lecture 1: Propositional Logic.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
CSE 311 Foundations of Computing I Spring 2013, Lecture 3 Propositional Logic, Boolean Logic/Boolean Algebra 1.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Chapter 7 Logic, Sets, and Counting
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Conditional Statements
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
LOGIC.
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
Chapter 1: The Foundations: Logic and Proofs
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Simplifying Boolean Expressions. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xyx XOR y FFF FTT TFT TTF xNOT x FT TF.
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.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
UMBC CMSC 203, Section Fall CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
CSE 311: Foundations of Computing Fall 2013 Lecture 1: Propositional logic.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Citra Noviyasari, S.Si, MT
CSE 311 Foundations of Computing I
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
Administrivia Course Web:
Propositional Equivalences
Information Technology Department
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 321 Discrete Structures
CSE 321 Discrete Structures
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
Presentation transcript:

CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence

Administrative Course web: –Homework, Lecture slides, Office Hours... Office Hours: starting today Homework: –Paper turn-in (stapled) handed in at the start of class on due date (Wednesday). No on-line turn-in. –Individual. OK to discuss with a couple of others but nothing recorded from discussion and write-up done much later

Administrative Coursework and grading –Weekly written homework ~ % –Midterm (November 4) ~ 15-20% –Final (December 12) ~ 30-35% A note about Extra Credit problems –Not required to get a 4.0 Recorded separately and grades calculated entirely without it Fact that others do them can’t lower your score In total may raise grade by 0.1 (occasionally 0.2) –Each problem ends up worth less than required ones

Recall…Connectives p  p p TF FT pq p  q TTT TFF FTF FFF pq p  q TTT TFT FTT FFF pq p  q TTF TFT FTT FFF NOT AND OR XOR

p  qp  q Implication –p implies q –whenever p is true q must be true –if p then q –q if p –p is sufficient for q –p only if q pq p  q

“If you behave then I’ll buy you ice cream” What if you don’t behave?

“If pigs can whistle then horses can fly”

Converse, Contrapositive, Inverse Implication: p  q Converse: q  p Contrapositive:  q   p Inverse:  p   q Are these the same? Example p: “x is divisible by 2” q: “x is divisible by 4”

Biconditional p  q p iff q p is equivalent to q p implies q and q implies p pq p  q

English and Logic You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old –q: you can ride the roller coaster –r: you are under 4 feet tall –s: you are older than 16 ( r   s)   q

Digital Circuits Computing with logic –T corresponds to 1 or “high” voltage – F corresponds to 0 or “low” voltage Gates –Take inputs and produce outputs Functions –Several kinds of gates –Correspond to propositional connectives Only symmetric ones (order of inputs irrelevant)

Gates p q out pq p  q TTT TFF FTF FFF pqout AND connective p  q AND gate p q out AND “block looks like D of AND”

Gates p q out pq p  q TTT TFT FTT FFF pqout OR connective p  q OR gate p q out OR “arrowhead block looks like V”

Gates p out NOT connective  p NOT gate (inverter) p  p p TF FT pout Bubble most important for this diagram NOT p out

Combinational Logic Circuits AND OR Values get sent along wires connecting gates

Combinational Logic Circuits OR AND Wires can send one value to multiple gates

Logical equivalence Terminology: A compound proposition is a –Tautology if it is always true –Contradiction if it is always false –Contingency if it can be either true or false p   p p  p (p  q)  p (p  q)  (p   q)  (  p  q)  (  p   q)

Logical Equivalence p and q are logically equivalent iff p  q is a tautology –i.e. p and q have the same truth table The notation p  q denotes p and q are logically equivalent Example: p   p p  p p   pp    p

De Morgan’s Laws  (p  q)   p   q  (p  q)   p   q What are the negations of: –The Yankees and the Phillies will play in the World Series –It will rain today or it will snow on New Year’s Day

De Morgan’s Laws pq  p p  q  q  p   qp  q  p  q)  p  q)  p   q) TT TF FT FF Example:  (p  q)  (  p   q)

Law of Implication pq p  q  p p  p  q(p  q)  (  p  q) Example: (p  q)  (  p  q)

Computing equivalence Describe an algorithm for computing if two logical expressions/circuits are equivalent What is the run time of the algorithm?

Understanding connectives Reflect basic rules of reasoning and logic Allow manipulation of logical formulas –Simplification –Testing for equivalence Applications –Query optimization –Search optimization and caching –Artificial Intelligence –Program verification

Properties of logical connectives Identity Domination Idempotent Commutative Associative Distributive Absorption Negation

Equivalences relating to implication p  q   p  q p  q   q   p p  q   p  q p  q   (p   q) p  q  (p  q)  (q  p) p  q   p   q p  q  (p  q)  (  p   q)  (p  q)  p   q

Logical Proofs To show P is equivalent to Q –Apply a series of logical equivalences to subexpressions to convert P to Q To show P is a tautology –Apply a series of logical equivalences to subexpressions to convert P to T

Show (p  q)  (p  q) is a tautology

Show (p  q)  r and p  (q  r) are not equivalent