KEMBAR78
Propositional logic 2 all about logics and gates | PPT
PROPOSITIONAL
LOGIC
By
Sir. Najam
Mphil (Edu)
BS Hon
M.A Edu
M.Ed Special Educagion
PGD (CS)
CCNA
MCSE Microsoft Certified system Engineer
Mikrotik Certified System Engineer
Email-ASSADCHADHAR@GMAIL.COM
#-03127522112
CHAPTER OUTLINE:
1.1 INTRODUCTION
1.2 PROPOSITION
1.3 COMPOUND STATEMENT
1.4 FORMAL PROPOSITION
1.6 PROPOSITIONAL EQUIVALENCES
1.5 CONDITIONAL STATEMENT
PROPOSITIONAL LOGIC
PROPOSITIONAL LOGIC
1.1 INTRODUCTION
1.1 INTRODUCTION
 Logic – used to distinguish between valid and
invalid mathematical arguments.
 Logic was developed by Aristotle
 Application in computer science – design
computer circuits, construction of computer
program, verification of the correctness of
programs.
 Logic is a system based on proposition
1.2 PROPOSITION
1.2 PROPOSITION
 Proposition – is a declarative sentence either
true or false, but not both.
 Eg:
1) Tunku Abdul Rahman was the first prime
minister of Malaysia - TRUE
2) 1 + 1 = 2 - TRUE
3) What time is it? NOT PROPOSITION
4) Read this carefully. NOT PROPOSITION
5) x + 1 = 2 – NOT PROPOSITION
 Letters are used to denote propositions – p, q, r,
s.
 Many mathematical statements are constructed by
combining one or more propositions.
Eg:
John is smart or he studies every night.
 One or more propositions can be combining to form
a single compound proposition using
connectives (logical operator)
1.3 COMPOUND STATEMENTS
1.3 COMPOUND STATEMENTS
LOGICAL CONNECTIVES
Connectives Symbol Name
And Conjunction
Or Disjunction
Not Negation


,~

TRUTH TABLE
 Can be used to show how logical operators can be
combine propositions to compound propositions.
 Displays the truth value that correspond to all
possible value (2n
) of truth values for its
component statement variables.
 The truth value for proposition could be TRUE
(T) or FALSE (F)
1) Not (negation) : ~ /
Let p be a proposition. The negation of p is denoted by
, and read as “not p”.
-Eg:
Find the negation of the proposition “Today
is Friday”.
The Truth Table for the Negation of a Proposition
1.4 FORMAL PROPOSITION
1.4 FORMAL PROPOSITION

p

p
T F
F T
p

2) And (conjunction) :
Let p and q be propositions. The proposition of “p and q” - denoted
, is TRUE when BOTH p and q are true and otherwise is
FALSE.
Eg: Student who have taken calculus and computer sciences can take
this class.
The Truth Table for the Conjunction of Two Propositions

p q

p q
T T T
T F F
F T F
F F F
p q

1.4 FORMAL PROPOSITION
1.4 FORMAL PROPOSITION
3) Or (disjunction) :
Let p and q be prepositions. The preposition of “p or q” - denoted
, is FALSE when BOTH p and q are FALSE and TRUE
otherwise.
Eg: Student who have taken calculus or computer sciences can take
this class.
The Truth Table for the Disjunction of Two Prepositions
p q
T T T
T F T
F T T
F F F

p q

p q

1.4 FORMAL PROPOSITION
1.4 FORMAL PROPOSITION
EXAMPLE 1.1
EXAMPLE 1.1
Consider the following statements, and determine
whether it is true or false.
1)Ice floats in water and 2 + 2 = 4
2)China is in Europe and 2 + 2 = 4
3)5 – 3 = 1 or 2 x 2 = 4
 Let :
 Express these propositions using p, q, r, s and logical
connectives.
 Anwar is a good lecturer and his students not hate
