Logic
Logic
T F T
Eg.:. p: The computer is good. q: The computer is cheap.
F T T p: It is cold. q: It is raining
F F F
Conditional proposition: If p and q are proposition then “if p then q” denoted by
pq
F F T
correct answer or all possible sets of input data.
Logical Equivalence: If two propositions P (p, q, r…….) and Q(p, q, r…..) have the
same truth values in every possible case or p q is a tautology, then the
propositions are called logically equivalent and denoted by P Q
Q. Use truth table to show that ~ p q p ~ q ~ p q
Solution.
p q pq ~ p q ~p ~q p ~ q ~ p q ab
(a) (b)
T T T F F F F F F
T F F T F T T F T
F T F T T F F T T
F F T F T T F F F
Since the truth value of both the propositions are same in each case,
therefore the given propositions are equivalent.
Q. Prove that the given proposition is Tautology: p q p r q r r
Solution:
T T F T F F F F T
T F T F T T F F T
F T T F T T F F T
T F F F F T F F T
F T F F T F F F T
F F T F T T F F T
F F F F T T F F T
Since the truth value of the given proposition is all T in each case, therefore the
give proposition is a Tautology
Converse, Inverse and Contrapositive:
If p and q are two propositions then some other conditional propositions related to
pq
are
1. Converse: The converse proposition of p q is q p
2. Inverse: The inverse proposition of p q is ~ p ~ q
3. Contrapositive: The contrapositive proposition of p q is ~ q ~ p
Example: p: The number x is divisible by 2. q: x is an even number.
(a) Conditional: p q
If the number x is divisible by 2 then it is an even number.
(b) Converse: q p
If x is an even number then it is divisible by 2.
(c ) Inverse: ~ p ~ q
If the number x is not divisible by 2 then it is not an even number.
(d) Contrapositive: ~ q ~ p
If x is not an even number then it is not divisible by 2.
Example: p: It rains. q: The crop will grow.
Conditional:p q
If it rains then the crop will grow.
Converse: q p
Inverse: ~ p ~ q
If it does not rain then the crop will not grow.
Contrapositive: ~ q ~ p
If the crop do not grow then there has been no rain.
Q. Check the validity of following argument:
If Siddhartha solved this problem, then he obtained the answer 5.
Siddhartha obtained the answer 5.
Therefore, Siddhartha solved this problem correctly.
Solution: Let p: Siddhartha solved this problem. And q: He obtained the answer 5.
So pq
p
q p q pq q
(Conclusion)
------------------------
p T T T T T
T F F F T
Since corresponding to every
F T T T F
critical row, the truth value of
conclusion is not true, therefore the F F T F F
argument is invalid.
Example: Check the validity of following argument:
“If I study, then I will pass the examination. If I do not go to cinema, then I will
study. But I failed in examination. Therefore, I went to cinema.”
Solution: Let p: I study, q: I will pass the examination r: I do not go to cinema.
pq
rp p q r pq rp ~q ~r
(Conclusion)
~q
--------------------------------------- T T T T T F F
~r T T F T T F T
T F T F T T F
Since corresponding
F T T T F F F
to every critical row,
T F F F T T T
the truth value of
F T F T T F T
conclusion is true, F F T T F T F
therefore the argument
F F F T T T T
is valid.
Mathematical Induction:
Ex. 1: Using principle of mathematical induction prove that 1 3 5 7......2n 1 n
2
LHS
1 3 5 7......2k 1 1
1 3 5 7......................2k 1 2k 1
k 2 2k 1
k 1
2
1 3 5 7......2k 1 1 k 1
2
k 3 4k 6 3k 2 3k 3
3 p 3k 2 k 1
3 p k 2 k 1
3 Integer
k 1 4k 1 6 is divisible by 3.
3
B x : x Z and 1 x 100
Types of Sets:
1. Finite Set: A set with finite number of elements in it, is called Finite set.
Ex.: B 1, 2, 3, 4...................100
B x : x Z and 1 x 100
2. Infinite Set: A set with finite number of elements in it, is called Finite set.
Ex.: A 1, 2, 3, 4...................100..................................
B x : x Z and x 1
3. Null Set: A set which contains no elements at all is called Null set. It is also
known as empty set. It is denoted by
Ex.: B x : x Z and x 2 4 0
4. Singleton Set: A set which has only one element is called a Singleton set.
Ex.: A {a}
5. Sub-set: If A and B are Sets such that every element of A is also an element of
B, then A is said to be a sub-set of B. a A a B then A B and B is called as
Super set of A and is denoted by B A
If A B then at least one element x A and x B
Important Note:
1. Null set is a subset of every set A.
2. Every set A is a sub-set of itself i. e. A A
3. If A B and B C then A C
Proper sub set and Improper sub set: Any sub set A is said to be proper sub set of
B if A B but there exists at least one element of B which does not belongs
to A, and is written as A B Otherwise A is known as improper sub set of B.
6. Equal sets: Two sets A and B are known as equal sets if A B and B A
7. Universal set: In set theory, all the sets are likely to be considered as a sub set of
particular set, this set is called Universal set. It is denoted by U.
8. Power Set: If A is any set then the set of all subsets of A is called Power set and
is denoted by P(A).
If A = {1, 2, 3} then P(A) = { , {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2,
3}}
defined by A A x : x U and x A
C
Similarly B A y, x : y B & x A