1.1 Propositional Logic Discreate Structures
1.1 Propositional Logic Discreate Structures
Proposition
A Proposition or a statement or logical sentence is a declarative sentence which is either true or
false.
o It rained Yesterday.
o If x is an integer, then x2 is a +ve integer.
o “Morre has an Apple laptop.”
o “chris is a professor.”
o “3 = 2 + 1”
o “3 = 2 + 2”
LOGICAL OPERATOR:
A “not” operation switches (negates) the truth value
^ Symbol: or ~
p p
^ p = “Today is not Friday”
T F
F T
Compound Statements
~ Not Negation
∧ And Conjunction
∨ Or Disjunction
Conjunction: It means Anding of two statements. If p, q are two statements, then "p and q" is a
compound statement, denoted by p ∧ q and referred as the conjunction of p and q. The
conjunction of p and q is true only when both p and q are true. Otherwise, it is false.
p Q p∧q
T T T
T F F
F T F
F F F
Disjunction: It means Oring of two statements. If p, q are two statements, then "p or q" is a
compound statement, denoted by p ∨ q and referred to as the disjunction of p and q. The
disjunction of p and q is true whenever at least one of the two statements is true, and it is false
only when both p and q are false.
p q p∨q
T T T
T F T
F T T
F F F
Implication / if-then (⟶): An implication p⟶q is the proposition "if p, then q." It is false if p is
true and q is false. The rest cases are true.
p q p⟶q
T T T
T F F
F T T
F F T
If and Only If (↔): p ↔ q is bi-conditional logical connective which is true when p and q are
same, i.e., both are false or both are true.
p q p↔q
T T T
T F F
F T F
F F T
DERIVED CONNECTORS:
NAND: It means negation after ANDing of two statements. Assume p and q be two
propositions. Nanding of pand q to be a proposition which is false when both p and q are true,
otherwise true. It is denoted by p ↑ q.
p q p↑q
T T F
T F T
F T T
F F T
NOR or Joint Denial: It means negation after ORing of two statements. Assume p and q be two
propositions. NORing of p and q to be a proposition which is true when both p and q are false,
otherwise false. It is denoted by p ↓ q.
P q p↓q
T T F
T F F
F T F
F F T
XOR: Assume p and q be two propositions. XORing of p and q is true if p is true or q is true but
not both and vice-versa. It is denoted by p ⨁ q.
p q p⨁q
T T F
T F T
F T T
F F F
PROVE:
T T F F F F F F
T F T T F T F T
F T T F T F T T
F F F T T F F F
T T F F F F
T F T F T T
F T T F T T
F F F T T T
Conditional and Bi-Conditional Statements
Conditional Statement
Let p and q are two statements then "if p then q" is a compound statement, denoted by p→ q
and referred as a conditional statement, or implication. The implication p→ q is false only when
p is true, and q is false; otherwise, it is always true. In this implication, p is called the hypothesis
(or antecedent) and q is called the conclusion (or consequent).
p q p→q
T T T
T F F
F T T
F F T
1. If a = b and b = c, then a = c.
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
As, the values in both cases are same, hence both propositions are equivalent.
Example2: Show that proposition q→p, and ~p→~q is not equivalent to p →q.
Solution: Construct the truth table for all the above propositions:
p q ~p ~q p →q q→p ~p→~q
T T F F T T T
T F F T F T T
F T T F T F F
F F T T T T T
As, the values of p →q in a table is not equal to q→p and ~p→~q as in fig. So both of them are
not equal to p →q, but they are themselves logically equivalent.
BiConditional Statement
If p and q are two statements then "p if and only if q" is a compound statement, denoted as p
↔ q and referred as a biconditional statement or an equivalence. The equivalence p ↔ q is
true only when both p and q are true or when both p and q are false.
p q p↔q
T T T
T F F
F T F
F F T
Example: Prove that p ↔ q is equivalent to (p →q) ∧(q→p).
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
Since, the truth tables are the same, hence they are logically equivalent. Hence Proved.
Principle of Duality
Two formulas A1 and A2 are said to be duals of each other if either one can be obtained from
the other by replacing ∧ (AND) by ∨ (OR) by ∧ (AND). Also if the formula contains T (True) or F
(False), then we replace T by F and F by T to obtain the dual.
Two propositions are said to be logically equivalent if they have exactly the same truth values
under all circumstances.
T T F F F T F
T F F T T F T
F T T F T F T
F F T T T F T
A proposition P is a tautology if it is true under all circumstances. It means it contains the only T
in the final column of its truth table.
T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T
Contradiction:
Solution:
p ∼p p ∧∼p
T F F
F T F
A statement that can be either true or false depending on the truth values of its variables is
called a contingency.
T T T T T
T F F F T
F T T F F
F F T F F
Predicate Logic
Predicate Logic deals with predicates, which are propositions, consist of variables.
Quantifier:
The variable of predicates is quantified by quantifiers. There are two types of quantifier in
predicate logic - Existential Quantifier and Universal Quantifier.