100% found this document useful (2 votes)
1K views

DSGT Tech Knowledge

The document discusses three basic counting principles: 1) The Sum Rule Principle states that if a set S is partitioned into disjoint subsets S1, S2, etc., then the total number of elements in S is the sum of the elements in each subset. 2) The Subtraction Principle states that if S is a subset of a finite set T, then the number of elements in S's complement (T\S) is the difference between the number of elements in T and S. 3) The Inclusion-Exclusion Principle states that if A, B, and C are finite sets, then the number of elements in their union (A U B U C) is the number of

Uploaded by

kanchisudhanwa7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views

DSGT Tech Knowledge

The document discusses three basic counting principles: 1) The Sum Rule Principle states that if a set S is partitioned into disjoint subsets S1, S2, etc., then the total number of elements in S is the sum of the elements in each subset. 2) The Subtraction Principle states that if S is a subset of a finite set T, then the number of elements in S's complement (T\S) is the difference between the number of elements in T and S. 3) The Inclusion-Exclusion Principle states that if A, B, and C are finite sets, then the number of elements in their union (A U B U C) is the number of

Uploaded by

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

Discrete structuresand Graph Theory (MU) 4-2

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

A-B is shaded portion


4.1.7 Solved Examples on Basic Counting
Syllabus Fig. 4.1.1
Hence by the Addition Principle Principless
Basic Counting Principle-SumRule, Product Rule,Inclusion-ExclusionPrinciple, Pigeonhole Principle
AUB A-B| +B Ex. 4.1.1: How many elements are in Aq U Ag if there are
Recurrencerelations,Solvingrecurrencerelations = AI-1A nB|+|BI 12 elements in Aj and 18 elements in Ag and

By the previous theorem) () AnA= (i) 1A, nAl=1


Formally we could say that the set of all valid Hence A UB| = |A|+ |B|-IA n B (di)1 A n Al = 6 (iv) A, SAa
4.1 BasicCountingPrinciples license plates is given as the product: Soln.
4.1.6 Mutual Inclusion Exclusion Principle
4.1.1 Sum Rule Principle G)x 1J)x (-}
x {0,..9) x {0,.,")
x {A,.....,Z} x {A,.2,)x (0,. for Three Sets Given Al = 12 and |Ag l = 18.

We say a finite set S is partitioned into parts An Az =


By the Multiplication Principle the size of this set Let A, B, C be finite sets.
S1, Sx if the parts are disjoint and their union is S. A Agl 0
1xlxix 26x 27x 10x 10x 11 Then
In other words Sns
SiUS2U...USk =S. In that case: |S|
= for i i andis givenas =772200. By principle of Inclusion -Exclusion
|Si| + |S2|***
=
IAUBUC| =|A|+|B|+|C
+S Example. Let S be the set of students 4.1.3 Subtraction Principle A UAal IA+1Al- A n Aal
attending the combinatorics lecture. It can be Let S be a subset of a finite set T. We define -1AnB-|BnCi
= 12 + 18 -0 30
partitioned into parts S1 and S2 where S: T\ S, the complementof S in T. -1AnC+|AnBnC |A1 UAl= 30
S1 = set of students that like easy examples. Then S IT| - IS|. Proof: Let D denote the union set B U C.
(i) Given: A Agl = 1
Sa= set ofstudentsthat don't like easy examples. Example : IfT is the set of students studying at
ThenA U BuC = AUD
If |S| = 22 and |Sa|l = 8 then we can conclude GTU and S the set of students studying neither By principle of Inclusion-Exclusion
math AUDI = 1A]+ |DI-1AnDI
S 30. nor computer science. If we know |T| = 23905 and
S| = 20178, then we can compute the number |S| o (by the previous theorem) .(1)
AUAal A1l+Adl -IA nA
4.1.2 Product Rule Principle students studying either math or computer science
= 12+ 18-1 =29
DI = |BuCI A UA2 l = 29
ie. S
If SSi.Sax.S,
is a finite set S that is the product of Sa.8| IT| |s| 23905 -20178 3727.
= -
= =

.(2) (ii) Given : |A n A2l = 6


then |S| =
|S1|x|Sa|x.x |S| 4.1.4 Bijection Principle
= B]+|C - IBnCI
Example. Consider the car license plates. They AnDI = 1An(Bu)I By principle of Inclusion-Exclusion
have the form GJ 1la n1na ns IfS and T are finite sets, then |S| = |T| there
where l1; lh are letters from {A,..and ni, na, n3 exists a bijectionbetween S and T. Example. Let Sbe = | (An B) u (An C)I AUAl= 1A1l+ |A2l -1A Al
are digits from {0,...91. the set of students attending the lecture and T the se = 12 + 18-6 24
= IAnB]+|AnCI
However, le and na may be omitted. ofhomeworksubmissions for the first problem sheet. AUAl = 24

We count the number of possibilities for each


the number of students and the number of submissions - |AnBnCI iv) Given: A1 S A2
position:
coincide,then there is a bijectionbetween students an DstitutingEquations (2) and (3) in Equation(1,
we have
submissions. A Agl = 12

GJ-h n» 4.1.5 Principle of Inclusion Exclusion AUBUC| =|A|+|B|+|CI-1AnB| By principle of Inclusion-Exclusion


1A1U Aal 1Al+|Aal -1A n Al
BnC-jAnC+A nBnd
=
Let A and B be finite sets.
27 10 10
11 Then AUB] =|A|+ |B|-1AnBI
= 12+ 18-12 = 18

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

Thus 56 mathematics students study exactly one


Hence from Equation (1), FI = 65 G = 45
language.
52= 25 + 26 +26-11-9-8 |R| = 42 IF G| = 20

+INnTn FI FORI = 25 GRI 15


INnTnF| = 3
Using formula of inclusion and exclusion, we have
Fig. Ex. 4.1.8
Hence, 3 people read all three magazines.
FUGURI = |F|+|G|+|R|
(ii) Students who have taken only computer (b) To draw Venn Diagram,
science course
3 read all three magazines - IFnGI-IFnR| 20
=
IBI-|BnAI-|BnCI+ |A nBnC NOTI-INOTOF| = 11-3=8 - 1GnR|+|FnGnR| Fig. Ex. 4.1.10
100 =65+ 45+ 42-20-25-15
94-26-22+14 =60 read Newsweek and Time but not all three
k 12+ 17+7 36
(ii)
60 students had taken only computer sciencemagazines. +| FnGOR|
Thus 36 mathematics students study exactly two
course. NOFI-INnTnFI = 9 3 6 read IFnGnR = 8 languages.
Newsweek and Fortune but not all three magazines.
Ex. 4.1.9: In a survey of 60 people,it was found that 25 read Eight students study all three languages.
Newsweekmagazine,26 read Time and 26 read Fortune IToFI-1NOToFI = 8-3=5 read Ex. 4.1.11: One hundred students were asked whether they
Also 9 read both Newsweek and Fortune, 11 read bothTime and Fortune but not all three 0Using the above result, we draw the Venn Diagram
had taken course in any of three areas, sociology,
Newsweek and Time, 8 read both Time and Fortune, 8 read
magazines. 8
study all three languages anthropology and history. The results were
no magazineat all. INI-IN TI-INnF|+ |NnTn FI . IFnGI IFnGnR| = 20-8 12 | 45 had taken sociology,
(a) Find the number of people who read all three = 25-11-9+3 =8 read only Newsweek
magazines ITI-ITO FI-INoT|+|N nTnFI study French and German but not Russian.38 had taken anthropology.
(b) Fill in the correct number of people in each of eight
26-8-11 +3 - 10 readonlyTime IP OR] |FnGnR| = 25-8 =17
21
hadtakenhistory,
regions of Venn diagram of Fig. 1.18. Here N, Tand F
-

18 had taken sociology and anthropology,


German.
denote the set of people who read Newsweek, Time IFI-1Tn FI-INOF|+ |NoTnFI Study French and Russian but not 9 had taken sociology and history,
and Fortune respectively 26-8 9+3 12 read
=

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

Djscrete Structuresand GraphTheory(MU) = 38-4- 18 +4 = 20 MncOT| = 100-I MuCUTI


of the
will show the results who had taken only history 5)
(a) Draw a Venn diagram that
Number of students 100-(12+ 10+ 10 + 15 +20 +8+
survey
number k of students who had taken = H-|Sn HI-|HnA|+|SnHn A| 100 80 20
(6) Determine the
21-9-4 +4 = 12 Hence 20 students did not take any drink.
Classes in exactly
of the three sets
) one of the areas (i) two ofthe areas. and 23 belong to none
ii) The set of students taking milk but not coffee is
who
Soln.: Let S, A and H denote the
sets of students (6) Using Venn diagram 12 +15=27
taken courses in sociology,
anthropology and| =

have (i) k 22 +20+ 12 =54


=

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

ISnHI = 9, |HnA = 4 and, the areas.


