You are on page 1of 6

CSC510 Lecture Slides 14/09/2017

Proposition
 Statement or expression that is either true or false,
but not both (e.g. Russel’s paradox)
Propositional Logic  An atomic proposition is represented by a single
propositional (boolean) variable that can take one of
the two constant values, i.e., true (1) or false (0)
 Compound proposition (boolean expression) =
Atomic propositions (boolean variable) + Logical
operators (connectives)
Muthukkaruppan Annamalai  Operators in the order of precedence: negation (¬),
mk@tmsk.uitm.edu.my conjunction (⋀), disjunction (⋁), conditonal/
implication (), biconditional/ equivalence ()
What is the truth values of ¬P, (P⋀Q) and (P⋁Q)?
14/9/2017 mk 2

Logical Expressions
Form vs. Content
There is a man barber who shaves all men  Logic focuses on the form (relationship among
in the village who do not shave propositions), and
themselves.  NOT on the semantics (content of a proposition)
e.g.
Does the barber shave himself? The cow jumped over the moon and the little dog
laughed to see such sport

14/9/2017 mk 3 14/9/2017 mk 4

mk 1
CSC510 Lecture Slides 14/09/2017

With the aid of truth table check if the pairs


Tautology and Contradiction of logical expressions are equivalent
 A truth table helps to indicate the truth values of a
compound proposition under all possible 1. ¬ (P  Q), P  ¬ Q
assignments
 A tautology is a proposition that is always true
2. (P  Q)  R, P  (Q  R)
 A contradiction is a proposition that is always false
 A contingent is a proposition that is true on some
assignments of truth values, false on others 3. P  Q, ¬ Q  ¬ P
 Two expressions are logically equivalent, if and only
if they have identical truth table

14/9/2017 mk 5 14/9/2017 mk 6

Represent the propositions as logical


Write the logical expressions in English
expressions
Let P: Today is Monday, Q: It is raining, R: It is hot Let P: There is a sea wave, Q: It is raining

1. ¬PQR 1. There is sea wave and it is not raining

2. ¬ P  (Q  R) 2. Either there is sea wave or it is raining

3. ¬ (P  Q)  R 3. Either there is sea wave or it is raining, but


there is no sea wave
4. ¬QR
4. There is sea wave while it is raining
14/9/2017 mk 7 14/9/2017 mk 8

mk 2
CSC510 Lecture Slides 14/09/2017

Exclusive- and Inclusive- OR Conditional and Contrapositive


 Conditional P  Q denotes “if hypothesis P is true then
 NL ~ OR refers to Exclusive-OR conclusion Q is true”; and so, P  Q is false when P is
true but Q is false
 The contrapositive of conditional P  Q is ¬Q  ¬P
 Logic ~ OR refers to Inclusive-OR (),
unless stated explicitly as EITHER… OR  Contrapositive ¬Q  ¬P denotes “if Q is false then P is
false”; and so, ¬Q  ¬P is false when ¬Q is true but ¬P
refers to Exclusive-OR () is false or Q is false but P is true
 Conditional P  Q emphasises the hypothesis P, i.e.,
“if P then Q”
 Contrapositive ¬Q  ¬P emphasises the conclusion Q,
i.e., “P, only if Q”
14/9/2017 mk 9 14/9/2017 mk 10

Write the logical expression for the


Variants of Conditional Statements
following propositions
 Conditional PQ
1. If I attend the party then I have an invitation  Contrapositive ¬Q  ¬P
 Converse QP
2. I will attend the party if I have an invitation
 Inverse ¬P  ¬Q
3. I will attend the party only if l have an invitation Draw the truth table for each of the above statements
Note: A conditional statement is logically equivalent to its
contrapositive and a converse statement is logically
equivalent to an inverse statement
14/9/2017 mk 11 14/9/2017 mk 12

mk 3
CSC510 Lecture Slides 14/09/2017

Sufficient and Necessary Translating NL Sentences to


Conditions Logical Form
 Conditional P  Q reads “if P then Q” and denotes P is P⋀Q PQ
