Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

Lecture Week 2 -Propositional Logic

Uploaded by

ankit giri
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lecture Week 2 -Propositional Logic

Uploaded by

ankit giri
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 38

Propositional Logic

Logic and Problem solving


MA4001
Lecture 2

Propositional Logic

1
Agenda
 Review of week 1
 Week 2 lecture coverage
• Logical equivalence , Tautology and contradiction
• Basic laws of propositional logic
• Conditional and biconditional
• Inverse converse and contra positive
• Logical consequences
• Arguments and its validity

2
Fast Math Tricks….

3
Math Tricks….
Review of Week 1
Question:
Write the truth table for the followings :
a. (p ∧ q) ∨  r
b. ¬ p ∧ q
c. p ∧ (false ∧  q)

5
Google Classroom
• Your Google class room code for Logic & Problem solving
module is

xzgjzs
Logged in to classroom.google.com and get your lecture
slides and others materials .
Any Questions?

7
LOGICAL EQUIVALENCE:
Two compound propositions P (p, q, r, … )and Q (p, q, r, .. )
are said to be logically equivalent (or simply equivalent) if
the last column of their truth tables are identical.
We write P ≡ Q in this case.
Example:
Show that p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
For simplicity we construct their truth tables in a single
diagram.
p q r (q ∨ r) p ∧ (q ∨ r) (p ∧ q) (p ∧ r) (p ∧ q) ∨ (p ∧ r)

T T T T T T T T
T T F T T T F T
T F T T T F T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
Tautology:
A proposition P(p, q, r, … ) is called a tautology if every
entry in the last column of its truth table is T.

We represent any tautology by TRUE.


Tautology (Contd.):
Consider the proposition (p ∨ q) ∨ ¬(p ∧ q).
p q (p ∨ q) (p ∧ q) ¬(p ∧ q) (p ∨ q) ∨ ¬(p ∧ q)
T T T T F T
T F T F T T
F T T F T T
F F F F T T

Here, every entry in the last column is T. This means the


proposition evaluates to true for all possible
combinations of Truth values of its component
propositions.
Hence, the above proposition is Tautology.
Contradiction:
A proposition P(p, q, r, … ) is called a contradiction if every
entry in the last column of its truth table is F.

We represent any contradiction by FALSE.


Contradiction (Contd.):
Consider the proposition (p ∧ q) ∧ ¬(p ∧ q).

p q (p ∧ q) ¬(p ∧ q) (p ∧ q) ∧ ¬(p ∧ q)
T T T F F
T F F T F
F T F T F
F F F T F

Here, every entry in the last column is F.


This means the proposition evaluates to false for all
possible combinations of Truth values of its component
propositions.
Hence, the above proposition is Contradiction.
Any Questions?

14
Five Basic Laws of Propositional Logic:

1.p  q  q  p
Commutative laws
pqqp

2.(p  q)  r  p  (q  r) Associative
(p  q)  r  p  (q  r) Laws

3.p  (q  r)  (p  q)  (p  r) Distributive
p  (q  r)  (p  q)  (p  r) Laws

4.p  FALSE  p Identity Laws


p  TRUE  p

5.p  p  TRUE Complement


p  p  FALSE Law
Six More Laws:
FALSE  TRUE
6. Negation Laws
TRUE  FALSE
ppp
7. Idempotent Laws
ppp
p  TRUE  TRUE
8. Domination Laws
p  FALSE  FALSE
p  (p  q)  p
9. Absorption Laws
p  (p  q)  p
10. p)  p Double Negation Law
(p  q)  p  q
11. De Morgan’s Law
(p  q)  p  q
Example:
Prove Idempotent law, p ∨ p ≡ p

p  p  (p  p)  TRUE (Law 4)
 (p  p)  (p  p) (Law 5)
 p  (p  p) (Law 3)
 p  FALSE (Law 5)
p (Law 4)
Example:
Example:
The Conditional of two proposition (→):
P implies Q or equivalently P → Q is true unless P is true
and Q is false.
In another words,
If P and Q are two propositions, P → Q is false if
P(hypothesis) is true and Q(conclusion) is false.

p q p→q

T T T
T F F
F T T
F F T
The inverse of p → q:
For any two propositions p and q the conditional p →  q
is called the inverse of p → q.
The truth table for p → q is shown below together with
that for p → q for comparison.

p q p  q p→q p→q