77.
SUAUH| =100-23 Ex. 4.1.12: A survey of a sample of 25 new cars being sold b) Number of cars
that had only air-conditioning
Hence by principle of inclusion and exclusion,
we
local auto dealer was which of three
conducted to see
at a
= A-A nWI-IAnR|+|AnRnWI Fig. Ex. 4.1.13
radio (R) and power
have
popular options air-conditioning (A),
SUAUH| = |S|+|Al+ |H|-ISnAI windows (W), were alreadyinstalled. The survey found: 15- 5-9 +3 (ii) The set of students taking tea and coffee, but not
15 had air-conditioning9 milk 1s
- IS n H-AnHI+ S nHnA| 12 had radio,
ITnCI-1TnCn MI
77 45+ 38 +21-18-4-9 11 had power windows, (c) Number of cars that had only radio
5 had air-conditioning and power Windows, 30- 10 = 20
+SnHn AI =R -1AnRI-IRnWI-1AnRnWI
9 had air-conditioning and radio,
Ex. 4.1.14 : In a survey, it is reported that of 1000
SnHOAi = 4 4 had radio and power windows,
To draw Venn diagram we write 3 had all three options, 12-9-4 +3 programmers, 650 habitually flowchart their programs,
788
of the
had no options.
= 2 are skilled cOBOL programmers, 675 are men, 278
4belongtoall the threesets 2Find the number of cars that had:
women are skilled COBOL programmers, 440 programmers
(d) Number of cars that had Radio (R) and power
(a) Only power windows. windows (W) but not air conditioning (A) both habitually flowchart and are skilled in COBOL, 210
women are both skilled
(6) Only air-conditioning. women habitually flowchart and 165
in COBOL and habitually flowchart. Would you accept these
IRnWI-|AnRnWVI
(c)Onlyradio. data as being accurately reported? Justify your answer.
(d) Radio and power windows but not air-conditioning.
(e)Air-conditioning and radio but not power windows.
4-3= 1
eNumber of cars that had air-conditioning (A) andSoln.
() Only one of the options. Let F denote the set programs (both men and
radio (R) but not power windows (W
soln. women) who habitually flowchart their programs, and

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 =

An RnWI = 3. offee (C) and Tea (). He IFI = 650

belong to S and H but not A


repor
three drinks 20 had" M nd 'C, 30 had
| 3 had all three
options.
C
had 'M only, 5 had ' oniy
C 788
HnAI-ISnHnA! =4-4 =0 Anand 8 T,25 had 'M and T, 12
IWnCI = 278
We draw Venn
hadT only.
belong to A and H but not S diagram as
show 0) How many did not take any of the tnree
WOFI = 210
Number of students who had taken only sociology. Fig. Ex. 4.1.12.
Using the Venn diagram, we have
drinks ? IFnCI = 440
S-iSn Al-iSnHi+|SnHnA ow
many take milk but not coftee
IWnFnCI = 166
45-18-9+4 22 (a) Number of cars that had only power windows
Soln. : many take
tea and coffee but not milk ?
Number of students who had Consider the Venn diagram | MnCi = 1CI-IWnCi
taken only
anthropolo i) Tak into = 788-278 = 510
of the disjoints sets
account.the
cardinalities
= A-IHnAI-|SnAj +|SnHnAI

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
=

one or = |AUA UAsl by '5' nor by 7'?


more
ofthe brands. So number of elements of | X U YuU |Al +|Aal
Soln.: Let A denote the set
510+440 274676 Z= 86. Hence, from the Venn diagram.
=
+|Agl-IAn A 300 divisible by 3.
of integers
between 1 and
Hence there should -|A, Asl-1A2 n Asl +|A nA,n
n SimilarlyAa and As
be atleast 676 men
programmers. But this contradicts the given data that
80+ (8 m) +m +(9- m) + 22 +(7 m) + 18
86 = A be the sets of
integers divisible 5 and 7 by
94-2m= 86 = 30+20 + 12- 10-6-4+2 44 = respectively.
there are in all 675 men
programmers. Hence the data
is inaccurately reported. Hence the number of Then 1A= 100
m
integers between 1 and 60
Ex. 4.1.15: 75 children went to an amusement arenot divisible by 2, 3 or5 = 60 -44 = 16
park, where
they can ride on the merry-go-round,roller coaster, and the 100 IAal | =60
ferris wheel. It is known that 20 of them have Ex.4.1.18: Determine number of positive integers n where
rides. and 55 of them have taken atleast 2.
taken all three 22 1Sns 100 and n is not divisible by 2, 3
or 5. Al= 300 =42
Each ride costs 5
rupees and the total collection of the park was 700 m 7m Soln.: Let A, be the set of integers between 1 and 100
rupees And An Number
Determine the number of children who did not
try any of the 8 divisible by2. and 5
Azl =
ofintegers divisible by 3
rides.
Let Az be the set of integers between
Soln.: The total number
of rides = 700 140 1 and 100
300
3x5 20
divisible by 3.
The number of children who have Flg. Ex. 4.1.16
2 rides = 5-20 35
taken exactly
4 housewives used all three
Let Ag be the set
of integers between 1 and 100 AAl 3X14
brands X, Y, and Z divisible by 5.
The number of children who have
taken only
(6) The number of housewives
using brands X and 2 AAl 300
5x78
ride.
one
and not Y is the number of elements in Then 1Al =
50 And 300 =2
140-2 x 35-3 x 20 (x z) n Y, which is the region indicated A AanAsl =3x5x72
140-70-60 10
having 9-m elements in the Venn diagram.
as
IA | -33 Hence, using the principle of inclusion and
Thus the required answer is
Hence the number of children who have not
any rides
taken
9 m 9-4 5housewives
IAl -20 exclusion, we have number of integers which are
divisible by 3 or 5 or 7.
Ex. 4.1.17: Find how many integers between 1 and 60 are A Agl = 16
75-(35+20+ 10) =
IAUA UAsl
not divisible by 2 nor by 3 and nor
= 75 65 10 by 5? =
Al+|Aal + |1Asl-1A n Aal
AnAl= 2x510
=

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,

14 used none of the brands


7 used brands Z and Y
1Al -20 AU AU Al
3 or 5 i.e. nor by 5, and nor by 7 = 300- 162 = 138.
Again number of integers between 1 and 300 which
Al+1Aal +|.Asl
(a)
(b)
How many housewives used brands X, Y and ?
How many housewives used brands X and Z but not A 12 -1A n Aal-1A1 Asl
aredivisible by 3 but not by 5, nor
7 A1l- 1A, NA2l-lA1 NAsl + |A N A2 0 Asl 100
by
brandY ?
1An
Al 2x5-10 -1An Asl+ |A nA n Asl
50+33 +20-16-10-6+3 74
20-14 +2 = 68.

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

B! =666 250=125 193

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

AnC = 9 200 shaded portion shown in Venn diagram.


Similarly,I AnA2l =
largest number ofelements ThenA n Bnc denote the set of integers not It is clear from the diagram that,
2000 | that are divisible by 2 and 3.
divisibleby 3, nor by 5, nor by 7. .
AD =
2X7= 142 A-(BU C)| = JA|-1 (A n B) u (Anc)

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 =

2x3x566 A-(BUC)I = 333-104


C = =142 229
A BDI 2000
2x3x747 A nA | =7 Hence, 229 integers from to 1000 are not

BncnD = xX719
14nA 11 AnBI =66 divisible by 5 and 7 but divisible by 3.

Ex. 4.1.23 : A software company writes a new


250 BnCI = 28 package
A
35 28
AnCnDI = 25 =28
A Asl = 2x3X=8 which integrates a word processing program with a spread
sheet program and they wish it to run on a 64k machine. The
2000 AnCI 1000
= 2147
and
AnBnCnDI =2x3x5x7 AAnA-287=5 word processor requires 4Ok for program and data and the
spread sheet requires 32k for the same. If 16 k must be
By the principle of inclusion and exclusion AnBnC 1000
=05= reserved for the code integrator, what is the minimum
AUBUCuDI A A nA|= |25x=3 amount of overlappingspace that will be necessary ?
= IA+|B+|C1+|D|
principleof inclusion and exclusion, Soln.:
-1ANB1AnCI-|AnDI A As nAl= 3x5K72 AUBUCI= |A| +|B|+|C]-1An5 Let A denote the memory space reserved for word
-IBnCI-|BNDI-1COD
+AnBnCj+|ANBND| A A As nAl =

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

+(66+ 47+ 19 +28)-9 = 1542


+1An AA, BUC 1000 543 = 457 AUBI = A|+|B |-|A NB|
-IA nAn As n A
TechKaouledg
cat nouledge Dns
Discrete Structuresand Graph Theory (M
4-14
Discrete Structuresand GraphTheory(MUU 4 -13
COuntin = 60-26-30+ 12 = 16 Coun
AUB 48 = 285- 70-45 + 20 ci) Set of students studying neither mathematics nor BPnCI =|BnPI-|BnCnPI
A+B-AN BI s 48 = 190 Physics nor Chemistryis |MUPuCI| = 25- 12 13

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

ii) An F. iv) F CUD. 16 know


both Pascal and COBOL. Ex. 4.1.38: A travel company
1000 both Fortran and COBOL
earn how
much of their travel is surveyed
it's travelers, t0
8 know taken with an
(v) AUBUCUDUEcF. A2Agl = x5=66 47 know at least one of the three Languages.
Train or a Car. The Airplane, a
to detemine
Complete Venn Diagramfollowing
with all
data is known,
make a
Ex. 4.1.34 Let A denote the set of students who
:
and
From this
we have
people who lew was 1307. The the data. The number of
study data Howmany students know none Hew but didn't drive number of people who both
structures, B denote the set of students who study discrete AnAAsl =2x3x5 83 of these languages? buf did not use a
came to a total of 599.
Those who drovee
structures. C denote the set of students who How many students know all three languages? train totaled 1097. There
study assembly know exactly one who used both were 610
people
language programming. D denote the set of students Hence using the principle of inclusion and many students trains and cars. The number of
language ? Used either a car or a people who
studying Theory of Computer Science. Let E denote the set exclusion we have number of integers which train or both was 2050.
are MU-May17 pe0ple used none of Lastly, 421
but used neither a these.
of students who are staying in Hostel and F divisible by 2, 3, or 5. Find out how many
denote the set of Soln. train nor an airplane and
people drove
students who went to watch a cricket match last = AAUAal also, how many
Monday. Let P, F and C denote the set of students people were in the entire survey.
Express the following statements in set theoretic notation. who
=
|Al+|Az l+ |Asl-|A nAl know Pascal, Fortran and COBOL respectively.
() All hostelites who study neither data structure nor Soln. MU- May 19
discrete structure went to watch cricket match
last
- AAsl-1A2nAsl+1A1An Asl IP 30, FI 18, Let travel by
Monday.
=
500+333 +200- 166-
100 -66+33 CI 26, PoFI 9 airplane be A
(i) The students who went to see cricket match are 734 travel by train be T
only PaC 16, IFnC =8 travel by car be C
hse who study assembly language programming ori) The set of integers divisible by 3 but not by 2 ands
data structure. (a) Students know of these
none
languages A =1309
(ii) No student who is studying data structures went to see
is the n nA set Ap 50-47 3 AnT = 602
cricket match.
(iv) Those and only those students who are studying
AanAnA =
An (An Ag) =
A -(A uA)
3 students know none of these languages
C-T = 1097 ITnC| = 610
theory Az-(A1 UA)| CUTI = 2050
of computer science and discrete
structure went to see
=
|Apl-1(A2nA) u (A2 A)|
for a cricket match.
(v) All went to see cricket match.
-

