Professional Documents
Culture Documents
Logic & Propositiona L Equivalence: Pertemuan-2 Matematika Diskrit A (Discrete Mathematics)
Logic & Propositiona L Equivalence: Pertemuan-2 Matematika Diskrit A (Discrete Mathematics)
MATEMATIKA
DISKRIT A
(DISCRETE
MATHEMATICS )
LOGIC &
PROPOSITIONA
L
EQUIVALENCE
Not propositions:
“is Cameron Diaz a Prime Minister?”->kalimat tanya
“x = 7”->pernyataan tidak pasti
“I am good student”->pernyataan tidak pasti
“Help me doing this homework”->kalimat perintah
Proposition (cont.)
IMPORTANT !!!
• Logical constants (True and False)
• Propositional symbols/ Variables ( P or Q)
• Logical connectives/ Operator
Propositional Variables
We use propositional variables to refer to
propositions
Usually are lower case letters starting with p (i.e.
p, q, r, s, etc.)
A propositional variable can have one of two
values: true (T) or false (F)
p p
T F
F T
Logical Operator: And
An “and” operation is true if both operands
are true
Symbol:
pq = “Today is Aug, 22 and
today is thurday” p q pq
T T T
T F F
F T F
F F F
Logical Operator: Or
An “or” operation is true if either operands or
both are true
Symbol:
pq = “Today is Aug, 22 or
p q pq
today is Thursday (or T T T
possibly both)”
T F T
F T T
F F F
Logical Operator: XOR
An “xor” operation is true when exactly one
of p and q is true, and false otherwise.
Symbol: p q
p q = “Either today is
p q p q
Aug, 22 or today is T T F
thursday (not both)” T F T
F T T
F F F
Logical Operator: XOR (cont)
When two simple propositions are combined using
‘or’, context will often provide the clue as to whether
the inclusive or exclusive
sense is intended.
For instance, ‘Tomorrow I will go swimming or play
golf’ seems to suggest that I will not do both in the
same time and therefore points
to an exclusive interpretation.
Logical Operator: Conditional
A conditional means “if p then q”
Symbol:
pq = “If today is Sep, 24, 2020, then today
is thursday”
p→q=¬pq p q pq
T T T
Antecedent/ Consequence/ T F F
hypothesis/ conclusion
premise F T T
F F T
Logical Operator: Conditional (cont)
Let p = “saya dapat nilai A pada Matdis” and
q = “saya akan puasa”
I state: p q = “Jika saya dapat nilai A pada Matdis, saya
akan puasa”
Note that if p is false, then the conditional is true
regardless of whether q is true or false
Jika saya dapat nilai A, maka saya tidak puasa -> salah
Jika saya tidak dapat nilai A, maka saya puasa -> benar
Jika saya tidak dapat nilai A, maka saya tidak puasa -> benar
Logical Operator: Conditional (cont)
Alternate ways of stating a conditional:
p implies q
If p, q
p only if q
p is sufficient for q
q if p
q whenever p
q is necessary for p
Logical Operator: Conditional (cont)
Ms. Word adalah syarat cukup bagi Windows,
sedangkan Windows adalah syarat perlu bagi Ms. Word
Ms. Word tidak dapat digunakan tanpa Windows
tetapi Windows dapat digunakan tanpa Ms. Word
Logical Operator: Conditional (cont)
Propositions Conditional Inverse Converse Contrapositive
p q p q pq pq qp qp
T T F F T T T T
T F F T F T T F
F T T F T F F T
F F T T T T T T
¬p¬q
Translating English Sentences
You can access the Internet from campus only if you are a
computer science major or you are not a freshman.
a (c f)
pTT p (q r) (p q) (p r)
Domination Law Distributive laws
pFF p (q r) (p q) (p r)
ppp Idempotent Laws
(p q) p q De Morgan’s laws
ppp (p q) p q
Double negation p (p q) p
( p) p
law
p (p q) p
Absorption laws
Negation laws
pqqp Commutative ppT
Laws
pqqp ppF
Implication p q (p q) (q p) Biconditional
Definition of
pq pq
Definition of
33 -- KS091201 MD W-02
(p r) (q r) (p q) r
( p r) ( q r) Definition of implication
prqr Associative
pqrr Commutative
( p q) (r r) Associative
(p q) r De Morgan, Idempotent
(p q) r Definition of implication
34 -- KS091201 MD W-02