T T F F T T
T . F F T F T
F T T F T F
F F T T T T
The converse of p → q:
For any two propositions p and q the conditional q → p is
called the converse of p → q.
The truth table for q → p is shown below together with
that for p → q for comparison.

Columns 2 and 3 of the two tables differ so q → p ≢ p → q.


This means, of course, that the connective → is not
commutative.
The contrapositive of p → q:
Consider the following example:
The truth table for q → p is shown below together with
that for p → q for comparison.
p  q  p  q (Example)
 q  p (Commutative Law)
 (q)  p (Double Negation Law)
 q  p (Example)
Consequently ¬q → ¬p ≡ p → q.
The proposition ¬q → ¬p is called the contrapositive of
p → q. It is equivalent to p → q.
The contrapositive of p → q:
For any two propositions p and q the conditional
q → p is called the contrapositive of p → q.
The truth table for q → p is shown below together
with that for p → q for comparison.
p q p q p→q q→p

T T F F T T

T F F T F F
.

F T T F T T

F F T T T T
The Bi-conditional of Two Propositions:
If propositions p and q are combined in the form “p if and
only if q” the resulting proposition is called the bi-
conditional of p and q, or simply the bi-conditional.
The logical connective is the “if and only if ” connective
with symbol ↔.
The proposition p ↔ q is really shorthand for
(p → q) ∧(q → p)
The Bi-conditional of Two Propositions
(Contd.):
We can construct its truth table as below
p q pq qp (p  q)  (q  p)
T T T T T
T F F T F
F T T F F
F F T T T

We conclude that the truth table for p ↔ q is


p q pq
T T T
T F F
F T F
F F T
Question
Find the truth table for p  (q  r)
p q r qr p  (q  r)
T T T T T
T T F F F
T F T F F
T F F T T
F T T T T
F T F F T
F F T F T
F F F T T
Logical Consequence:
Definition:

If P1, P2, …, Pn and Q are compound propositions and Q is


true whenever all the propositions P1, P2, …, Pn are true we
say Q is a Logical Consequence of P1, P2, …, Pn.

We write P1, P2, …, Pn Q


Logical Consequence (Contd.):
Consider the following example:
Notice that whenever both p  q and q  p are true (i.e.
in lines 1 and 2) p  q is also true
We say p  q is a Logical Consequence of the two
propositions p  q and p  q and we write
p  q, p  q ├ p  q

p q p  q q  p pq
T T T T T
T F T T T
F T T F T
F F F T F
Logical Consequence (Contd.):
Show that p  q, q  r ├ p  r
The truth tables for p  q, q  r and p  r are as below:

We see that both p  q and q  r are true in lines 1, 5,


7 and 8. In all cases p  r is true also.
 p  q, q  r ├ p  r
ARGUMENTS:
An argument is a relationship between a set of P1, P2, …, Pn
propositions, P1, P2, …, Pn, called premises, and another
proposition Q, called the conclusion. An argument is
denoted by P1, P2, …, Pn ├ Q

An argument P1, P2, …, Pn ├ Q is said to be valid iff


(P1  P2  …  Pn)  Q is a tautology.
ARGUMENTS EXERCISES:
Question :
Determine the validity of the following argument.
p → q, q → r ├ p → r
Solution,
In order to show that the above argument is valid ,we
need to show that X = [ (p → q) (q → r )] (p → r) is a
Tautology.
ARGUMENTS EXERCISES:
Truth Table :
p q r pq q r (p  q) p r X

(q r)

T T T T T T T T
T T F T F F F T
T F T F T F T T
T F F F T F F T
F T T T T T T T
F T F T F F T T
F F T T T T T T
F F F T T T T T

Here from the truth table its proved that X = [ (p → q) (q → r )]
(p → r) is a Tautology. Hence the given argument is valid.
Questions:
Determine the validity of the following arguments:
1. p v q , p ├ q
2. p → q , q → r , r ├ p
3. If you do not study you will fail your examination. You
failed therefore you did not study.
4. If I am not in Malaysia, then I am not happy; if I am
happy, then I am singing; I am into singing; therefore, I
am not in Malaysia.
Any Questions?

35
Summary: Week 1 and 2 Lecture
• Logic and proposition
• Logical Connectives
• Truth tables
• Tautology and contradiction
• Logical equivalence
• Logical consequences
• Argument and its validity

36
What to Expect: Week 2 Tutorials

• Review and practice Logic problems through in-class


assignments to actually acquire them.
• Practice problems to know how Propositional logic can
be useful in solving various mathematical problems.

37
Thank you

You might also like