0% found this document useful (0 votes)
19 views24 pages

Logic

Uploaded by

sanketkurve7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views24 pages

Logic

Uploaded by

sanketkurve7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Discrete Mathematics and Graph Theory (PCCCS401T)

Unit 1: Mathematical Logic and Set Theory

Dr. Rupali K. Kelkar


Proposition: A proposition is a declarative sentence that is either true or false but
not both. It is denoted by p, q, r etc.
Ex: 1. The sun rises in the west.
2. The sun rises in the east.
A proposition consisting of only a single propositional variable is called primary
or primitive proposition.
A proposition obtained from the combinations of two or more propositions by
means of logical operators or connectives is called compound propositions.
The words or symbols used to form compound proposition are called
connectives.
Negation: If p is proposition the negation p is denoted by ~p is also a
proposition.
p ~p
Eg.: p: Nagpur is in Maharashtra state.
T F
~p: Nagpur is not in Maharashtra state.
F T
Conjunction: If p and q are two statements then conjunction of p and q is the
compound Statement denoted by p  q and read as “p and q”.
Eg.: p: Ram is healthy. q:Ram has blue eyes.
p q pq

p  q : Ram is healthy and has blue eyes. T T T

Eg.:. p: The computer is good. q: The computer is cheap. T F F


p: It is cold. q: It is raining
F T F
Disjunction: If p and q are two statements then disjunction
F F F
of p and q is the compound Statement denoted by p  q
and read as “p or q”.

pq Eg.: p: Ram is healthy. q: Ram has blue eyes.


p q

T T T p  q : Ram is healthy or has blue eyes.

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
pq

is called conditional proposition. Proposition p is called hypothesis


p q pand
 qq
Eg.: p: It rains. q: I will carry an umbrella. T T T
p  q : If it rains then I will carry an umbrella
is called conclusion. T F F

Eg.: 1. p: Tomorrow is Sunday. q: Today is Saturday. F T T

2. p: The earth is round. q: The earth travels round the Sun. F F T

Biconditional proposition: If p and q are proposition then the compound statement


“p if and only if q” denoted by p  q is called biconditional proposition.
p q pq Eg.: p: He swims. q: The water is warm.
p  q: He swims if and only if the water is warm.
T T T

T F F Eg.: 1. p: Sales of houses falls. q: Interest rate rises.

F T F 2. p: This computer program is correct. q: It produces the

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 pq ~ p  q ~p ~q  p  ~ q  ~ p  q  ab
(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:

pq pr qr


p q r
(a) (b) (c )
ab abc a  b  c   r
T T T T T T T T T

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
pq
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

If the crop will grow, then there has been rain.

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 pq
p
q p q pq 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.
pq
rp p q r pq rp ~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

Proof: Let 1  3  5  7......2n  1  n  S n 


2

(a) First we prove S(n) for n = 1.


LHS RHS
1 1 2=1
Hence S(n) is true for n = 1.
 3  5  7......2k  1  k 2
(b) Assume that S(n) is true for n = k, i.1e.

(c ) Now we wish to show that S(n) is true for n = k + 1.


That is 1  3  5  7......2k  1  1  k  1
2

LHS
1  3  5  7......2k  1  1

 1  3  5  7......................2k  1  2k  1
 k 2  2k  1
 k  1
2

 1  3  5  7......2k  1  1  k  1
2

Thus S(n) is true for n = k + 1 and hence it is true for n.

Ex. 2: Using principle of mathematical induction proves that n 3  4n  6 is divisible by 3


Proof: Let n 3  4n  6  S (n)
(a) First we prove S(1) is divisible by 3.
For n = 1, S(n) = 3 and therefore it is divisible by 3.
Hence S(n) is true for n = 1.
(b) Assume that S(n) is true for n = k, i. e. k 3  4k  6 is divisible by 3

 k 3  4k  6  3  p where p is any integer.


(c ) Now we wish to show that S(n) is true for n = k + 1.
That is, k  1  4k  1  6
3
divisible by 3
Now k  13  4k  1  6
 k 3  3k 2  3k  1  4k  4  6

 k 3  4k  6   3k 2  3k  3

 3  p  3k 2  k  1


 3 p  k 2  k  1 
 3 Integer
 k  1  4k  1  6 is divisible by 3.
3

Thus S(n) is true fir n = k + 1and hence it is true for n.


Set Theory:
The collection of well-defined objects is known as Set.
Ex: 1. The Rivers in India.
2. The vowels in English alphabets.
Capital letters A, B, C…… are used to denote sets and small letters a, b, c….. are
used to denote elements of set.
There are two ways to representing a set.
1. Roster or Tabular Form:
A  a, e, i, o, u and B  1, 2, 3, 4...................100

2. Set Builder form:


A  x : x is a vowel of an English alphabet.


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

Ex.: If B = {a, b, c, d……………….z} and A = {a, e, i, o, u} then A is sub set of


B and B is a super set of A.

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

Ex.: A = {1, 2, 3, ……..10}, B = {1, 2, 3………….15}, C = {1, 2,3…………10}


Here it is clear that A = C and A  B

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}}

Venn Diagram: A Venn diagram is a pictorial


representation of sets which are used to show
relationship between sets and operations on
them.
Operations on Sets:

1. Union of sets: The Union of two sets A and B is denoted by A  B and is


defined as A  B  x : x  A or x  B

Ex. If A = {1, 3, 5, 7, 9} and B = { 1, 2, 3, 4, 5, 10, 12, 15}then

A B = {1, 2, 3, 4, 5, 7, 9, 10, 12, 15}.

2. Intersection of Sets: The Intersection of two sets A and B is denoted by A  B


and is defined as A  B  x : x  A and x  B
Ex. If A = {1, 3, 5, 7, 9} and B = { 1, 2, 3, 4, 5, 10, 12, 15}then
A  B = {1, 3, 5}.

3. Complement of Set: the complement of set A is denoted by A or A and is


C

defined by A  A  x : x  U and x  A
C

Ex. If A = {1, 3, 5, 7, 9} and U = { 1, 2, 3, 4, 5, ……….15}then


A  A C = {2, 4, 6, 8, 10, 11, 12, 13, 14, 15}.
4. Difference between sets: The difference between two sets A and B is denoted
by A  B and is defined as A  B  x : x  A and x  B
Ex. If A = {1, 3, 5, 7, 9} and B = {1, 2, 3, 4, 5, 10, 12, 15} then A – B = {7, 9}

Similarly B  A  x : x  B and x  A = {2, 4, 10, 12, 15}.

5. Symmetric Difference: The symmetric difference between two sets A and


B is denoted by AB and is defined as AB   A  B   B  A
Ex. If A = {1, 3, 5, 7, 9} and B = {1, 2, 3, 4, 5, 10, 12, 15} then
A  B  {7, 9} B  A  {2, 4,10,12,15}

therefore AB  2,4, 7, 9,10,12,15


6. Cartesian product of Sets: The Cartesian product of Sets A and B is denoted
by A  B and is defined as A  B  x, y  : x  A & y  B

Eg: A = {1, 2, 3} and B = {a, b} Then

A  B  1, a , 1, b , 2, a , 2, b , 3, a , 3, b 

Similarly B  A   y, x  : y  B & x  A 

B  A  (a,1), (a,2), (a,3), (b,1), (b,2), (b,3)

You might also like