M1 dms
M1 dms
piscreteMathematical1Struc
Module -1
1.0 Introduction
Discrete Mathematics is a fundamental mathematics component for the computer
science and allied disciplines.
Comprehensively it is focused on the study of discrete /distinct things and also
finite systems play a key role in this advanced era of computer science.
The digital computer is basically a finite structure and a number of its properties
can be understood, analyzed and can be interpreted using finite systems.
Set theory is the foundation of Discrete Mathematics. Algebraic structures are also
based on sets and we present set theory as a preamble.
Examples:
i) Students in civil engineering branch of a college.
ii) Integers between0and 9.
ii) Prime numbers less tharn 100.
Generally sets are denoted by uppercase (capital) letters such as A, B, C....and the
elements of a set are denoted by lower case (small) letters such as a, b, c....
For a set Awe write xEAifx is an element of A and y¢ A if y is not a member
of A.
The symbols E and can respectively be understood as belongs to' and
'does not belongs to'.
We generally use two methods to represent a set and they are
(i) The tabulation method (ii)The rule method.
In the Tabulation method all the elements of a set without repetition are written
within flower brackets :( }.
2 Discrete Mathematical Structures
However, if the elements are more/infinite a few are written, as the subsequents
can be guessed.
In the Rule Method we specify the set by stating its characteristic property which
all the elements of the set possess.
two methods. The notation
Here are a few illustrativeexamples that exhibit the
in the form of aslant line "/" is read as 'such that'.
Rule method
Set Tabulation method
{x/x is an vowel}
{a,e, i , o, u) (This is read as, the set of all x' where x
isan vowel)
{x/x is a positive odd integer less
B {1,3,5, 7,9 ...... 19} than 20}
(x/x is an integer)
C {....-3,-2,- 1, 0, 1, 2,3 ...
{x/xEN,
D {1,4,9, 16,.... N
being the set of natural numbers}
E {...- 15,- 10,- 5,0, 5, 10, 15 ....)|(x/x is an integer divisible by 5)
Remark.
Every set is a subset of itself and null set is a subset of every set.
Example:
Let A = {1,2,3}. B = {1,2,3,4,5,6), X = {3,4,5}
Here, A CB. It may be observed that an element 4 E B, but 4 e A and hence
AcB.
Also A X and XÉA.
That is, Ais not a subset of X and X is not a subset of A. Further X c B.
Remark
IfAC Band BE Athen A= B. That is to say that if Ais a subset of Band Bis a subset
of A then the sets Aand B are equal.
" Universal set.
It is always possible to choose a special set U( 0) such that every set under
consideration /discussion is a subset of U.Such a set is called auniversal set.
It should be noted that universal set is not unique. A E Ufor every set A.
Discrete Mathematical Structures
For example when we
all integers / is the
deal with sets whose elements are
universal set. That is U= (0,+1,A2, t3,integers,
...)=|
then
the set of
"
Cardinalityof a set.
If A is a finite set,
then the number of elements in A is referred
cardinality of A and is denoted by |A|. to as the
Referring to the earlier illustrative example in respect of
|A| =3, |B| = 6 and |X| = 3. subsets, we have
" Power set
Example
If A= {0,1,2, then we have P(A) =
{0,(0},(1,(2),(0,1), (1,2), (0,2}, A}
Remark :
Here \A| =3and |P (A)| = 8= 23
It may be noted that, if |A| =n then \P(A)| = 2"
Set operations
In this section we discuss certain basic
operations on sets. Using these operations
we exhibit the formation of new sets according to a rule
of the given sets.
combining the elements
Illustrative Examples.
Let, U={x/xEN and x< 15)
A= {1,2,3,4, 6, B= {3,4, 8, 9,10) C ={1,7, 13}
We have the following illustration on set operations, where
U= {1,2, 3, 4,5, 6, 7, 8, 9, 10, 11, 12, 13, 14}
Unions
AUB = {1,2, 3, 4, 6, 8,9, 10} = BUA
BUC = {1,3,4, 7, 8,9, 10, 13} = CUB
CUA = {1,2,3, 4, 6,7, 13} =AUC
Intersections
The word Logic can be understood as the science of reasoning and logical' means
valid reasoning. Mathematical Logic is related to all kinds of reasoning and it serves
as a tool to judge the truthfulness of any statement. Logic principles play an
important role in computer programming and designs. It is also a foundation in
the developent of subjects like 'logic design', 'logic gates', 'artificial intelligence'
etc.
Propositions.
Aproposition is an assertive statement which is either true or false but not both.
Propositions are usually represented by small letters p, q, T, ..
The truth of aproposition is called the truth value, symbolized as '1' or T.
Also the truth value of the falsity of a proposition issymbolized as 0 or "F.
We present a few examples along with truth values in the case of propositions.
Truth value of the
S.
Statement statement being a
No
proposition
1. Mysuru is in Karnataka state T(1)
Not a proposition
6 x+y<1 (The statement can be either
true or false)
The table showing the truth values of a statemnent is called a »truth table'.
10 Discrete Mathematical S
1. 21 Basic connectives and Truth tables.
Structures
We present three basic logical connectives on the propositions
eigish words 'not', 'and', 'or' with illustrations and truth tables. using simple
Negation
The negation' of a proposition p is the statement obtained by
'not (or dropping the word 'not') at the befitting place of intheducting woro
the
statement tha
Conveys the opposite version of the given statement and is denoted by p
Further it t is evident that if T(1) is the truth value of pthen F(0) is the truth orp
of ~p and vice versa. value
Observe the following illustrations.
SI. No Proposition (p) Negation (-p)
1. Today is a holiday Today is not aholiday
2. 32+4 + 52 32+42 = 5
ax + bx+c ax + bxtc
3.
is aquadratic expression is not a quadratic expression
2Tr 2r
4
is not the area of a circle is the area of a circle
Proposition (P)
T(1) F (0)
F(0) T(1)
" Conjunction
Given two propositions pand q, the compound proposition formed by using the
Connective "and" is called the 'conjunction' of the original propositions.
It is denoted by p Aq, read as 'p and q'.
It should be noted that if the propositions p and q are true then its conjunction
pAqisalso true. The same is false in allother cases.
Module -1 11
Illustrative Examples
Observe the following four compound propositions (p A) connected by the
propositions p, q.
() Delhi is the capital of India and x +4 =5’x=1
(ii) Delhi is the capital of India and x+ 4 =5 ’x=2
(ii) Mumbai is the capital of India and x+4= 5x=1
(iv) Mumbaiis the capital of India and x+4=5x=2
Clearly (i) only is true as both the propositions are true. In the rest either of them
or both of them are false.
Remark: The reader can easily visualize the earlier illustrative example with the word
'or' in place of 'and'
Truth table associated with disjunction.
p p Vq
T(1) T(1) T(1)
T(1) F (0) T(1)
F (0) T(1) T(1)
F(0) F (0) F(0)
12
Discrete Mathematical Structures
T(1) F (0)
T(1)
F (0) T(1)
T (1)
T (1) T (1)
F(0)
F (0) F (0) F (0)
the first
Remark: Obseroe that in this truth table pVq truth value differs only in
case in comparison with the truth table of p q.
Illustrative Example
p: Delhiis the capital of India
q:x+ 4 =5’r=1
Worked Examples
Ex- 1. Write down the truth value of the follotoing compound propositions.
(i) Tajmahal is in Delhi and Rajghat is in Agra
(i) Tajmnahal is in Agra or Mumbai is the capital of India
> i)F (0) (ii) T (1)
Module -1 13
Ex-2. Write the negation of the followingpropositions and the ass0ciated truth value.
) River Ganga flows in Varanasi.
(i) r² is not the area of acircle.
> () River Ganga does not flow in Varanasi : F (0)
(ii) r² is the area of a circle:T (1)
Ex - 3.Given the following propositions p.q :
p: Jaipur is in Rajasthan.
q:Chennai is a coastal city.
Write down the symbolic form of thefollowing compound propositions.
(i) Jaipur is not in Rajasthan and Chennai is a coastal city
(ii) Chennai is not acoastal city or Jaipur is not in Rajasthan
(ii) ~q V~p
Ex- 4. Considering the propositions p.q as in Ex -3, write down the compound
proposition for the following.
(i) ~p A~ q (ii) pVq
) Jaipur is not in Rajasthan and Chennai is not a coastal city
(ii) Jaipur is in Rajasthan or Chennai is not a coastal city.
Ex - 5. Construct truth table for the following
(i) pA(q Ap) (i) ~ (p V~ q) (ii) (pVq) V~p
(iv)p A
(q vr) & pv (q vr) (v) ~p V~q&~p V~ q
º (i) pA (qAp)
q^p pA(q^p)
T T
F F F
F T F F
F F F
(i) ~ (p ~ q)
pVq ~ (pV~ )
T T F F
T T F
F T F F
F T
14 Discrete M
Mathematical
(ii) (pv q) V~ p Structures
pVq (pV)Vp
T T T
F T F T
F T T
F F T T
T T T
F T T T
T F F F
T T T F T
T F T F
F T T F
F F F F
Remark: The number of rows needed for the truth table of conmpound propositions
composed of 'n' propositions is 2". As particular cases we have seen for
p,g(n = 2), 2 = 4 and for p, q, r (n =3) 2s =8 rows in the truth table.
~pV~q ~pV~q
T
F F
T
T F
T
T
Module -1 15
T T T
T F F
F T T
F T
Biconditional propositions.
Given two
before p andpropositions p and q the
compound proposition using the words "if"
"then" before q and vice versa also is called the
proposition"
It is
of the original propositions "biconditional
denoted by p qand is read as "if P,q. pthen g" and "if qthen p"
Equivalently terminology
It is
evident
the
that p q is
"p if and only if q" or "p iff q" is being used.
(p ’ ) is true when p equal to (p ’ ) A(q ’p). It should be noted that
and ahave the same truth
values. It is false otherwise.
Truth table asso ciate dwith
biconditional propositions
pq
T
T
T F F
T F
F T
Observe the following Illustrative Examples
p:Mr. Ajay is sent abroad.
q:Mr. Ajay completes the project successfully.
p +q: Mr. Ajay is sent abroad if
and only if he complete the project
successfully.
This statement is deemed true when both the
propositions are true/false.
Converse, Inverse and Contrapositive propositions.
Let p and q be two propositions. Also p ’qis the conditional proposition. Then
() Proposition q’pis called its convese.
(ii) Proposition~p’ q is called its inverse.
(ii) Proposition ~q’~ p is called its contrapositive.
Truth table associate d with these is as follows.
Module-1 17
We take note that the truth values of p ’qand ~g’~p are the same. Hence we
say that they are equivalent. We have the same in respect of q ’p and p ’~g.
1.22 LogicalEquivalence
Two compound propositions P and Qare said to be logically equivalent if P and
Qhave the same truth value. Equivalently we can say that, if the biconditional
PoQis atautology then Pand Q are logically equivalent.
The notation P = Qor PeQis used for logical equivalence. However it may be
noted that the symbol'='do not refer to alogical connective since P=Qis not a
compound proposition.
Twopropositions P and Qare said to be contradictory if the biconditional
proposition P Qis acontradiction.
Note: The operators used in our discussion so far are called logical operators. We use
them in the same order as discussed for solving problems.
The order of the logic operators for use is as follows.
~(); A;V;V;’;’
18
Discrete Mathematical Structures
pAq pVq
(Negation p) (p and q) (p or q) (p exclusive q) (p implies q) (p iff q)
T T F T F T T
T F T F
F T T F T T T F
F F T F F F T
[T]; True or 1
Tautology
[F]; False or 0 Contradiction
Ex-9. Define Tautology and Contradiction with an example for each. [Dec 2010]
T F T
F T F T T
F F F T
[I,
T F F T F F
F T T F F
F F F F T F
q’p
T F F F T T
22 Discrete Mathematical Structures
(ii) (iv)
F T
Reason
pVq
0 0 0 pVq is 0 when p is 0, q is 0.
(ii)
Reason
1 0 pAqis 0 when p is 1, q is 0.
Ex-12. Given that p. q, rare propositions having truth values 0,0,1 respectively.
Find the truth value ofthe follooing propositions. IJan 2017]
(i)p ’ (q Ar) (ii) (p Vq) vr
(ii) (pA ) ’r (iv) p ’ [q ’ (~r)]
(i)
(ii)
(iii)
0 0 1 0 1 P ’Q is 0when P is 1, Qis 0.
(iv)
0 0 0 1 1
P ’Qis0 when P is 1,
Q is 0.
q
pv(~)
(u)
T T F T
T F T F T
F T T F F T T
F T T F T
(i)
(p ’ ) ’ (q ’p)
T T T T
F F T
T T F F
F T T
(iv) (iii) 24
Ex
F F F F T T T T 14. -
(i) Write
F F T T F
(p’ F F T T
F T T down F T T
q)
’r the F T F T
F T T T truth T F T
table T F F
T T T T F T for T T F T
(ii)
the T F
p’
following. qA(p’)
T T F T T T T
q’r
(q F T F T
’r) T T T F
)’r (p’ Mathematical
Structures
Discrete
F T F T T T qA(p
q
+
[(-p) T F T T ’
F )]
-’r)p’
(q
v ’p
T T T T T T
(~)
F
Module -1 25
T T I F T
(ii)
(ii)
T T
T
I T
F T
F F
F
(ii)
pAp’ q) [pA (p’ q)] ’9
T T
T
F T
T F
F T
T T
F
F T
T F T T
T F
T T F T T T
F T
F T F F T
We observe that the truth values in the lastcolumn of every truth table is
true (T).
Thus we conclude that the propositions (i), (ii), and (ii) are tautologies.
Module -1 27
We observe that all the truth values in the last column of the truth table is
true (T).
Thus we have verified that the given proposition is a tautology.
T T F F T F T
T T T T T T T T
L
T F T T F T
T T T T T T T T
F T F T F T
F F T T T F T T
F F T T F T T T
We observe that all the truth values in the last column of the truth table is true (T).
Thus we conclude that the given proposition is a tautology.
28 Discrete Mathematical Structures
(ii)
pVq (pV) A(GpV¬) P+Q
(P) (0)
T
F F
T F
L
F T T T T
T
F T T T T
F F T T F T F F
(iii)
p Vq
P Q
(P) ()
T T F T T T
T F F F F T
F T T T T T
F F T T T T