Lecture No. 3
Lecture No. 3
SEDS 116
1
Double Negative Property ~(~p)
p
Example
“It is not true that I am not
happy”
Solution:
Let p = “I am happy”
then ~ p = “I am not happy
”
and ~(~ p) = “It is not true that I
am not happy”
Since ~ (~p) p
Hence the given statement is
equivalent to:
Spring 20234 “I am happy”
SEDS 116 - Discrete Structures 2
~ (pq) and ~p ~q are not logically
equivalent
3
DE MORGAN’S LAWS
4
DE MORGAN’S LAWS
5
Example:
Give negations for each of the following
statements:
a.The fan is slow or it is very hot.
Solution
a. The fan is not slow and it is not very hot.
b. Akram is not unfit or Saleem is not
injured. 6
Precedence of Logical
Operators
p ∧ q ∨ r means (p ∧ q) ∨ r
rather than p ∧ (q ∨ r).
p ∨ q → r is the same as
(p ∨ q) → r.
7
Truth Tables of
Compound Propositions
Construct the truth table of the compound
proposition
(p ∨ ¬ q) → (p ∧ q).
Two positional variables p , q
Number of rows: 2n
8
Logic and Bit
Operations
9
Spring 2024 SEDS 116 - Discrete Structures 10
Propositional
Equivalences
TAUTOLOGY:
A tautology is a statement form
– that is always true regardless of the truth
values of the statement variables.
A tautology is represented by the symbol
“T”..
11
CONTRADICTION:
A contradiction is a statement form that is
always false regardless of the truth
values of the statement variables.
A contradiction is represented by the
symbol “c”.
12
Tautologies and
Contradictions
A tautology is a statement that is always true.
Examples:
– R(R)
(PQ) (P)( Q)
A contradiction is a statement that is always false.
Examples:
– R(R)
((P Q) (P) (Q))
The negation of any tautology is a contradiction,
and the negation of any contradiction is a
tautology.
16
APPLYING LAWS OF
LOGIC
17
APPLYING LAWS OF LOGIC
SIMPLIFYING A STATEMENT:
18
APPLYING LAWS OF LOGIC
SIMPLIFYING A STATEMENT:
19
EXERCISE
Use Logical Equivalence to rewrite each of the following
sentences more simply.
1. It is not true that I am tired and you are smart.
{I am not tired or you are not smart.}
2. It is not true that I am tired or you are smart.
{I am not tired and you are not smart.}
3. I forgot my pen or my bag and I forgot my pen or
my glasses.
{I forgot my pen or I forgot my bag and glasses.
4. It is raining and I have forgotten my umbrella, or
it is raining and I have forgotten my hat.
{It is raining and I have forgotten my umbrella or my
hat.}
20
Exercises
• Show that P Q P Q: by truth table
• Show that (P Q) (P R) P (Q R):
by equivalence laws (q20, p27):
– Law with implication on both sides
– Distribution law on LHS
SECourse(SEDS116) = T
SECourse(MATH155) = F
How do we say
All humans are mortal
One SE course
Spring 2024 SEDS 116 - Discrete Structures 25