Applications of Propositional Logic
Applications of Propositional Logic
System Specifications
Boolean Searches
Logic Circuits
Learning Objective
2
Translating English Sentences
3
Translating English Sentences (Examples)
EXAMPLE 1 How can this English sentence be translated into a logical
expression? “ You can access the internet from campus only
if you are a computer science major or you are not a freshman.”
Solution
Let 𝒂 represent “You can access the Internet from campus”.
Let 𝒄 represent “You are a computer science major”.
Let 𝒇 represent “You are a freshman”.
𝑎 → (𝑐 ∨ ¬𝑓) .
P only if q p q
4
Translating English Sentences (Examples)
Solution Let q, r and s represent “ You can ride the roller coaster ,” “ you
are under 4 feet tall”, and “ you are older than 16 years old ,”
respectively .
The sentence can be translated to
(𝑟 ¬𝑠) → ¬𝑞.
5
System Specifications
6
Boolean Searches (Web Page Searching)
7
Logic Circuits
8
Basic Logic Gates
p ¬p
The inverter, or NOT gate
p 𝑝∨ q
The OR gate q
p p∧q
The AND gate q
9
Propositional Equivalences
¬(𝑝 ∧ 𝑞) ≡ ¬𝑝 ∨ ¬𝑞
De Morgan’s Laws
¬(𝑝 ∨ 𝑞) ≡ ¬𝑝 ∧ ¬𝑞
10
Propositional Equivalences
A compound proposition that is always true, no matter
Tautology/ what the truth values of the propositional variables that occur in it,
Contradiction
is called a tautology. A compound proposition that is always false
is called a contradiction.
¬ 𝑝 → 𝑞 ≡ ¬ ¬𝑝 ∨ 𝑞
Example
≡ ¬(¬𝑝) ∧ ¬𝑞
≡ 𝑝 ∧ ¬𝑞 .
12
Summary
Boolean searches
Propositional equivalences
13
𝑝
q
𝑟
Answer: TRUE
14
Predicates and Nested Quantifiers
15