a sufficient condition for Q
 Conditional ¬Q  ¬P reads “if not Q then not P” (P, only P and Q if P then Q
if Q) and denotes Q is a necessary condition for P P yet Q when P, Q
P but Q P is sufficient condition for Q
 Since a conditional P  Q is logically equivalent to its P while Q Q if P
contrapositive ¬Q  ¬P, we can say that if P is a P whereas Q Q is necessary condition for P
sufficient condition for Q, then Q is a necessary P even though Q Q provided P
condition for P P Q PQ Q assuming P
0 0 1 Q is a necessary condition for P
Q on condition P
0 1 1 ¬Q  ¬P P only if Q
1 0 0
P is a sufficient condition for Q P only on condition that Q
PQ 1 1 1
14/9/2017 mk 13 14/9/2017 mk 14

Formally express the following phrases Bi-conditional


1. P if Q  Bi-conditional P  Q ≡ (P  Q) ⋀ (Q  P)

2. P only when Q  Bi-conditional is the Conditional and its Converse


form

3. P unless Q  Bi-conditional P  Q denotes P is both necessary


(Q  P) and sufficient (P  Q) conditions for Q

4. P, coincidentally Q  Bi-conditional P  Q is read P if Q (Q  P) and


P only if Q (¬Q  ¬P ≡ P  Q),
5. Neither P nor Q i.e., “P, if and only if, Q”, or in short P iff Q
14/9/2017 mk 15 14/9/2017 mk 16

mk 4
CSC510 Lecture Slides 14/09/2017

Propositional Logic
 In a conditional P  Q the sufficient condition is the  also known as Boolean Algebra
ENABLING condition; the necessary condition indicates  has a set of proposition symbols,
the REQUIREMENTS  connected with binary (⋀, ⋁ , → , ↔) and unary (¬)
 Having a ticket ENABLES a patron to walk into a show, while operators, and
walking into a show REQUIRES the patron to have a ticket.
 has two distinct outcome values: true (1) and false (0)
 Having a ticket is a sufficient condition, and walking into a show
is a necessary condition.  such that, the set of proposition symbols (e.g. P,
Q and R) abide by laws of Boolean Algebra (or
 A bi-conditional P  Q is true if both P and Q have the
axioms), whose values can be deduced based
same truth values and is false if P and Q have opposite
truth values on inferencing rules

14/9/2017 mk 17 14/9/2017 mk 18

Simplify the following expressions


Laws of Boolean Algebra using the basic connectives
P ⋁ ¬P ≡ 1 (P ⋁ Q) ⋁ R ≡ P ⋁ (Q ⋁ R)

P ⋀ ¬P ≡ 0

(P ⋀ Q) ⋀ R ≡ P ⋀ (Q ⋀ R)
1. ¬ (P  Q)
Negation laws Association laws

P⋁0≡P P⋀0=0

P⋀1≡P P⋁1=1
 (P ⋁ Q) ⋀ (P ⋁ R) ≡ P ⋁ (Q ⋀ R) 2. PQR
Identity laws Universal bound laws (P ⋀ Q) ⋁ (P ⋀ R) ≡ P ⋀ (Q ⋁ R)
P⋁P≡P

P⋀P≡P  ¬ (P ⋀ Q) ≡ ¬P ⋁ ¬Q
Distributive laws
3. P¬QR
Idempotent laws ¬ (P ⋁ Q) ≡ ¬P ⋀ ¬Q
 ¬ (¬P) ≡ P
Double-negation law
 P  Q ≡ ¬P ⋁ Q
De Morgan’s laws
4. PQR
P⋁Q≡Q⋁P
PQR

 P  Q ≡ (P  Q) ⋀ (Q  P) 5.
P⋀Q≡Q⋀P
Commutative laws

14/9/2017 mk 19 14/9/2017 mk 20

mk 5
CSC510 Lecture Slides 14/09/2017

Using logical axioms check whether the


pairs of expressions are equivalent Reference
1. P  ¬Q, ¬ P  Q  Wikipedia: Logical Connectives
2. P  ¬Q, ¬ (¬ P  Q)
3. P  (Q  R), P  Q  P  R
4. (P  Q)  (Q  R), P  R
5. P  Q, ¬ Q  ¬ P

14/9/2017 mk 21 14/9/2017 mk 22

mk 6

You might also like