Unit 1
Unit 1
Propositional Logic
Snehal Kamalapur
Department of Computer Engineering
K K Wagh Institute of Engineering Education and Research ,
Nashik
Introduction
1. Nashik is in Maharashtra(Primitive)
2. 1 + 1 = 2(Primitive)
3. Where are you going?(not a proposition)
4.Roses are Red and violets are
blue(Compound)
5. John is intelligent and studies every night
(Compound)
Exercises
This table has a row for each of the four possible combinations
of truth values of p and q
▪ Note that in logic the word “but” sometimes is
used instead of “and” in a conjunction.
▪ For example, the statement “The sun is
shining, but it is raining” is another way of
saying “The sun is shining and it is raining.”
Example
▪ Find the conjunction of the propositions p and q
where p is the proposition “Riya’s PC has more
than 16 GB free hard disk space” and q is the
proposition “The processor in Riya’s PC runs
faster than 1 GHz.”
Example
▪ Find the conjunction of the propositions p and q
where p is the proposition “Riya’s PC has more
than 16 GB free hard disk space” and q is the
proposition “The processor in Riya’s PC runs
faster than 1 GHz.”
▪ Solution: The conjunction of these propositions, p
∧ q, is the proposition “Riya’s PC has more than
16 GB free hard disk space, and the processor in
Riya’s PC runs faster than 1 GHz.”
This conjunction can be expressed more simply as
“Riya’s PC has more than 16 GB free hard disk
space, and its processor runs faster than 1 GHz.”
For this conjunction to be true, both conditions
given must be true. It is false, when one or both of
these conditions are false
DEFINITION: Disjunction
1) Paris is in France
Negation is: It is not the case that Paris is in
France
Paris is not in France
2) 2+2=5
Negation is: It is not the case that 2+2=5
2+2 ≠ 5
Exercise
Symbolic representation is :
1. (~ P) ^ q → r
2. r → (p v q)
3. (~r) → ~q v p
Example
▪ Use
p: Today is Monday
q: The grass is wet
r: The dish ran away with the spoon
Write an English sentence that corresponds to
each of the following
1. ~r ^ q
2. ~q v r
3. ~( p v q)
4. P V ~r
What is the value of the variable x after the
statement
if 2 + 2 = 4 then x := x + 1
DEFINITION:BICONDITIONALS
T T F T T T
T F T T F F
F T F F F T
F F T T F F
Truth Tables of Compound Propositions
p ¬p P ∨ ¬p
T F T
F T T
Tautologies and Contradictions
p ¬p P ^ ¬p
T F F
F T F
Tautologies and Contradictions
p ¬p P ∨ ¬p
T F T
F T T
p ¬p P ^ ¬p
T F F
F T F
Example
p q p∧ ¬(p ∧ q ) p q ¬p ¬q ¬p v ¬q
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