A-A nAl+|An AD
= 333 -(166 +66)
Soln.

(i) EAnBEFor (E- A)-BSF


=
333 232 101 10 395 139
Ex. 4.1.36: Find how many integers
i) F CuA Divisibleby 2 not by 3 and nor by 5. between 1 to 60 are
MU -Dec.14
ii) A NF = ¢ Soln.: Divisible by 2
not by 3 and nor by 5: Fig. Ex. 4.1.37
(iv) F = D nB Let A, denote the set of
integers between 1 and
divisible by 2. Similarly Az and As be the sets 60 of 6)PUFOCP|+|F|+|C|-|PnP| 310 212

(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

Ex. 4.1.35: Find the


numberof integers between 1 and 1000
Then
IA 2-30, +|PoFnC|
421
which are: ) Divisible by 2, 3 or 5. (i)
Divisible IPaFnCI = 6
not by 2 nor by 5. MU-
by 3 only but
Dec.13 A-320 6
studentsknow all three
Soln.: Let A denote the set
of integers between 1 and languages Fig. Ex. 4.1.38
1000 divisible by 2. SimilarlyA, and As be the sets of A 12 Le.
number
neither COBOL
of students who know only asca

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

AUTUCI JA||+ IT| + IC|


8 Some handshaking there will doing
Using Equation (1) always be atleast two
Thus there are 68 integers not divisible by 5 or 7. people who have shaken hands the
- AnTI -|AnC| same numberof
times. MU- Dec: 17
- ITnC+ JAnTnC] Ex. 4.1.40 : () Among 50 students in a class, 26
got anA If
1307+953+1707602 in the first examination and 21 got an A in the
second
F+IS -2|FnS|
IFI+|S| -(2*6)
=
40
= 40
n
pigenons are assigned to
and m <n, then at least one pigeonhole contains two or
m
pigeonholes,
- 708 610+ 398 examination. If 17 students did not get an A in either .(8) more pigeons.
examination, how many students got an FI +|S| 52
2445 both A in So, Proof: Consider labeling the
plgeonholeswith
:. Number of people surved 2445+ 421 = 2866
examinations ? () If the number of students who got an
Ain F S| =26 the numbers 1
through m and the
m

the first examination is equal to that in FI- IF oS| n


pigeons with the
Number of people drove but used neither a train total
the second =
26-6 20 numbers 1 through n. Now, beginning with pigeon 1,
examination, if the number of students who got an students got an 'A' in first examination only.
Ain assign each pigeon in order to the pigeonhole with the
nor
an airplane=|C| |AnC - -

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) .,

examinationis 50-17 33 A 12, 4,


=
7, 9), B =11, 4, 6, 7, 10)
University Questions
positive integers. Use the division rule Number of students got an A in both examinations 18 Q. State and explain extended Pigeonhole principle
and C 3,=
5, 7, 91
A -20 FnSI 33 = |F| + |S| - IFnS| MU-Dec.14, May16
AUB {1,2, 4, 6, 7,9, 101 a. Explain ExtendedPigeonholeprinciple.
Similarly, we obtain for numbers divisible by 7 FoSI = (26+21)-33 2. AnB 4,71
(round down!) IFnSI = 47-33 14 MU May15,Dec.17,May 18, May 19
3. BnC 7 If there are m pigeonholes and more than 2mn
ii) Number of students who got an A in
tne first 4. pigeons, then three pigeons will have to be
or more
examination is equal to that in the seco (AnB)u C= 14,71 JC
ApI TAL 14 examination,so |FI |S|| =
assigned to at least. One of the pigeonholes. In general
if the number at pigeons is much larger than the
ctly
=
13, 4, 5,7, 9)
Numbers divisible by 5 and by 7 are divisible by 35 Total number of students who
got an A in exac .(BuC)nC {1,3,4,5,6,7,9, 10) 8,5,7,9 number at pigeonholes, previous theorm can be
one examination is 40 = n conclusion.
(round down!): restated to give a stronger
IF+S2|FnS]= 40
.1)
=
13, 5, 7, 9)
E TechKnowledge
Tech Knowledg
PUDIICation>
FDiscrete Structuresand Graph Theory(MU)
First, a word about notation. If n and m are
4-21
If 11 numbers are chosen from the
set1, 2, ...201
Couning DiscreteStructuresand GraphTheory (MU)
4-22
positive integers, then L n/m] stands for the largest then two of them must have the same odd parts, " Counting
"This Soln.:

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

add upto 13 as follows.


Tech Knowledge
UDICation>
TechKaonledge
pubiications
Discrete Structuresand Graph Theory
(MU) 4-24
Discrete Structuresand GraphTheory(MU) 4-23
Counting 5n- 5 Counting
On the other hand, if no two A, B and C know each Soln. In the set 2,
: 50 , there are
15 prime Highest sum = 10+11+ 12 + 13 + 1415 = 75
.

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

Tech wledae TechUbIications


Knowledge
UDIICa tions
Discrete Structuresand Graph Theory(MU) 4-25 Discrete Structures and Graph Theory (MU)
For any five points in or on triangle ABC, at least two
Since any pair of individualsare either
Counting
acquaintane Ka1 10 4-26
must be in or on the small triangle and thus are no
or strangers, if say B, C are acquaintances, nces ie, 3 od +3 white +3 blue + 1(red or t
Counting
more than 1/2 unit apart. then
together, with A, A, B, C, form group of 3 mutual
1s clear from above
a
blue) = 10
recurrencerelation, we ne examples that according to
acquaintanceson the other hand if B, C, D are mulual mputation to determine can carry out a step-by-step
strangers they
If
form a
group of three mutual
strangers, 4.3 RecurrenceRelations any r using a, from a,-1, a -2,
given initial conditions. Thus thear-3 10
we the latter, when B, C, D
assume
nrevious sections, We have discussed Tunction which is numeric
meric functions and generating about 1s known as thecomputed
2 using recurrence relation
strangers to A, the proof follows in similar manner. are n nui

functions, relation. solution of the recurrence


Ex. 4.2.29 : A man hiked for 10 hours and covered
discre

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, =

wOrds, a recurrence relatuon on the


numeric function non-negative integers. A
formula that relates all the terms ofa to previousaecurrencerelationof the
3. Hence form
shown in Fig. Ex. 4.2.27. If five points are choosen in a10 a2 +ag + +ag 45 -(6 +3) =36
the square, we can assign each of them to
square that
miles. Consider the set
terms of a.A recurrence relation is also called Cpa,+Ca,-1+Ca-2 Cga,-3 + t.. +Ca,-x
contains it. If a point belongs to more than one A (a2, ag), (ag, a5), ag, a7 ), (ag, ag). fir) for
Hifference equation. To define the numeric
=

...(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

Homogeneous recurrence relation of the above homogeneous solution.


5 =
A+2A2 +3Ag
recurrence relation is given by
= yo+ and= tan The characteristicequationis
Soln.
l5
Coa,+C1ar -1+ C2ar -2+ Cgar-3t +Ca -k-0 -10a+9 0 15
A1+ 4A2 + 9A3
=

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) =

2 -3A +Aa a 1,2, 3 C, -2+7


