Mathematics for Computing - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Mathematics for Computing

Description:

Definition: A proposition is a statement that is either true or false. ... Distributive Laws. p ? (q ? r) (p ? q) ? (p ? r) p ? (q ? r) (p ? q) ? (p ? r) Identity Laws ... – PowerPoint PPT presentation

Number of Views:77
Avg rating:3.0/5.0
Slides: 34
Provided by: eyelen
Category:

less

Transcript and Presenter's Notes

Title: Mathematics for Computing


1
Mathematics for Computing
Lecture 2 Computer Logic and Truth Tables Dr
Andrew Purkiss-Trew Cancer Research
UK a.purkiss_at_mail.cryst.bbk.ac.uk
2
Logic
  • Propositions
  • Connective Symbols / Logic gates
  • Truth Tables
  • Logic Laws

3
Propositions
  • Definition A proposition is a statement that is
    either true or false. Which ever of these (true
    or false) is the case is called the truth value
    of the proposition.

4
Connectives
  • Compound propositione.g. If Brian and Angela
    are not both happy, then either Brian is not
    happy or Angela is not happy
  • Atomic propositionBrian is happy Angela is
    happy
  • Connectivesand, or, not, if-then

5
Connective Symbols
6
Conjugation
  • Logical and
  • Symbol ?
  • Written p ? q
  • Alternative forms p q, p . q, pq
  • Logic gate version

p
pq
q
7
Disjunction
  • Logical or
  • Symbol ?
  • Written p ? q
  • Alternative form p q
  • Logic gate version

p
p q
q
8
Negation
  • Logical not
  • Symbol
  • Written p
  • Alternative forms p, p, p
  • Logic gate version

p
p
9
Truth Tables
10
Compound Propositions
(p ? q)
11
Tautologies
  • Always true

12
Contradictions
  • Always false

13
Website for Lecture Notes
  • http//www.cryst.bbk.ac.uk/bpurk01/MfC/index2007.
    html

14
End of First Logic 1?
  • Place marker

15
Mathematics for Computing
Lecture 3 Computer Logic and Truth Tables 2 Dr
Andrew Purkiss-Trew Cancer Research
UK a.purkiss_at_mail.cryst.bbk.ac.uk
16
Logical Equivalence
  • Logical equals
  • Symbol
  • Written p p

17
Conditional
  • Logical if-then
  • Symbol ?
  • Written p ? q

18
Biconditional
  • Logical if and only if
  • Symbol ?
  • Written p ? q

19
converse and contrapositive
  • The converse of p ? q is q ? p
  • The contrapositive of p ? q is q ? p

20
Laws of Logic
  • Laws of logic allow us to combine connectives and
    simplify propositions and prove that logical
    equivalences are correct.

21
Double Negative Law
  • p p

22
Implication Law
  • p ? q p ? q

23
Equivalence Law
  • p ? q (p ? q) ? (q ? p)

24
Idempotent Laws
  • p ? p p
  • p ? p p

25
Commutative Laws
  • p ? q q ? p
  • p ? q q ? p

26
Associative Laws
  • p ? (q ? r) (p ? q) ? r
  • p ? (q ? r) (p ? q) ? r

27
Distributive Laws
  • p ? (q ? r) (p ? q) ? (p ? r)
  • p ? (q ? r) (p ? q) ? (p ? r)

28
Identity Laws
  • p ? T p
  • p ? F p

29
Annihilation Laws
  • p ? F F
  • p ? T T

30
Inverse Laws
  • p ? p F
  • p ? p T

31
Absorption Laws
  • p ? (p ? q) p
  • p ? (p ? q) p

32
de Morgans Laws
  • (p ? q) p ? q
  • (p ? q) p ? q

33
End of Logic
Write a Comment
User Comments (0)
About PowerShow.com