CSE 1201, Week#1, Lecture#2
CSE 1201, Week#1, Lecture#2
Discrete Mathematics
Lecture 2
Compound Propositions
Course Teacher:
2
Compound Proposition
New propositions formed from existing propositions using
logical operators are called compound propositions.
Example: (p∨¬q)→(p∧q)
Truth Tables of Compound Propositions
Example
Construct the truth table of the compound proposition
(p∨¬q)→(p∧q).
4
Boolean operators summary
and or xor conditional Bi-conditional
p q pq pq pq pq pq
T T T T F T T
T F F T T F F
F T F T T T F
F F F F F T T
4+3*2 = ?
4+3*2 = 4+(3*2)
4+3*2 = (4+3)*2
6
Precedence of operators
p q ¬r → s ↔ t = ?
Operato Preceden
rs ce
=(p (q (¬r)) → s) ↔ (t) ¬ 1
2
First three are the most
3
important
Not is always performed → 4
before any other ↔ 5
operation
Logic and Bit Operations
8
Applications of Propositional Logic
9
Translating English Sentences
Example
p = “It is below freezing”
q = “It is snowing”
It is below freezing and it is snowing pq
It is below freezing but not snowing p¬q
Solve:
Let, a = “You can access the Internet from campus,”
c = “You are a computer science major,” and
f = “You are a freshman,”
11
Translating English Sentences
Problem: 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.”
Solve:
Let, a = “You can access the Internet from campus,”
c = “You are a computer science major,” and
f = “You are a freshman,”
12
Translating English Sentences
How can this English sentence be translated into a logical
expression?
“You can not ride the roller coaster if you are under 4 feet tall
unless you are older than 16 years old.”
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. Then the sentence can be translated to (r
∧ ¬s) → ¬q.
13
Propositional Equivalences
Compound Propositions
New propositions formed from existing propositions using
logical operators are called compound propositions.
15
Some Common Terms
Tautology
A compound proposition that is always true, no matter what the
truth values of the propositional variables that occur in it, is called a
tautology.
Contradiction
A compound proposition that is always false is called a
contradiction.
Contingency
A compound proposition that is neither a tautology nor a
contradiction is called a contingency.
16
Example
Tautology
p ¬p
Contradiction
p ¬p
Contingency
p ¬p
17
Tautology
Demonstrate that
[¬p (p q )]q
is a tautology in two ways:
1. Using a truth table – show that [¬p (p q )]q is always
true
2. Using a proof (will get to this later).
18
Tautology by truth table
T T
T F
F T
F F
L3 19
Tautology by truth table
T T F
T F F
F T T
F F T
L3 20
Tautology by truth table
T T F T
T F F T
F T T T
F F T F
L3 21
Tautology by truth table
T T F T F
T F F T F
F T T T T
F F T F F
L3 22
Tautology by truth table
T T F T F T
T F F T F T
F T T T T T
F F T F F T
L3 23
END
Stay Home
Stay Safe