(A +Aprm-*+...+An-1T+An) a
On solving, we get C are the characteristic roots of the equano Ex.43.6: Solve the recurrencerelation:
where the constants A 's are to be calculated using
Therefore
is
he solution of the given recurrencerelaton 2a-2-11a,.1+520n2 0,a,=2, a
-8
initial conditions.
A- Soln.: The characteristicequation
4.3.5 Case of Complex Roots A (1P+A,(2+A,(3 2c-11a+5 = 0
and A
Let a +iß and a - iß be the complex roots of To find Aa and As, putting r = 0,
r =l and
2c -10a-la +5 = 0
a.2+2 ca,.1 + da, 0 (where c < d) then the solution t=2 we get
ven
=
Hence the homogeneous solution of the g
of the homogeneous recurrence relation is given by ie. (a-5) (2a-1)
recurrence relation is Given ag 2
Tech Kuouledge

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
=

Ag n 0 and l in above equation we get,


-1 -Aj- A2
On solving we get, For n = 2, 2 .

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

To find A, Az and As putting n =0, 1, 2 in aboya


solution ofa,. get
an 3n
Ex.4.3.18:
Find the
+a, =0
equation we get,
Now for a, = 5 we get
The
characteristic equation is
For n = 0, Soin.:
+A2
Forn 2, 5 2A 5 As
o+1 = 0 0 = Aj+Az
n= 3, 5 3A+A
On solving we get
For n = 1, 1-9
-b+yb'-4ac Also putting r = 1 in Equation), we get
2a
9 (A1 +Ag + A_) (-1
= 0 and A2 = 5
= -A1-Ap-As a = 1, b = 0, c = 1
= 5 is solution ifA =0
= - A-A-5
-0 O4(1) (1) 0#-4 A1
Ex. 4.3.14 :Solve the recurrence relation: d,=2 d,-1 -dh-2
with initial conditions. d,= 1.5 and d, = 3.
- 9+5 -A1-Az 1)
Soln.: Solve as per above Ex.4.3.13.
-4 - Aj -A2 2
A(1+5)+A (1-5
For n = 2, a2 = l5 On solving we get,
Ex. 4.3.15 : Find the solution of
15 = (4A1 +2A2 + As) -1 Roots arei
4a,-20a, +17a,-2 -

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,

4 4 1 Ex. 4.3.17: Solve an-7an-2+ 6a-3 0, wherea


MU-Dec. 18
A cos2) +A,sin
a6 and a 22. Ex. 4.3.20 : Solve the recurrence relation, an-2a 1
:(a-4) (4a- 4a+ 1)= 0
Soln. Ex.4.3.19 Find the solution of FibonacCcl
(a-4) (2a- 1) = 0 Tlu|+2a-2-ay-30
6 an-3 =0 a 1 a -2 with the initial conditions a 0,
Given an-an-2+ Soln.: The characterstic equation is
-4.2 Characteristic equation is
a, =1.
o-20+2a-1 = 0
+0-7a +6 =0 Soln.: The
characteristic
Hence the homogeneous solution of the given equation is =0
recurrence relation is (a-1) (a-2) (a +3) =0 1.e. (C-1)(c- a+ 1)
-a-1 =0
a 1,2, -3 Thus, the roots are
=

(Ar +A +A (4 Which are roots of the equation bb-4ac Za &=1,


Therefore the solution of recurrence relation1s
Ex. 4.3.16: Solvethe
recurrenoe relation
a-3 With a=5, a, 9, a = 15.
a,-3 a-1-2 a A1 (1) +Az (2P +Ag-3 a =
1, b =
-1, c = -1 Hence the Homogeneous solution of the given
To find A, A, As put n = 0, 1 and 2
MU-May 14 n= 0,
D-1+
2(1)
4(1 (-)_1+l+4 recurrencee relaiton

Soln. a0 A (1)° + A2 (2) + Ag (-3) , A,(IA» A


Given: a + 3a,-1 +3 a-2 + a-s = 0

The characteristic equation is


8=
n =
A1+ Az +As
1,6 =Aj + 2Ag + (-3) Ag
1)

2)
.
a+3+ 3a +1 = 0 n =
2,22 =Aj +4 Ag + 9A
.(3)

Roots are+ and

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

Graph Theory 6.1.5 Adjacent Vertices


A path 7 in a
graph is a sequence t: Vi, V2 V OI
vertices, each adjacent to the next and a choice of an
edge between each v, and v; + 1 so that no edge is
.

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

Subgraph G' Graph H


s

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

For each integer n 2l, let L, denote the graph


we
each a subgraph of the graph shown in Fig. 6.1.12. f: (A, C), (B, A), (C, B.)
(b) with n vertices Vi V) and with edges
Fig.6.1.15:Subgraphlsomorphism
.

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.17(C) Cut Edge (Bridge)


Let 'G' be a connected graph. An edge 'e' e G is
Fig. 6.1.16
called a cut edge if 'Ge' results in a disconnected
6.1.13(A) Incidence Fig. 6.1.18 (a) Fig.6.1.18(b) Sraph.
Let u be any vertex of If removing an edge in a graph results in to two or
the diagraph D (V, E). An
=

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

Table 6.1.1 vertices.


3 Example
Vertex Indegree Outdegree
Fig. 6.1.19 In the following graph, vertices
'e' and 'c are the
V1 cut vertices.
6.1.17 Cut Set and Cut Vertex
V2 of Graph
V3 6.1.17(A) Cut Set of a Graph
V4 Let 'G= (V, E) be a
Eis called a cut set of
connected graph. A subset
G if deletion
of all the edges ot
6.1.14 Simple Graph from G makes G
disconnect.
Directed graph without loops and multiple edges is If deleting a certain
number of edges from a
known as simple graph. (Refer Fig. 6.1.17). makes it
disconnected, then those deleted edges
grap
&a Fig. 6.1.22
called the cut set of the
graph. Fig. 6.1.25

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)
=

edges in any 'n=


(even degree vertices) Fig. Ex.6.2.46)
+ (odd degree vertices) Simple graph with n vertices is Fig. Ex. 6.2.4(a)
nodes Number of edges = 3(8 28
construct a graph with 12
Ex. ls it possible to
6.2.5: remaining
3 and the
nodes have degree
Such that 2 of the Maximum edges.
4.
nodes have degree
TechKnewledge
Tech Knouledge uDucations
PUbICation>
Discrete Structuresand Graph Theory(MU)_ 6-9 Graph Theory Discrete
Structures and Graph
' A simple undirected graph of 8 vertices cannot A path in a graph G is called
an Euler path if it If G is connected and has Theory (MU) 6-10
includes every edge exactly once. An Euler circuit is odd degree, then there exactly two vertices of Graph Theory
have 40 edges excludingself l0op.
is an
an Euler path thatis a circuit. G. Any Buler path in G Euler path in
Ex. 6.2.9: How many
paths of odd degree and end at themust begin at one vertex of
in simple graph shown in
length4 are there from a
to dExamples other.
Fig.
Ex. 6.2.9.
1. An Euler path in Fig. 3.1 is t: E, D, B, A, C, D. Proof
There is no Euler circuit. (a) Let Vi, V2» Va be vertices
Euler path must of odd degree, Any
possible
leave (or
Va with no way to return arrive at) each of vi, V2
(or leave) since
de these vertices has odd each of Fig. 6.3.4
degree. One vertex of
three vertices may be
the these In Fig. 6.3.4, vertices present the land areas and
Fig. Ex. 6.2.9
path and another the end, but beginning of the Euler the edges present the bridges rding
this leaves the third of the prDoe
Soln. : vertex at one end of to the problem, we have to walk through all .the
exactly once and come back to the original vertex. eages
an
untraveled edge. Thus
there is no Euler path.
Fig. 6.3.1 1a
is it is required to find an Eulerian circuit in a graph.
a bc d (b) Let u and v be the two
vertices of odd degree. As the degree of each vertex is not even, hence by
a0 1 10 2. One Euler circuit in the graph of Fig. 6.3.2 is Adding the edge lu, v} to G produces a
T: 5, 3, 2, 1, 3, 4, 5 Euler path is not
possible for Graph G all of whose vertices have evenconnected Theorem 1 (a), there does not exist any Eulerian
in the graph.
circuit
b 10 0 1 this graph. By Theorem 1 (b), there is an Euler circuit ' degree.
in G. Hence it is not possible to walk through all seven
Omitting (u, v} from t produces an Euler that
1 00 1 path bridges exactly once andcome back to original
begins at u (or v) and ends at v (or u). poSition.
Therefore, there is no solution to Konigsberg bridge
We shall now give the solution
of famous
d01 10 Konigsberg seven bridges problem which was problem.
solved by Swiss Mathematician Leonhard Euler in
1736. Euler presented the paper with the solution of
6.3.3 Solved Exampleson Euler Paths and
abcd Circuits
seven bridges problem which is considered as the
Fig. 6.3.2 birth
a 08 8 mark of graph theory. The problem is depicted in Ex. 6.3.1 In Fig. Ex. 6.3.1 each of the four vertices has
Two questions arise naturally at this Fig.6.3.3. degree 3; thusby theorems 1 and 2, there is neither an Euler
A b8 0 0 8 point. Is it circuit nor an Euler
possible to determine whether an Euler path or Euler path.
8 0 0 8 circuit exists without actually
finding it ? If there must
be an Euler path or Euler
circuit, is there an efficient
0 8 8 0 way to find one ? See following theorems.
A D
path of length 4 is entry (a, d)a
6.3.2 Theorems
'Total 08 paths are there from
a to d. These are, University Question
ababd abacd abdbd abded Q. Whatis the necessaryand sufficient
path and circuit? conditionforEuer Fig. 6.3.3 Fig. Ex. 6.3.1
acabd acacd acdbd acdcd MU- May 12
Theorem 1 Two islands C and D formed by Pregel rver in EX. 6.3.2 : In Fig. Ex. 6.3.2, there are seven vertices Two

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

Q. DefineEulerpath,Euler circuit.MU-May 19, Dec. 19

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

Fig. Ex. 6.3.10


Fig. Ex. 6.3.6 Ex. 6.3.11 In Fig. Ex. 6.3.11, vertices 1
:
and 7 have odd
degree 3 so by theorem 1 (a) and (b), there is no Euler circuit
Ex. 6.3.7 In Fig. Ex. 6.3.7,
there are four of odr!
vertices but by theorem 2 (0) there is an Euler path, that path is, Fig. Ex. 6.3.14
Fig. Ex. 6.3.3
there is no Euler circuit and Euler path by : 1,2,4, 5, 7,6, 4,3, 1, 8,7 f have odd
degree so
Ex.6.3.15: In Fig. Ex. 6.3.15, vertices c, d, e,
Ex. 6.3.4 : Graph is shown in Fig. Ex. 6.3.4,
is connecte0Theorems 1 (a), (b) and Theorems2 (D). 3. So there is neither an Euler path nor an Euler
A degree
and there are exactly two vertices d, e of odd degree.
Circuit, by theorem 1 and 2.

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,

Fig. Ex. 6.3.4


Ex. 6.3.12: In Fig. Ex. 6.3.12, given graph is not connected :A, 8, CD, E, F,AE, B,D,A. MU-May 16
so there is no Euler path and Euler circuit.
Hence by Theorem 2 (b) there is an Euler path and
by Theorem 1 (b) there is no Euler cireuit.
d, b, e, a, b, f. a, f, d, e, c, ,e Fig. Ex.6.3.8

Ex. 6.3.5 Graph is shown in Fig. Ex. 6.3.5,is connected


Ex. 6.3.9 In Fig. Ex. 6.3.9,vertices 4, 7 have odd degree.
and all the vertices are of even
degree. Hence DyHenceby Theorem 1 (a) and theorem 2 (6) there is no
Euler Fig. Ex. 6.3.16
Theorem 1 (b), it has an Euler circuit, that circuit is,
circuit but there is an Euler path.
T:a, b, f, c, a, d, b, C, e, f, d, e, a
T:4,2,1,3, 4, 6, 7, 5, 4, 7. Ex.6.3.17: In Fig. Ex. 6.3.17, Two vertices B and C have
Fig. Ex. 6.3.12 odd degree 3. So there is no Euler circuit, by theorem 1 (a).
But there is an Euler path by theorem 2 (b), and that Euer
have even
In Fig. Ex. 6.3.13, all vertices path is, Tt: B, A, E, D, C, B, D, A, C.
Ex. 6.3.13: theorem 1 (b), and
Hence there is an Euler circuit, by
degree A.
that circuit is, n : A, B, F,C, A,D, G, E,

Fig, Ex. 6.3.9 Fig. Ex. 6.3.17


Fig. Ex. 6.3.5 Ex. 6.3.10: In
Fig.Ex. 6.3.10, vertex 6 has degree 1, verte Ex. 6.3.18: Determine whether directed graph shown in
5 has degree 3 so there is
but there is an Euler
no Euler circuit
by theorem 1(a) Fig. Ex.6.3.18ta) has Euler circuit. Construct Euler circuit if
path, by theorem 2 (D). one exist Ifno Euler circuit exist, detemine whether directed
Fig. Ex. 6.3.13 graph has Euler path. Construct Euler path if one exist.
n:6,5,4, 3,2,1,9, 3, 8, 7,5

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

Ex.6.3.21: Give necessary A, C,D, A, E, B, G, D, E, G, B, A Ifa graph


Fig. Ex. 6.3.18(a) an Eulerian path and Eulerian F, be no Euler circuit in G.
undirected graph to possess
two vertices of odd
circuit. Ex.6.3.23 : Which graph shown in Ifa graph G has more than
Soln.
than two vertices of odd
Figs. Ex. 6.3.23(a) and Euler path in G.
G has degree then there can be no
more
Soln.: If a graph (b) have an Euler path? Justify your answer.
can be no
Euler path in G or in other has no Euler path and
no Euler
degree, there Hence given graph
connected and has exactly two vertices of
words if G is circuit.
there is an euler path
in G. Any Euler path
odd degree, in graph shown
in G must begin at one vertex of odd degree
and end at Ex. 6.3.25: Detemine Euler Cycle and path
a connected graph and every vertex MU- May18
the other. If G is in Fig.Ex. 6.3.25.
there is an Eulerian circuit in G.
has even degree, then

Ex. 6.3.22: Find Eulerian path and circuit in Figs. Ex


6.3.22a), (b) and (o).
Fig. Ex.6.3.23(a)

Fig. Ex. 6.3.25

Fig. Ex. 6.3.23(b) Soln.


than two vertices of odd
Euler path does not exist. Fig. Ex. 6.3.25, has more
Soln. euler circuit and euler path.
Fig. Ex.6.3.22(a) degree. S0 there is no no

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

Ex. 6.3.20 In Fig. Ex. 6.3.20,wo vertices a, b haveodd


degree 3, So accordingto theorem1.(a)and (6) Eulerian Fig. Ex. 6.3.26(a)
circuit doesnot éxistinthis gráph.MU-May 17,May 19
Soln.: According to theorem 2 (b) there is an Euler
Fig. Ex. 6.3.22(¢)
path : b, e, d, c, a, d, b, a.
Soln.:
Flg. Ex. 6.3.24
(a) All vertices have even degree. So there must De a
TechKnouledgd
Eulerian circuit. PDCationS

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

All around the World prove the following:

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

Ex. 6.4.2In Fig. Ex. 6.4.2, thereis an Hamiltoniancircuitfor


this graph. The path A, D, C, B, A is a Hamiltonian circuit.
189 least+ =n, so the hypotheses of Theorem 1 hold.

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

By the hypothesis of the theorem, Hamiltonian path : A, B, E, C, D.

deg(u) deg(v) 2
+ a-3n +6)

