cse 20 discrete mathematics
Download
Skip this Video
Download Presentation
CSE 20 – Discrete Mathematics

Loading in 2 Seconds...

play fullscreen
1 / 14

CSE 20 – Discrete Mathematics - PowerPoint PPT Presentation


  • 56 Views
  • Uploaded on

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CSE 20 – Discrete Mathematics' - clodia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cse 20 discrete mathematics

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 http://peerinstruction4cs.org.Permissions beyond the scope of this license may be available at http://peerinstruction4cs.org.

CSE 20 – Discrete Mathematics

Dr. Cynthia Bailey Lee

Dr. Shachar Lovett

today s topics
Today’s Topics:
  • Step-by-step equivalence proofs
  • Equivalence of logical operators
two ways to show two propositions are equivalent
Two ways to show two propositions are equivalent
  • 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
  • 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
logical equivalences
Logical Equivalences
  • (p∧q∧r) ∨ (p∧¬q∧¬r) ∨ (¬p∧q∧r) ∨ (¬p∧¬q∧¬r) ≡(p∧(q∧r)) ∨ (p∧(¬q∧¬r)) ∨ (¬p∧(q∧r)) ∨ (¬p∧(¬q∧¬r))
  • ≡ (p∧ ((q∧r) ∨ (¬q∧¬r))) ∨ (¬p ∧ ((q∧r) ∨ (¬q∧¬r)))
    • Substitute s = (q∧r) ∨ (¬q∧¬r) gives (p∧ s) ∨ (¬p ∧ s)
    • ≡ (s∧p) ∨ (s∧¬p)
    • ≡ s ∧ (p ∨ ¬p)
    • ≡ s ∧ t
    • ≡ s, substitute back for s gives:
  • ≡ (q∧r) ∨ (¬q∧¬r)

Which law is NOT used?

Commutative

Associative

Distributive

Identity

DeMorgan’s

3 equivalence of logical operators
3. Equivalence of Logical Operators

Do we really need IMPLIES and XOR?

are all the logical connectives really necessary
Are all the logical connectives really necessary?
  • You already know that IMPLIES is not necessary
    • p → q≡ ¬p ∨ q
  • What about IFF?
    • Replace with ¬(¬p ∨ ¬q)
    • Replace with (¬p ∧ ¬q) ∨ (p∧q)
    • Replace with ¬(p∧q) ∧(p∨q)
    • Replace with something else
    • XOR is necessary
are all the logical connectives really necessary1
Are all the logical connectives really necessary?
  • You already know that IMPLIES is not necessary
    • p → q≡ ¬p ∨ q
  • What about XOR?
    • Replace with ¬(¬p ∨ ¬q)
    • Replace with (¬p ∧ ¬q) ∨ (p∧q)
    • Replace with ¬(p∧q) ∧(p∨q)
    • Replace with something else
    • XOR is necessary
are all the logical connectives really necessary2
Are all the logical connectives really necessary?
  • You already know that IMPLIES is not necessary
    • p → q≡ ¬p ∨ q
  • What about AND?
    • Replace with ¬(¬p ∨ ¬q)
    • Replace with (¬p ∧ ¬q) ∨ (p∧q)
    • Replace with ¬(p∧q) ∧(p∨q)
    • Replace with something else
    • AND is necessary
are all the logical connectives really necessary3
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??

YES, just OR

YES, just NOT

NO, there must be at least 2 connectives

Other

it turns out yes you can manage with just one
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)
using nand to simulate the other connectives
Using NAND to simulate the other connectives
  • “NOT p” is equivalent to
  • p NAND p
  • (p NAND p) NAND p
  • p NAND (p NAND p)
  • NAND p
  • None/more/other
using nand to simulate the other connectives1
Using NAND to simulate the other connectives
  • “p AND q” is equivalent to
  • p NAND q
  • (p NAND p) NAND (q NAND q)
  • (p NAND q) NAND (p NAND q)
  • None/more/other
using nand to simulate the other connectives2
Using NAND to simulate the other connectives
  • “p OR q” is equivalent to
  • p NAND q
  • (p NAND p) NAND (q NAND q)
  • (p NAND q) NAND (p NAND q)
  • None/more/other
ad