Logic of Compound Statements - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Logic of Compound Statements

Description:

Logic of Compound Statements. Introductory Discrete Mathematics (CS/MAT165) ... which Sarah (Jennifer Connelly) finds herself faced with two doors each guided ... – PowerPoint PPT presentation

Number of Views:236
Avg rating:3.0/5.0
Slides: 31
Provided by: joe49
Category:

less

Transcript and Presenter's Notes

Title: Logic of Compound Statements


1
Logic of Compound Statements
  • Introductory Discrete Mathematics (CS/MAT165)

2
Compound Statements
  • Logical Form and Logical Equivalence
  • Conditional Statements
  • Valid and Invalid Arguments
  • Application Digital Logic Circuits

3
Boolean Operations
  • Logical
  • Combines logical expressions
  • Arguments must be logical
  • Relational
  • Compares logical expressions
  • Arguments must be comparable

4
Logical Operations
  • OR a ? b
  • AND a ? b
  • NOT a

5
Truth Tables
Or
And
Not
6
Relational Operations
  • Greater than a b
  • Less than a
  • Equal to a b
  • Not greater than a b (also a ? b)
  • Not less than a
  • Not equal to a ? b

7
Logical Form and Logical Equivalence
  • Argument
  • A sequence of statements (premise) aimed at
    demonstrating the truth of an assertion
    (conclusion).
  • Example
  • Premise If a fruit is a cherry, then its red.
  • Conclusion Therefore, if a fruit is not red,
    then its not a cherry.

8
Logical Form and Logical Equivalence
  • Premise a ? b (if a then b)
  • Conclusion b ? a (If not b then not a)
  • or maybe
  • Premise a ? b
  • Conclusion b ? a
  • Is This True?

9
Logical Equivalence
  • Two expressions are said to be logically
    equivalent when the first is true if and only if
    the second is true
  • Examples
  • (p) ? p (double negative)
  • a ? b ? b ? a (commutative property)
  • (a ? b) ? c ? a ? (b ? c) (associative
    property)

10
De Morgans Laws
  • (p ? q) ? p ? q
  • (p ? q) ? p ? q

Augustus De Morgan (1806-1871)
11
Tautological Statements Contradictions
  • Tautological Statement
  • Always true regardless of the values of its
    variables
  • Example
  • p ? p
  • Contradiction
  • Always false regardless of the values of its
    variables
  • Example
  • p ? p

12
Study!
  • Theorem 1.1.1Logical Equivalencespage 14

13
Conditional Statements
  • If p then q
  • p ? q

14
Logical EquivalencesDivision Into Cases
  • p ? q ? r ? (p ? r) ? (q ? r)
  • Think about it!
  • It makes sense!

15
Representing If-Then as Or
  • p ? q ? p ? q
  • How could you prove this?
  • Do this!
  • Create a truth table for both sides of the
    equivalence

16
Negation
  • (p ? q) ? p ? q
  • Okay, truth tables (again)

17
Contrapositive
  • p ? q ? q ? p
  • Truth tables (one more time)

18
Converse / Inverse
  • Given
  • p ? q
  • Converse
  • q ? p
  • Inverse
  • p ? q

19
Valid and Invalid Arguments
  • Argument
  • p ? q ? rq ? p ? r? p ? r (Read therefore p
    implies r)
  • This is invalid!
  • Why?
  • How would you mathematically show its invalid?

20
Valid and Invalid Arguments
  • p ? q ? r
  • q ? p ? r
  • ? p ? r
  • First, rewrite (i)(p ? q) ? (p ? r)
  • Substitute (ii) into (i) (p ? p ? r) ? (p ? r)
  • Rewrite (p ? r) ? (p ? r)
  • Set this equal to (iii) (p ? r) ? (p ? r) p ?
    r
  • Simplify p ? r p ? r
  • This is false, therefore the original argument is
    invalid

21
Modus Ponens Modus Tollens
  • Syllogism
  • An argument with two premises and a conclusion
  • Modus ponens
  • If p then qp ? q
  • Modus tollens
  • If p then q
  • q
  • ? p

22
Rules of Inference
23
Rules of Inference
24
ProblemHow to Reason With a Robot
  • You might try the ploy successfully used by Mr.
    Spock on the malevolent android 'Norman' (Star
    Trek), wherein he posed the following to Norman
    "Everything I say is a lie. I'm a liar". Norman
    self-fried.
  • Can you prove what Spock said is invalid?

25
Knights and Knaves
  • On a fictional island, all inhabitants are either
    knights, who always tell the truth, or knaves,
    who always lie. The puzzles involve a visitor to
    the island who meets small groups of inhabitants.
    Usually the aim is for the visitor to deduce the
    inhabitants' type from their statements, but some
    puzzles of this type ask for other facts to be
    deduced. The puzzle may also be to determine a
    yes/no question which the visitor can ask in
    order to discover what he needs to know.

Raymond Smullyan (b1919)
26
Knights and KnavesQuestion 1
  • John and Bill are residents of the island of
    knights and knaves.
  • John says We are both knaves.
  • Who is who?

Raymond Smullyan (b1919)
27
Knights and KnavesQuestion 2
  • John If Bill is a knave then I'm a knight.
  • Bill We are different.
  • Who is who?

Raymond Smullyan (b1919)
28
Knights and KnavesQuestion 3
  • Logician Are you both knights?
  • John answers either Yes or No, but the Logician
    does not have enough information to solve the
    problem.
  • Logician Are you both knaves?
  • Bill answers either Yes or No, and the Logician
    can now solve the problem.
  • Who is who?

Raymond Smullyan (b1919)
29
Knights and KnavesQuestion 4
  • Here is a rendition of perhaps the most famous of
    this type of puzzle
  • John and Bill are standing at a fork in the road.
    You know that one of them is a knight and the
    other a knave, but you don't know which. You also
    know that one road leads to Someplace, and the
    other leads to Nowhere.
  • By asking one yes/no question, can you determine
    the road to Someplace?
  • By asking one yes/no question, can you determine
    whether John is a knight?
  • This version of the puzzle was further
    popularized by a scene in the 1980's fantasy
    film, Labyrinth, in which Sarah (Jennifer
    Connelly) finds herself faced with two doors each
    guided by a two-headed knight. One door leads to
    the castle at the centre of the labyrinth, and
    one to certain doom.

Raymond Smullyan (b1919)
30
Digital Logic Circuits
  • Time to use the computers!
Write a Comment
User Comments (0)
About PowerShow.com