(n-5n+6) =n
Thus the result follows from Theorem 1. Fig.Ex.6.4.7

Theorem 4 Ex.6.4.8:In Fig. Ex. 6.4.8 consider vertices 1 and 7 which


Fig. Ex. 64.13
always a Hamiltonian path in
There is a directed are not adjacent to each other Flg. Ex. 6.4.10
Degree of 1 is 2.
completegraph Ex. 6.4.14: Graph shown in Fig. Ex. 64.14, has
6 vertices.
Ex. 6.4.11: In Fig. Ex. 6.4.11,
For example
Degree of 7 is 3. MU-May 16 numberof verticesis 6. Each
vertex has degree greater than or equal to 6/2. Vatices
Vertices d, e have
b, d,
a.
a, degree 2 wnich is less than 6/2. So
have degree
So there is an
(1) Consider the problem of ranking players in roimd- Hamiltoniancircuit : 7:a, f,e, d, c, b, a. Hamiltonian circuit does not edst in this graph. But there is

robin tennis tournament such that player 'A' will an Hamiltonianpath


4 Hamiltonianpath: a, f, e, d, c, b.
be ranked higher than player B if A beats B. or a
T:b, a, c, f, d, e.
beats a player who beats B. or A beats A player
who beats another place who beats B; and so on.
(2) Since outecomesof the matches arc represented asa
directed complete graph, the existence of
a Flg. Ex. 6.4.8
Hamiltonian path in the graph means that it is
always possible to rank the piaver lincarlv. Degree of 1+ degree of7> number of vertices
2+3 7
Ex. 6.4.5: Define Hamiltonian path and circuit with
5 7 Fig. Ex.6.4.14
example. What is the necessary and sufficient condition to
exist Hamiltonian circuit ? Fig. Ex. 6.4.11
There is no Hamiltonian circuit. Ex.6.4.15 Graph shown in Fig. Ex. 6.4.15. has 6 vertices.
Soln.: Refer Sections 6.4.1 and 6.4.2. Vertex f has degree 1 which is less than 6/2. So Hamiltonian
But there is Hamiltonianpath
an

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.

Hamiltonian path : 1,3,5, 4, 2.

Fig. Ex. 6.4.15


D

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

Degree (A) +degree (C)> no. of vertices 8> 4.


TechKneuledge
PuDiications
Tech Knouledge
PubIcatlon
Graph Theory Discrete Structureand Graph Graph
Theory
Theory(MU) 6-20
6-19 Eulerian Circuit: a, b, C, d, a (covers all
Discrete Structuresand Graph Theory(MU edges of Graph G) path: p, u, v, q, 8, t,T
Hamiltonian
HamiltonianGraph: a, b, c, d, a (covers all vertices of Hamiltoniancircuit: , p, u, v, 9, 8, j,r
Graph G) 5, V, u, r, t, 5, I, P,
G1 Eulerian path: (p, u, v, q,

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

each vertex exactly once.


T:a.,b, c, d, b, f, d,a, f, e,d above path doesn't visit Hamiltonian e)
G has 2 vertices of odd degree. Hence by Hamiltonian graph is Eulerian graph.
Eulerianpath: (e, d, b, a, d, c, a,
(i) Not every ) In HamiltonianGraph, we need to visit each and
Theorem 1 (a), no Eulerian circuit in given graph. graph not consists of
For example following evey verexonly once exçept the last vertex which Ex. 6.4.21 Determine Hamiltonian Cycle and pathn.inne
Hamiltonian Circuit: a, b, c, d, e, f, a. Eulerian cireuit path, but it consists of is also the first vertex. In this type of graph we MU-May 19
HamiltonianPath: a, b, c, d, e, f Hamiltonian path. don't require to visit each and every edge of the
followinggraphs
graph (which is necessary in case of Eulerian
) Eulerian Circuit: This not exists in given graph.
Hamiltonianpath: 1, 2, 4,3 Graph) i.e. need to cover all vertices only once
Eulerian Path: 8, d, b, a, e, f, g, c, b.
Since every Hamiltonian graph not necessarily be
HamiltonianPath: d, b, a, e, , g,c Eulerian. Refer following Fig. Ex. 6.4.19(¢) to
Ex. 6.4.17 Determine whether the given graph has a better understand this statement. In following
Graph G2 solid lines indicate Hamiltonian Graph,
Hamitoncircult or Eulerian circutt. If it does, find such a Fig. Ex. 6.4.21
but it is not Eulerian Graph, since it is not possible
circuit. MU-May13
to cover all edges exactly once.
Fig. Ex. 6.4.18(b) Soln.
G2
Hamiltonian Cycle:
Ex. 6.4.19: ) ls Every Eulerian graph a Hamiltonian ?
(i) ls every Hamiltonian graph a Eulerian ? Justify with the Degree of each vertex:
a b 3
necessary graph.
Fig. Ex. 6.4.17 2 = 2
Soln.:
d C

Total number of vertices n = 4


Soln. ) Let G =(V, E) be a graph. A Eulerian Graph is a
Hamiltonian path g, f, a, b, c, h, e, d It has no Hamiltonian cycle consider 'a' and 'e
graph which passes through every edge exactly
which are not adjacent to each other,
No Hamiltonian circuit once.
Fig. Ex.6.4.19(0) not great, than
degree (a) + degree (c) 3, which is
=

Hamiltonian path = e, a, b, d, c Let G= (V E,) be a graph. A Hamiltoniancircuit of vertices


