CSE 311 Foundations of Computing I

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

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.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
CSE 321 Discrete Structures Winter 2008 Lecture 1 Propositional Logic.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
Adapted from Discrete Math
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Propositions and Truth Tables
Discrete Maths 2. Propositional Logic Objective
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
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.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
UMBC CMSC 203, Section Fall CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
CSE 311: Foundations of Computing Fall 2013 Lecture 1: Propositional logic.
Law of logic Lecture 4.
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
Chapter 1 Propositional Logic
Discrete Mathematical
2. The Logic of Compound Statements Summary
Propositional Logic.
The Foundations: Logic and Proofs
Advanced Algorithms Analysis and Design
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Citra Noviyasari, S.Si, MT
MATH 245 Spring 2009 This is mathematics for computer science
CSE 311 Foundations of Computing I
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Mathematics for Computing
Discrete Structures for Computer Science
The Foundations: Logic and Proofs
Chapter 8 Logic Topics
CSCI 3310 Mathematical Foundation of Computer Science
CSE 311 Foundations of Computing I
Propositional Calculus: Boolean Algebra and Simplification
Administrivia Course Web:
Propositional Equivalences
Information Technology Department
CS 220: Discrete Structures and their Applications
CS201: Data Structures and Discrete Mathematics I
Propositional Equivalences
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Lecture 2: Propositional Equivalences
CSE 321 Discrete Structures
CSE 321 Discrete Structures
The Foundations: Logic and Proofs
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Discrete Structures Prepositional Logic 2
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Concepts of Computation
Presentation transcript:

CSE 311 Foundations of Computing I Spring 2013 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence

Administrative Course web: http://www.cs.washington.edu/311 Check it often: homework, lecture slides Office Hours: 9 hours; check the web Homework: Paper turn-in (stapled) handed in at the start of class on due date (Wednesday); no online turn in. Individual. OK to discuss with a couple of others but nothing recorded from discussion and write-up done much later Homework 1 available (on web), due April 10

Administrative Coursework and grading Weekly written homework ~ 50 % Midterm (May 10) ~ 15% Final (June 10) ~ 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 T F p q p  q T F NOT AND p q p  q T F p q OR XOR

p  q Implication p implies q whenever p is true q must be true F T 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

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

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 4” q: “x is divisible by 2”

Biconditional p  q p iff q p is equivalent to q p implies q and q implies p p q p  q F T

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 Gates 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 AND connective AND gate p q p q p  q p q p  q T F p q out 1 p q out p q out AND “block looks like D of AND”

Gates OR connective OR gate p q p q p  q p q p  q T F p q out 1 out p q out p q out OR “arrowhead block looks like V”

Gates NOT connective NOT gate (inverter)  p p  p out p p T F p out 1 p out Bubble most important for this diagram p NOT 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 p   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 Example:  (p  q)  ( p   q) p q  p  q  p  q T F

Law of Implication Example: (p  q)  ( p  q) p q p  q  p  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 p  T  p p  F  F p  p  p p  q  q  p (p  q)  r  p  (q  r) p  (q  r)  (p q)  (p  r) p  (p  q)  p p   p  F

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 To show P is a tautology 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