mathematics
 Either Hidayah is a good lecturer or she is not
 Anwar’s students both hate and do not hate mathematics
 Either Anwar is a good lecturer, or his students hate
mathematics and Hidayah is not a good lecturer
 Anwar is good lecturer but his students hate mathematics
 Neither Anwar nor Hidayah is a good lecturer
p Anwar is a good lecturer
q Hidayah is a good lecturer
r Anwar’s student hate mathematics
s Hidayah’s student hate mathematics
EXAMPLE 1.2
EXAMPLE 1.2
EXAMPLE 1.3
EXAMPLE 1.3
Let p and q be the following propositions:
p = It is below freezing
q = It is snowing
Translate the following into logical notation, using
p and q and logical connectives.
(a)It is below freezing and snowing
(b)It is below freezing but not snowing
(c) It is not below freezing and it is not snowing
(d)It is either snowing or below freezing (or both)
EXAMPLE 1.4
EXAMPLE 1.4
EXERCISE
EXERCISE
1) Implication
Let p and q be a proposition. The implication is the preposition
that is FALSE when p is true, q is false. Otherwise is TRUE.
p = hypothesis/antecedent/premise
q = conclusion/consequence
Express: “ if p, then q”, “q when p”, “p implies q”
Eg: If you earn an A in logic then I will give you present.
The Truth Table for the Implication ( )
1.5 CONDITIONAL STATEMENTS
1.5 CONDITIONAL STATEMENTS
p q
T T T
T F F
F T T
F F T
p q

p q

p q

2) Equivalence/ Biconditional
Let p and q be a preposition. The biconditional is the preposition
that is TRUE when p and q have the same truth values, and FALSE
otherwise.
Express: “ p if and only if q”
Eg: -You can take flight if and only if you buy a ticket.
-You can have dessert if and only if you finish your meal
The Truth Table for the Biconditional ( )
1.5CONDITIONAL STATEMENTS
1.5CONDITIONAL STATEMENTS
p q
T T T
T F F
F T F
F F T
p q

p q

p q

IMPLICATION:
Eg: “ If it is raining, then the home team wins”
CONVERSE : the converse of this implication is
Eg: If the home team wins, then it is raining
INVERSE: the inverse of this implication is
Eg : If it is not raining, then the home team does not win.
CONTRAPOSITIVE : the contrapositive of this implication
is
Eg : If the home team does not win, then it is not raining.
CONVERSE, INVERSE,
CONVERSE, INVERSE,
CONTRAPOSITIVE
CONTRAPOSITIVE
p q

q p

p q

q p
  
p q
 p q
  
p q

EXERCISE
EXERCISE
EXERCISE
EXERCISE
EXERCISE
EXERCISE
Logically Equivalent
Two propositions p and q are said to be logically equivalent,
or simply equivalent or equal, denoted by
if they have identical truth tables.
Example: Find the truth tables of
1.6 PROPOSITIONAL EQUIVALENCES
1.6 PROPOSITIONAL EQUIVALENCES
p q

( ) and p
p q q
    
p q p^q -(p^q) p q -p -q -p v -q
T T T F T T F F F
T F F T T F F T T
F T F T F T T F T
F F F T F F T T T
Tautology
 A compound proposition that is always TRUE, no matter what the truth
values of the propositions that occur in it.
 Contains only “T” in the last column of their truth table.
Contradiction
 A compound proposition that is always FALSE.
 Contains only “F” in the last column of their truth table.
1.6 PROPOSITIONAL EQUIVALENCES
1.6 PROPOSITIONAL EQUIVALENCES
(( ) ) ( ( ))
A B C A B C
    
Example:
1.6 PROPOSITIONAL EQUIVALENCES
1.6 PROPOSITIONAL EQUIVALENCES
T F T F
F T T F
p

p p p
  p p
 
Contingency
 A proposition that is neither a tautology nor a
contradiction
 A statement that can be either true or false