Hamiltonian circuit b, a, e, d, e, b. is a circuit which passes through every vertex exactly path,ifnumber
Ex.6.4.20: Deteminethe Eulerianand Hamiltonian 14
Eulerianpath = b, d, e, a, b, c, d once (with only the first and last vertex exists, inthe followinggraphs. MU-May Hamiltonianpath: a, b, c, d
being a
Eulerian circuit is not exist. repeat). A graph is called Hamiltonian if it possesses a
Ex. 6.4.22 Determine Hamiltonian Cycleand pathin graph
Hamiltoniancircuit. shownin Fig.Ex. 64.22. MU-May 18
Ex.6.4.18: () Is every Eulerian graph a Hamiltonian? In following Fig. Ex. 6.4.19(a) Graph G consists of
(i) Is every Hamiltoniangraph a Eulerian ? both Eulerian and Hamiltonian
Explain with the necessary graph.
Graph. But in
Fig. Ex. 6.4.19(6) Graph G1 consist of Eulerain Graph
but not Hamiltonian. Ex. 6.4.20(6)
Soln. Ex. 6.4.20(a)
(i) Not every Eulerian graph is Hamiltonian graph.
For example following graph is Eulerian because Soln.
Eulerian cireuit/ path exists in graph ie.

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

the edge connecting z and this vertex.


Hamiltonian circuit n :a, c, b, f, g, e, d, a Thus the travelling salesman
Hamiltonian Path n: a, c, b, f, g, e,d finding
the hamiltonian problem reduces to Repeat step (2) until all vertices in G are

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

graph. vertex and the last vertex


added.
Figs. Ex. 6.4.23(a) and (b). MU-Dec. 18 the starting

6.44 Solved Examples on Traveling


Salesman Problem

G2 Use neighbour method to find out


nearest
Ex.6.4.25 :
Hamiltonian circuit for graph shown in Fig. Ex.
6.4.25.
Hamiltonian circuit = t: D, A, B, C, F, E, D
(a) starting vertex a
Hamiltonian path = t: D, A, B, C, F, E
(b) starting vertex d
Ex. 6.4.24 Detemine if ig. Ex. 64.24 has Euler path, minimum Hamiltonian circuit
G1 (c) Also find
Euler circuit, Hamiltonian path and Hamiltoniancircuitand Fig. 6.4.3
Fig. Ex. 6.4.23(a)
state the path/circuit. MU-
Dec. 19 There are several Hamiltonian circuits starting
from a.
) abeda withweight22
Gi) a be cda
with weight21
(ii) a cebdawith weight 26 and so on.
The minimumHamiltoniancireuitis a becda
If we have a complete graph k, on n vertices, then
C Fig. Ex. 6.4.25
the problem is resolved by listing are possible
3L Soln.
Hamiltonian circuits and pickingup the one with least|
(a) Starting vertexa: There are 4 adjacent vertices
Fig. Ex. 6.4.24 weight.
However for large value of n, this is a highly
a to 'a' namely b, c, d, e.
Fig. Ex. 6.4.23(b) Soln. : inefficient algorithm. But nearest neighbour is c
a simple method that
Euler circuit : In next section, we present
FA,D,G,C,D,E,C,B,E,A,B,F will give good results to the travelling salesman C weightof edge ac =4 is minimum
Soln. :
Euler cireuit is Euler path Hamiltonian path = tia, c}
HamiltonianCircuit: problem.
FA,D,G,C,E,B,F
Hamiltoniancircuit is Hamiltonianpath 6.4.3(A) Nearest NeighbourMethod
circuit
start the hamiltonian
6.4.3 In this method, we

TravelingSalesman Problem with any arbitrary


vertex and find the vertex
nearest
bo
One of the problems related
Hamiltonian circuit
to to it.
the
is
Traveling Salesman Problem" which is statea this way, and coming back to do do e
Continuing
below: through all the vertices
starting vertex by travelling Fig. Ex. 6.4.25(@) Fig. Ex. 6.4.25(b)
circuit.
salesman is required to visit a number of cities
A
we get
hamiltonian
exactly once,
deseribed below:
during a trip. Given the distances between the neighbourmethod
is
Every node in this graph Gi, as shown in Fig. Ex. in what order cities
should he travel so as to visit every ci
The nearest-
vertex and find the
There are 3 vertices adjacent to c, namely b, d, e
an arbitrary

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(

Hamiltonian circuit = la, £, d, c, e, b, al

and its weight = 34

Ex. 6.2.27: Show that the complete graph k (n 23) has a


Fig. Ex. 6.4.26(a)
C
Hamiltonian circuit. What is the length of that circui? How
Proceedingin similar fashion we have many Hamiltonian circuits exist in Kn?
Fig. Ex. 6.425(d) Hamiltonianpath= la, f, d
Soln. :
Since all the vertices are traversed,to
complete the The complete graph k, (n 2 3) has n vertices and
Hamiltonian circuit, we have to reach back to the
vertex a. Fig. Ex. 6.4.25(h) degree of each vertex is (n- 1)

Hamiltonian path fa, c, b, d, e,al Lastly: We know that when n2 3;

weight of Hamiltonian cireuit = 18 Hamiltonian path = {d, e, b, c, a) n-1 2


Fig. Ex. 6.4.26(b)
Similarly, from vertexsd;

Hamiltonian path la, f, d, c


D (v)2 for all verticesve V(,).
Therefore theorem II on complete graphs is
satisfied.
d
Hence complete graph on n vertices has a
Hamiltonian circuit.
d
Fig. Ex. 6.4.25(e) eg. consider k as showm in Fig. Ex. 6.4.27.
Fig. Ex. 6.426(c)
(b) Starting vertex d Fig.Ex.6.4.25() Similarly from vertex c, we travel to the nearest The length of Hamiltoniancircuit is the number of
edges in the circuit. For k4 the Hamiltonian circuit
(because both are
If starting
vertex is d then by nearest
neighbour The Hamiltoniancircuit is
ld, e, b, c, a, d)
neighbour either b or e

has 4 edges.
method, choose among either b or e (since both are at equidistant)
the minimum distance 2) we choose vertex e :

The Hamiltonianpath la, f, d, c, e)


=ld, el . Hamiltonian path =

Fig. Ex. 6.4.27

Hence, k, graph has Hamiltonian circuits


Fig.Ex.6.4.25()
Weight of the circuit Fig. Ex. 6.4.26(4) and length of Hamiltoniancircuit is n.
do 16
c) Thus, the choose vertex b Ex. 6.4.28: Find Hamiltonian
minimum Hamiltoniancircuit is > From vertex e we path and a Hamiltoniancircuit
Fig. Ex. 6.4.25() 16. in graph K4,3
Hamiltonian path = (a, f, d, c, e, b}
Tech Kneuledge
Pubtications
Tech Knowledse
Publitations
6-25 GraphTheory Discrete Structuresand Graph
DIsCrete Structuresand Graph Theory(MU) b) There is an edge between any two vertices Theory (MU) 6-26 GraphTheory
) Graph with Euleriancireuit but has
which correspond to two examination d than to
At the vertex h', if we take the path h cb
Soln. no
Hamiltoniancircuit
The complete bipartitegraph k4,3 is given by: given by different instructors. cover all the vertices we have to cover the edge
Eulerian circuit bcedeca ef to traverse through the remaining
vertex 18 atleast 3, las per ld,
Now degree of each the vertices fand g.
given condition),
the sum of degrees of an two starts from the vertex h or
vertices is at least 6. Similarly, if the circuit
and contains edge x,
any other vertex from graph
then to traverse through all the vertices the edge y
Fig. Ex. 6.4.28 Note must be traversed.
Supposethe degree of anyvertex less than 3 ther
is
in the graph |) the hen at
total number of vertices most two vertices ill have the edge with this vertey Fig. Ex. 6.4.31(b)
Here
k4,3 is 7. tex Hence proved.
of degree less than 3, (ii) Graph with neither Eulerian
Also the degree sum of any pair of vertices 2 (7-1)
nor Hamiltonian Ex. 6.4.33: Is there a hamiltonian circuit in the graphs
haveany circuit.
Henoe remaining vericeswouldnot
4

Dy theorem l1, the graph k has a hamiltonian


with this vertex.
edge shown in G and G2 in Fig. Ex. 6.4.33.

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.

Ex. 6.4.29: Does the following graph posess hamiltonian


v) Hencedegreeofeachvertexis atleast3
circuit ? If yes, find the hamiltonian circuit Now when sum of degree of two vertices is atleast
6; This is greater than or equal to (7-1) = 6. Fig. Ex. 6.4.31(¢)
Hence by theorem, the graph will have a iv) Graph with no Eulerian circuit but a hamiltonian
hamiltonian path. circuit
Hence it is possible to schedule the examinations
under given condition.

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 =

In Gz, the hamiltonian path = ab d chfeg


But this leaves 4 edges circuit.
not enough for
-

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.

10 And each vertex in this graph has degree greater


Soln. than or equal to n/2 ie. 5/2.
For a Hamiltoniancircuit, each vertex should have
degree exactly 2 in the circuit. Hence we have to
This graph possesses Hamiltonian cireuitgiven
813 11
remove additional edges.
as 135421 and Hamiltonian path given as 13542.

Considervertex'a'of degree 3 (a) b) (4)Fig.Ex.6.4.39(d)


