Mathematical Logics
Mathematical Logics
› The compound statement p ∧ q is true only when P & Q are both true
& for all other cases its false.
› TRUTH TABLE : p q p∧q
T T T
T F F
F T F
F F F
Disjunction (or) :
› The compound statement obtained by connecting two simple statements with the
connective “or" is called the disjunction of these simple statements.
Logically equivalent statements: If two statements S1 (p, q, r, ...) & S2 (p, q, r, ...) have the
same truth value for all possible truth values of the component statements, then they are said to be
logically equivalent statements.
S1 (p, q, r, ...) = S2 (p, q, r, ...)
Tautology & Contradiction
Tautology ( t ) Contradiction ( c ) :
› A statement which is always true is › A statement which is always false is
called tautology. called contradiction.
› It is denoted by "t" › It is denoted by "c"
› Truth value for tautology = “ T ” › Truth value for contradiction =“ F ”
› Laws › Laws
1. p ∨ t = t 1. p∨c=p
2. p∧t=p 2. p ∧ c = c
3. p ∨ (~p) = t 3. p ∧ (~p) = c
Conditional Statement (if… then ) :
A conditional statement is represented in the form of “if… then”.
• Let P and Q are the two statements, then statements P and Q can be written as
P → Q (P implies Q).
• A conditional statement is also called implication.
• Converse : The converse of a conditional statement is formed by swapping the antecedent
and the consequent. The converse of p → q is q → p
• Inverse : The inverse of a conditional statement is formed by negating both the antecedent and
the consequent . The inverse of p → q is: ~ p→ ~ q
• Contrapositive : The contrapositive of a conditional statement is formed by swapping and
negating both the antecedent and the consequent.
• The contrapositive of p → q is : ~ q→ ~ p
• The statement p → q is false if p is true, and q is false. Otherwise, p → q is true.
• TRUTH TABLE : p q p→q
T T T
T F F
F T T
F F T
Biconditional Statement ( if and only if) :
› A biconditional statement is represented in the form of “if and only if”.
› A biconditional statement is also called biimplication
› Let p and q are the two statements, then statements p & q can be written as
p ⇔ q (equivalence).
› p ⇔ q = (p→ q) ∨ (q → p)
› The state p ⇔ q is true if both p & q is either true or false together.
Otherwise, false. p q p⇔q
T T T
› TRUTH TABLE :
T F F
F T F
F F T
Truth Table Summary:
› Examples : 1. ( p ∧ q ) ∨ r
2. ( p ∧ ~ q ) ∨ (~ q ∧ r ) ∨ ( r ∧ ~
q)
Obtain the DNF of the form ( p → q ) ∧ (~p ∧ q )
Conjunctive Normal Form
› A statement form which consist of conjunction(∧)
between disjunction(∨) is called Conjunctive
Normal Form (CNF)
› Examples : 1. ( p ∧ q )
2. ( ~ p ∨ q ) ∧ (~ p ∨ r )
Obtain the CNF of the form ( p ∧ q ) ∨ (~p ∧ q ∧ r )
Obtain the DNF of the form p ∨ (~ p → (q ∨ (q →
~r )
•Sentence: If it rains, the ground will be wet.
Logic: p→q
(p: "It rains," q: "The ground will be wet.")