1.6 PROPOSITIONAL EQUIVALENCES
1.6 PROPOSITIONAL EQUIVALENCES
 
p q
  
THE END

Propositional logic 2 all about logics and gates

  • 1.
    PROPOSITIONAL LOGIC By Sir. Najam Mphil (Edu) BSHon M.A Edu M.Ed Special Educagion PGD (CS) CCNA MCSE Microsoft Certified system Engineer Mikrotik Certified System Engineer Email-ASSADCHADHAR@GMAIL.COM #-03127522112
  • 2.
    CHAPTER OUTLINE: 1.1 INTRODUCTION 1.2PROPOSITION 1.3 COMPOUND STATEMENT 1.4 FORMAL PROPOSITION 1.6 PROPOSITIONAL EQUIVALENCES 1.5 CONDITIONAL STATEMENT
  • 3.
    PROPOSITIONAL LOGIC PROPOSITIONAL LOGIC 1.1INTRODUCTION 1.1 INTRODUCTION  Logic – used to distinguish between valid and invalid mathematical arguments.  Logic was developed by Aristotle  Application in computer science – design computer circuits, construction of computer program, verification of the correctness of programs.  Logic is a system based on proposition
  • 4.
    1.2 PROPOSITION 1.2 PROPOSITION Proposition – is a declarative sentence either true or false, but not both.  Eg: 1) Tunku Abdul Rahman was the first prime minister of Malaysia - TRUE 2) 1 + 1 = 2 - TRUE 3) What time is it? NOT PROPOSITION 4) Read this carefully. NOT PROPOSITION 5) x + 1 = 2 – NOT PROPOSITION  Letters are used to denote propositions – p, q, r, s.
  • 5.
     Many mathematicalstatements are constructed by combining one or more propositions. Eg: John is smart or he studies every night.  One or more propositions can be combining to form a single compound proposition using connectives (logical operator) 1.3 COMPOUND STATEMENTS 1.3 COMPOUND STATEMENTS
  • 6.
    LOGICAL CONNECTIVES Connectives SymbolName And Conjunction Or Disjunction Not Negation   ,~ 
  • 7.
    TRUTH TABLE  Canbe used to show how logical operators can be combine propositions to compound propositions.  Displays the truth value that correspond to all possible value (2n ) of truth values for its component statement variables.  The truth value for proposition could be TRUE (T) or FALSE (F)
  • 8.
    1) Not (negation): ~ / Let p be a proposition. The negation of p is denoted by , and read as “not p”. -Eg: Find the negation of the proposition “Today is Friday”. The Truth Table for the Negation of a Proposition 1.4 FORMAL PROPOSITION 1.4 FORMAL PROPOSITION  p  p T F F T p 
  • 9.
    2) And (conjunction): Let p and q be propositions. The proposition of “p and q” - denoted , is TRUE when BOTH p and q are true and otherwise is FALSE. Eg: Student who have taken calculus and computer sciences can take this class. The Truth Table for the Conjunction of Two Propositions  p q  p q T T T T F F F T F F F F p q  1.4 FORMAL PROPOSITION 1.4 FORMAL PROPOSITION
  • 10.
    3) Or (disjunction): Let p and q be prepositions. The preposition of “p or q” - denoted , is FALSE when BOTH p and q are FALSE and TRUE otherwise. Eg: Student who have taken calculus or computer sciences can take this class. The Truth Table for the Disjunction of Two Prepositions p q T T T T F T F T T F F F  p q  p q  1.4 FORMAL PROPOSITION 1.4 FORMAL PROPOSITION
  • 11.
    EXAMPLE 1.1 EXAMPLE 1.1 Considerthe following statements, and determine whether it is true or false. 1)Ice floats in water and 2 + 2 = 4 2)China is in Europe and 2 + 2 = 4 3)5 – 3 = 1 or 2 x 2 = 4
  • 12.
     Let : Express these propositions using p, q, r, s and logical connectives.  Anwar is a good lecturer and his students not hate mathematics  Either Hidayah is a good lecturer or she is not  Anwar’s students both hate and do not hate mathematics  Either Anwar is a good lecturer, or his students hate mathematics and Hidayah is not a good lecturer  Anwar is good lecturer but his students hate mathematics  Neither Anwar nor Hidayah is a good lecturer p Anwar is a good lecturer q Hidayah is a good lecturer r Anwar’s student hate mathematics s Hidayah’s student hate mathematics EXAMPLE 1.2 EXAMPLE 1.2
  • 13.
    EXAMPLE 1.3 EXAMPLE 1.3 Letp and q be the following propositions: p = It is below freezing q = It is snowing Translate the following into logical notation, using p and q and logical connectives. (a)It is below freezing and snowing (b)It is below freezing but not snowing (c) It is not below freezing and it is not snowing (d)It is either snowing or below freezing (or both)
  • 14.
  • 15.
  • 16.
    1) Implication Let pand q be a proposition. The implication is the preposition that is FALSE when p is true, q is false. Otherwise is TRUE. p = hypothesis/antecedent/premise q = conclusion/consequence Express: “ if p, then q”, “q when p”, “p implies q” Eg: If you earn an A in logic then I will give you present. The Truth Table for the Implication ( ) 1.5 CONDITIONAL STATEMENTS 1.5 CONDITIONAL STATEMENTS p q T T T T F F F T T F F T p q  p q  p q 
  • 17.
    2) Equivalence/ Biconditional Letp and q be a preposition. The biconditional is the preposition that is TRUE when p and q have the same truth values, and FALSE otherwise. Express: “ p if and only if q” Eg: -You can take flight if and only if you buy a ticket. -You can have dessert if and only if you finish your meal The Truth Table for the Biconditional ( ) 1.5CONDITIONAL STATEMENTS 1.5CONDITIONAL STATEMENTS p q T T T T F F F T F F F T p q  p q  p q 
  • 18.
    IMPLICATION: Eg: “ Ifit is raining, then the home team wins” CONVERSE : the converse of this implication is Eg: If the home team wins, then it is raining INVERSE: the inverse of this implication is Eg : If it is not raining, then the home team does not win. CONTRAPOSITIVE : the contrapositive of this implication is Eg : If the home team does not win, then it is not raining. CONVERSE, INVERSE, CONVERSE, INVERSE, CONTRAPOSITIVE CONTRAPOSITIVE p q  q p  p q  q p    p q  p q    p q 
  • 20.
  • 21.
  • 22.
  • 23.
    Logically Equivalent Two propositionsp and q are said to be logically equivalent, or simply equivalent or equal, denoted by if they have identical truth tables. Example: Find the truth tables of 1.6 PROPOSITIONAL EQUIVALENCES 1.6 PROPOSITIONAL EQUIVALENCES p q  ( ) and p p q q      p q p^q -(p^q) p q -p -q -p v -q T T T F T T F F F T F F T T F F T T F T F T F T T F T F F F T F F T T T
  • 24.
    Tautology  A compoundproposition that is always TRUE, no matter what the truth values of the propositions that occur in it.  Contains only “T” in the last column of their truth table. Contradiction  A compound proposition that is always FALSE.  Contains only “F” in the last column of their truth table. 1.6 PROPOSITIONAL EQUIVALENCES 1.6 PROPOSITIONAL EQUIVALENCES (( ) ) ( ( )) A B C A B C     
  • 25.
    Example: 1.6 PROPOSITIONAL EQUIVALENCES 1.6PROPOSITIONAL EQUIVALENCES T F T F F T T F p  p p p   p p  
  • 26.
    Contingency  A propositionthat is neither a tautology nor a contradiction  A statement that can be either true or false  1.6 PROPOSITIONAL EQUIVALENCES 1.6 PROPOSITIONAL EQUIVALENCES   p q   
  • 27.