Number of vertices 6.
6 5 d e12 ) Edges e and eg incident on 'a' can not be removed
since they are incident on vertices 'b' and 'e' of
Each vertex has degree greater than or equal to0
Fig. Ex. 6.4.36
degree 2.
By theorem, it posseses Hamiltonian cireuit given
Soln. : i) Hence we have to remove edge e as 1456321and Hamiltonian path :145632.
We know that for any Hamiltonian
circuit, all the Consider vertex 'd' of degree 3:
vertices of the graph should be traversed C) (d) 6.5 IsomorphicGraph
exactlyonce. (1) We cannot remove
Each vertex in the circuit must any of the edge eg and e4 Flg. Ex. 6.4.39
have degree 6.5.1 Definition
exactly 2 becauseif the vertex has degree more than 2
becausevertex'e'and vertex'c'have degree2.
in the circuit, it means that (i) So we have to remove Soln. 1
the vertex is traversed edge e15
more than once in the circuit.
Similarlyfor vertex 'e of degree 3: (1) Fig. Ex. 6.4.39(a) University Question
Hence, we have not adjacent
in
to
additional edges, if any,| ) To maintain
remove
connectedness of the graph, we have
Consider vertices A and C
which are
9. Defineisomorphicgraph. MU-May 16,May 18
keeping mind the connectednessof the In geometry, two figures are thought of as
Consider the vertexf of graph. to retain
edges e4 and ea Degree of A
or eg, the vertices
degree 3, if we remove eg (ii) This
means we can remove Degree of C 4
equivalent if they have identical behaviour in terms of
g and e will become the edge e14 to a ake geometrieproperties.Likewisetwo graphs are thought
of degree 1,
which is not allowed for the circuit. vertex'c'of degree 2. According to theorem
ofas equivalentor isomorphic if they have identical
No. of vertices in
Hence remove the edge
e 80 that the vertex But neither of
these D (A) 2 behaviour terms of graph properties.The problemof
becomes of degree 2. This implies b
also
fbecausethe graph will becomeapproaches would wo
becomes of disconnected.
graph isomorphism arises in many fields, such as
degree 2. Hence the
given graph 8 2 chemistry,switching theory, information retrieval etc.
Now we define isomorphism of graph as follows:
does not contau
Hamiltoniancircuit.
TechKneuledge
DCations

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

Fig. Ex. 6.5.3(e)

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.

Ex. 6.5.10 Show that the foliowing fwo graphs ae


G1 G2 isomorphic. U- May 13, May 16
Fig. Ex. 6.5.8(0)
5
Fig. Ex. 6.5.7(a Fig. Ex. 6.5.7(b)
Soln.: Note that each of the graphs is sinmple,
connected and has 7 vertices and 11 edges.
Soln.Here both the graphs have 4 vertices and A
G
5 edges. Gj and G2 both, there are 2 vertices of
In Furthermore, each has one vertex of degree 4, four
2 vertices of degree 3 and two vertices of degree 2. Now
degree 2 and 2 vertices of degree 3. Also the adjacency vertex c of
Fig. Ex. 6.5.5(a) Fig. Ex. 6.5.5(b) is preserved. The one-to-one consider the graph G1 In this graph, the
vertices is given by function f:
correspondencebetweenn degree 4 is adjacent to 2 vertices
of degree. 3, while in
Soln.: Here again G1 and G2 both have 5 vertices but v v", vertex 7 of degree 4 is adjacent to four vertices
where Ga, the G1 2
G has 6 edges while Ga has 7 edges. Hence G Go of degree 3. Hence G1 and Ga
are not isomorphic.

That is G is not isomorphicto because adjacency is


G2 v la, b, c, d) Graphs G and G3 are isomorphic
defined by the following (a)
Ex.6.5.6:
Such that la, b} is an edge in G1 if and only if preserved. An isomorphis1m is
Show that graphs shown in Fig. 6.5.6(a) and
(b) are not isomorphic. la, flb)}is an edge in G2 vertex bijection :
Fig. Ex. 6.5.10
f dz
=(, a), (va, c), (v3, d), (v4, b)} ay bX Cw

Soln.: Both the graphs have 5 vertices and 8 edges


Therefore the two ft 8u
Graphs G and Ga are Both the graphs have 4 vertices of degree 3 and 1
isomorphic. Hence, G s G3. Since G # G2 and G© Gg.
Hence G G
vertex
ofdegree 4. And adjaceneyis also preserved.
The one-one correspondence between the vertices

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

isomorphic. Such that la, b) is an edge in G1 if and only if


Such that (a, b} is
(fa), fb) is an edge in G2 an
edge in G iff ( f (a), f (b)) is
an edge in Ga.
f ((a, 1), (b, 3), (c, 4), (d, 2), (e, 6), (, 5))
f
Therefore two graphs are isomorphic.
=
(u1, V5), (u2 V), (uG, V1), (4
Vg
Ex. 6.5.13: Determine whether the graphs shown in
(u5,V, u3
Therefore G, and Ga are isomorphic
Fig. 6.5.13 are isomorphicor not. graphs.
Fig. Ex. 6.5.16ta)
Ex. 6.5.15: Are the graphs drawn below
Fig. Ex. 6.5.11(a) Why ? isomophic?

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)

Fig. Ex. 6.5.18

have 4 vertices and


Soln. Note that both graphs
has 2 vertices of degree 4 and
6 edges. Each graph Fig. Ex. 6.5.21(b)
2. Also the adjacency is preserved.
2 vertices of degree
vertices. But graph G
The one-onecorrespondence between the vertices, is (a) (6) Soin.: Both the graphs have 6
d>4. So bijection does
given by; a1 b2 c 3 Hence has 8 edges and graph H has 9 edges.
Flg. Ex.6.5.20 vertices of these two graphs. So these
not exist between
Fig. Ex. 6.5.17(c) G Ga Soln.: Both the graphs have 5 vertices and 6 edges. two graphs are notisomorpnc
Ex. 6.5.19 Show that the pairs of graphs are isomorphic,
But first graph has two vertices of degree 3 and 3 shown in
from to the other. Indicate whether the two graphs
verices, ot degree 2 whereas in second graph there are Ex.6.5.22:
one
by finding an isomorphism answar.
Ex. 6.5.22 are isomorphic.Justify your
Z vertices ot degree 2, 1 vertex of degree 1, 1 vertex of Fig.
degree 4, 1 vertex of degree3. So bijection does not
exist between vertices of these graphs. So this graphs
are not isomorphic.

Ex. 6.5.21 : Determine graph G and H shown in Fig. Ex.


6.5.21 are isomorphic or not. Justify your answer
2
Ex. 6.5.17(d)
(a
G1

Fig. Ex. 6.5.22(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)

Fig. Ex. 6.5.24

Soln. Here both the graphs Gj and Ga have same


Fig. Ex. 6.5.26
number of vertices 8, but the number of edges are not It is closed operation
same in both the graphs. Gj has 12 edges while Ga has Soln.:
(G, X) is a group.
11 edges. Therefore graphs are not isomorphic. Condition
Flg. Ex. 6.5.23(a) 1. Both the graphs Gl and G2 contain 7 vertices and Ex.6.5.27 Detemineif foliowinggraphsgand G are
Ex. 6.5.25 Determine whetherthe followingpair of graphs 9 edges. isomorphic or not. MU-May 14
areisomorphicornot MU-Dec.12 2. The number of vertices of degree 3 in the both the
b graphs is four and the number of vertices of degree
2 in both the graphs is 3.
3. For adjaceney.
Isomorphicgraph
A7,B4, C3,D 6, E5, P->2, G1
G2 G
. Given two graphs are isomorphie
Fig. Ex. 6.5.27
Fig. Ex. 6.5.23(b)
Show that the set G= [f, ,, f, fd
Soln. Here both G and Go have 7 vertices and 14 Where the functions are defined by Soln.: Graph G, have 4 vertices and 6 edges; where
edges each. Every vertex in G and G2 is of degree 4. Graph G have 5 vertices and 8 edges. Adjacency is not
) = 1
(a) f ()=x available between G and Ga.
Also the adjacency is preserved. The one-one
correspondencebetween vertices is given by,
Fig. Ex. 6.5.25
Hence given two graphs are not isomorphic.
funetion f:v>v Ex. 6.5.28 Detemine iffollowinggraphs g and Gare
Soln.: Here both graphs 1-
Where v la, b, c, d, e, f, g),
G and Gg have same number f (6) =

isomorphicor not MU-May15


ofvertices i.e. 6 and same number of edges that is9.
is a group under composition
of function frame the
fa', b, c, d, e, f, g Degree of each vertices in graph G and H is given composition table
Such that (a, b} is an edge in
G1 if and only if below.
f(a), f(b) ) is an edge in Ga. G)is group underoperationcomposition.
Graph G a=3 c3 b=4 d=4 e=2 f=2
f (a, a), b, c'), (c, b), (d, f), (e, c), ) 6G))=6*
Graph H a'=3 d=3 d=4 f=4 b' =2 e=2
Hence two graphs and Sach graph has two Vs
vertex of
G Go are isomorphic. degree 3 and two of degree 2. Now degree
4, two or r Fig. Ex. 6.5.28 t

G. In this consider the grapP


Ex. 6.5.24 : State and justify whether the graph, the vertex of degree 3 is
Soln.
following graphs|2verticesof a
adjacent to
are isomorphic or not? 3 and degree another of degree 4. Condition Number of vertices = both 5
1. It associative. Number of edges = both 5

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

Number of loops : 0 D =3 X=2 b, c, d does not further divide region 5.

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

Construct 2 functions f: V>V and g: E>E


