CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.

Slides:



Advertisements
Similar presentations
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Advertisements

CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Prof. Shachar Lovett Clicker frequency: CA CSE 20 Discrete math Prof. Shachar Lovett
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
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.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CS61C L16 Representations of Combinatorial Logic Circuits (1) Beamer, Summer 2007 © UCB Scott Beamer Instructor inst.eecs.berkeley.edu/~cs61c CS61C :
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2008 © UCB 100 MPG Car contest!  The X Prize Foundation has put up two prizes;
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
CS 61C L28 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
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,
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Truth Tables for Negation, Conjunction, and Disjunction.
3.2 – Truth Tables and Equivalent Statements
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Discrete Maths 2. Propositional Logic Objective
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Normal Forms, Tautology and Satisfiability 2/3/121.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 12 – Basic Data Structures Cynthia Bailey Lee Some slides and figures adapted from Paul Kube’s CSE 12 CS2 in Java Peer Instruction Materials by Cynthia.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
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.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Conditional Statements
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
How do I show that two compound propositions are logically equivalent?
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
Boolean Logic.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
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,
Fundamental Logic Gates And, Or, Not. Logic Gates: The Basics Regulate the flow of electricity within circuits to perform desired functionalities Each.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
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
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Senior Lecturer SOE Dan Garcia
CSE 20 – Discrete Mathematics
MATH 15A – Discrete Mathematics
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
TA David “The Punner” Eitan Poll
Presentation transcript:

CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. Based on a work at Permissions beyond the scope of this license may be available at LeeCreative Commons Attribution- NonCommercial-ShareAlike 4.0 International Licensehttp://peerinstruction4cs.org

Today’s Topics: 1. Step-by-step equivalence proofs 2. Equivalence of logical operators 2

1. Step-by-Step Equivalence Proofs 3

Two ways to show two propositions are equivalent 1. Using a truth table  Make a truth table with a column for each  Equivalent iff the T/F values in each row are identical between the two columns 2. Using known logical equivalences  Step-by-step, proof-style approach  Equivalent iff it is possible to evolve one to the other using only the known logical equivalence properties 4

Logical Equivalences 1. (p ∧ q ∧ r) ∨ (p ∧ ¬q ∧ ¬r) ∨ (¬p ∧ q ∧ r) ∨ (¬p ∧ ¬q ∧ ¬r) ≡(p ∧ (q ∧ r)) ∨ (p ∧ (¬q ∧ ¬r)) ∨ (¬p ∧ (q ∧ r)) ∨ (¬p ∧ (¬q ∧ ¬r)) 2. ≡ (p ∧ ((q ∧ r) ∨ (¬q ∧ ¬r))) ∨ (¬p ∧ ((q ∧ r) ∨ (¬q ∧ ¬r))) a) Substitute s = (q ∧ r) ∨ (¬q ∧ ¬r) gives (p ∧ s) ∨ (¬p ∧ s) b) ≡ (s ∧ p) ∨ (s ∧ ¬p) c) ≡ s ∧ (p ∨ ¬p) d) ≡ s ∧ t e) ≡ s, substitute back for s gives: 3. ≡ (q ∧ r) ∨ (¬q ∧ ¬r) Which law is NOT used? A.Commutative B.Associative C.Distributive D.Identity E.DeMorgan’s 5

3. Equivalence of Logical Operators Do we really need IMPLIES and XOR? 6

Are all the logical connectives really necessary?  You already know that IMPLIES is not necessary  p → q ≡ ¬p ∨ q  What about IFF? A. Replace with ¬(¬p ∨ ¬q) B. Replace with (¬p ∧ ¬q) ∨ (p ∧ q) C. Replace with ¬(p ∧ q) ∧ (p ∨ q) D. Replace with something else E. XOR is necessary 7

Are all the logical connectives really necessary?  You already know that IMPLIES is not necessary  p → q ≡ ¬p ∨ q  What about XOR? A. Replace with ¬(¬p ∨ ¬q) B. Replace with (¬p ∧ ¬q) ∨ (p ∧ q) C. Replace with ¬(p ∧ q) ∧ (p ∨ q) D. Replace with something else E. XOR is necessary 8

Are all the logical connectives really necessary?  You already know that IMPLIES is not necessary  p → q ≡ ¬p ∨ q  What about AND? A. Replace with ¬(¬p ∨ ¬q) B. Replace with (¬p ∧ ¬q) ∨ (p ∧ q) C. Replace with ¬(p ∧ q) ∧ (p ∨ q) D. Replace with something else E. AND is necessary 9

Are all the logical connectives really necessary?  Not necessary:  IF  IFF  XOR  AND  We can replicate all these using just two:  OR  NOT  Can we get it down to just one?? A.YES, just OR B.YES, just NOT C.NO, there must be at least 2 connectives D.Other 10

It turns out, yes, you can manage with just one!  But it is one we haven’t learned yet:  NAND (NOT AND)  Another option is NOR (NOT OR)  Their truth tables look like this:  Ex: p OR q ≡ (p NAND p) NAND (q NAND q) 11 pqP NAND q TTF TFT FTT FFT pqP NOR q TTF TFF FTF FFT

Using NAND to simulate the other connectives 12 pqP NAND q TTF TFT FTT FFT “NOT p” is equivalent to A. p NAND p B. (p NAND p) NAND p C. p NAND (p NAND p) D. NAND p E. None/more/other

Using NAND to simulate the other connectives 13 pqP NAND q TTF TFT FTT FFT “p AND q” is equivalent to A. p NAND q B. (p NAND p) NAND (q NAND q) C. (p NAND q) NAND (p NAND q) D. None/more/other

Using NAND to simulate the other connectives 14 pqP NAND q TTF TFT FTT FFT “p OR q” is equivalent to A. p NAND q B. (p NAND p) NAND (q NAND q) C. (p NAND q) NAND (p NAND q) D. None/more/other