I find the question, why are we here typically human' - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

I find the question, why are we here typically human'

Description:

Tautology: a compound proposition that is always true, independent of the truth ... if p ' q is a tautology. Example: show that q r q r q r ... – PowerPoint PPT presentation

Number of Views:106
Avg rating:3.0/5.0
Slides: 13
Provided by: davide56
Category:

less

Transcript and Presenter's Notes

Title: I find the question, why are we here typically human'


1
  • I find the question, why are we here? typically
    human.
  • Id suggest are we here? would bethe more
    logical choice.
  • Leonard Nimoy
  • Against logic there is no armor like ignorance.
  • Laurence J. Peter
  • Logic is like the sword those who live by it
  • shall perish by it.
  • Samuel Butler

2
CSE 502NFundamentals of Computer Science
  • Fall 2004
  • Lecture 4
  • Introduction to formal logic Boolean algebra
  • (Rosen 1.1 1.4)

3
Propositional Logic
  • Proposition, p, is a declarative sentence that is
    either true or false, but not both
  • Nairobi is the capital of Kenya (true
    proposition)
  • 2 5 6 (false proposition)
  • x 4 21 (not a proposition)
  • Negation operator (Ø) produces a new proposition
    such that q Øp is the proposition it is not
    the case that p
  • Note that p Ø(Øp)
  • Formal definition of NOT operator or inverter
    logic gate

Truth Table
4
Connectives
  • Conjuction (Ù) the proposition p Ù q (p and q)
    is true when both p and q are true and false
    otherwise
  • Disjuction (Ú) the proposition p Ú q (p or q)
    is false when both p and q are false and true
    otherwise
  • Exclusive-or (Å) the proposition p Å q (p xor
    q) is true when exactly one of p and q is true
    and false otherwise

5
Implication
  • Implication () the implication p q is the
    proposition that is false when p is true and q is
    false, and true otherwise
  • An implication is a conditional statement
  • p is the hypothesis (antecedent or premise)
  • q is the conclusion (consequence)
  • Equivalent statements if p, q, p only if q,
    q if p, q when p
  • Examples
  • If I am elected, then the economy will improve.
  • I am elected only if the economy will improve.

6
Converse, Contrapositive, Inverse
  • Proposition q p is the converse of p q
  • Proposition Øq Øp is the contrapositive of p
    q
  • The contrapositive has the same truth value as
    the implication
  • Proposition Øp Øq is the inverse of p q
  • Converse and inverse are equivalent compound
    propositions

7
Biconditional
  • Biconditional () the biconditional p q is the
    proposition that is true when p and q have the
    same truth values
  • Can also be thought of as Exclusive-NOR (XNOR),
    Ø(p Å q)
  • Also equivalent to (p q) Ù (q p)
  • Equivalent statements p if and only if q, p
    is necessary and sufficient for q, p if q
  • The economy will improve if and only if I am
    elected.

8
Precedence of Logical Operators
  • Negation takes precedence over all other logical
    operators
  • It is applied before all other operators
  • Example Ø p Å q is the exclusive-or of Øp and q,
    i.e. (Øp) Å q
  • Conjunction takes precedence over disjunction
  • p Ù q Ú r means (p Ù q) Ú r
  • Implication and biconditional operators have
    lower precedence than conjunction and disjunction
    operators

9
Found in Translation
  • You can drive your car on campus only if you are
    a graduate student or you are not a business
    student.
  • p you can drive your car on campus
  • q you are a graduate student
  • r you are a business student
  • p (q Ú Ør)

10
Consistent Specifications
  • Logic expressions are useful for translating
    natural language problem constraints into formal
    system specifications
  • Example
  • If specifications conflict, there is no way to
    develop a system that satisfies the constraints
  • Propositional expressions are consistent if there
    is an assignment of truth values to the variables
    that makes all the expressions true
  • Example Are the following propositions
    consistent?
  • The checksum is correct and the timer has
    expired if only if the link has intermittent
    failures. p Ù q r
  • If the checksum is correct, then the timer has
    expired and the link does not have intermittent
    failures or the timer has not expired and the
    link does have intermittent failures. p q Ù
    Ør Ú Øq Ù r

11
Logical Equivalences
  • Tautology a compound proposition that is always
    true, independent of the truth values of the
    constituent propositions
  • Example p Ú Øp
  • Contradiction a compound proposition that is
    always false, independent of the truth values of
    the constituent propositions
  • Example p Ù Øp
  • Contingency a compound proposition that is
    neither a tautology nor a contradiction
  • Example p Å q
  • Propositions p and q are logically equivalent, p
    º q, if p q is a tautology
  • Example show that q Ù Ør Ú Øq Ù r º q Å r

12
De Morgans Law
  • Ø(p1 Ú p2 Ú Ú pn) º (Øp1 Ù Øp2 Ù Ù Øpn)
  • Ø(p1 Ù p2 Ù Ù pn) º (Øp1 Ú Øp2 Ú Ú Øpn)
  • Review other logical equivalences in Rosen 1.2
    (Tables 5, 6, 7)
  • Examples
  • p q º Øp Ú q
  • Show that (p Ù q) (p Ú q) is a tautology
Write a Comment
User Comments (0)
About PowerShow.com