1 4 Fig. 6.6.1()
f:V>V |g:E-E G
6.6.2 Theorem
vVE E Fig. Ex. 6.5.30
For any connected planar graph
V, | Soln. V-e+r 2
where v, e, r are the number of vertices, edges and
G
regions of the graph respectively
Number of vertices Proof:
Number of edges
Number of verticesof degree 2 2 (V Vs |2 (W2» W
Number of vertices of degree 3 2(V2 V |2 (W, Ws3
of vertices Set
Ex. 6.5.29:Determine if followinggrephs G1 and 2 are Wa, W
V (V V2. V3, Val W {W, W d)
isomorphicor not. tg MU-May17, May 19 Fig. 6.6.1
Set of edges E =le, e2, e3, e4, es} F
=
=
{fi, f2, 13, 14 Fig.6.6.2(a)
Fig. 6.6.1(a) shows planar graph
f:V>W 8 E>F a

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

shows non-planar graph.


two graphs with a single edge shown in Fig 6.6.2(a)
below above equationv-e+r =2
is satisfied.
V2 W
a

Fig. Ex. 6.5.29 on the plane and


Suppose we draw planar graph
a As the Induction step, we assume that this
Soln.: Both Graphs Gl and G2 contain 6
| Vs W 3 take a sharp knife to eut along the edges e equation is satisfied in all graphs with n-1edges. Let
Edges Vertices and into pieces that are called the Gbe a connected graph with n edges. If G has
a vertex
plane will be divided the removal of this vertex together with
Let G1 = (A, B, C, D, E, FI
regions of the graph. A region ot a planar grapn
1so degree l,
the edge incident with it will yield a graph
Let G2 {V, U, W, Hence the two graphs are defined to be an area of the
plane that is bounded by connected
X, Y, Z} isomorphic. further divided into subareas.
C'as shown in Fig. 6.6.2(6).
edges and is not

Tecaknowledga
TechKnouledge
PubliCat1ons
uDEicatigns
41
Graph Theory Discrete Structures and Graph Theory
Discrete Structuresand Graph Theory(MU Graph Theory
(MU) 6-42

10

Fig. 6.6.2(b) Fig. 6.6.2(c)

Since v-e +r = 2 is satisfied in G. It is als0

satisfied in G, because putting the removed edge and


vertex back into G will increase the count of vertices by
Flg.6.6.2(d) Fig. Ex. 6.6.1(b) Fig. Ex. 6.6.2
Fig. Ex.6.6.1(©)
1 and the count of edges by 1, but will not change the
Determine the number of regions defined by
The most important application to this corollary is a
Soln.
Ex. 6.6.3: 10 edges. Draw
count of regions if G has no vertex of degree 1, the to show that the complete graph Kg on 5 vertices is non connected planar graph with 6 vertices and
removal a simple and a non simple graph.
of any edge in the boundaryof a finite regionplanar
will yield a connected graph G" as shown in In K5, the number of vertices v =5 Soln.
Fig. 6.6.2(c). Given v = 6, e = 10
The number of edges e = 10
Hence by Euler's formula for a planar graph
Since this equation is satisfied in G, it is also
According to equation V-e+r = 2
satisfied in G, because putting the removed edge back
6-10+r = 2
into G' will increase the count of
edges by one and the es 3v-6
6
count of regions by one but will not change the count of 10 3x5-6
Hence the graph should have 6 faces.
vertices 10 9
A simple graph and a multigraph with v = 6,
Equation v -e + r = 2 is known as Euler's
which is impossible. e 10 andr = 6 are shown in Fig. Ex. 6.6.3.
formula for planar graphs. All connected planar Hence Ks is non planar. Ex. 6.6.1(e))
Ex.6.6.1(d)
graphs must satisfy such a simple formula.
It is also not possible to draw the edges eß and e7
Corollary: If Gv, E) is a simple connected Withouterossing.Hence Kg is non planar.
planar graph then
6.6.3 Solved Examples on Planar
es 3v -6 ..(1) Graphs
where is the total number
e
of edges and v is the EX. 5.6.1: By drawing the graph, show that following
total number of vertices in the
graph G. graphs are planar graphs
Ex. 6.6.1(
Proof: Since the graph is a simple planar graph, (@) Simple Graph
Vo
therefore each region of the planar graph is bounded Ex 6.6.2: How many edges must a planar graph have if it
by such graph.
at least three or more has 7 regions and 5 nodes. Draw one
edges. Hence the total number of
edges e 2 3r. Also each edge is included in at least 2 Soln.:
in planar graph
According to Euler's formula,
a
regions of the planar graph G, therefore
V-e+r= 2
2e2 8r number of vertices edges and
where v, e, r are the
or
regions in a planar gráph.
5,r 7,e = ?
Here v
=
(b) Mutiple Graph
Substitutethis value ofrin Euler's formula we 5 V-e+r= 2
get Fig. Ex. 6.6.3

Fig. Ex. 6.6.1(@) 5-e+7.= 7


10
or 3v-6 2 e
must have 10 edges. This
Hence the given graph
6.6.2.
is shown in Fig. Ex.
graph
Tech Knowledge
Pubtica tion
TechKnowledge
UOTUC3ton>
Graph Theory
Graph Theory Discrete Structuresand Graph Theory(MU) 6-44
6-43 6.6.4(6) can be rawn a
Discrete Structuresand GraphTheory(MU (b) Graph
shown in Fig. Ex. Ex.6.6.6: Suppose that a connected planer graph
has 20a
are planar Fig Ex. 6.6.4d). vertices, each of degree 3 into how many regions does
Ex. 6.6.4: Which of the following graphs
representation of this plan graph split the plane ?
Soln.
IVI =20 number of vertices
degree of each vertex = 3
Fig. Ex. 6.6.4a)
By hand shaking Lemma Fig. Ex.
be redrawn
as

Soln.: Fig. Ex. 6.6.8(a) can

V
i=1
21el, 6.6.8(b).

Fig. Ex. 6.6.4(d) lel numberofedges


20x3 = 2lel
Above graph planar graph because edges do
is a

Hence the given graph is a planar


not cross each other. lel =30
graph. By Euler's theorem,
be redrawn
(c) Graph shown in Pig. Ex. 6.6.4(c)
can as
IVI-IE|+|R| = 2
Fig. Ex. 6.6.4e).
Fig. Ex. 6.6.8{b)
20-30+ | R| 2
is
IR| 12 each other. So this graph
Edges are not crossing
Planar graph will split the plane in 12 regions. planar graph.
vertices and 9 edges and 5
This graph has 6
Ex. 6.6.7 A connected planar graph has 10 vertices each regions.
a representationof formula
(b) of degree 3. Into how many regions does According to Euler's
this planar graph split the plane? -e+r = 2
,
MU-Dec. 12 6-9+5 = 2
2 2.
Soln.: v 10 =
numberof vertices,
Fig. Ex. 6.6.4) Hence this graph is planar graph.
3.
Above graph is a planar graph because edges do
degreeof each vertex

By Handshaking Lemma having


not
cross each other. Hence the given graph planar Ex. 6.6.9Find the nurmber of vertices of the graph
each vertex is 2.
5 graph. 16 edges if degree of
2 el,
. Vi
=
a MU-Dec.09,May 11
)
Ex.6.6.5 A connected planar graph has 9 vertices i=1
Soln. : By handshaking lemma
having degrees 2, 2, 2, 3, 3, 3, 4, 4 and 5. How many edges Ilel = number ofedges)
Fig. Ex. 6.6.4 are there 2.
10 x 3 2Jel d(vi) = 2e
Soln. : | MU - May 12, Dec. 18
lel 155 i=1
(a) Number of vertices = 6 Soln.: By handshakinglemma h
By Euler's Theorem, where d(vi) = degree ofi vertex
Number of edges = 9
Number of regions 7 2 a) 2e Iv IE| +|R| =2 e number of edges
10-15+1R| = 2
Accordingto Euler's formula i=1 For given Graph.
Where
R| = 7 2(n) = 2.e,
d
V-e+T 2 (v =
degree of ith vertex the plane in 7 regions. where n is number of vertices and e is nunmber of
Planer graph will split
6-9+7= 2 e number of edges whether the following graph isedges
42 For given graph Ex.6.6.8:
Detemine
Eulers formula 2(n) 2 16
verity
Graph is non-planar 2+2+2+3+3+3+4+4+5 =2.e planar or not and
2(n) 32
Even in this graph 28 = 2e
crossing of
avoided. So graph shown in Fig. Ex.edges cannot be
16

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.

web pages ant direeted teages reprosent linka


Solved University Question Papers of
eprvsented by' a dirveted graph, in which the vertices represent

fvm one .age lo another.


May 2019 and Dec. 2019
iniilar approach can be taken to problems in social media, travel, biology, computer chip design, mapping
the progression of neuro-degenerative disenses, and many other fields. The developnment of nlgorithms to handla
LDiscrete Structuresand Graph Theory
gTapha is therefore of major interest in computer science.

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

(d)Let f :ROR, where f) 2x 1 and equivalences. (Refer Ex. 1.9.17) (4 Marks)


f()= (x+ 1)/2 Find(f Ofr))
(b) Consider the (3. 5) group encoding tunction
(Refer Ex. 2.10.17) (5 Marks) defined by.
e (O00)= 000 e (001) = 00110
a.2 (a) Define Lattice. Check if the following diagram is a
latice or not. e (010)-01001 e(011) 01111

(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, ..

ispmorphic or not. enceeding100


ceeding 100 that are not ded.
are nrt dorisitke bry 5 7. Ap cz K TZ
draw Letbe a brary perain
i) Determine Euler cycde ad path m ra0 corressondingVenn iagam. drided by n

(Refer Ex. 41.39)


aeb remiderof ab
shown in Fig. 1-0. 4(b (e Marks) frn=4
a.3 (a) Conetruct truth table ard check if the 6) Corstrd table for e peraion
tooning
statemertis tautoogy. (p-0) 0-P) R Show at (z, e) s a sem group or aY
n

(Refer Ex. 1.6B5) (Refer Ex. 52.21) (4 Marke)


Fig. 1-Q. 6c) (4 Marks)
t R represented by Ma as
(b) Consider the (2, 5) group ecoding funcon Cb) Find Transitve cosure
Fiz. 1-0.44hi (ReferEx.6.5.29) (8 Marka) defined by tokous using Warshalf's algoritm set ja.
b. c, d.

(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

Relation. (Refer Ex. 2.5.16)


an equivalence isomorphic or not.
(8 Marks)
a.6 (a) Define reflexive closure and
symmetric closure of
a relation. Also find
reflexive and symmetric
closure of R.

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>

You might also like