DSGT Tech Knowledge
DSGT Tech Knowledge
Counting
We may express
A Das
dsjoint union of two
sets, by writing
Theorem:Let | Ai, Az, ...,
A, | be a finite
colleclo O
sets. Then
AUB (A- B) U B.
4 Countingg
B
AUA U ... UA, F2 Al
i= 1
An
1si<jsn
Al+
Module 4 1si<j<ksn
AnAnAl+..+(-1P|A1 n A2 ..n Aal
Here we modeled the case that lb is omitted by Proof Thu the AUAal = 18
principleis proved for three sets.
allowing an additional value * for l2 thatstands for
Consider the Venn diagram, shown in Fig.
We have the general theorem for a finite
omitted". The same holds for na. 4.1.1 Collectio
collection of finite sets.
Tech Knouwledge
PubICationS
Discrete structures and Graph Theory (MU)
Discrete Structuresand Graph Theory(MU) 4-3 -axis
COuning AUB 55 Counting9
Ex. 4.1.2 :A company manufactures cranes. These are
IPnc= 45
crane is
three baslc type of crane, labelled A, B and C. Each
assembled from a sub-assemblyset (a, b, C, d, e, t) as
follows
A is assembled from fa, b, c, d}
B is assembled from fa, c,
Cis assembled from (b, d, e) Flg. Ex. 4.1.5
In turn, the sub-assemblies are manufactured from basic Fig. Ex. 4.1.7(a)
X-axis
components {p. q, r, s, t, u, v, w, x, y, 2) as follows: Thus 55 programmers must be hired.
PuC 105
a is manufactured from (p, q, r, s)
Ex. 4.1.6 A sample of 80 people have revealed that 24 like U
bis manufactured from (q, r,t, v} Fig.Ex.4.1.3 inema and 62 like television programmes. Find the number
cis manufactured from {P, r, S, ) of people who like botn cinema and television programmes.
d is manufactured from {p, w, y} Ex. 4.1.4: Given A {1, 2), B={% y, Z, C =
{3, 4} thenfind
Soln.: Let A Set of people who like cinema
e is manufactured from (u, z}; AxBxC.
B Set of people who like television
fis manufactured from {p, r, u, v, y, z) Soln.: Note that A x B xC consists of all ordered
(a) Give the makeup of the following sub-assemblies programmes Fig. Ex. 4.1.7(b)
triplets (a, b, c) where a e A, be B, ce C. We can draw Then, we have
) a Ub (i) a ucuf (i) dUe Using the Principle of Inclusion and Exclusion
a tree diagram by which we can obtain the elements of
(6) Given that A is made in Bombay and B and C are A 24, IB = 62.
PUCI = IPI+|CI-1PnCI
made in Calcutta, what components need to be Using principle of Inclusion and Exclusion
84 +66-45 105
available on both sites ? . AxBxC =
(1, x, 3), (1, z, 4, 1, y, 3), (1,y,4, 1AUB I1A|+|B|-1AnB|
Soln. : PUCI = IU-|PuCj= 120 -105 15
(1, z, 3), (1, z, 4, (2, x, 3), (2, x, 4, We obtain
(a) Using the definition of union of two sets, we write:
(2, y, 3), (2, y, 4), (2, z, 3), (2, z, 4) There are 15 students who cannot program in
80 24 +62 |A nBI
i) aub =p,9, r, s, t, v) either of these languages.
Therefore, ANB| = 6
(ii) aucUf = (p, q, r, s, t, u, v, y, z AUB= 80 Ex. 4.1.8: In a survey of 260 college students, the following
(ii)d ue p, u, w, y, z} data were obtained.
(b) Note that A is made from sub-assemblies 64 had taken a Mathematics course.
a, b, c, d, where as B and C requirela, b, c, d, e, f 94 had taken a computer science course.
in all of them. 58 had taken a business course.
Now, inspection of those components required to Flg. Ex. 4.1.4 28 had taken both mathematics and business course.
make all six sub-assemblies reveal that the sub- 26 had taken both a mathematics and computer science
assemblies a, b, c and d do not require components u Fig. Ex. 4.1.6 course.
and z.
Ex. 4.1.5: A computercompany must hire 25 programmers Thus 6 people like both cinema and television
Hence only components u and z need not be made to handle system programming jobs and 40 programmers for
22 had taken both a
computerscienceand Business course.
available in both sites. Hence the components that| application programmingof those hired 10 will be expected
programmes. 14 had taken all three types of courses.
() How many students were surveyed who had taken
constitute aubUcud have to be made available on EX.4.1.7: In a group of 120 students studying computer
both sites.
to
perform jobs of both types. How many programmersmus none of the three types of courses?
cOurse, 84 can
program in 'pascal' and 66 can progran
45 can program in both 'pascal' and 'C, how many o(i) Of the students surveyed, how
be hired ?
many had taken only a
Ex. 4.1.3 Define Cartesian product of two sets. computer science course ?
Soln.: Let, A be the set STUdents cannot program in either of these languages ?
If A= {x|x is real and-2 Sxs3) of system programmersni Soln.: Let
and B= {yIy is real and1 sys5) B be the set of applications programmers hired. Soln.
A be the set of students taken Mathematics course.
Sketch the set A x B in the Cartesian plan. We want to find |A UB Let U =
(Students in computercourse B be the set of students taken
Computer Science
P = (Pascal programming students) course.
Soln. We have, A 25,
C C be the set of students taken Business course.
Let A and B be two non-empty sets. Then we define B = 40
=
IC programing students
Cartesian product of A and B as a set of collection of We have A = 64, IB| = 94,1C = 58,
Using the Principle of Inclusionand Exclusion, We want to find PUC
ordered pairs. We have, AnCI
PI = 84,
=
28, taken mathematicsand
AxB { (a, b) | a e A, be B} AUB =
IA| +|B|-1AnB| C = 66, business course
Sketch is as shown in Fig. Ex.4.1.3. = 25+ 40- 10 55
IPnCI = 45.
Tech Kaowled
PuDIICatip TechKnowledge
ubICations
Discrete Structuresand GraphTheory(M 4-5 Counting DiscreteStructuresand Graph Theory (MU) 4-6 Counting
AnBI= 26, takenmathematicsand Ex. 4.1
Suppose that 100 of the 120 mathematics
at college
take at Ileast one of the
a college take +IFnGnRI
students ussian. Also suppose languages
computer science course
French, German and 65 study
science and
= 65-20-25+8 28
BnCI 22, taken computer French,
business course French and German, 28 student study only French language
20 study
45 study German,
IAnB nC| =
14, taken mathematics,computer Only German =| G|-1GRI-|FnG|
and Russian,
science and business course. 12 25 study
42 study Russian,
French
+IFnGnRI
) Using Principle of Inclusion and Exclusion
15 study
German and Russian, 45-15- 20+8 = 18
AUBUC = JA|+|B|+|C]-|AnB| Fig. Ex. 4.1.9 (a) Find the numoer or stuaents who study all three
18 students study only German language.
- |BnCI-IAnCI Soln.:
ages.
(b) Fill in the correct number of students in each of the eight Only Russian = IR|-|FORI-1GnR|
+|AnBnCI regions of venn diagram.
(a) By the principle of inclusion and exclusion we +|FnGORI
64 + 94 + 58-28-26- 22+14 Here F, G and R denote the sets of students studying
have, French, German and Russian respectively.
42-25-15 +8 10
154
NUTUF| = |NI+1T|+|FI-INnT () Determinethe number k of students who study 10 students study only Russian language.
Students who have not taken either of subjects,
- ITnFI+IN nTnF| .1) )exactly one language
(i) exactly two languages
U -|FuGURI
AUBUCI= | Ul-IAuBUCI We have, 120 100
= 260- 154 = 106 Soln.
INUTUF| = 60-8 52 20
Thus 106 students had taken none of the three (a) Since 100 of the students study at least one of
'8 read no magazineat all. do not study any of the languages.
types of course. languages.
N = 25, 1T| = 26,| F| 26, IFuGUR| = 100
(c) From Venn diagram
and INnT| = 11, INOFl = 9, ITnFl = 8.
Again, from given data
) k 28+ 18+ 10 = 56
only Fortune
= :. GoRI |FnGnR 15-8 = | 4 had taken history and anthropology and 23 had taken no
() Determine the number of people who read exactly one 10 + " courses in any of the three areas.
() People who read only one magazine is 8 + udy German and Russian but not French
magazine. Refer Fig. 4.1.9. MU- May 12,May 13
30 Only French IF|-IFnG|-IFOR|
Tech Knowledge
Pubiication Tech Knouledgë
Dubitations
e Structuresand Graph Theory(MU) 4-8 CountingL
4-7 Counting Discrete
history respectively. 54 students had taken classes in exactly one of Fig. Ex. 4.1.12
S| 45, |A| = 38,
(a) We have =
the area.
H 21, = W-|RnWI-1An W|+ |AnRnW 10
19
(ii) k =
14 +5 +0 =
/15 20
SA = 18, 19 students had taken classes in exactly two of = 11-4-5+3
23 We have, A 15, |R| = 12, IWI = 11, AnR1-JAnRn WI 9-3 =6 Let C denote the set of all skilled COBOLL
4+2+5 11 programmers. Let M and W denote the set of men and
Fig. Ex. 4.1.11 AnWI = 5,
l1 cars had only one of the options. women programmers respectively.
SnA-SnHnA = 18-4 = 14 IM = 675
AnRI =9, 4.1.13: An investigator interviewed 100 students to
belong to S and A but not H RnWI = 4, and Cof their preferences for three drinks Milk (M), WI = 1000-675 325
SnHI-iS nHnAl 9-4 =5 =
TechKnsule
TechKnouledgeOns
EICatigB"
Discrete Structuresand Graph Theory(MU)_ 4-9 iscrete Structures and Graph Theory
MnFI = |FI-|WnFI
Counting 4-10
Soln.
650-210 440 (a) Let the number of housewives using brands
AnAl-256 Hence, number of integer between 1 and 100
Counting
IMOFnC| = IFnC-IWOFnC and Z be 'm'
X, Y are
not divisibleby 2,3, or
440 166 = 274 Let also the number of housewives using 1A Asl3x5-4 5 i.e.
brands x,
The set of M n (F n C) is the set of male
Y and Z as being elements of the sets
X, Y and Z
A nA nAsl |2x3x52=
| AUA2U As I 100 74 26
programmers who habitually flowchart their programs respectively.
Ex. 4.1.19 :
or are, skilled COBOL Now we can draw Number of integers between l and 60 Among the integers 1 and 300, how many or
programmers. Venn-diagram: which are them are divisible by 3, 5 or 7 and
|MnFuC)| Since 14 housewives used none of the three divisible by 2, 3 or 5 are by 5, nor by 7? How many of them
arenot divisible by 3, nor
=
|MnF|+ |MnC we have that 100
brands, are divisible by 3' but not
- |MnFnCi
14 86 housewives used
=
Ex. 4.1.16: When carrying out a MU-Dec. 14,May 16 - 1AgAsl-1An Asl +|A, n A
n Asl
survey on the popularityof
three different brands X, Y and Z of
washing powder, 100
Soln. : Let A1, Ag and Ag be the set of
integers between A A 3X5b = 100+60 +42-20-14-8+2
housewives were interviewedand the results were shown as 1 and 60 divisible 162
follows by 2, 3 and 5 respectively. and
An Az n Asl
30 used brand X only 22 used brand Y
only .
1Al- 30
=
2x3x5| Hence, there are 162 numbers between 1 and 300
divisible by 3,5 or 7.
18 used brand Z only 8 used brands X and Y Number of
divisible by 2 or integers between 1 100 whichare
and Number
9 used brands X and Z of integers
which are not divisible by 3,
Tech Kaeuledge
PUDIication>
Techubtications
Knouledga
Discrete Structuresand GraphTheory(MU)_ 4-11
Ex. 4.1.20: How many integers between 1 and 2000 Ex. 4.1.21 Detemine the number of integers betwear
COunting niscreteStructuresand GraphTheory(MU)
DIScrete
4-12
Counting
divisible by 2,3, 5 or 7 ?
are
and 250 that divisible by any of the
are Neenintegers2,3,5and |Al+ A+|Asl+|A4l-1A,nAal
- |A Asl-1A1 nAl-1A, nA Gi) Consider the Venn
Soln. MU Dec. 16 diagram shown in
Let the sets Ay Ags A denote the A4l-1As nA| Fig. Ex. 4.1.22.
Let Abe
divisibleby 2.
the set of numbers between 1 to 2000 Soln.: Az set - |A
integers between 1 and 250 that are
divisihe +|A nA2 nAsl+|AAn A
B be the set of numbers divisible by 3. respectivelyby 2,3, 5 and 7. +A A n A|
C be the set of numbers divisible by 5, and Then Al= number
D be the set of numbers divisible by 7
of elementsin A +A A Al-|A, n AzAnA
=
largest number of elementsin
A= 2000|
2 |= 1000 A which are divisibleby 2 125 +83+50+35-41-25-11-16-17-7
76
+8+5+3+2-1
CI = =400
Similarly, Apl =88 EX. 4.1.22 Among the integers 1 to 1000: () How
many of
them are not divisible by S, nor by 5, nor by 7 ? (i) How
Fig. Ex. 4.1.22
The set of integers not divisible by 5 and 7 but
DI |= 285 many are not divisible by 5 and 7 but divisible by 3?
1Al =50 Soln. divisible by 3 is the set A NBnd.
.
JA NB 93333
=
Let A, B, C denote respectivelythe set of integers A BnC= A n ( BuC ) A
from 1 to 1000 divisible by 8 by 5 and by 7. (Bu C), the
= -
BnC= 133
25041
| 2x3 ByDeMorgan'sLaw n B nT= (AUBUC) Now,
and, 1A, n Al = 25 Hence, AUBUC| = 1000-1AUBuCI (A NB)U(An C)|= |AnB|+JAnCI
2000
BOD 3x7 95 - 1AnBnC
CnD = 57
and 1A n Agl = = 16 IA 88 66+47-9
104
2000 AA 250
2x717 B = 200
Also, AnBnC =
BncnD = xX719
14nA 11 AnBI =66 divisible by 5 and 7 but divisible by 3.
2x250 3X5xT=1 -IBnCI-1AnCI processor and B denote the memory space reserved for
spread sheet.
+ BncnD+JAnCnDI Now we use the fornmula,
+AnBnC
|A| = 40
-1ANBncnDI 333 + 200+142-66-28-47 +9 Given:
= (1000+ 666+400+285) A nA As nAl =
EIA| -2IA;nA| 543
IB = 32
i,j
- (333 +200+ 142+133 +95+57) Hence, AU Available memory is 64- 16 = 488
ie. A nB| 2 A + |B| - 48 People who watch only hockey and the number of students who known Pascal and
MUPUC| = 130-| MUPuC| but not Cobol is
"C
= 40+32 48 24 =
|H-|H n FI-|HnB 1+|FnHnB
Hence the minimum amount of overlapping space
= 195 70 - 50+20 = 95 130-| M|-IP|-1C BPnc =IPOCI-|BncnP
People who watch only basketbal +[M nP+ |MnCI+|Pnci 28 12 16
that will be necessary is 24 k.
- | MOPnCI Hence, number of students who know exactly two
Ex. 4.1.24 A survey of 500 television watchers produced
=
|BI-IF NB|-|B0H|+|FnHnB languages is,
the following information:
= 115-45 50+20 40
=
130-60- 51- 54+30+ 26 2513 + 16 = 54
+21- 12 = 30.
285 watch football games ii) The number of students who know only Cobol (i.e.
195 watch hockey games BY.4.1.26 It was found that in tirst year of Computer neither 'C nor Pascal) is
115 watch basketball games
45 watch football and basketball games
19 5
Science of 80 students 50 know Cobol, 55 know 'C', 46 know
Pascal. It was also known that 37 know 'C' and Cobol, 28 BI-BnCI-|BPI+|BnPncC
= 50-37-25+12 0
know'C and Pascal, 25 know Pascal and Cobol. 7 students
70 watch football and hockey games however know none of the languages. Find: Similarly the number who know only 'C is
40
50 watch hockey and basketball games () How many know all the 3 languages? CI-1CnP1-1CnB|+|BnPncI
50 do not watch any of the 3 kinds of games. () How many know exactly two languages? = 55-28- 37+ 12 2
) How many people in the survey watch all 3 kinds of ()How many know exactly 1 language ? The number of students knowing only Pascal is,
games ? Fig. Ex. 4.1.24 Soln.: Let B,C and P denotethe set of studentswho IPI-IPNCI-IPnB|+|BnPnC
() How many people watch exactly one of the sports ? know Cobol, 'C' and Pascal respectively.
= 46-28-25+12 = 5.
Number of people watching exactly one kind of
MU-May 15 game
Then B UCUP| = 80 7 73 Hence the number of students who know exactly
Soln.
190 +95 + 40 325
number
1S the
the languages.
of studentswho know at least one ofone language is
Let F be the set of people who watch football 0+2+5 = 7
'325 people watch exactly kind
Let H be the set of people who watch hockey. one
of game. ) |BuCUP| =
|B|+1CI+|PI-|BnC| Ex. 4.1.27 : t is known that at the university, 60
Let B be the set of people who watch basketball.
Ex. 4.1.25: Among 130 students, 60 study Mathemalics,
percent of
Given: F = 285
-BPI-COP +|BncnP the professors play tennis, 50 percent of them
play bridge,
H 195 51 study Physics and 30 study both mathematics a ence the number of students who know all the0 0g, 20o play tennisand bridge, 30%claimed
play tennis and
|B| = 115 IFOB = 45 physics. Out of 54 students studying Chemistry 26 stuy three languages is
Mathematics, 21 study Physics and 12 study boh og. 40% play bridge and
of the professors jog and
jog. If someone that 20%
IFOH = 70 HBI = 50 play bridge
and tennis, would you
mathematics and Physics. All the students studying neither BnCP| = 73- 50 55-46 +37 +28 +25 believe this claim ? Why?
50 people do not watch any of the 3 kinds of games. mathematics nor Physics are studying biology. Find
12 Soln.: Let
() How many are studying biology ?
i) People in survey who watch all 3 kinds of games The number of students who know Cobol and T be the set of professors playing tennis
i.e. football or hockey or basketball, Gi) How many are not studying Chemistry and studyng
Mathematics but not Physics ?
but not Pascal is
B be the set of professorsplayingbridge
FuHUB| = 500- 50 = 450 J be the set of
() How many students are studying neither mathemai IBncOPi =|BnCi-1BncnP professorswho jog.
450 people watch atleast one of the 3 games. nor Physics nor Chemistry? Since, the data is given in percent, we assume that
Using the formula of inclusion and exclusion, we Soln. 37-12 =25
=
the total number of professors be 100 x. Hence from the
have, given data,
i)
FUHUB| = |FI+|H|+|BI-IFnHI
|MUP| =
1M|+|PI-|MnPI TI 60x IBI 50 x
60+51-30 81 1J 70x ITOBI = 20x
- IFnBI-|HNB| Number of students studying neither Mathenman
nor Physics IT nJ| = 30x IBnJI = 40x
+IFOHOB|
iBnJnT| = 20x
450 = 285 +195
+115-45-70 50 = 130-I MUP| = 130 81 49
Using the formula of inclusion and exclusion, we
+IF nHBI Hence the number of students studying D
49. have,
IFOHnB| = 20
(1) The set of students studying Mathematic Fig. Ex. 4.1.26 BUJUT| = |B]+|J|+|TI-|BnJI
20 people in survey watch all 3 kinds of games.
and Similarly, the number of studentswho know Cobol
neither Chemistry nor Physics is,
-JnTI-B0TI+|B nJnTI
i) People who watch only football.
| M-[Mn(CUP)]| Pascal but not 'C' 1s,
= FI-IFOHI-IFnB|+|FnHnB|
IMI-IMnC-|MN PI+ |Mncn el Tech Knowledge
UDIICatinns
DISCrete structures and
n Theory (MU)
Discrete Structuresand Graph Theory(MU) 4-15 COUnn EY. 4.1.30: Suppose that 109 of 150 computer science
4-16 Counting
30 of principle of inclusive and
50 x+ 70 x + 60 X-40 x- x
students at
one or the Mumbai college take at
least one of By formula of
using 1ormula
- 20 x+20Ox 59 42
language: VB, VC++ ar Java.
the followingcompurer 61 stucy *and exclusion,
exclusion we have,
study VB, study VC++, 53 study Java. 18 A UAUAal =
lAsl-A Al
|A4|+|Agl+
110 x opose 45
SUppand
VB and VC++, 53 study VC++ and
study
Java, and 23 study -1A n Agl-1A2nAsl
|BUJUT|is 110% which absurd. VB and Java.
+1A nA n Al
I will not believe the claim made by someone. How many students study all 3 languages?
students study only VC+4? = 15 +8+6-1A n Aal
(a) How many
Out of 250 candidates who failed in an Fig. Ex. 4.1.28 How many students do not study any of the language ?
Ex.4.1.28:
examination, it was revealed that 128 failed in mathematics ( -1A Asl-1A2nAsl+3
(iv) Candidates Failed in Physics but not in aggrega. 32-1A n Al-1A n Agl
134 in aggregate. 31 failed in mathematics Soln.
87 in physicsand
and in Physics, 54 failed in the aggregate and in or in Mathematics Let V be the set of students who study VB -1AnAsl
in physics. Find |P|-|MOP1- JA n P]+ |MOPnA Since, 1A n Al 2 1A nA Al
mathematics, 30 failed in the aggregate and Let C be the set of students who study vC++
how many candidates failed. = 87-31-30 + 16 Let J be the set of students who study Java. A Al A nAn Asl
) in all the three subjects. AzAsl 2 |A1 n A2 Al
By using the formula of principle of inclusion and
i) in mathematics but not in physics Hence we consider that,
exclusion
in the aggregate but not in mathematics. Ex. 4.1.29: A college record gives the following information:
(i) 6) VuCUJ| = |V| +|CI+|J|-|VuCI Since, An Al = 3
(v) in physics but not in aggregate or in mathematics 119 students enrolled in Introductory computer Science of
MU- Dec.12| these 96 took Data structures, 53 took Foundations, 39 took -IVuJ-ICuJ+VncnJ A Al = 3
A Asl = 3
Assembly language, 31 took both foundations and Assemby 109 45+61+53-18-23-53
Soln. :
language, 32 took both data structures and Assemby AUAUA,l 32-3-3-3
Let |M|= 128 PI = 87, +VnCnJ
language, 38 took data structures and foundations and 2 23
A 134 MOPI = 31 took all the three courses. Is the information correct ? Why? VncnJ| =109-65 =44
That is, there are at most 23 cars that have one or
AnM 54 AnPI 30 Soln. : Let D be the set of students who took data 4 students study all 3 languages. more options. There are at least 7 cars that do not have
any options.
(1) By the principle of inclusion and exclusion weSUrueture.
F be the set of students who took data
) C-I VuCI-|CuJ| +|VncnJI
have,
Foundations. 61-18-53 +44 =34 Ex. 4.1.32: Find the number of positive integers not
exceeding 100, that are either odd or the square of an
MUPUAI =|M|+|PI+|AI-|MnP 34 students study only VC+*.
A be the set of students who took data Assembly integer.
- ANM-A NPI
Language. 11) VuCUJ = IUl-|VuCuJI Soln.
+MnPnA| Hence from given data, Let A be the set of odd integers between 1 and 100.
= 150- 109 = 41
250 128+87+ 134-31-54-30 DI 96 IFI = 53
4l students do not study any of the language.
B be the set of integers between 1 and 100 that are
squares of an integer.
+|MPO A| A = 39 IFNAI = 31
A = {1,3, 5, 7, 9, ... 99
EX. 4.1.31 : 30 cars were assembled in a factory. Ine
250 234+|MOPnA ID A = 32 IDNF| = 38
B 1,4, 9, 16, 25, 36, 49, 64, 81, 100
wns available were a radio, an air conditioner, and white
250-234= | MNPnA| IFODA| = 22 tres. It is known that 15 of the cars have radios, 8 of
AUB IA|+|B|-1AnB|
MPNA 16 m have air conditioners, and 6 of them have whine-wau
Using the formula of principle of inclusion and = 50 + 10-5 55
16 candidates are failed in all three subjects. exclusion we have, Moreover, 3 of them have
00
all 3 options. How many cais
not have
any options at all. Ex. 4.1.33: Let A denote the set of staff who has mastery
ii) Candidates failed in Mathematics but not in . |FUDUA| = IF|+ |DI+ |A|-|F nAI Soln.
inC language.B denotes the set of staff having mastery in
Physics -ID A-DNFI+ FND nA et A be the sets of cars with a radio. C++. C denote the set of staf having mastery in COBOL, D
= |M|-|MnPI
= 53 +96 +39-31-32 38 +22 et A be the sets of cars with an air-conditioner. denote the set of staff members having mastery in JAVA. E
et Ag be
the sets of cars with wall tires. denote the set of staft staying in staff quarters. F denote the
128-31 =97
(ii) Candidates Failed in aggregate but not
= 109 which is less than 119.
Given set of staff who went to play games on computer. Express
the following statements in set theoretic notation.
Since there were119 students enrolledtor
Mathematics Al Al = 8 ()All staff staying in staff quarter has mastery neither in C
course, assuming that all these students had a nor in C++ went to play 9ames on computer.
A= 6
= 1A|-|A N M|= 134-54 80 atleast one course, the given information is not cors AAn Asl (i) The staff who went to play games are only those who
has mastery in COBOL.
TechKnou
ubIirate
TechPubiications
Knouledge
Discrete Structuresand Graph Theory(MU) 4-17 Discrete Structures and
Graph
Theory (MU)
(ii) No staff who has mastery in C language went to play
Counting In a class of students undergoing acomputer4-18
games. Al = 333 c4.1.37:
observed.
se the followingstudents:
were
Th number Counting
(iv) Those and only those staff who has mastery in JAVA total of 50
of students who know only COBOL
| 1000 out of
C1-IFnCI-|PoC]+|PnFnCI
a
and COBOL went for a cricket match. 1Aal 5 200 30 know Pascal,
(v) All staff went to play games.
26-8-16+6 8
1000=166,
18 know Fortran,
Soln. :
AA 2x3 26 know CoBOL,
Hence number of
students, who know exactly one
) E F-(AUB). (i) C F. Pascal and Fortran language is 11+7+8 =26
AAgl 1000
2x5 100 g know
both
A-A nAl+|An AD
= 333 -(166 +66)
Soln.
(v) If the universal set is A u BuCuD, then E F, integers divisible by 3 and 5 respectively. -PnC-FnC+PoFnC
otherwise (A UB
UCUD)-ESF. 47 30+ 18 +26-9-16-8 87
integers divisible by 3 and 5 respectively. Number of integers between 1 and 60 which ar nor Fortran) is People flew but drive
divisibleby 2 but not by 3 and nor by 5. nCI A-C JA| -
IA|
) Then 1Al = 1000
2=500 30-16-9+6 =11 599 = 1307-1A|
Al An Al-A nAgl +
= 30-10-6+2 16
AnAnAsl ne number who know onlyFortran'15, : JAnC| = 708
TechKnewledge
-IFnC|-|PoFI+|PnF
18-8-9+6 7
nd People drove but use a train
Tech Knowledge
OITtations Publitat
Discrete structures and Graph Theory (MU)
Discrete Structuresand GraphTheory(MU) 4-19
COunting studentsdid not get an A in either examination
4-20
Counting
AnAa= al_100
1C-T 1C|-ICnT 2
number of students who 4.2 The Pigeonhole
1097 C| -610 Use the principleofinclusion exclusion
So the
examination is 50-4 46
got A in at least In
this section
Principle
C =1707 AuAa l=| Ai l+ | Aa| - | AinA2 | one It is also
known
discuss the pigeonhole principle.
we
Either a car or train or both |S|-|FoS| =46 dirihlet drawer principle or the
as
20 F| +
..(2) shoe box
CuT = C+ IT| - 1CnTI
=
+14 -2 Using Equation (1) principle and it can be stated as follows.
32
2050 1707 +1T| -610
Thus 32 of the 100 integers are divisible by 5
FI+S2 |FnS|=40 4.2.1 Theorem of Pigeonhole Principle
. IT| = 2050+610- 1707 r7,
then the number of integers not divisible by 5 or 7 are
F+IS-|FnS| -|FnS| =40 University Questionss
IT| = 953 46-IFnS|=40 ..using Equation (2) Q. State pigeon hole
pinciple. MU
Total number of people travelling by plane or
(AAe | = |A |-1 AUAz
Q. Explain Pigeonhole principle. MU
Dec. 14,May 16
FnS =6 May 15, Dec. 17Z
train or car. 100 32 6 Students got an A in both examinations. Q. Show that in any of people who have been
room
IToC| exactly one examination is 40 and if4 students did not get an S- IF nS| = 26-6 20 same number. This assigns as many
A in either examination then determine the number of pigeons as
+AnTC] students got an 'A' in second examination only. possible to individual pigeon holes, but because m < n,
students who got an A in the first examination only, who
= 1707-708 610+398 got there are
an A in the second examination only and who got an A n 50
n -
m
pigeons that have not yet been
787 assigned to a pigeonhole. At least one pigeonhole will
both the examination.
Soln. : be assigned a second pigeon.
Ex. 4.1.39: Find the number of positive integers not
) Let T be the number of students. 20 Let us say there aren people attending the party.
exceeding 100 that are not divisible by 5 or 7, Also draw
corresponding Venn diagram. Obviously, this problem makes sense only when n 2 2.
Let F be the students who got A in first If no two people have shaken hands with equal number
MU Dec.19 examination of people then there handshake count must differ at
Soln.
Let 'S be the students who got A in second least by 1. So the possible choices for hand shake count
Let, Fig. Ex. 4.1.40
examination would be 0,1,...n - 1. There are exactly n choices andn
A: All positive integers not exceeding 100 people. If there exist a person with (n-1) handshake
ITI = 50 EX. 4.1.41: Let the universal setU = {1, 2, 3,10)
A: Divisible by 5 count, there can't be a person with 0 handshake count.
FI = 26 Let A=(2, 4, 7, 9) B {1, 4, 6,7, 10) and C = (3,5, 7, 9)
Ag: Divisible by 7 Thus reducing the possible choices to (n-1). Now, due
S = 21 Find:1.A U B 2. An B 3. BnC 4.(AB) to pigeon hole principle, we have that at least two
There are 100 integers not exceeding 100.
Number of students who did not get an A in either 5.(BuC)nC MU-May 18 person will have the same number of handshake count.
A 100 examination = 17 Soln.
There are 100 integers not exceeding 100, which a Number of students got an A in at least ou U 4.2.2 The ExtendedPigeonhole Principle
number divisible by 5 is every 5th element in the list of
[1,2, 3,
=
10) .,
integer less than or equal to the rational number n/m.| follows from the pigeonhole principle since there are 1 From i 8 selected bowlers, we can form total a
A1 =
{1, 12 ), A2 8, 5,
ThusL 3/2 Jis 1, L 9/4 Jis 2 and L 6/3 Jis 2. numbers (pigeons), but only 10 odd numbers betweer
en PC3 or
different teams. These will play the role of Ag = 17,6),
A4 (11, 21,
and 20 (pigeonholes) that be odd parts of at
Theorem: (The extended pigeonhole principle) can
theae
these The largest possible team code number Ag 19,4),
assigned to pigeonholes, then
numbers. piged is 18+ Ag 10, 3 ).
If n pigeons are m,
Let ni and n2 be two chosen numbers with tha 19+20 or 51,
ana ae snaest possible is 1+2+3 Each of the seven numbers
one of the pigeonholes must obtain at least ThuS only the 52 code numbers
or
chosen must belong to
L n- 1)/mJ+1pigeons. same odd part we must have n
2 m and =
6 and 57 inclusive (pigeonholes) one of the sets.
Since there are only 6 sets, the
available for the 56
are
pigeonhole principle tells us that two
Proof n = 2 m, for some kj and ko.
If kh 2 k2, then n is a hle teams. By the pigeonhole principleat
least two numbers belong to the same set. of the chosen
we can prove this by the method of contradiction. multiple at ng; otherwise ng is a multiple of n. teams will have the same code number. These numbers add
upto 13.
Assume that each pigeonhole does not contain more
Ex. 4.2.4: Consider the region shown in E 4.2.6: Show that it any 30 people are selected,
theen weEX. 4.2.11: How many numbers
than [(n-1/m) pigeons. Then, there will be at most
Fig Ex. 4.2.4(a). t may choose a sudset ats so nat all
5 were born must be selected from the
on the Set f1, 2, 3, 4, 5,6} to
mn-1/ml smn-1Vm=n-1 pigeons in all. This is in sunit.bounded byaregular
Show that hexagon whosesidesare oflength1
if any seven polnts same day of
the week. that at guarantee
these numbers add up to 7 ? least one pair of
contradiction to our assumptions. Hence, for given m are chosenin his region, MU-Dec. 14
pigeonholes, one of thses must contain at least
then two of them must be no farther apart than 1 unit. Soln.: Assign each person of to the
week day the onSon.
Solve by extended
which she or he
born. Then 30
was Pigeonhole principle 4
(n-1)/m]+1lpigeons. pigeons are being numbers must
be selected from the set {1, 2, 3, 4, 5, 6
MU-May 13, Dec.15 assigned to pigeonholes. By
7 the extended pigeonhole guarantee that at least one pair
4.2.3 Solved principle with n = 30 and m = 7, at least L (30-1)/7J | add upto 7. of these numbers
Examples on Pigenhole
Principle 1or 5 of the people must have been born
day of the week.
on the seame Ex. 4.2.12: How many
people do you need in a school to
Ex. 4.2.1: If eight people are chosen in anyway from some gurantee that there are two people who have the same
group, at least two of them will have been bom on the same Ex. 4.2.7 Show that if 30 dictionaries in initial. (first and last names only).
day of the week.
a containna
total of 61,327 pages, then one of the dictionariesmust have
library
Soln. : There are 26 letters for each
Fig. Ex. 4.2.4(a) at least 2045 pages. of the first and the
Soln. Here each person (pigeon) is assigned to the last names number at possible sets of initials are
day of the week (pigeonhole) on which he or she was oln. Soln. Let the pages be the pigeons and the 26 6T6. So by pigeonhole principle, provided there
born. Since there are dictionaries the pigeonholes. Assign each are more than 676 people there must be
eightpeople only seven days
and Divide the region into six equilateral triangles as page to the
dictionary in which it appears. Then by the extended eople with the same initials.
atleast two
of the week, the pigeon hole principle tells us least two shown in Fig. Ex. 4.2.4(b).
people must be assigned to the same day of the week. If seven points are chosen in the region, we can pigeonhole principle, one dictionary must contain
least. a Ex. 4.2.13 Show
that in any room of people who have
assign each of them to a triangle that contains it. If the been doing some handsaking there will always be atleast two
Ex. 4.2.2 Show that if
any five numbers from1 to 8 are point belongs to several triangles L61, 326/30 J+ 1 or 2045 pages. people who have shaken hands the same number of times.
chosen, then two of them will add upto 9. arbitrarilyassign t0
one at them. Then the seven points are assigned to sx
X. 4.2.8: Six friends discover that they have total of 2161 Soln. : Suppose there are n people, then since people
MU- Dec. 12 triangular regions. So by the pigeonhole principle at With them on a trip to the movies. Show that one or more shake hands only once, the labels on the pigeonhole
Soln. Construct four different sets, each containing
: least two points must belong to the same region. These of them must have at least 361 Rs. will go from 0 to (n- 1). That is we have n people and n
two numbers that add up to 9 as follows: two cannot be than 1 unit
more
apart. he rupees be the ut
pigeons and the numberofnoles. DoEn
t
1s not possible say for 0th and (n 1th -
e
A 1,8), Ag 12,7 , 1s number of pigeonholes.Then by the extended noles to be occupied. Thus we have at most (n-1)
pigeonhole principle one friend must have at least. holes occupied at any one time. Hence, by the principle
Ag 3,6), A4 = 4,5]
L2160/6 J+1 or 361 rupees.
at least one of the holes has two occupants, which
Each of the five numbers chosen must belong to shows that there are atleast two people who havve
one of these sets. Since there are Ex. 4, shaken hands the samenumber of times.
only four sets, the assembled in show that
13 people are a room,
pigeonhole principle tells us that two of the chosen St 2 of them must have their
month. birthday in the
sa Ex. 4.2.14: Among six people there are eitherthree who all
numbers belong to the same set. These numbers add
know each other or three who are complete strangers.
uptoS9. Fig. Ex. 4.2.4(b) Soln.:
Let the birth months play the role of the p Soln. : Consider one of the people, say X. of the other
Ex. 4.2.3: Show that if any 11 numbersare
chosen from the Ex. 4.2.5 : Shirts numbered
consecutivelyfrom 1 to 20 a
the calendar months, the pigeonholes.Then u pigeonhole
ca put them inknow. X ofortwo
we either
set {1, 2, 20, then one of them
will be a multiple of worn by the 20 members of a and 12 pigeonholes. By the pigeonhole|Ve peoe
another,
bowling leaque. When any Princinons aepeanangon wnether they not. If we put
MU- Dec. 15 these members are chosen to be a
team,
the sum of east 2 people were born in the
same
n = 2 and k = 2 so that there must be k + 1 = 3 people
month.
Soln.: Every positive integer be written as
can
Sit numbers is used as a code
that if any 8 of the 20 are
number for the team sno we
who do not know X. Suppose there are three people A,
n =
2, where m is odd and k 2 0. This can be seen by selected, then from these Ex. 4.2.10: Show B, C who all know X. Then if any two of A, B and C
may form at least two different teams having the same Show that if numbers from 1 to 12are
simply factoring all powers of 2 (f any) out ofn. In this Chosen
sen, then 2 seven know each other, say B and C, then X, B, C all know
number. of them will add upto 13.
case let us call m the odd part of n. Soln.: each other.
bers that
Construct
6 different sets each containing
two
other then A, B and C form a set of three complete numbers viz ( 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37. n-1 25
41, 43, 47 ). Hence m = 75-21 +1 55
strangers.
n 26 Hence by the
Ex. 4.2.15: Showthat amongn + 1 arbitrarilychosen
Suppose in any set of 16 numbers from 2 to 50, no pigeonholeprinciple
two have divisor greator than dents are required n a discrete structures
positive integers, there are two whose difference is divisible
a common one.
Consider
by n.
the prime factors of these numbers. By our assumption class.
no two numbers will have common prime factor. This
Soln. We use Eculid's division algorithm. Given
would mean that there should be atleast 16 different A2.21: How many triends
must you have to gurantee L 5004
55
positive integers a and b, we can divide a by b and get at least five of them wil have birthdays in the same
prime numbers. This contradicts the fact that there are 91
a quotient q and remainder r, i.e.
only 15 prime numbers. Hence our assumption is month.
MU-May 18,May 19 Hence in atleast 90 ways, we can choose six
bq+r wrong Therefore, in any set of 16 numbers from 0 to Soln.: Let n be the no. of friends
numbers from 1 to 15 that all the choices have the
Let S = la, a2 ...an+1l be the set of n +1| 50, 2 numbers will have a conmon divisor greater Tf number of months are to be
than 1
pigeonhole then samesum.
arbitrarily chosen positive integers. number of friends n will be pigeon
Define, f: S-10,1,2,... n -1 ). Ex. 4.2.18: Show that among any n+ 1 positive integers By extended pigeonholeprinciple X. 4.2.24 Prove that if any 14 integers from 1 to 25 are
chosen, then one of them is a multiple of another.
by f(ai) = ri, the remainder left after dividingnot exceeding 2n, there must be an integer that divides one
of the other integers.
by n.
MU- May12
Here s = n+1 and cordinality of the co-domain is
Soln.: Let us denote the n +1 positive integers as a Soln. : Every positive integer n can be written as
a2 n+1 Then we can write each integer a as n =2, where n is odd and k 2 0.
n.Hence by pigeonhole principle, fa;) faj) for This can be seen by
1#J. a:
=
2ki b; for j
= =
1, 2 ... n + 1, where k is a non n-1 = 48 simply factoring all powers of 2 (if any) out of n. In this
This means thatr, Tj. Hence
a8n 9. nus
=
case let us all m the odd
means that there are two integers a and a, in s whose negative integer and b;odd positive integer. For n = 49 part of n. If 14 numbers are
chosen from the set {1, 2,..., 25} then 2 of them must
example, 1 = 20. 1, 2 = 21, 4 = 22. 1, 6 = 21 3 and so
Thus among 49 friends, at least five
difference is divisible byn. on. Now b,
b2.. bn+1are all odd positive integersless of them will have the same odd parts. This follows from the
have birthdays in the same month. pigeonhole principle since there are 14 numbers
Ex. 4.2.16: A sports tournament consisting of 45 events is than 2n. Since there are only n odd positive integers
pigeons), but only B odd numbers between 1 and 25
spread over 30 days. There is atleast one event per day. which are less then 2n, it follows from Ex. 4.2.22: Prove that among 1,00,000 people, there
pigeonhole are (pigeonholes)that can be odd parts of these numbers.
Provethat no matter how the events are arranged there willprinciple that b; = b; for some i and j. Then a = 2 q two who are born at exactly the same time
be a period of consecutive days during which Let n and no be 2 chosen numbers with the same
exactly 14 and a 2k q, where a a a. If k; < k, a divides (hour, minute, second)
a
= = =
events will take place. odd part we must have n =2 m and na = 2k2 m.
otherwise a, divides ai. Hlence the result. Soln.: Let A be the set of people. (pigeons) and B, the
Soln. : Let a denote the total number of events that set of seconds
for some k and k2. If k2 2 k2 then nj is a multiple at
(pigeonholes)of one day. ng; otherwise na is a mutiple of n.
takes place upto and including the
a
iday. Hence Ex. | 4.2.19 Show that
7 colors are used
1 and ago = 45, and we have a sequence a1 , a2| bicycles, at least 8 bicycles will be of same color. to paint 50 A 100,000 n
Ex. 4.2.25: There are 3000 students in a college which
B30 45, which is strictly increasing since there is
B 24 x 3600 86400 = m offers 7 disfinct courses of 4 years duration. A student who
atleast one event per day. Adding 14 to each term in MU-May 15,May16,May1 has taken a course in Discrete Mathematics learns that the
the sequence, we obtain Soln.: Ifn pigeons are assigned to m pigeonholes, and Then k L(n-1)/mJ+1 largest classroom can hold only 100 students. She at once
m <n, then at least one pigeonhole contains two or realizesthere is a problem.What is the problem
a+14, a2 + 14, .. g0 + 14 = 59
more pigeons.
k =
L(100000-1)/86400J+1 Soln. : Since, there are 7 distinct classes of 4 years
Now consider the sequence a1 a2 ag0, a1+ 14, k 1+1
a2 + 14, .a30 + 14, which consists of 60 numbers By the extended pigeonhole principle at least. duration, we have 7 x4 = 28 different classes. Hence,
L(50-1)/7J+1=8willbe of the same color. k 2. by extended pigeonhole principle,each classroom must
ranging from 1 to 59. Hence by pigeonhole principle,
two of these numbers must be the same. Since
aj * ai Ex. 4.2.20: What is the minimum number of stude ence there
Same day.
are atleast two who are born on the | students.
hold atleastL(3000- 1)/ 28 + 1 =107 + 1 = 108
But since the capacity of the largest
for ij, it follows that a = a; + 14 for some j> i. Hence
required in a discrete structures class to be sure that at least classroom is only 100, this is obviously a problem.
a- 14, which means that there is a peirod of SIx
ill receive the same grade, if there are five possible 6.23: Show that there must be atleat 90 ways to
choose six numbers
grades A, B, C, D, E
consecutive days from the day duringwhich exactly nave the
from 1 to 15. So that all the cholces Ex 4.2.26:Let Tbean equilateraltrianglewhosesides are
14 games take place. Soln.: By extended pigeon hole
principle same sum of length1unit.Show that if any five points arechosenlying9
onor inside the triangle, then two of them must be no more
Soln.: n
15C6 =5005 than 1/2 unit apart. MU-Dec. 13
Ex. 4.2.17: If a set
of 16 numbers is selected from { 2,
.. 6
50 ), atleast two numbers will be in the set with a common The0West sum of 6 numbers chosen from1to
15 Soln.: m1, m2, ma are midpoints of sides AC, AB and
divisor greater than 1 BC, respectively. Let the four small triangles created
6-1 1+2+3+4+5+6
be the pigeonholes.
= 21
n ma
any discrete computation
putation
problems, it is easier
to
numeric
relation 4.3.1 Linear Recurrence
m3 distance of 45 miles. It is known that he hiked 6 miles total
a function in the form of a
first hour and only 3 miles in the last hour. Show that
in the obtats terms. The recursive formula for Relationswitn
Fig. Ex. 4.2.26 he must defining Constant Coefficients
have hiked atleast 9 miles within a certain
period of two
imer function is called a recurrence relation. Lost of the recurrence
Ex. 4.2.27: Let S be a square whose sides have consecutive hours. fa lao, a, a2 ** as 18 a relations we
come across
units. Show that for any five points on or
length 2 =
*
numeric function are linear recurrence
relations. Now, we define the
be two points whose distance apart is almost
inside
S, there must
Soln. : Let a, 1
sis10, denote the number of miles Ahon the recurrence
relation
is an
quation
tor
near recurrence
a
relation with constant
2 units. ating &, for any r, to one or more
aj s (i <r). In other coeficients.
hiked by the man during the Suppose r and k are
Soln. Divide the square into 4 equal squares, as i hour. Then a 6, =
...(4.3.1) r 2 k
we assign it to one of them
square, function
arbitrarily. Then the five at pairs of consecutive hours using the
completelyusing the recurrence relation, the valuesofere CCs Ca Ca,..C are constant, is called a
relation,the
points are assigned to 4 square regions, so by the the numeric function at one or values oflinear recurrence
Apply pigeonholeprinciple to the sum more ponts arecoefficient relation with constant
pigeonholeprinciple at least two points must belongto required to initiate the of order k, provided Co and
(a2 + ag) + a4 + a5) + (ag + a7) + (ag +ag) = 36 computation. These given C are non-
the region. These two cannot be more than y2
same values of the function are called initial conditions. For zero.
units aparts, as the side of Since sum of 4 nunbers is 36, value of The relation
each square being 1 units, one number example, consider the recurrence relation a, - 2a,-1 2r is a first order linear
the length at the diagonal is N2 units, which is the should be atleast 9. recurrence relation with constant coefficients.
+3
maximum distance, that the two points can be Hence the man must have hiked atleast 9 miles
a,ar-1 ,r 21with a =2 Similarly, a, + 2a, -3 = r'is a third order linear
apart. Here a ap +3 =2+3 = 5
within a certain period of two consecutive hours. recurrence relation.
a a +3 5+3 =8
Ex. 4.2.30 Show that among any group of five (not But the relation a 5 is not
13 = a +3 =8+3 = 11
+
a -1
=
a linear
necessarily consecutive) integers, there are two with the recurrence relation.
same remainder when divided by 4.
To solve the kh order linear recurrence relation
Soln.: Since there are 4 possible remainder when an with constant coeficients, we require k initial
integer is divided by 4. The pigeon hole principle conditions to determine the numeric function uniquely.
Thus the
Fig. Ex. 4.2.27 implies that given 5 integers at least two have the given recurrence relation recursivelyWithfewer than k initial conditions, the numeric
defines the numeric function
same remainder. function computed is not unique.
Ex. 4.2.28: In a group of six
people at a party, each pair of a 12,5, 8, 11, ... Consider the second order linear relation
individuals consists of two mutual Ex. 4.2.31 : A bag contains 10 red marbles, 10
acquaintances or two white The condition a = 2 is the initial condition. a, + a-1t a,-2= 4 with only one initial condition
strangers. Show that there are either three mutual marbles, and 10 blue marbles. What is the minimum no. of
acquaintances or three mutual strangers in the groupP. marbles you have to choose randomly from the bag to Another
Ano
AUnbers'.
example is Fibonaci
It is defined
sequence of arecurrence relation
=
numericandfunctions
2. The
whieh
initial condition
satisfy the given
are
Soln. ensure that we get 4 marbles of same color? Use pigeonhole by the recurrence relatio
Principle. , a-2 + a,-1, r 22 ) 2,0,2,2,0, 2, 2,0, 2, 2, 0,
Let A be one of six people. Divide the MU
- Dec. 19
remaining five Soln. : with the initial ii) 2,2,0, 2,2, 0, 2, 2, 0, 2,2,..
into two sets. One consisting only of acquaintances of A conditions Gii) 2,5,-3, 2,5,-3,2, 5,-3, ..
the other only of strangers to A. By extended Apply pigeonhole principle. a 1 and a = 1
Here Thus, the numeric function described by the second
Pigeonhole principle, cardinality of one of the sets must No. of colors (pigeonholes) n = 3 a2 ag + a =2 order recurrence relation with only one initial
be atleastl 5/2 J+ 1 =3. Hence it follows that in the No. of marbles (pigeons) K+ 1 =4 condition is not unique.
a3 a + a2 = 3
group there are either 3 or more Who are
Therefore the minimum no. of marbles required 4.3.2 Homogeneous Solutions
acquaintances of A, or there are 3 or more who are a4 a2 +ag = 5
Ka+1
strangers to A. Let us assume the former i.e. say B, C,
By simplifying we get Ka- 1 = 10.
hus, the Fibonacciseries is iven by Each linear recurrence is associated with its
D, are acquaintances of A.
Verification: ceillAveragel is K /n] =4
,1,2,3, 5, 8, 13, ..
homogeneous equation
1s
and the
called
solution
homogeneou1s
of
homogeneous equation
K. /8)= 4 recurrence relation.
solution of the given
TechKaouledge
PUDIitations
echKnowledge
PUbiitatfon
4-27 Discrete Structures and GraphTheory (MU)
Discrete Structuresand GraphTheory(MU)
4-28
Consider akth order linear recurrence relation with a, = r (A cos re + B sin re)
Counting
constant coeficients.
r --)+
and 2 A+A, +As
Coa,+Car1 +Ca a,-2 + Ca,- t.. +C ar-k Ar
wherea+ iß r,e =
d-iß = r, e- Ex.4.3.3.
a.- 10 a-1+9a-2=0 With ag=3 and a, =11, a = 5
This means that for any linear recurrence relation, 4.3.6 Solved Examples on Recurrence
(a-9) 0 On solving we
(a- 1)
=
if fr) = 0 (right hand side term zero), then the given Relation get
equation is homogenous recurrence relation. a = 1,9 A 1, A=-1 and Ag = 2
Ex. 4.3.1: Find the solutionof a,.2-a,.1- 6a, = 0.
For example, if the given recurrence relation is, Hence the
Soln.: The characteristic equation is
which are the characteristic roots of the
equation. homogeneous solution of the given
a,-6a,-1+ 11a,-2 + 6a,-s 2r recurrence relation is
orefore, the solution of the given
c-a-6 = 0 recurrence
then, its homogeneous recurrence equation is relation is 1-2 +2.3
(a-3) (a+ 2) = 0
a,-6a,-1+11a,-2 + 6a,-s = 0 a A ()+A, (9) EX. 4.3.5 : Determine the sequence whose R.R. is
given by
r a 3,-2 which are
the characteristie where A, A2 are constants.
. C30--20-2 with initialconditions C, =5, G2.
Now we describe the method to find the solution of
roots of the equation. Soln. : Let
homogeneous recurrence relation. For this, we first To find A and A2 putting r = 0, we get
define the term characteristic equation. Therefore, the solution of the given recurrence C-3 C-1+20-2 = 0
relation is
ag A+ A2
The characteristic equation of the homogeneous k The characteristic equation is
a, A1 (3y + A2 (-2
3 A +A
order linear recurrence relation.
0 Also putting r=l in Equation (), we get, a-3a+2= 0
Coa,+ C18,-1+ C2a-2+ Coa,-3 t ...
+Ck ar - Ex. 4.3.2 Find the
solutionof a.2 t 2a,1-3a, =0 tht (a-2) (a-1)
43.2) satisfies a 1,a, 2. MU-Dec.16, May 17, Dec.188 a A+9A
is the kh degree polynomial equation 11 A+9A, :2,1
Soln. : The characteristic equationis
which are the characteristic roots of the equation.
Coc+Col+...C = 0 4.3.3)
a+2a-3 = 0 On solving, we get
Therefore, the solution of the given recurrence relation
The polynomial Equation (4.3.3) in a is of degree k. A 2
Therefore, it has k roots, called
'.
(a+3)(a-1) = 0
characteristics a -3, 11
and A = 1
roots. r C, A 2+A, (1" ...)
which are the characteristic roots of the equation. Hence the homogeneous solution of the given
4.3.3 Case of Distinct Roots recurrence relation i3 Where A, Ag are constants
Suppose C1, a s, ,0 are the roots of Therefore,the solution
S
of the given recurence relation
a, 2(1)Y + (9)*
To find A and AF puttingr= 1 we get
characteristic Equation (4.3.3). If all the roots are
ex.
A4.3.4Find the solution to the recurrence relation
C 2A+A
distinct, then the solution of the homogeneous a, A -3+ Al1 5 2A+Aa
recurrence relation Equation (4.3.2) is given by a, A -3Y + A ..) ,6an1+ 118 -2 6a- With condition a 2
a5 and a= 15. MU-May 15 Also puttingr=2 in Equation (D, we get
a, =
Aa+Aa.. +A where A, A, are constants
Soln.: Ca 4A+ Aa
To find Aj and
where A, Agy . A are constants which are to be Ap putting r =
0, we get
Given a- 6a, -1 + 1la-2- 6a, -3 =0 3 4AtAa
determined by initial conditions. a
A +A The characteristicequationis On solving we get, A =-1 and A = 7
1 A +A
4.3.4 Case of Equal Roots 0
If any characteristic root is repeated say d is Also puttingr=l in Equation (), we get a-6c+11a -6 =
Hence the homogeneous solution of the given
0 recurrence relation is
repeated m times, then the term A1 a is replaced by a 3A +Aa (a-1) (a-2) (a -3) =
PUDIIcatio
Tech Knouledgi
Discrere siructuresand Graph Theory (MU)
4-30
Discrete Structuresand Graph Theory(MU)
4-29
(a-4 = 0
Couning to
SOve
EX, 4.3.11:initial the
conditions
recurrence relatio
do= 1 = d
d= 4(dn-1-d-2
Therefore the solution of the given
Counting
recurrence
Thus a = 5, 1/2 Subject
relation is
a 4,4
which are characteristic roots of the equation Soln.:
relation
which is repeated twice. da = 4 da-1-4 da-2 aa(An +Agn +A_)-1"
Therefore the solution of the given recurrence
To find A, Az and As putting n = 0, 1, 2 in
Therefore the solution is 0
da-4 da-11t 4da-2
=
a, = (A^r+ Ag)(4
Equation () we get
characteristic equation is,
A5)P +Az (1/2)" The For n 0,
a Now, given a = 16 and ag = 80. So by puttingr ao
The constants Aj and Az can be found by putting a-40+4 0
1 As
the initial values a 2 and a -8 in Equation ()
= = andr =3 in Equation () we get, (a-2) (a -2) = 0
For n = 1, -2
2, (2A A) 42 16
+ =
a = 2, 2
For n =
0, ap
and (3A + A,) 4 = 80
-2
(A+Ag+Ag)(-1)
2 A+ A Which are the characteristic roots of the equation.
= -A-Aa-As
On solving we get, Therefore solution of the given recurrence relation is
For n = 1, a1 -8,
d (Aj n +A) (2 - A-Ag-1
..) -2+1 - A1-Aa
Now, given do 1 and di 1. So by putting
=
A -2
l =
(A, (0) + A (2)
Hence -1 (4A1 +2A+ As) -1?
1 A
and A 4
= 4A1 + 2Ag +1
Hence the solution of the given recurrence relation a, (r+2) (4)-1 = (A, (1) +A) (2) 2 4A1+2A2
Ex. 4.3.10 What is the solution of the recurrence relation
(A +Ag) (2)
Solving we get,
en 6e-1-9an-2 with initial conditions a= 1 and a, =67 1 = 2A1 +2A2
A =-2, Az = 3, Ag = 1
is a unique solution to put Az = 1
MU- Dec. 17 Hence the homogeneous solution of the given
ao2 and Soln. : Given 1 = 2A +2
recurrence relation is
Ex. 4.3.7: Find solutionofa,.2-2 Ca,+1 +C'a, = 0. an-6a-1+ 9a-2 = 0 -
1 =
2A a -2n2-3n+1) -1
Soln.: The characteristic equation is The characteristic equation is
a-6c+9 =0 A Ex. 4.3.13: Determine whether the sequence (a,) is
a-2Ca+C= 0 solution of recurrence relation
an 2a-1 a-2
for n 2, 3, 4,
(a-C" = 0 . (a-3)P
a
= 0
= 3, 3
A 1 and A= - where a,
. 3n for every non-negative
integers n. Answer the same question for a
=
= 5.
a Cis a
repeatedroot Hence the homogeneous solution of the givenSoln.
Therefore the solution is which is repeated twice.
recurrence relation is,
Therefore the solution of the given recurrence Given an -2 an-1 +a-2 =0
a, = (A + Ar) C"
relation is n -(-)a The characteristic equationis
Ex. 4.3.8: Find solution of a, +6a,-1 12a,-2+8a,-=0 +
a(An +A)3) . a-2d+1= 0
Soln.: The characteristic equation is To find A, Az put n = 0 and 1 in Equation (D, we
A 4.3.12: Find the solution to the recurrence relaio
3-1 3a-2 - an-a with initial conditions a0 , (a-1P = 0
o 6c+12a +8 0 get a-2 and ag
=-1.
'. (a +2 = 0 For n =0, ao
Soln.
a1,1 whichis repeatedtwice.
1 A2 Therefore the solution is,
a = -2,-2, -2 uven a +3a-1+ 3aa-2+ag-3
which is repeated 3 times
For n=1, 1 The characteristic
ag (An + A) (1" ..)
Therefore the solution is
6 = (A + A2) (3) equationis Now given a, = 3n for n = 2, 3, 4,. , s0 by putting
. 3A1 +3A2 = 6
+3+ 3a+1 0 n 2, and n=3 in Equation D), we get
a, =
(A^r* + Agr + As) (-2 a+1 = 0
On solving we get For n 2,
Ex. 4.3.9:Considera,- Ba,-1+16a,-2= 0 where 16 C=-1, -1, -1 6 2A1 +Az
a2 =
A = 1, Az 1
and a,= 80. Find solution. hus, the roots are -1, -1, -1 (tripple or
Soln.: The characteristic equation is
Hence the homogeneous solution of the given
g 3-fold roots) n = 3,
recurrence relation
-8c+16=0
9 3A +Az
aa (In +
1) (3P.
led
'Cations
TechPubIItations
Kaeuladgi
DiscreteStructuresandGraph Theory (MU)
Discrete Structuresand Graph
Theory(Mu_
4-31
(a+1)a 0
Counting equations (1), (2) and (3) we
4-32
Counting
On solving get,
Therefore, the solution of the given recurrence
On solving, we get
A 3 Thus, the
a =
roots
-1,- 1,
are -1,
-1
-1, -1 (triple or 3fla
A = 5, Az =2, Ag = 1
relation is
homogeneous solution of the given
and Ag roots). Therefore the solution of the given recurrene Hence,
recurrence is ..)
Hence the Homogeneous
solution of the given relation is, An 5 +2 (2)" +1 -3)
To find Aj and
recurrence relation is, an(A ns + A2 n +A_) (-1)" Az, putting r = 0 in Equation ), we
4a,-3 =0 =
4A1 +2A2 +1
a= 0, ß = 1 A
Soln.: The characteristic equation is
4c-20c+ 17a-4=0
14 4A +2A2 a+p =0+i=1
Solving we get, Aj =
3, Az =
1, As = 5.
Observe that a = 4 satisfies the equation, hence by
e = tan
Hence the homogeneous solution of the given Hence the homogeneous solution of the given
synthetic division recurrence relation is
recurrence relation is,
a, = (1 A co8A sin
4 -20 17 4 aa (8n +n+5) (-1"
16 -16 4 a,
2)
.
a+3+ 3a +1 = 0 n =
2,22 =Aj +4 Ag + 9A
.(3)
echKnouledg
PUDIICation?
Tech Knowledge
Publitations
Discrete Structuresand Graph Theory Counting
(MU) 4-33
Ex. 4.3.21: What is the solution of the Let n = 0 a0 A(-2)° + Ag (2)° + Ag (-1
recurrence
relationan an 1+4an-2+ 4an-3 with ag 8, a1 6
and a 26? 8 A1t Az + Ag 1)
n= 1 a= A-2) +Az (2)+ Ag (-1)
MU-Dec. 19 6 -2A1 +2A2-As .(2)
Soln. an -an -1t 4an -2 + 4an -3 n 2 a2
a2 A1-2)* + Az (2)2 + Ag (-1)2
an+ an-1-4an-2- 4an -3 0 26 4A1+ 4A2 +Ag ..(3)
Characteristicequation is, Solving Equations (1), (2) and (3), we get
a+-4a-0 =0 A = 1
Roots of the
equationare A2 5
a1 =2, Ca 2 ag-1 Ag 2
Thereforethe solution of
given recurrence relation is '. an (-2) +5 (2)" +2(-1)
an A -2+ Az(2" + Ag(-1)
O00
iscreteStructuresand
6.1.4 Isolated Vertex Graph Theory(MU)
GHAP
A vertex with
6-2 Graph Ineoy
degree 0 will be called
6 vertex.
6.1.6 Path
an solated
A pair of vertices
Module 6 adjacentvertices.
that determine an chosen more than once. Pictorially, this means that it
edge are isis possible to
ege
at vi and travel along edges
begin at i a
and never use the same edge
toX
twice. A path is called
simple if no vertex appears more than once.
Syllabus Example
Types of graphs, Graph Representation,Sub graphs, Operations on Graphs, Walk, Path, Circuit,
ISConnectedGraph, Components,Homomorphismand lsomorphismof Graphs. Euler and Connected Graphs, (a) Paths in the graph represented by Fig. 6.1.2
Graph, Cut Set, Cut Vertex, Applications. Hamiltonian draphs,Planar include T1 : D, E, B, C; : A, B, E, D, D and
Ta: A, B, A.
Introduction (6) Paths in the graph represented by Fig. 6.1.3, are
Graphs are usually represented by pictures using a
T:a, b, c, a and Ta: d, c, a, a.
Graph Theory is
intimately related to many point for each vertex and a line for each edge. Graphs
branches of (c) In Fig. 6.1.4, the sequence 1, 2, 3, 2 is not a path,
mathematics. It is widely applied are often used to record information about
in since the single edge between 2 and 3 would be
Subjects like, computer Technology, Communication relationshipsofconnections. ig.6.1.2 travelled twice.
Science, Electrical Engineering,
Physics, Architecture, | Example (d) The path :C, a, b, c, d in Fig. 6.1.3 is not simple.
Operations Research, Economics, Sociology, Genetics,
etc. In the earlier et V 1,2,3, 4
stages it was called sum Topology. Length of a path
Euler, Cayley, Sir William Hamilton, and E le, ez, es, e4 es
=
Number of edges in a path is called the length of
Kirchhoff, Lave laid foundations to the Graph Lewin, Let g be defined by a path.
Theory.
Graph theory was born in 1736 with Euler's paper on
konigsberg bridge problem. The Konigsberg Me) =y(es) =
11, 2), y(e) =
14,3), 6.1.7 Circuit
problem is the best known example in Graph bridge es) = (1, 3),
Me) 2,4) A circuit is a path that begins and ends with the
was a long pending theory.It vertex. A circuit Vi, V.
problem. Euler solved this problem Then G (V, E, y) is a graph as shown in e same V- , is simple if
by means of a graph. Euler became father of the vertices Vi, V2 Vk-1 are all distinct.
graph Fig. 6.1.1 Fig. 6.1.3
theory. Kirchhoff, Cayley, Mobius, Hamilton and Example
Demorgan have laid strong foundationsand
contributed much to the developmentof the (a) In Fig. 6.1.3, the path 7: a, b, c, a is a circuit and
subject. it is simple.
Graph Theory begins with very simple geometrie (b) In Fig. 6.1.4, path T: 1, 2, 3, 1 and : 4, 5, 6, 4
ideas and has powerful
applications.In Chapter 3 you are simple circuits.
have studied that, a
graph is associated with the
digraph of a symmetric relation. By combining those 6.1.8 Connected Graph
ideas with that of function, we can define a more Fig.6.1.1 A graph is called
connected if there is a path
general type of graph. We usually omit the Fig.6.1.4 from any vertex to any other vertex
names of the
edges, since they in the graph.
have no intrinsic
6.1 Definitions as a node, a
meaning. A vertex is also referred to Example Otherwise,the graph is disconnected.If the
graph is disconnected, the various connected pieces are
junction or point. Other terms used for the vertex A has degree
an edge are a line an
element or an arc. (a) In the graph in Fig. 6.1.2, called the components of the graph.
6.1.1 Graph 4 and vertex D has degree 3.
2, vertex B has degree
A graph G consists of a finite set v of
objects called 6.1.2 Degree Tn ic 6.1.3, vertex a has degree 4, vertex e a has6.1.8(A) Solved Examples on Connected
vertices, a finite set E of objects called edges and a The degree of. a
vertex is the number of degree 0, vertex
b has degree 2. Graph
edges 6.1.4 has degree 2.
functionY that assigns to each edgea subset {v, w having that vertex as an end
point. (c) Each vertex of
the graph in Fig. Graphs shown in Figs. 6.1.l and 6.12 are
where v and w are vertices (and whereas graphs shownin Fig. 6.1.3
may be the same). We 0 is an 1501ated Ver Connected graphs
will write G= (V, E, ¥) when we need to name the 6.1.3 Loop (a) Vertex e with degree and 6.1.4 are disconnected.
parts Fig. 6.1.3.
of G. Ife is an edge, and, and ye) {v, w), we say that
= A graph may contain vertices,
adjacentyertices,
vertices
v
e is an edge between v and w. The
an
edge from
vertexX to
a
(e) In Fig. 6.1.3,
a and b
are adjacent Ex. 6.1.1 Prove that a connectedgraph withnvericesmust
vertices v and w are
the called end points of e. an eage 18 referred to as a loop. A loop and d not adjacent. have atleastn1.edges MU-Dec.16
contributes 2 to the degree of a a
are
not adjacent vertices.
vertex. Since that and 4
Fig. 6.1.4, 3
are
vertex serves as both end In
points of the loop.
TechU
Knouledge
Cations5
Discrete Structuresand GraphTheory(M Graph Theory Discrete Structuresand Graph
6-3 Theory (MU) 6-4
Soln. Suppose there is a path from v, to v2. Let 6.1.10 CompleteGrapn Example Graph Theory
For each integer n 21,, let Ka denote the grank
Vis. V2) be the sequence of vertices that the
path meets when it is traced from vi to V2. If there l
with vertices V, V2. Vaand with an
edge
edges in the path, there are l + 1 vertices in the v, v} for every i andj, In other words, every vertex in
sequence. For l larger than n - 1, there must be connected to every other vertex.
Ka is In
vertex vk that appears more than one in the 6.1.7 shows K3. F1g. 6.1.8 shows K4 and Fig. 6.19
sequence, Fig.
thatis (v1, Vi, Vk. Vko.,. V).
Deletingthe shows K D
edges in path that leads v back to v, we have a path
from vi to v2 that has fewer edges than the Fig. 6.1.12 Fig. 6.1.14
originalone.
This argument can be until we have a Subgraph
repeated path 6.1.12(C) SubgraphIsomorphism
that has n-1 or fewer edges.
The subgraph isomorphism is a computational
Ex. 6.1.2 : Determine whether the graph (shown in task in which two graphs G and H are given as input,
Fig. Ex. 6.1.2) is connected or disconnected.If disconnected Ka K and one must determine whether G contains a
find its connected component. Fig. 6.1.7 Fig. 6.1.8 subgraph that is isomorphic to H.
An example of subgraph isomorphism between
D graphs G and H, with highlighted graph G' being a
subgraph G. The subgraph C is isomorphic to H.
Isomorphism function is given in below Fig. 6.1.15.
(a)
A Graph G
A
Fig. 6.1.9
(a)
The graph K, is called the complete graph of n
vertices. In a complete graph Kas the number of edges
D<
are , More generally, if each vertex of a
graph
has the same degree as every other vertex the b)
graph is
called regular. The graphs D, are also
regular. Fig.6.1.13
6.1.11 Linear Graph The graphs shown in Figs. 6.1.13(a) and (b) are
Fig. Ex. 6.1.2 Vis Vi,+ 1} for 1 si <n Fig. 6.1.10 shows
L2 and 6.1.12(A) SpanningSubgraph
Soln. Fig.6.1.11 shows L4. We call L, the linear graph on A subgraph is said to be spanning subgraph ifit | 6.1.13 Directed Graph
vertices. na
above example A directed graph or diagraph is an ordered pair
(a) Graph shown in Fig. Ex. 6.1.2(a) is not connected contains all the vertices of G. In the
G. (V, E) where V is a non-empty set of elements called
Fig. 6.1.13(b) is spanning subgraph of graph
its connected components are [A, D, P, S, C} and
(B, Q, R) vertices and E is the set of ordered pair of elements
(b) Graph shown in Fig. Ex. 6.1.2(5) is not connected of Subgraph called directed edges. In other words, we can say that
Fig. 6.1.10
6.1.12(6) Complement
its connected componentsare {A, B, Y, Z), {C, X, QI,
The complement of a subgraph G if eachcalled
edge then
Fig. 6.1.11 = (V, E) with the of the graph G has a direction the
(P, R G (V, E) is another subgraph graphis diagraph.
Note All respect to the graph
=
the K and L are connected, while the Da are Example
6.1.9 Discrete Graph disconnectedfor n> 1. In fact, the graph D, has exactiy G" (V", E) such that E" is equalto - E and
components vertices with which the edges in E"
D2 Ds
contains only the In Fig. 6.1.16 we have a diagraph D = V, E) in
Fig. 6.1.5 Fig. 6.1.6
6.1.12 Subgraph are incident. which the vertex set V =lv, V2 Vg, Vd and the directed
Let G (V, E, is a edge set E =f e, e e e, et, eg, el. The edges are
Foreach integer n 21, we let D, denote the graph
=
Y) graph. Choose a subset Ea o
the
edges in E and a subset V, Example given Dy
by e = (Vi va), ee
(vi, Y), = (va, vs), es = (Va Va)s
with n vertices and no edges. of the vertices in V. So e
= s
in Fig. 6.1.14.Even
i. 6.1.6 shows D. We call D,Fg. 6.1.3 shows D, and that shown
discrete V contains all the end points of edges in E. Complement ofthe subgraph e(V V), es= (vi, V2), es= (v, V2), e =(Va, Va).
the graph on nH= (Vi, Ea, Y) is also a graph, where is Then
vertices. y restricted
to edges in El.
Such a graph is called a
G. H subgrapn
Tech Knouledge
TechuDitatig
Knowledge
Graph Theory FDiscrete Structuresand
Discrete Structuresand Graph Theory(M 6-5 Graph Theory(MU)
Example
Example 6-6 Graph Theory
In Fig. 6.1.16 the vertices v, and va are joined more
1
Take look at the
a By removing 'e' or 'e, the graph will become a
than one edge with the same directions. Such edges are
called multiple edges. The edges es and er are not E1=le e3, e5, eg. following graph. lts
Its cut
cut set isd15connected
is graph.
multiple edges because their directions are different
though their end vertices are same. The self loop for
the diagraph is defined exactly in the same way as Fig. 6.1.17
defined for undirected graph. In Fig. 6.1.16 the edge a
e
is a self loop. 6.1.15 Multigraph
Directedgraph having multiple edges between two
vertices is called as multigraph. Undirected graph Fig. 6.1.23
having more than one edge between two vertices is also Flg. 6.1.20
called as Multigraph. Figs. 6.1.18 (a) and (b) shows Without 'g, there is no path between vertex 'e and
5 ATter
removing the cut set E from the graph, it vertex h' and many other. Hence it is a disconnected
Directed Multigraph and Undirected Multigraph would appear as follows graph with cut vertex as 'e'. Similarly, 'e is also a cut
respectively.
9 vertex for the above graph.
6.1.16 Labelled and Weighted Graph Fig. 6.1.21 more graphs, then that edge is called a Cut Edge.
edge 'a' in D is said to be incident into the vertex u if it
A graph G is called a labelled graph it its Similarly there are other cut sets that can
is of the form (v, u) for some v e V.
Similary, a 15 sala edges Example
to be incident out of the vertexu if it is of the torm and lor vertices are assigned data of one kind or disconnect the graph:
another. In particular, G is called a weighted graph In the following graph, the cut edge is [(c, el
(u, v) for some v ¬V. For example, el is incident into Eg leg: Smallesteut setofthe graph.
if each edge 'e' of G is assigneda
the vertex V3 and incident out of the vertex Vi in non-negativenumber E = leg, e, eg
Fig. 6.1.10.
| called the weight or length of V.
Fig. 6.1.19 shows weighted graph. The weight ofa 6.1.17(B) Cut Vertex
6.1.13(B) Indegree and Outdegree path in such a weighted graph G is defined to be the Let 'G' be a connected graph. A vertex Ve G is
sum of weights of the
The indegree of a vertex u of
diagraph D 1s
edges in the path. One important called a cut vertex of 'G', if 'G-V (Delete V from 'G)
defined as the number of edges which are incident into problem in graph theoryis to find a shortest path, that results ina disconnected graph. Removing a cut vertex
is a path of
u.
Similarly, the outdegree of a vertex u is defined as minimum length. from a graph breaks it in to two or more graphs.
Fig. 6.1.24
A
the number of edges which are incident out of u. For
Note Removing a cut vertex may render
a
graph By removing the edge (c, e) from the graph, it
the graph, shown in Fig. 6.1.16, Table 6.1.1 shows the
disconnected becomes a disconnected graph.
indegree and outdegree of each vertex. (n-2) cut
graph G may have at
most
A connected
Tech Knouledge
Pubtatian
TechKnowledge
PublICation
Discrete Structuresand Graph Theory(MU)_ 6-7 Graph Theory FDiscrete Structuresand
But the of degrees
Graph Theory(M
In the above graph, removing the edge (c, e) breaks sum or even degree vertices is Ex. 6.2.3 How many 8-8
the graph into two which is nothing but and Ze is
nodesaare necess Graph Theory
always even i.e. 2 d (v) 1s even
always an graph with
exactly
graph. Hence, the edge (c, e) is
disconnected
a
cut edge of the graph. even number. Therefore, the sum of degrees of dd degree 2,
6
edges in which eachto node
construct a
is
Soln.
Suppose it is possible to construct a graph with
:
MU
14, Dec.19of12 nodes suc
a
-Dec.13, Dec. 12 such that 2 of them having degree 3 and
degree vertices should be
Soln.:Supposethere
even. are
|Note: Let 'G' be a connected graph with 'n' vertices, then a are remainingvertices are having degree 4
Ed(v) = an even number 6 edges. Also, n vertices in the graph with
cut edge e eG if and only if the edge 'e' is not a part of any given the degree
Cycle in G. Therefore by handshakinglemma,of each vertex is 2. Hence, by handshakinglemma,
odd degree vertices 12
the maximum number of cut
edges possible is 'n-l'. This shows that the of the degrees of
whenever cut edges exist, cut vertices also exist
sum
vertices is an even number and which is possible only
odd
2 d (v) = 2e 2x6
d v)= 2e
i= 1
because at least one vertex of a cut edge is a cut vertex. when the number of odd degree vertices is even. i=1
where, e is the number of edges
ifa cut vertex exists, then a cut edge may or may
6.2.2 Solved Examples on Handshaking
d (v,) +
d(v2) +.. +d (v,) According to given conditions,
not exist. =
2x6=12.
Lemma (2 x3)+(10x 4) = 2e
2 - 12
6.2 HandshakingLemma 6+40 2e
Ex. 6.2.1 Show that the maximum degree of any vertex n times
46 2e
Consider a graph G with e number
of edges and n in a simple graph with n vertices is (n-1). 2n = 12
23
number of vertices. Since each e
edge contributes two Soln.: Let Gbe a simple graph on n vertices. Consider
degrees, the sum of the degrees of all vertices in G 1s n 6 It is possible to constract a graph with 23 edges
twice the number of edges in G i.e. any vertex v of G. Hence, 6 nodes are required to construct a and 12 nodes which satisfy given conditions.
Since the graph is simple (i.e. without self with 6 edges in which each node is of graph -
loops 2. degree Ex. 6.2.6: An odd fellow wishes to have an odd party that is
and parallel edges), the vertex v can be adjacent to at
2 d v)= 2e attended by an odd number of odd people. each of whom is
. most remaining (n - 1) vertices. Hence, the degree of Ex. 6.2.4Determinethe number of edges in a graph with 6
nodes, 2 of degree 4 and 4 of degree 2. Draw two such acquainted
i= 1 with an odd number of other odd people ar tne
the vertex v can be at the most (n
This is called handshaking lemma. The result is - 1). Hence party. Can this odd situation occur ?
maximum degree of any vertex in a simple
graph with
9raphs MU- Dec. 15 Soln. : Represent each person in a party fexcept host)
so named because it implies that if several
shake hands, the total number of hands shaken
people n vertices is (n 1).- Soln.: Suppose the graph with 6 vertices has e number
by' a vertex and each pair of acquaintances by an edge.
must of edges. Therefore, by handshaking lemma.
be even, precisely because two
hands Then the odd party can be represented by a graph with
are involved in| Ex.6.2.2: Showthat the maximum number of edges in
one handshake. a 6 odd number of vertices such that the degree of each
simple graph with n vertices is n-1
6.2.1 Theorem
d(v)= 2e vertex is odd. But this is the contradiction to theorem
Soln.
i=1 in Section 6.2.1 which says that number of odd vertices
: Let G be a simple graph with n vertices. By
From the any graph is always even.
Equation (1), we shall derive the
handshakinglemma,
d (v)+d (va)+ d (vo) + d (v) +d (vi) + d (ve) = 2e
following interestingresult. Now, given 2 vertices are of degree 4 and 4 vertices Hence the odd party is impossible.
Theorem: The number of verticesof odd degree in are of degree 2.
2 d (v) = 2e
a graph is always even.
il Hence from the above equation
Ex. 6.2.7: t is possible to
vertices and 7 edges ? Justify.
draw a simple graph with 4
Proof Let G be a graph with e edges and n
where e is the number of (4 +4) +(2+2+2+2) =2e Soln. In the simple graph with n vertices, the
number of vertices. Then by
handshakinglemma, edges in the
graph G.
16 = 2e
n d (v)+d(v .. +d(v.) = 2e maximum number of edges will be . Hence, a
e = 8
2 d (v,) = 2e = even number We know that the maximum simple graph with 4 vertices will have at the most
i=1 in the
degree of each vertex
graph G can be at the most (n 1) Therefore,
- Hence the number of edges in graph with
| 4x3 =6 edges.
above equation reduces to is 8.
Now, the total degree of all the vertices can be 6 vertices with given conditions
Ex. 6.2.4(a) and Therefore, the simple graph with 4 vertices can not
expressed as the sum of degrees of even degree vertices Two suchgraphs are shown in Fig.
and odd degree vertices.
-1)+(n-1)+...+(n-1) = 2e
Ex. 6.2.4(b). have 7 edges. Hence such a graph does not exist.
n n times
EX. 6.2.8:Cana single undirectedgraph of 8 verticeshave
Zd (v)+2d(v) =
2 d(v) 40 edges excludingself loop ?
n(n -1) = 2e MU-Dec. 16
i =1 Soln.
(even degree vertices) + (odd degree =n-)
vertices) For a simple graph maximum edges are gven by
Zd (v) +2d (v) = 2e an
evennumber Hence, the maximum number of nn number of vertices)
=
6.3 EulerPathsand Circuits (a) If a graph G has a vertex Konigsberg (capital of East Prussia
but now renamed vertices 1 and 7 have odd degree. So by Theorem 2 (6),
be no Euler circuit in G.
of add degree; there can Kaliningrad and in West Soviet Russia) were tnere is
Euler path. T 1, 2, 3, 1, 4, 3, 6, 7, 3, 5,7. Not all
6.3.1 Definition (6) If G is a connected
connected to each other and to the banksA and Bwathres nave
6.3.3. The problem was Euler circuit.
even degree, so by Theorem
1(b) there is no
graph and every vertex ha5 Fig.
University Questions seven bridges as shown in
the city A, B, C
degree, then there is an Euler circuit in G. the four land areas of
even
a. Define Eulerian and circuit with example.What is the to start at any of
once.
bridges exactly
D, walk overeach of the
seven
Proof Or
necessary and suficientcondition for Euler path and and return to the starting paint.
circuit? MU-May12,May 17 This Proofis left as an exercise to the reader. situation by means of graph
Euler represented this
Define Euler path and Euler circuit,deteminewhether Theorem 2
as shown in Fig. 6.3.4 and proved that the
solution to
the given graph has Eulerpath and Euler circuit. (a) lf a this problemdoes not exist.
graph & has more
than two vertices of
MU- May 16 degree, then there can be no Euler path in G.
ada Fig. Ex. 6.3.2
TechKnowledge
PUDIlcationsS
TechKnowledge
UBCations:
araph Theory Discrete Structuresand Graph
6-11 Theory (MU) 6-12 Graph Theory
(MU al vertices hava
four vertices have odd
Discrete Structuresand GraphTheory
6.3.6,
6.3.6: In Fig. Ex. a andb have odd
paln nor an Eulercircuit,
Ex. : In Fig. Ex. 6.3.14,
vertices
6.3.3, every vertex
has even degree So there is nelner dn cuier Ex.6.3.14 theorems 1 (a) and (b).
EX. 6.3.3: In Fig. Ex.
Euler circuit,
that degree.
1
and
(a), (0)
2 (a).
Iheorem
degree so there is no Euler circuit by
1 (b) there must be an by
Theorems
By theorem 2 (b), there is an Euler path.
yheorem
1.6.7.6,4,3,5.7.3.2.4,1,2,1.
Circuit is :
T:46, 0, 7G 0. ZE, ö,7,0.Y. B.
A
D
Fig. Ex. 6.3.7
Ex. 6.3.8: In Fig. Ex. 6.3.8, each of the four vertices has Fig. Ex.6.3.15
Theorem 1 (6), there is a Euler
even degree (4). Hence by
circuit,that circuit is, n:A, B, C, D, A, B, C, D, A. all vertices have even
EX.6.3.16: In Fig. Ex 6.3.16, Euler circuit, by
Fig. Ex. 6.3.11 degree. So this graph contains an
theorem1 (6), and that Euler circuitis,
TechKeeuledga
Potications
Tech Knouledge
YPubtcation
Graph Theory
Discrete Structuresand Graph
Theory (MU
(MU) 6-14 Graph Theory
6-13 T A, G, B, c, D, E,
Discrete Structures and GraphTheory(MO F, G, C, D, G, E, A
Soln.
b) Vertices A, B, C, D have add
degree 3.
N
Vertex a- degree 3 Vertex b -
degree 6
So this graph does not have degree 4
Eulerian circuit.
Eulerian path and Vertexc degree 3 Vertex d-
Vertex f degree 3
Vertex e- degree 4
Fig. Ex. 6.3.20
cAll vertices have even degree. So there exists an Vertex g- degree 3
Eulerian cireuit. Number of vertices with odd degree
= 4.
and suficient condition for an G has a vertex of odd degree, there can
two vertices b|
Ex. 6.3.19 : In Fig. Ex. 6.3.19, vertices D and F have odd (a) In graph shown in Fig. Ex. 6.3.23(a)
degree 3. So there is no Euler circuit by theorem 1 (b). but
and d have odd degree 3. Hence there is an Buler
Ex.6.3.26: Detemine the Eulerian path/circuit, if any, in
there is an Euler path by theorem 2 (b) and that Euler path
b, g, c, , d the following graphswhich is shown in Figs. Ex. 6.3,26(a)
path. a: b, a, g, f, e, d, c,
is, : F, A, E, B, D, G, B, A, F, E, D.
have and (). A MU-Dec.18
Fig. Ex.6.3.23(b)6
vertices
(b) In graphshown in
of even degree, 6. |
vertex
odd degree, 3 and 1
in this graph.
So Euler path does not exist
Fig. Ex. 6.3.22(b) in graph
Ex. 6.3.24: Detemine Euler Cycle and Path
MU- May 15
shownin Fig. Ex. 6.3,24
Fig. Ex. 6.3.19
Tech Kaouwledga
PUDIICation
Graph Theory Discrete Structures and Graph
Discrete Structuresand Graph Theory(MU)_
path that
Theory (MU) 6-16 Graph Theory
A Hamiltonian path is a contains each
each :Graph given in Fig. Ex.
A Hamiltonian circuit circuit and Hamiionian path. 6.4.4, has no Hamiltonian
vertex exactly once.
a
Any complete 6.4.2 Theorem
circuit that contains each vertex exACtly once except for Hamiltonian circuits. In tact, starting graph K, has
at any vertex, you can Questions analogous to those about Euler paths
is also the last. yisit the other vertices
the first vertex,
which
sequentially in any desired order. and circuits can be asked about,
circuits can
and circuits.
be
a
Is it possible
Hamiltonian paths
to determine whether a
6.4.1(A) Solved Examples
on Hamiltonlan iamiltonian path or circuit exists? If there must bea
Paths and Circuits circuit is there an eficient way to
Hamiltonian path or
find it.
Ex. 6.4.1: In Fig. Ex. 6.4.1, the path a, b, c, d, e is a
See following theorems
Hamiltonian path because it contains each vertex exactiy
G2 Theorem 1
once. There is no Hamiltonian circuit for this path.
Fig. Ex. 6.3.26(b) G has a Hamiltonian circuit if for any two vertices
u and v of G that are not adjacent, the degree of u plus
Soln. of v. is greater than or equal to the number
A The degree
of vertices.
Fig. Ex. 6.4.4
Now we
present the famous "all around the world" Proof
problem. We omit the proof of this result, but from it we can
Theorem 2
G has a Hamiltonian circuit if each vertex has
degree greater than or equal to n/2.
Proof
Fig. Ex. 6.4.1 The sum of the degrees of any two vertices is at
12 Theorem 3
A
Let the number of edges of G be m. Then G has a
Fig. 6.4.1 Hamiltonian circuit if
This problem was first Posed by Irish
m 2a*-3n +6.
G2 Mathematician, Sir William Hamiltonian. He made a
All vertices have regular dodecahedron from wood with 20 vertices and ('n is number of vertices)
even degree. So there is Euler D 30 edges as shown in Fig. 6.4.1 in which each of 20
path and Euler circuit Proof
vertices were marked with the name of a city.
The
Euler cireuit «: D, A, B, C, F, E, C, A, E, D Fig. Ex. 6.4.2 and find a route along
=
puzzle was to start from any city Suppose that u and v are any two vertices of G that
each
Euler circuit is Euler path Ex. 6.4.3: ln Fig. Ex.
6.4.3, given graph is the edge of the dodecahedron that passes through are not adjacent. We write deg (u) for the degree of u
not connected.So
6.4 Hamiltonian Paths and Circuits
there is neither an Hamiltonian
circuit.
path nor an Hamiltonian city exactly once and returnto the eityor omgn.1n
Hamiltonian cireuit in the
Let H be the graph produced by eliminatingu and v
is, it was required to find a anfrom G along with any edges that have u or v as end
such route (Hamiltonian
6.4.1 Definition graph of dodecahedron. One points. Then HH has n-2
s. 1hen
n -2 vertices
vertices and
and m deg (u)
circuit)is 1,2, 8, 9, 10, 3, 4, 5,not14, 16,
15, 20,13, 12, 11,| would have been removed
University Questions every connected graph | ges (one
fewer edge
19, 18, 17, 7, 6, 1. Obviously
a. Define Hamiltonian path and circuit with example circuit. For
has a Hamiltonian circuit. example,
For example, unethe graph in
g I u and v had been adjacent). The maximum number
of edges that H could possibly have is aC Thi
What is the necessaryand sufficient condition Hamiltonian circuit.
to exist the Fig. 6.4.2 does not have any happens when there is an edge connecting every
Hamiltonian circuit?
distinct pair of vertices. Thus the number of edges of H
MU-May 12, Dec. 16 is at most
aDefine Hamiltonianpathand Hamitoniancircuit.
MU-May 16, May 17, Dec. 19 Fig. Ex. 6.4.3 -2C2 (n-2)(a-3rn-5n +6)
We then have
Fig. 6.4.2
TechKnowleds
Tech Kneuledge
Pubticatlons
Graph Theory Discrete Structuresan
6-17 GraphTheory (MU) 6-18 Graph Theory
Discrete Structuresand GraphTheory(MU circuit n:A, B, C, D, A. Ex. 6.4.10 : In Fig. Ex.
.4,10,
vertex has degree greater thannumber of vertices isi 6. Each Ex. 6.4.13: In Fig. Ex 6,4.13, number of vertices in this
Hamiltonian
There is an
m-deg (u)-deg(v) n- ön +6) Hamiltoniancircuit. equal to 6/2. So there isan
Hamiltonian path n: A, B, C, D is 5. Each vertex has
graph 2 which is equal to 5/2.
degree
Therefore, :1,4,5,6, 3, 2, 1; Hencs there is an Hailtonian circut.
m- (n- 5n +6).
4
Hamiltonianpath: 1,4,5, 6,3,2. :A, B, E, C. D, A.
deg(u) + deg (v) 2
deg(u) deg(v) 2
+ a-3n +6)
(n-5n+6) =n
Thus the result follows from Theorem 1. Fig.Ex.6.4.7
6.4.6 : Graph shown in Fig. Ex. 6.4.6, has no t:8,1, 2,4, 6,7, 5. Circuit does not exist. But there is an Hamitonian path z:f,
Ex.
Ex.6.4.12 : InFig. Ex. 6.4.12, each vertexin this graph has d.
of b,
Hamiltonianpath. It has no Hamilitonian which is not greater than 4, where 4 is number e, c, a,
circuitalso. Consider
vertices B and E which are not adjacent to each Ex. 6.4.9 In Fig. Ex, 6.4.9, number of vertices is 5. Each degree 3
circuit.
no Hamitonian
other vertices divided by 2. Hence there is
degree (B) + degree (E) 2, 2 is not greater than numberot
=
vertexin this graph has degree greater than or equal to 5/2. But there are Hamiltonian paths.
vertices. So there is an Hamiltoniancircuit
T:a, g,, h, c, b, d, e.
:1,3,5,4, 2,1. Ta:a, g,f, e, d, b, c, h.
Fig. Ex. 6.4.6 Ex. 6.4.16: Detemine which of the folewing graph contain
an Eulerian or Hamiltoniancircuit
Ex. 6.4.7: In Fig. Ex. 8.4.7, consider vertices
are not adjacent.
Aand C which |MU-Dec.12,May 133
Degree of A is 4, Fig. Ex. 6.4.9
Degree of C is 4, Fig. Ex. 6.4.12
Fig Ex.6.4.19(b)
Fig. Ex. 6.4.16(a) Fig. Ex. 6.4.16(b) Fig. Ex. 6.4.18(a)
Eulerian Circuit: c, a, b, c, e, d, c
Soln. D, A.
m:A, B, C, D, A, B, C, No HamiltonianGraph Hamiltonian path : c, d, e, b, a
EulerianPath: not Hamiltonian graph because Hence every Eulerian Graph is not necessarily
But above graph is Hamiltonian circuit: c, d, b, a, c
de
Fig Ex. 6.4.19(a) Fig. Ex. 6.4.22
BTechKneuledge
TechPubticKnowledge
ation
6-21
Graph Theoy Discrete Structuresand Graph
EDiscrete Structures and Graph Theory(MU)
edges and vertices B and Theory (MU) 6-22 Graph heory
Given graph has fifteen
vertices cities
Soln.
D' have odd degree.
All other vertices have eve (2) Let x denote latest vertex added to the path
Fig. Ex. 6.4.22, each vertex in graph (a) has degree. So there is no euler circuit but there is euler edges roads between the in the path,
cities. among all vertices that are not
path : B, C, E, F, G,
B, B, D, A, F, C, D, G, A, B, D Weight of each edge is the distance between two add the path
degree greater than or equal to which is 3. cities. pickone that is closest to z an to
circuit in the
minimum weight. graph with included in the path.
Ex. 6.4.23: Determine the Hamiltonian path/circuit, if any,
circuit by adding the edge connecting
For example; (3) Form
M
in the following graphs whlch is shownin consider the following weighted
a
6.4.23(a) has degree greater than that is 3. exactly once and return home with (1) Start with to the starting
vertex
toexcept
a. The nearest neighbouris b.
minimum distane is closest
vertex that
travelled? of one edge. .Hamiltonian path = la, c, b}
Hamiltoniancircuit = :A, D, B, C, E, F, G, A form an initial path
The above
Hamiltonian path =: A, D, B, C, E, F, G problem can be represented by
weighted graph where;
TechKnemledge
DCaTians
Tech Knouledye
V PublUEation
6-23
sraph Theor Discrete Structure and
Graph Theory(MU)
Discrete Structuresand GrachTheoy(MU Graph TheOy
From verter e,
nearest verter is b* Ex.6.4.26 Use nearest
: 6-24
Proeeding in similsr fashion ford: Hamiltoniancircuit neighbour method
Hamiltonian path= {d, e, bl from starting a. Find its
weight.
to find
OC Fig.Ex.6.4.26(e)
Fig. Ex. 6.4.26
For Hamiltonian cireuit we have;
Soln.
Fig. Ex. 6.4.25(¢)
If starting vertex. is 'a', then by nearest
and Hamiltonisn path = la, c. b. d method; we choose
vertex f from the
neighbour
Similarly for vertex d. we have: Fig. Ex. 6.4.25(g) vertices b, f,c. adjacent
Hamiltonian path = la, c, b, d, el Similarly for vertex b, we have; .
Hamiltonianpath =
la, f
Hamiltonianpath =
ld, e, b, c) Flg. Ex. 6.4.26(
has 4 edges.
method, choose among either b or e (since both are at equidistant)
the minimum distance 2) we choose vertex e :
path as a gb fced. CR) Now these 4 vertices and the vertex (with degree 3
The graph k4,3 cannot contain a hamiltonian corespond to 5 ditferent exams given by same
circuit because m # n. instructor, which contradicts the conditin that any
instructor can give at the most 4 examinations.
Fig. Ex. 6.4.29 Ex. 6.4.31 : () Give an example of a graph that has both an
Soln. : Eulerian circuit and a Hamiltonian circuit. (ii) Give an
example of a graph that has an Eulerian circuit but has no
Fig. Ex. 6.4.31()
There are 5 vertices in the graph given in Fig. Ex. G2
Hamiltonian circuit. (ii) Give an example of a graph that has Hamiltonian cireuit = abcda
6.4.28. Therefore for hamiltonian cireuit wil
5 edges. have| neither Eulerian nor Hamiltoniancircuit. (iv)Give an example Fig. Ex. 6.4.33
of a graph that has no Eulerian circuit but has a Hamiltonian Ex. 6.4.32: Show that any Hamiltonian circuit in the graph Soln.
Suppose if we eliminate any edge (s) from the Circuit. shown in Fig. Ex. 6.4.32 that contains the edge x must also In G1, the hamiltonian path = abcdfe
graph to produce a hamiltonian circuit, say weoln .
eliminate two edges one incident on v2 and another contain the edge y.
incident on V4* G) Graph with Eulerian as well as Hamiltonian
and hamiltoniancircuit abcdfea =
hamiltoniancircuit.
and hamiltonian circuit abdchfe ga
Therefore the graph does not possess any Ex. 6.4.34 : ls there a hamitonian path in any cf the
hamiltonian circuit. completegraphsk4, 4 and k4, s?
Ex. 6.4.30 : Consider the problem of
Soln.: In k, 4:
scheduling seven
examinationin seven days so that fwo examinations ) The number of vertices are 8 and degree of each
same instructorare not scheduledon
given by
consecutivedays. If no Fig. Ex.6.4.32 vertex is 4.
instructor gives more than four examinatonsshow i) Hence degree sum of any pair of vertices is 8.
that it is
always possible to schedule the examinations Soln. I presented is Section 6.7
Soln. : A. Hamiltonian circuit contains each
vertex
of theu Dy uneorem
for the starting vertex. degree sum (4 + 4) 2 (n-1)ie
Let Gbe a graph with: graph only once, except
Fig. Ex. 6.4.31(a) either starting
the hamiltonian circuit 4+4) (8-1)
(a) 7 verticess seven
examinations. Euleriancircuit =bcedcafdbfeab Consider
from the vertex a' and containing the edge (iv) Hence k4, 4 has a hamiltonian path
Hamiltonian circuit = bcdefab X= a, h
Tech Kaulelyi
Techkaole
PGbIIE3T9*
FDiscrete Structuresand Graph Theory(MU) 6-27 araph Theory Discrete tructuresand Graph Theory
Graph Theory
To make the
vertex d of degree 2, we Ex. 6.4.38 : Does the 6-28
d.
have to complete bipartle graph
In k4,5*
ofemove zedges
incident on
ki, 3 contan We can argue similarly for other
vertices of the
vertices are
Remove the edge e13
NOw we can not
remove the Hamiltoniancircuit ? nOt possess a simple connected graph shown in Fig. Ex. 6.4.39(a)
) There are 9 vertices of which four
e or Hence it possesses Hamiltonain circuit: A BCDA
the vertices c,
degree 5 and five vertices are of degree 4. edges e4 es or e12 otherwise
Soln.
of degree 1. The complete bipartile graph k1a is shown and Hamiltonian path :ABCD.
() Hence degree sum of pair ofvertices become
make the vertex below
(4+4)2 (9-1) Hence it is not possible to d of Above graph does not (2) Fig. Ex. 6.4.39(h)
the edges. possess even degree vertices. Consider vertices 1 and 7 of the linear graph
degree 2 by removing
or (4 +5) 2 (9-1)
Therefore, the graph does not have a Hamiltonian It will not contain Euler's circuit. shown in Fig. Ex. 6.4.39(b).
or 5+5)2 (9-1)
circuit. Here Degree of vertex 1 = 2
ii) Hence by theorem, k,5 has a hamiltonian path. The hamiltonian path = cba hij defg.
and Degree of vertex 7 = 3
Ex. 6.4.35 : Is there a hamiltonian circuit in any of the
complete graphs k4, 4 k, s and K4, 6
Ex. 6.4.37: Show that the graph shown in Fig. Ex. 6.4.37 Degree sum of these two vertices should be greater
has no hamiltoninan circuit. Flg. Ex.6.4.38 than or equal to (n 1) where n is number of verices. If
-
Soln. Also for a complete bipartilte graph kn.n to possess this condition is fulfilled, then the graph possesses
We
know by theorem, that for complete bipartite
a Hamiltonian circuit the
necessary condition is
Hamiltonian circuit.
graph km, if m = n then hamiltonian cireuit m =n which in the case of above
graph is not Hence
k^,
exists else the graph doesn't possess hamiltonian fulfilled. D(1)+ D (7) 2 (n-1)
circuit.
The graph would not possess any Hamiltonian 2+32 6
Based on this theorem, we can say, K4, 4 nas
circuit. 6
hamiltonian circuit.
There is no Hamiltonian circuit.
but k4, 5 and ka, 6 dont possess hamiltonian circuit. Ex. 6.4.39: Determineiffollowing graphs have Hamiltonian
124675.
4
circuit or Hamiltonian path? Butthereis aHamiltonianpath: 3
Ex. 6.4.36 : Does the graph in Fig. Ex. 6.4.36 shows (3) Fig. Ex. 6.4.39(c)
Hamiltoniancircuit ? What about hamiltonianpath?
Fig. Ex. 6.4.37 Here number of vertices n = 5.
Tech Knsuledga
Publica tions
Graph Theory
Discrete Structuresand Graph Theory(MU) 6-29 Discrete Structuresand Gra Graph Theory
6-30
said to
Twographs G, (V1, E1) and G'(V', E) are Function f:v>v
is a
be isomorphic to each other if there v = 11,2, 3, 4, 5, 6, 7, 8. 9, 10
one-one correspondence between their vertices and Where
between their edges such that the incidence = la, b, c, d. e, f, g. h, i, ji
relationship is preserved. In other words, suppose that if and only if
Such that la, b} is an edge in G1
edge e is incident on vertices and v2 of G, then the
v Fig. 6.5.4 fffa), fb) }is an edge in G2
corresponding edge e' in G' must be incident on the (b)
vertices v and v2 that corresponds to V and V2 Fig. 6.5.2 graphs
The shown in Figs. 6.5.5a) and
(b) are
f { (1, f, (2, g), 3, hi, 4, i, 5. ji. 16, a,
In particular, adjacency between vertices is
homomorphicto the first graph. (7, bi, (8, ci, (9, d, (10, e}
In Fig. 6.5.2, the graph G has a vertex A of degree
preserved. More generally two graphs and G2 G are p Therefore the two graphs are isomorphic.
1s0morphicif we can find the bijections f,: V, » V23 which adjacent two
is to pendant vertices u and v
2. But in Gz, the vertexy of Ex.6.5.2:: Detemine whether foowing gapis are
and
e E2 such that if e e E1. given by and
one vertex
of degree
one pendant vertex y and MU-Dec. 17
e where a and b are vertices in Vi then degree 3 is adjacent to only somorphic or not.
d,
D two vertices of degree 2. Hence adjacency is not
e) = (fa), f,b), where f(a) and f, (b) are vertices
preserved.
n
V2 Fig. 6.5.5a)
Therefore G # G2 Fig. 6.5.5 )
Isomorphicgraphs are denoted by G = Ga
6.5.3 Solved Examples on IsomorphicGraph
In followingFig. 6.5.1,
G is isomorphicto Gg 6.5.2 Homomorphic Graph
A homomorphism from a graph G to a graph His Ex. 6.5.1 Show that following graphs are isomorphic.
a mapping (May not be a bijective mapping)
h: G-H G
such that-«, y) E E(G)-h(x), hy)) e E(). Fig. Ex. 6.5.2(b)
Fig. Ex.6.5.2a)
It maps adjacent vertices of graph G to the
adjacent vertices of the graph H. Soln.: Hence both the graphs G and Ga contain 8
vertices and 10 edges. The number of vertices of degree
Properties of Homomorphiems
(a) 2 in both the graphs are four. Also the number of
Fig. 6.5.1 A homomorphism is an isomorphism if it is : vertices of degree 3 in both the graphs are 4
The one-one correspondence between the vertices are bijectivemapping For adjacency, consider the vertex 1 of degree 3 in
Homomorphism always preserves edges and G. It is adjacent to two vertices of degree 3 and 1
a, 2b, connectednessof a graph. vertex of degree 2. But in G2 there does not erist any
Fig. Ex. 6.5.1(a) vertex of degree 3 which is adjacent to wo verticesof
The compositions of
3d, homomorphisms are also
homomorphisms degree. 3 and 1 vertex of degree 2. Hence adjaceneyis
It is immediately apparent not preserved. Hence given graphs are not isomorphic.
by deinition
isomorphism that two isomorphic graphs must have o Definition
1. The same number of vertices Ex. 6.5.3 Draw all non-isomorphic graphs on 2 and 3
Twographs Gi and Ga are said to be vertices.
2. The same number of edges homomorphic,if each of these graphs can be obtained
3. from the same graph G Soln.: All non-isomorphic graphs on 2 vertices are
An equal number of vertices with a given degree. by dividing some edges of G
with more vertices.
However, these conditions are by no means
sufficient, for instance, the two graphs shown in 2
Fig. 6.5.2, satisfy all the three conditions given above, Fig. Ex. 6.5.3a)
yet they are not isomorphic. Fig. Ex.6.5.3tb)
All non-isomorphic graphs on 3 vertices are as
follows.
2
Fig. 6.5.3 Fig. Ex. 6.5.1(6)
Divide the edge 'rs' into two contain 10 vertices and
15
edges by adding one Soln. Here both graphs
of degree 3 are 10 in
:
vertex.
number of vertices
edges. The is preserved. The
Also the adjacency Fig. Ex. 6.5.3(c)
Fig. 6.5.2(a) both the graphs.
between vertices
is given by, Fig. Ex 6.5.3(d)
correspondence
one-one
eckoukdge
Tec Kvuledge 2tatics
uDEations,
Graph Theory Discre Structuresand
Discrete Structuresand Graph Theory(MU)_ 6-31 Graph Theory (MU) 6-32 Graph Theory
a
6.5.4:
4
Fig. Ex. 6.5.3(9
in
2
(b)
A 2
EX. Find whether following pairs of graphs shown
Fig. Ex. 6.5.4ta) and (b) are isomorphic or not.
Flg. Ex. 6.5.6 Fig. Ex. 6.5.8(a) (a)
Soln.: G and G both have 5 vertices and 6 edges. In
Fig. Ex. 6.5.9
G, the vertex 'a' of degree 3 1s adjacent to 3 vertices of
degree 2. But in Gq, both the vertices a' and b' of Soln.: Here both the graphs G and G2 have
same
degree 3 are not adjacent to 3 vertices of degree 2, number of vertices that is 4 and same number of edges
Hence'a' in G cannot be mapped to either a' or b' in that is 6. Also each vertex is of degree 3 and adjacency
Ga. Hence bijection between vertices does not exist. is preserved in both the graphs. The one-to-one
Hence G is not isomorphic to Ga correspondence between the vertices is given by
G 2 2
function f: vv*
Flg. Ex. 6.5.4(a) Fig. Ex. 6.5.4(6) Ex. 6.5.7: Indicate whether the two graphs below are Fig. Ex. 6.5.8(b) where v = la, b, c, d}
Soln. : Here G1 and G both have 4 vertices but G, has somorphic. Justity your answer. la', b, c, d'}
4 edges and G2 has 5 edges. Hence G is not V1 Such that la, bl is an edge in G1 if and only if
isomorphic to G2. (Ma), ftb)) is an edge in G2
Ex. 6.5.5 Indicate whether the two graphs shown in f {(a, a), (b, b'), (c, c'), (d, d'}
Figs. Ex. 6.5.5(a) and (b) are isomorphic. Therefore G and Ga are isomorphic graphs.
8e D, Tunction f:vv,
Ex.6.5.8:Which of the graphs shown below are Ex. 6.5.9: Determine whether following graphs are
where v
isomorphic? isomorphic or not.
V2VaV4V5»
(a) v* u, U2 Us, 4 ug
echPubticat.ions
Knomledge
TechKneuledge
ations
PUD
Graph Theory Discrete Structuresand Graph
Discrete Stnucturesand GraphTheory(MU) 6-33
Soln.:
Theory (MU) 6-34 Graph Theoy
Such that la, b} is an edge in G if and only, if| soln. ,5),(g,. 6), (h, 7}}
Both the graphs
have 6 vertices and 6 edges Both the graphs have 6
Ifa), fb)) is an edge in G Adjaceney is also preserue Adjacency is vertices and 9 edges Hence G and Gz are isornorphic graphs.
vertex is of degree 2. also
f (vi, u). (2, u2, (V3, ug),(g
every between vertices is give
correspondence between vertices is preserved. One-to-one
ug) (5 ) One-one correspondence by
given by function Ex. 6.5.16: Show that the following wo oraphs are
Hence G and G2 are isomorphic graphs. function f: VV, f:vv*,
V la, b, c, d, e, f) isomorphic. 8MU-Dec.13. Dec.14
where Where
Show that the following two graphs not v* = (1, 2, 3, 4, 5, 6)
Ex.6.5.11 are
2 G1 G2
Flg. Ex. 6.5.11(b) G2
(a) (b)
Soln.: Both the graphs have 5 vertices and 6 edges.
Fig. Ex 6.5.16(b)
Both the graphs have 2 vertices of Fig. Ex. 6.5.13
degree 3 and
3 vertices of degree 2. Now consider vertex a of G1 Soln.: Note that both the graphs have 5 vertices and 7
degree Soln.: Both the graphs have 5 vertices and 7
3 in graph G1. It is adjacent to 3 vertices of
degree 2, But Graph G has two vertices edges edges. Each graph has 4 vertices of degree 3 and 1
but both the vertices of degree 3 in graph of degree
2, 2 vertices of Fig. Ex. 6.5.15(a)
vertex of degree 2. Also the adjacency is preserved. The
Ga are|degree 3 and 1 vertex of
adjacent to 2 vertices of degree 2 and 1 vertex of degree| has 1 vertex of degree 4 whereas graph G2 one-one correspondence between the vertices is given
3. So graphs Gj and Ga are not
isomorphic. degree 2 and 4 vertices of
degree 3. by, function f: v-> v*
Hence vertices are not
adjacent. Hence bijection
between vertices does not exist. Hence where V (a, b, c, d, el
Ex. 6.5.12 : Determine whether the
graphs shown in GG2
Fig. Ex. 6.5.12 are isomorphic.Justify your answer. v = 11,2, 3, 4, 31
Ex. 6.5.14: Determine graphs shown in Figs. Ex. 6.5.14/a) f a, 1, (b, 3),(e,2, (d, 4, (e, 5)
and (6) are
isomorphicor not, justify your answer
Hence Gand Ga are isomorphicgraphs.
2
Ex.6.5.17: Draw non isomorphicofdirected graphs with 3
vertices and 4 edges
Fig. Ex. 6.5.15(b) (without loops lengthone)
Soln. :
have same number of
Soln. : Here both the graphs
number of edges 10. Purthermore,
vertices 8 and same of
has 4 vertices of degree 2 and vertices degree
4
each
The one-one
3. Also the adjacency is preserved.
(b) between the vertices is given by,
5 correspondence
Fig. Ex. 6.5.12 function f:v>v*
la, b, c, d, e, ,g, h)
where
= 11,2,3, 4, 5,6,7, 8)
Fig. Ex. 6.5.17(a)
4), (e, 8),
Flg. Ex. 6.5.14(a)
Fig. Ex. 6.5.14(b)
f (a, 1), (b, 2), (e, 3), (d,
1 ' echKnouwledge
PUDtations
knouwledse
Graph Theo Discrete Structuresand Graph Theory 6-36
Graph Theory
6-35 Therefore G and Ga are isomorphie
Discrete Structuresand GraphTheory(MO graphs.
b) Note that both the grapha have 5
N
edges. But graph G has 2 vertices ofvertices and 6
3 vertices of degree 2
degree 3 and
whereaa graph G2 has 4
vertices of degree 2 and 1 vertex of
degree 4. Hence
bjection does not exist between these vertices. So
these two graphs are not
isomorphic.
G2
Ex. 6.5.20: Show that graphs shown in
Fig. Ex. 6.5.20 are
Fig. Ex. 6.5.17(b)
(b) not isomorphic.
(a)
(b)
Fig. Ex. 6.5.19
Soln.:
Fig. Ex. 6.5.17(0)
(a) Note that both the graphs have 5 vertices and 6
edges. Each graph has two vertices of degree A
G2
3 and 3 vertices of G
degree 2. The adjacency is also Fig. Ex. 6.5.22(b)
preserved. One-one correspondence between tne Flg. Ex. 6.5.21(@)
vertices is given by function f: vv* Here both Graphs contain 10 vertices and 15
Soln.
Fig. Ex. 6.5.17(0 where (A, B, edges. The number of vertices of degree 3 are 10 inn
V
C, D, E)
both the graphs. Also the adjacency is preserved. The
Ex. 6.5.18: Show that the pairs of graphs are
and
v A, B C, D, El one-one correspondence between vertices is given by
by finding an isomorphismfrom one to the other. isomorphic, f I(A, B), (B, A^), (C, E), D, D). functionf:v^v
E, C
TechKaowledge
PUbC atlonsS
Tech Kaeuledge
PUDlltatjons
Graph
Theory Discrete Structuresand Graph
Discrete Structuresand GraphTheory(MU 6-37
Where in another
Theory (MU) 6-38 Graph Theory
Where v = la, b, c, d, e, f, g, h, i, j) are adjacent to two
graph
Htwo verticesof 3 degree
2. is identify element asH
vertices, they have degree 4 and 2
v11, 2,3, 4, 5,6, 7, 8, 9, 10 respectively.
Hence G and H are
not fX)= X (1)
Such that la, b} is edge in G if and only if
an
G #H
isomorphic
graph.
f (a), ftb)}is an edge in Gg inverse under
Each of fi. f2 f, f, f, fs has its
f I(a, 1), (b, 3), (c, 2), (d, 6), (e, 9), G, 4), Ex.6.5.26:1 Determine whether
isomorphic following graphs are mposition
(8,7), (h, 8), G, 10), G, 5)1 (C, ) is group.
Therefore, the two graphs are isomorphic. MU- Dec.15,May 18, Dec.18 x
A
shown in
Ex. 6.5.23: Show that, the Graphs G and G
Figs. Ex. 6.5.23(a) and (b) are isomorphic. G1 G2
(a) (6)
TechKnowledge
Ocatio n's
TechKnowledge
UDtCato"
Graph Theory
6-39
Discrete Structuresand Graph Theony(t
ofeach Degree of each
OlscreteStructuresand Graph Graph Theory
Degree Theory (MU) 6-40
Degree of correspondingvertices = all degee node in Gl node in G2 6.6 Planar Graphs
V=2 Example
connectedness: each is fully connected. A2 6.6.1 Definition shown in
graph has five regions
as
J =3 The
I B 3
Number of connected components both the edge a does
University Question Fig. 6.6.1(e). Notice that cutting along
the edges
Pails of connected vertices all correspond C=2 W=2 a tine with example: Planar graph. not further divide region 1 and cutting along
Y=1
MU-Dec. 12, May 13, Dec.17 A region is said to be finite if its area
is finite and
Numberofparallel edges =0
aid
&piane Suen a
to
be planar if it be drawn
can on is said to be infinite if its area is infinite. Clearly
a
Everything is equal, so the graphs are isomorphi F-l Z2 way that no edges cross one another,planergraphhas exactly one ininite eE n.
except of course at common
vertices.
more formally G2 is not holding any additional vertices of degree
G = (VE) 3. Hence adjaceney is not preserved. Hence given
graphs are not omorphic.
where V {Vi.VV, V, Vsl and
= IV, V), (V. Vs), (V, V, (V. V), (V. V,)}Ex.6.5.30:DetemineiffolowinggraphsG and G are is
isomorphicor not. MU-
Dec. 19
le, ep, ess e, es
IV,Ewhere V=V, v, V, V, V} and (a) (6)
N1
shows a planar graph because it The proof proceeds by induction on the number of
Fig. 6.6.10b) also edges. As the basis of induction, we observe that for the
that of figureshown in Fig. 6.6.1(c)
G1
VW can be redrawn
Fig. 6.6.1d)
as
Tecaknowledga
TechKnouledge
PubliCat1ons
uDEicatigns
41
Graph Theory Discrete Structures and Graph Theory
Discrete Structuresand Graph Theory(MU Graph Theory
(MU) 6-42
10
V
i=1
21el, 6.6.8(b).
planar.
6.64(a) is non- e 14 There are 26 vertices in Graph.
There are
14 edges.
TechPubiltations
Kneuledye
Tech Knewledge
Pubicatlons
6-45 Graph Theory
FDiscrote Structurosand GraphTheory(Mu
6.7 Applicationsof Graph Coloring in ComputerSclence
communieaon, (datn organization
tion,
Appendix
computer mcíence, grupha nre used to reprosent nefworks ot
the link structure of a websito con h
For instanee, be
putatinl devsees, the flow of computation, ete.
The transformation of graphs is often formalizod and representedby gTraph rewrite systems.
Complementary May 2019 Those wo drove but did ro a trai tctaled
both
1097. There were 610 peopie wh sed
to graph transformation systems focusing on rule-based in-memory manipulationof graph8 are graph databases a.1 (a) Prove using mathematicalinduction The number of pecpie wno used
trains and cars.
Bearvd toWards tranNaetion-safe, persistent storing and querying of graph-structured dnta. either a car of a train or bosh was 2050. Lasty.
2+5+8+...+(3n-1) =n(3n + 1)/2 421 people used none of mese. Fird out now
a train nor an
(Refer Ex. 1.12.8) Marks) many people drove but used nerther
were in the
airplane and also, how many pecpie
(o) Let A = {1,4,7, 13) and R ((1, 4), (4, 7), (4, 7). entire survey. (Refer Ex. 4.1.38) (8 Marks)
(1, 13)). Find TransitiveClosure using Warshall's
a.3 (a) Prove (p v (-p a)) and p-q are iogicaly
Algorithm(Refer Ex. 2.8.9) (5 Marke)
equivalent by developing a seres of logical
(Refer Sectlon 3.4.1 and Ex. 3.4.4) (4 Marks) e(100) 10011 e (101) 10101
e (110) 11010 e(111) 11000
Decode the following words reiatve to a maximum
likely hood decoding function.
() 11001
Fig. 1-Q.2(a) (i) 01010
i) 00111 (Refer Ex. 5.4.20) (8 Marks)
{1, 2, 3, 4, 5, 6) is a finite
(b) Prove that set =
abellan group of order 6 with respect to (c) Mention all the elements of set Doe also specity
multiplicatlon module 7 Ron D36 as aRb it aib. Mention domain and range
(Refer Ex. 5.2.23) (8 Marks) of R. Explain it the relation s Equivalence
Relation or a Partially Ordered Relation. It it issa
ir's travelers, to learn
() A travel company surveyed Partialy Ordered Relation, draw its Hasse
how much of their travel Is taken with an Airplane,
a Train or a Car, The following data is known diagram.
(Refer Ex. 3.3.8) (8 Marks)
make complete Venn Diagram with all the data.
a
The number of people who flew was 1307. Tne.4 (a) Explain Extended pigeonhole principle.
flew but didn't drive
How many
number of people who both friends must you have to
guarantee that at least
to a total of 599. five of them wil have
came
birthdaysin the same moth.
(Reter Section 4.2.2 and Ex. 4.2.21) (4 Marks)
kppendo Diecrete Structurea and GraphThery hU Appends
Ditcrete Structuresand GraphTher MU (c) Determine f foiomng gráprs G, and
1, 2, -1
(b) Define Euler path and Harmitonianpatr 3 | Q.5 (a) Let z, dercte tte setdineprs 9, ..
(Pefer Ex.6.3.20)
Dec. 2019 e
(00)=00000 e(10)= 10101 1017
(8 Marks)
e (01)=01110 e(11)-11011 Ma-1 (Refer Ex. 26.2)
Eerrine Hamitonian cycde ard pah ina.1 (a) Proveusingmathematicalinduction LO O 0 O
Decode the folkowing words relative to a maimum
graph in shown in Fig 10. 40) 213 .= n(n +1) (20+1/8 fikelihooddecoding function. (c) Let A{1,2,3, 4, 5. and let
(Refer Ex. 1.12.2) (5 Marks) 11110 )10011 R={(1, 1). f1, 3, (1, 4), (2. 2), (2, 5), (3, 1),(3, 3)
A
(b) Let A = la, b, c}. Draw Hasse diagram for (3,4, 14,1), (4, 3,14, 4), (5,2), (5, 5)%. Checkf
Gi) 10100 (Refer Ex. 54.22) (8 Marks) answer. Fid
(pA), ) (Refer Ex. 3.2.8) is a equivalence relation. Justify your
(5 Marks) equivalence cdasses of A
a.4 (a) A bag contains 10 red marbles, 10 vhite marbles,
(c)Let A = (1, 2, 3, 4, 5). A relation R is defined on and 10 blue mables. What is the minimum no. of
A as aRbiff a <b. Compute R and R. marbles you have to choose randomty from the (Refer Ex. 25.59) (8 Marks)
Fig 1-0. 4bii) bag to ensure that we get 4 marbles of same to constud a
(Refer Ex. 2.3.39) a.6 (a) How many vertices are necessay
(5 Marks) color? Use pigeonholePrinciple. each is
graph with exacty 6 edges in which
vertex
(Refer Ex. 64.21) (4 Marks) of degree 2. (Refer Ex. 6:2.3) (4 Marks)
(d) Let f ROR, where f{x) =
2x 1 (Refer Ex. 4.2.31) (4 Marks)
a.5 (a) Let G be a group. Prove that the identity element
and )= (x+ 1)/2 Find (fOr)(x) (b) What is the solution of the recurrence relaton
b) Define Euler path, Euler circuit, Hamiltonian path Wih a= 8, a =6
e is unique. (Refer Ex. 5.2.3) (4 Marks) (Refer Ex. 2.10.17) and Hamiltonian circuit. Detemine f following an-an 1+ 42n-2+ 4an-3
(5 Marke) and a =26?
Hamiltonian
(C) Let A be a set of integers, let R be a relation diagram has Euler path, Euler circuit,
on.2 (a) Define Distributive Lattice. Check if the and Hamitonian circuit and state the (Fefer Ex. 4.3.21) (8 Marks)
AXA defined by (a, b) R (c, d) fand
following path
only if diagram is a Distributivelattice or not. path/circuit.
a +d b +C. Prove that R is (c)Determine if foiowing graphs G and G2 are
A=(1,2,3,4)
R (1, 1), (1,2), (1, 4),
(2, 4), (3, 1), (3, 2),(4, 2), Fig. 1-Q.6c)
(4, 3), (4, 4)} (Refer Ex. 2.6.5) Fig 1-0. 4b)
(4 Marks)
0
Fig. 1-0. 2/a) (Refer Sections.6.3.1,
6.4.1 and Ex. 6.4.24)
(ReferEx.6.5.30) (8 Marks)
0 (8Marks)
(Refer Section 3.6.2 and Ex.
(6) Let H|1 00Be a
parity check matrix. 3.6.5) (4 Marks)
() Prove that set G
{(1, 2, 3, 4, 5, 6) is a fin
adelan group of order
6 with respeCt
Determine the group code e:BB multiplicationmodule 7
(Refer Ex. 5.4.16)
(8 Marks) Refer Ex. 5.2.23) (8 Marks)
Techkaoetedgi
PubIICatiop>