Professional Documents
Culture Documents
Unit 1 - Discrete Structures - WWW - Rgpvnotes.in
Unit 1 - Discrete Structures - WWW - Rgpvnotes.in
Tech
Subject Name: Discrete Structure
Subject Code: IT-302
Semester: 3rd
Downloaded from be.rgpvnotes.in
UNIT-1
So e I po ta t Sets
N − the set of all atu al u e s = { , , , …}
) − the set of all i tege s = {....., − , − , − , , , , .....}
)+ − the set of all positi e i tege s
Q − the set of all atio al u e s
R − the set of all eal u e s
W − the set of all hole u e s
Ca di alit of a Set
Ca di alit of a set “, de oted |S|, is the u e of ele e ts of the set. The u e is also efe ed as
the a di al u e . If a set has a i fi ite u e of ele e ts, its a di alit is ∞.
E a ple − |{ , , , }|= ,|{ , , , , ,…}|=∞
If the e a e t o sets X a d Y,
1. |X|=|Y| de otes t o sets X a d Y ha i g sa e a di alit . It o u s he the u e of ele e ts i X
is e a tl e ual to the u e of ele e ts i Y. I this ase, the e e ists a ije ti e fu tio f f o X to
Y.
2. X| |Y de otes that set X s a di alit is less tha o e ual to set Y s a di alit . It o u s he u e
of ele e ts i X is less tha o e ual to that of Y. He e, the e e ists a i je ti e fu tio f f o X to Y.
T pes of Sets
“ets a e lassified i to a t pes. “o e of hi h a e fi ite, i fi ite, su set, u i e sal, p ope , si gleto
set, et .
1. Fi ite Set- A set hi h o tai s a defi ite u e of ele e ts is alled a fi ite set.
E a ple – S = { | Na d > > }
2. I fi ite Set- A set hi h o tai s i fi ite u e of ele e ts is alled a i fi ite set.
E a ple − S={ | Na d > }
3. Cou ta le set: a set A is alled ou ta le i fi ite if A N. We sa that A is ou ta le if A N o A is
fi ite. A ou ta le set is a set ith the sa e a di alit u e of ele e ts as so e su set of the set
of atu al u e s. A ou ta le set is eithe a fi ite set o a ou ta le i fi ite set. Whethe fi ite o
i fi ite, the ele e ts of a ou ta le set a al a s e ou ted o e at a ti e a d, although the ou ti g
a e e fi ish, e e ele e t of the set is asso iated ith a u i ue atu al u e .
4. U ou ta le Sets: A u ou ta le set o u a ou ta l i fi ite set is a i fi ite set that o tai s
too a ele e ts to e ou ta le. The u a ou ta ilit of a set is losel elated to its a di al u e :
a set is u ou ta le if its a di al u e is la ge tha that of the set of all atu al u e s.
5. Su set- A set X is a su set of set Y W itte as X⊆Y if e e ele e t of X is a ele e t of set Y.
E a ple − Let, X={ , , , , , } a d Y={ , }. He e set Y is a su set of set X as all the ele e ts of set Y is
i set X. He e, e a ite Y⊆X
E a ple − Let, X= { , , } a d Y= { , , }. He e set Y is a su set Not a p ope su set of set X as all the
ele e ts of set Y is i set X. He e, e a ite Y⊆X
6. P ope Su set- The te p ope su set a e defi ed as su set of ut ot e ual to . A “et X is a
p ope su set of set Y W itte as X⊂Y if e e ele e t of X is a ele e t of set Y a d |X|<|Y|
E a ple − Let, X={ , , , , , } a d Y={ , }. He e set Y⊂X si e all ele e ts i Y a e o tai ed i X too a d
X has at least o e ele e t is o e tha set Y
7. U i e sal Set-It is a olle tio of all ele e ts i a pa ti ula o te t o appli atio . All the sets i
that o te t o appli atio a e esse tiall su sets of this u i e sal set. U i e sal sets a e ep ese ted as U
E a ple − e a defi e U as the set of all a i als o ea th. I this ase, set of all a als is a su set of
U, set of all fishes is a su set of U, a d set of all i se ts is a su set of U, a d so o .
8. E pt Set o Null Set- A e pt set o tai s o ele e ts. It is de oted ∅ . As the u e of
ele e ts i a e pt set is fi ite, e pt set is a fi ite set. The a di alit of e pt set o ull set is ze o.
E a ple − S= { | N a d < < } =∅
9. Si gleto Set o U it Set- “i gleto set o u it set o tai s o l o e ele e t. A si gleto set is
de oted {s}
E a ple − S= { | N, < < } = { }
10. E ual Set- If t o sets o tai the sa e ele e ts the a e said to e e ual.
E a ple − If A={ , , } a d B={ , , } the a e e ual as e e ele e t of set A is a ele e t of set B a d
e e ele e t of set B is a ele e t of set A.
11. E ui ale t Set- If the a di alities of t o sets a e sa e, the a e alled e ui ale t sets.
E a ple − If A= { , , } a d B={ , , }, the a e e ui ale t as a di alit of A is e ual to the a di alit
of B. i.e. |A|=|B|=
12. O e lappi g Set - T o sets that ha e at least o e o o ele e t a e alled o e lappi g sets.
I ase of o e lappi g sets −
a) A∪B = A + B − A∩B
b) A∪B = A−B + B−A + A∩B
c) A = A−B + A∩B
d) B = B−A + A∩B
E a ple − Let, A= { , , } a d B= { , , }
Ve Diag a s
Set Ope atio s
“et Ope atio s i lude “et U io , “et I te se tio , “et Diffe e e, Co ple e t of “et, a d Ca tesia
p odu t.
1. Set U io - The u io of sets A a d B de oted A∪B is the set of ele e ts hi h a e i A, i B,
o i oth A a d B. He e, A∪B={ | A OR B}
E a ple − If A= { , , , } a d B = { , , }, the A∪B= { , , , , , }
The o o ele e t o u s o l o e
Fig . U io
2. Set I te se tio - The i te se tio of sets A a d B de oted A∩B is the set of ele e ts hi h
a e i oth A a d B. He e, A∩B={ | A AND B}
E a ple − If A= { , , } a d B = { , , }, the A∩B={ }
Fig . I te se tio
3. Set Diffe e e/ Relati e Co ple e t - The set diffe e e of sets A a d B de oted A–B is the
set of ele e ts hi h a e o l i A ut ot i B. He e, A−B={ | A AND B}
E a ple − If A= { , , , }
a d B={ , , }, the A−B ={ , , } a d B−A ={ , }. He e, e a see A−B ≠ B−A
Mo e spe ifi all , A′= U−A he e U is a u i e sal set hi h o tai s all o je ts.
E a ple − If A= { | elo gs to set of odd i tegers} the A′={ | does ot elo g to set of odd i tegers}
Fig . Co ple e t
5. Ca tesia P odu t / C oss P odu t - The Ca tesia p odu t of u e of sets A ,A ,…A de oted
as A ×A ⋯×A a e defi ed as all possi le o de ed pai s , … he e A , A ,… A
E a ple − If e take t o sets A= {a, } a d B= { , }
The Ca tesia p odu t of A a d B is itte as − A×B= { a, , a, , , , , }
The Ca tesia p odu t of B a d A is itte as − B×A= { , a , , , , a , , }
6. Po e Set - Po e set of a set “ is the set of all su sets of “ i ludi g the e pt set. The a di alit
of a po e set of a set “ of a di alit is . Po e set is de oted as P S
E a ple −
Fo a set S= {a, , , d}
Let us al ulate the su sets −
1. “u sets ith ele e ts − {∅} the e pt set
2. “u sets ith ele e t − {a},{ },{ },{d}
3. “u sets ith ele e ts − {a, },{a, },{a, d},{ , },{ , d},{ , d}
4. “u sets ith ele e ts − {a, , },{a, , d},{a , , d},{ , , d}
5. “u sets ith ele e ts − {a, , , d}
He e, P S ={{∅},{a},{ },{ },{d},{a, },{a, },{a,d},{ , },{ ,d},{ ,d},{a, , },{a, ,d},{a, ,d},{ , ,d},{a, , ,d}}
|P S |= =
Note − the po e set of a e pt set is also a e pt set. |P {∅} |= =
Relations
Whe e e sets a e ei g dis ussed, the elatio ship et ee the ele e ts of the sets is the e t thi g that
o es up. Relatio s a e ist et ee o je ts of the sa e set o et ee o je ts of t o o o e sets.
Defi itio a d P ope ties
A i a elatio ‘ f o set to itte as R o R , is a su set of the Ca tesia p odu t × . If the
o de ed pai of G is e e sed, the elatio also ha ges. Ge e all a -a elatio ‘ et ee sets
A … a d A is a su set of the -a p odu t A ×⋯×A . The i i u a di alit of a elatio ‘ is )e o a d
a i u is i this ase. A i a elatio ‘ o a si gle set A is a su set of A × A
Fo t o disti t sets, A a d B, ha i g a di alities a d espe ti el , the a i u a di alit of a
elatio ‘ f o A to B is .
Do ai a d Ra ge
If the e a e t o sets A a d B, a d elatio ‘ ha e o de pai , , the −
1. The do ai of ‘, Do ‘ , is the set { | , ‘ fo so e i B}
2. The a ge of ‘, ‘a ‘ , is the set { | , ‘ fo so e i A}
E a ples Let, A = { , , } a d B = { , , }
Case − If elatio ‘ is 'e ual to' the R= { , , , }
Do ‘ = { , }, Ra R = { , }
Case − If elatio ‘ is 'less tha ' the R= { , , , , , , , }
Do ‘ = { , }, Ra R = { , }
Case − If elatio ‘ is 'g eate tha ' the R= { , , , , , , , }
Do ‘ = { , }, Ra R = { , , }
T pes of Relatio s
1. The E pt Relatio et ee sets X a d Y, o o E, is the e pt set ∅
Question: Let A = {a, b, c}, B = {1, 2} and C = {a, b, g} is being three sets and R = {(a, 1), (a, 2), (b, 2), (c, 1)} and S = {(1, a), (2,
b), (2, g)} be two relations, find SoR.
Solution:
Here, R is a relation where a goes to 1 and so on. Thus, S o R will be calculated as a goes to 1 and in turn, 1 goes to a,
yielding (a, a).
Hence, SoR = {(a, a), (a, b), (a, g), (b, b), (b, g), (c, a)}.
Fig .
E ui ale e Relatio :
A elatio is a E ui ale e ‘elatio if it is efle i e, s et i , a d t a siti e.
E a ple − The elatio R={ , , , , , , , , , , , , , , , , , } o set A={ , , } is a
e ui ale e elatio si e it is efle i e, s et i , a d t a siti e.
E a ple : The e ualit elatio = o a set of u e s su h as { , , } is a e ui ale e elatio .
E a ple : The o g ue t odulo elatio o the set of i tege s i.e. {<a, >| a od },
he e is a positi e i tege g eate tha , is a e ui ale e elatio .
Pa tial O de Relatio :
A elatio is a Pa tial O de ‘elatio if it is efle i e, A ti s et i , a d t a siti e.
E a ple − The elatio R={ , , , , , , , , , , , , , , , , , } o set A={ , , } is a
e ui ale e elatio si e it is efle i e, s et i , a d t a siti e.
E a ple − A elatio " " is a pa tial o de o a set if it has:
. ‘efle i it : fo all.
. A ti-s et i : a d i plies.
. T a siti it : a d i plies.
E a ple
a) f:N→N,f = + is su je ti e.
b) f:R→R,f = is ot su je ti e si e e a ot fi d a eal u e hose s ua e is egati e.
3. Bije ti e / O e-to-o e Co espo de t - A fu tio f: A→B is ije ti e o o e-to-o e o espo de t
if a d o l if f is oth i je ti e a d su je ti e.
P o le - P o e that a fu tio f: R→R defi ed f = – is a ije ti e fu tio .
E pla atio − e ha e to p o e this fu tio is oth i je ti e a d su je ti e.
If f =f , the – = – a d it i plies that = . He e, f is i je ti e.
He e, – =
“o, = + / hi h elo gs to ‘ a d f = . He e, f is su je ti e.
“i e f is oth su je ti e a d i je ti e, e a sa f is ije ti e.
4. I e se of a Fu tio - The i e se of a o e-to-o e o espo di g fu tio f: A→B , is the fu tio
g:B→A , holdi g the follo i g p ope t − f = ⇔g = The fu tio f is alled i e ti le, if its i e se
fu tio g e ists.
E a ple
A Fu tio f:)→),f = + , is i e ti le si e it has the i e se fu tio g:)→),g = − .
A Fu tio f:)→),f = is ot i e ti le si e this is ot o e-to-o e as − =
5. Co positio of Fu tio s - T o fu tio s f: A→B a d g: B→C a e o posed to gi e a
o positio gof. This is a fu tio f o A to C defi ed gof =g f
E a ple
Let f = + a d g = , fi d fog a d gof
Solutio
fog =f g =f + = + + = +
gof =g f =g + = + + = +
He e, fog ≠ gof
6. Re u si el Defi ed Fu tio s – A e u si e defi itio has t o pa ts:
a) Defi itio of the s allest a gu e t usuall f o f .
b) Defi itio of f , gi e f - , f - , et .
f = ;
f = .f -
So e Fa ts a out Co positio
c) If f a d g a e o e-to-o e the the fu tio gof is also o e-to-o e.
d) If f a d g a e o to the the fu tio gof is also o to.
e) Co positio al a s holds asso iati e p ope t ut does ot hold o utati e p ope t .
|A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|
The ge e alized fo ula –
|⋃ni= Ai|=∑ ≤i<j<k≤ n| Ai ∩ Aj|+∑ ≤i<j< k≤ n| Ai ∩ Aj ∩ Ak|−⋯+ − π− |A ∩⋯∩A |
P o le
Ho a i tege s f o to a e ultiples of o ut ot oth?
Solutio
Fo to , the e a e / = u e s hi h a e ultiples of .
The e a e / = u e s hi h a e ultiples of .
The e a e / = u e s hi h a e ultiples of oth a d .
“o, |A|= , |B|= a d |A∩B|=
|A∪B|=|A|+|B|−|A∩B|= + − =
P o le
I a g oup of stude ts like old d i ks a d like hot d i ks a d ea h stude t likes at least o e of
the t o d i ks. Ho a like oth offee a d tea?
Solutio
Let X is the set of stude ts ho like old d i ks a d Y is the set of people ho like hot d i ks.
“o, |X∪Y|= , |X|= , |Y|=
|X∩Y|=|X|+|Y|−|X∪Y|= + − = − =
He e, the e a e stude ts ho like oth tea a d offee.
A ∩ B ⋃ C = A ∩ B ⋃ A ∩ C [verified]
(ii) A ∪ B ∩ C = A ∪ B ∩ A ∪ C)
L.H.S. = A ∪ B ∩ C
B ∩ C = {e, f}
A ∪ B ∩ C = {a, , d, e, f} ………………..
R.H.S. = (A ∪ B ∩ A ∪ C)
A∪B = {a, b, c, d, e, f}
A∪C = {a, b, d, e, f, g}
(A ∪ B ∩ A ∪ C) = {a, b, d, e, f} ………………..
From (1) and (2), we conclude that;
A ∪ B ∩ C = A ∪ B ∩ A ∪ C) [verified]
Nu e i al o Sets:-
1. Let A and B be two finite sets such that n (A) = 20, n (B) = 28 and n (A ∪ B) = 36, find n (A ∩ B .
Solution:
Using the formula n (A ∪ B) = n (A) + n (B) - A ∩ B .
Then n (A ∩ B = n (A) + n (B) - n (A ∪ B)
= 20 + 28 - 36
= 48 - 36
= 12
4. There are 35 students in art class and 57 students in dance class. Find the number of students who are
either in art class or in dance class.
(i) When two classes meet at different hours and 12 students are enrolled in both activities.
(ii) When two classes meet at the same hour.
Solution:
n(A) = 35, n(B) = 57, A∩B =
(Let A be the set of students in art class.
B be the set of students in dance class.)
(i) When 2 classes meet at different hours n(A ∪ B) = n(A) + n(B) - A ∩ B
= 35 + 57 - 12
= 92 - 12
= 80
ii Whe t o lasses eet at the sa e hou , A∩B = ∅ n (A ∪ B) = n(A) + n(B) - A∩B
= n(A) + n(B)
= 35 + 57
= 92
5. In a group of 100 persons, 72 people can speak English and 43 can speak French. How many can speak
English only? How many can speak French only and how many can speak both English and French?
Solution:
7. Each student in a class of 40 plays at least one indoor game, chess, carom and scrabble. 18 play chess,
20 play scrabble and 27 play carom. 7 play chess and scrabble, 12 play scrabble and carom and 4 play
chess, carom and scrabble. Find the number of students who play (i) chess and carom. (ii) Chess, carom
but not scrabble.
Solution:
Let A be the set of students who play chess
B be the set of students who play scrabble
C be the set of students who play carom
Therefore, We are given n(A ∪ B ∪ C) = 40,
n(A) = 18, n(B) = 20 n(C) = 27,
A∩B = , C∩B = A∩B∩C =
We have
n (A ∪ B ∪ C) = n(A) + n(B) + n(C) - A ∩ B - B ∩ C - C ∩ A + A ∩ B ∩ C
Therefore, 40 = 18 + 20 + 27 - 7 - 12 - C ∩ A + 4
40 = 69 – 19 - C ∩ A
40 = 50 - C ∩ A C ∩ A = - 40
n C∩A =
Therefore, Number of students who play chess and carom are 10
Also, number of students who play chess, carom and not scrabble
= C∩A - A∩B∩C
= 10 – 4
=6
Mathematical Induction
Mathe ati al i du tio is a te h i ue fo p o i g esults o esta lishi g state e ts fo atu al u e s.
This pa t illust ates the ethod th ough a a iet of e a ples.
Defi itio - Mathe ati al I du tio is a athe ati al te h i ue hi h is used to p o e a state e t, a
fo ula o a theo e is t ue fo e e atu al u e .
The te h i ue i ol es t o steps to p o e a state e t, as stated elo −
Step Base step − It p o es that a state e t is t ue fo the i itial alue.
Step I du ti e step − It p o es that if the state e t is t ue fo the th ite atio o u e , the it is
also t ue fo +1 th ite atio o u e +1 .
Ho to Do It
Step − Co side a i itial alue fo hi h the state e t is t ue. It is to e sho that the state e t is
t ue fo = i itial alue.
Step − Assu e the state e t is t ue fo a alue of = k. The p o e the state e t is t ue fo = k+1.
We a tuall eak = k+1 i to t o pa ts, o e pa t is = k hi h is al ead p o ed a d t to p o e the
othe pa t.
. n− is a ultiple of fo = , , .....
Solutio
Step − fo = , * − = − = hi h is a ultiple of
Step − Let us assu e − is t ue fo =k, He e, k− is t ue It is a assu ptio
We ha e to p o e that k+ − is also a ultiple of
k+ − = × k− = × k + k−
The fi st pa t × k is e tai to e a ultiple of a d the se o d pa t k− is also t ue as ou p e ious
assu ptio .
He e, k+ – is a ultiple of .
“o, it is p o ed that – is a ultiple of .
. + + +...+ n− =n fo n= , , …
Solutio
Step − fo = , = , He e, step is satisfied.
Step − Let us assu e the state e t is t ue fo =k
He e, + + +⋯+ k− =k is t ue It is a assu ptio
We ha e to p o e that + + +...+ k+ − = k+ also hold
+ + +⋯+ k+ −
= + + +⋯+ k+ −
= + + +⋯+ k+
= + + +⋯+ k− + k+
=k + k+
= k+
“o, + + +⋯+ k+ − = k+ hold hi h satisfies the step .
He e, + + +⋯+ − = is p o ed.
O , a k+ = ak+ k+
He e, step is p o ed.
“o, ab n = anbn is t ue fo e e atu al u e .
St o g I du tio
“t o g I du tio is a othe fo of athe ati al i du tio . Th ough this i du tio te h i ue, e a
p o e that a p opositio al fu tio , P is t ue fo all positi e i tege s, , usi g the follo i g steps −
Step Base step − It p o es that the i itial p opositio P t ue.
Step I du ti e step − It p o es that the o ditio al state e t [P ∧P ∧P ∧⋯∧P k ]→P k+ is t ue
fo positi e i tege s k.
P oof Co t adi tio . To p o e a state e t P is t ue, e egi assu i g P false a d sho that this
leads to a o t adi tio ; so ethi g that al a s false.
Ma of the state e ts e p o e ha e the fo P ⇒ Q hi h, he egated, has the fo P ⇒ ∼Q.
P opositio P ⇒ Q
P oof: √ is i atio al
P oof: “uppose √ is atio al. The i tege s a a d e ist so that √ = a/ . Without loss of ge e alit e
a assu e that a a d ha e o fa to s i o o i.e., the f a tio is i si plest fo . Multipl i g oth
sides a d s ua i g, e ha e
= a so e see that a is e e . This ea s that a is e e ho ould ou p o e this? so a = fo
so e ). The
=a = = hi h, afte di idi g , gi es = so is e e . This ea s = fo
so e ).