0% found this document useful (0 votes)
2 views22 pages

IGT Chapter 2 Notes by Vivek (1)

Chapter 2 discusses the properties of trees and distances in graph theory, defining key concepts such as acyclic graphs, forests, and trees. It introduces the concept of spanning trees and their characteristics, including the handshaking lemma and eccentricity. Additionally, it covers algorithms for finding minimum spanning trees and shortest paths, emphasizing their applications in network design.

Uploaded by

ananyapadhi3211
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
0% found this document useful (0 votes)
2 views22 pages

IGT Chapter 2 Notes by Vivek (1)

Chapter 2 discusses the properties of trees and distances in graph theory, defining key concepts such as acyclic graphs, forests, and trees. It introduces the concept of spanning trees and their characteristics, including the handshaking lemma and eccentricity. Additionally, it covers algorithms for finding minimum spanning trees and shortest paths, emphasizing their applications in network design.

Uploaded by

ananyapadhi3211
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/ 22

Chapter- 2

TREES and DISTANCE

24 Basic Properties

AcYCLIC GRAPH

Agaph Gib calld ayeli y at has no cyel.

FOREST
Afoust an aayeli guaph

TREE
True is a conructid ayclie gaph.

G6

Ex : has
’ Notu

LEAF

# Evey tus aa bipatit


Lemma 2.1,3

Eyeu trul wth atast 2 wices has atlast 2 Lals.


Eveg
Delating a lkas yrom a tu, yelds a smallu u

Let G be a tu usith atlut tuwo etices.


Acenneotd graph with otiast tices has an dge
we knsw, end pointa ! a maximal path has no ncighbos
othu thon tt neighbows on he path.
Hene end psint such paths au lats.

et o be aa lua n G,G. n (6)= n

Avoda o dignu 1 blengs to no path conneling ethu


tuoo vetices
v, we v(G), v o wpath in G s aso in ' '

33AT
vetx
Deking
>.G' ç a Tue el odu n-1.

Theoum 2.1.4

n-veviox qraph G, the folleuwing au eyuivalnt


Fer Cucli
A) Gs cennLtd , t has no
8) Gis cennuctd ond has n
c) G has n-1 dgs and no
B) Fen u, v e vlG), Ghas exadtly ene uvpath.
A’{Bc}

Gb comuced ccycle graph yodn n has n-t ede.


!
mathenatieal ndueet
Basis step By
ode n has
Pto): Aeyelie connutd qraph
n-i edpes
Basis step

2 6:; (tu) e(4) 1

Iodudive Step

coAnectd uder k hos k-l edges,


we show that po) a be
Let G be a
’ These exists a haf (say U) n G. (Lemma Ind pant
Suck that
G Go conucld and ayelie (tenna irnd pat)

elG) = (n-1)-1 n-2


ede incidnt to
c eG) > (a -2) +1 > n-1,).
36/ Mar/25

n- edges hun Ghas


1! 6Gii cenucd ond has ns no

Let Gii ennectd and has n- edges


Daeing adgs ton eycus in G one one by onu snl naulkng
Sinee no ut edg ies on yde ,this implies G'B csnnuctd
and acyeie.
e(G') = n-)
But no e edges in G, e(G) n

G has no yele

I Ghas n-l edges yces thun G is connuctd

Let Gbe discoustd and has k- cempenuns

agelie,

connectd gruph )
Nouo, we hawe,
e(G:) = o (G;)-)
e(G) = e (Gi) + e(G) +.+ e(Gu)
o(Gu)-1 t o(4,)-i+o(4)
o(G) +06,) t + oG) -I--l..-1
o(6) K- times
t O(G)-k
ecG) n-k
But we have e(G) = n-I

K 1

A ’B
Cennucld and ha N
I! Gs
u-v palh u,v e V(G).

Let G be cennectd and no geles


has no

Let u, ve V(G) wo hos wo paths.


p is thu shelst path

thuy path p &g togeler for a cyele in G.


(¢) conínadition: Ga ayeliayeli bA
path in G.

D’A
I7 tu,ve V(G), G has
is connsctd acyclic
Let u,V G V(G) , Ghas exady
G is connucld
{ G certains ayele ten for euey pain o vecas
veces bn tu
yele i we hae a tuwo path l doch uite antileckwise).
(é) q hes cacty sne path
SPANNING TREE
a tru
A spaning hu B a spanning subgraph that i o
A

H,! H,:

spanning Bu

conallany 2.1.3
2.)
@ Evey edge aBu is aa cut edqe
We krew an
edge is a cul-adye t belengs bto no- ayela
Tru hos ne ye
’ bog aede
’Evey edge a te is o ut- edge.

Addling ene-edge
we kww
vorties has Gre path

exacty on yee
ol/Apr/25

Agraph
e spanning br
Let G be a e
I we consider G has anethen spaning ue, that maans
’ Ghas no cyc
loepls.
Let
loep les and has xactly spoming tue (sayT)
twe claim,
Let q T
an
thue es an edge e inlG which ds not in G.
+e has exactly one ayeo
(Tte)- e' is
sponning
()4) Bccuse Ghas spening pe

2.1-6 be aa
Let T be tu with averae dugreu q. Delmine the
of T.
Let n(T) =n, e(T) n-)
we haw

A9E V(T)

hand shaking lemma

by egO Q.n = 2(0-)


n2
2-a

VVImp Qe
Atus of Grdr 21 has ony vectiies e< dage ,3.5L6.

% T has exady 15 end vedties and 1 vetr &dagu 6.


How many veritics T hoe dagre 5.
n(T) 21, elT) 20
we hawe
I5 voces have dynu =1
! voter haw digre 6
tet x no- yetox have =5

By hand shaking kmna,


E dy (0) 2e
15}+6 x|+ Sxxt 3a/5-x) 2.20
2

dape
t oh 2 votex havt

DISTANCE

8 (U, w) length shorlest poth frem v w


Dia (G) maxfd(, ) 9,we VG)
d (9f) =3
d (a,e) 2 d(bg):3
d (c,e) =1 d(,e)2
d (b,d)2 e
d(t,e)>3
dia (a) 2 . dia(a) =3

ECC ENTRICITY

¬ (v) = max d (N, w) | y we v(G)


Rad CG) = min { 6(v) vvev(G)3

pia(G) >2
DialG)=4
J Rod (a) 2
Dia (e,) =6

Dia(Cq) * 3
Rad (C,) = 3

3Dia (Pa)= n
Rad (Po)
Theorem 2.).1)
simple graph with dio(G) > 3, thun dia () s3
s Gi a

wth dianun otluast 4. thun prove that


Ex
Let G be aa simple qraph
G has a diomal almost 2.
then dia ( ) 63
We knoo,ordia (G) >3
Py using tus tueum,
7P 0ia (G) s3

q- Dia (6)s2 7= pia (G] > 3

duprewe
bet n; denolu the no- vetiies in a bu T, then;
on the no. vel ces in p

n, no. e utx dyu


By Hs. L

IXn, 2xn, t3 xn, +. . 4 in, = 2 (n-1)


E in, e22 (^-1)

Lel T be on n veir Cue bof4 hoanig


dequ i whue 2s is k, fe pemaining -k+} wiies
leaves petumún e n in tens K.

2,3, 4, 5 , . . K

K-I n-(K-i) = n-k+)

Hand Sheking lenma,ios dean skyia o d

n -kt
K
(Ktl)
K(K*1) n-k 2 (n-1)
20iCE
K(K*1) t 2(n-K) 4 (n-)
4n-4
K´4 K 2n - 2K

K K-(2n +4)= o
KKty
and Enumenation
2.3 Spanning u

n()=1
n(7) =2
b

n(t) 3
b e d
n() 4
b (12)
(4)
n-2

tus with
the ae n
size n, thene
set s
vwtex set s.

Sporning bu

b b

b
4
b a
a b

8
Tlalpossi3biliy + 3 = q4

5 + 24 2 2- |

Conthacion g an edqe

: 4.e
ab

G:

a
ab

G,:

conaction
e with end poins
In a raph G. with strgle vetex ohose
a, b
e b
o the pplacunent f e ethn than e that wk incident
tncidort edges ae the edgs
to a s b.

Ex :
ab
fiopesiloh Let
then tot e eE(G),T (G) = T(G -e) +
lG.e)
b b
Ex

bc
-

G-e Ge
(4)= (G-e) +(G-e)= +3 =y
b
a

+ a bd

G-e G:e

T(G) = T(G-e) +(Ge) =4+4 9

bd

G~e Ge

Matuz tie Theorum.(or lange grephs)


Step O: Find A(6) adjeney maiis
G:
abc

A(G) !
step:Find diagonal mabix, ohue diagenal
mathix ane vertux dege
2
3
D: 2

Step : Find = D-A(G)


2 -|
-| -| -
2 -)

-| - -|

now (i) and coumn C)


Step : Find e*, by daling any
Let's alalt i: 4, - 4 (upto you)

-1
- 2

itj
Step ) () =(-1)* Aot(o") = (-i)"dot (e")
2 -( o
2 (6-1) + (2+1).
3 -)
-I 2 8

EX: Find No. o spanning fuu n foleoing tgwe :


b
step O
2

2 2 1
4,: A(G): 2

3 3
step 5 -2
Step)
5 -2 -|
-2
<2 5 -3
-3 - -3 7

5 -2 o
le"| = 5 (25-4)
step: le*|
stp 9: -2 +2 (-l0)
-2
-2

Theorem Stament
(Not ask in exom)

loeplw graph witlh vG) = , ,, ,}


Giren a
Oij be tho
Let O,i t no. ef edges wsith end poiot y, and
(i)) is - Qi
’ Let Q be the mabix in wshich entry
ij.
i#) and d (u) shun
the matir obtoned by roro s cotupn t . then

t (G)= (-1)5+t det(a*)

2.3 Minimum Spanning Tree

weighted Guaph
A weighted graph u a graph wth
numical labels on the
ecges
numbeh.
G: ie.
ach ecge a ,
b
nunbes ae for tho weight y the
edqus,
Sueh a graph s calld o waghtd gruph
2

Weight d¡t (ác) - w(de) 2


2
-12
w(G) = w(el 2+3+ l+412
ee E(G)
4

Minimum Spanning tree

Let T be aa spaning tee e< G, f w(r) is the minimu


weight ameng al spanning he o Gthen T is calld a
minimum spanning

# Kruwskal's algorin for finding min" spannig tue


2

1 w(T) l+2+3 +4 = l0

on/apr /2025 cgeist M


Find ttu miinun
sponing
se° b

2 6

= 21
C

w(T) 147+ 24 44 3 +/o = 27

building a road
ThHo axe S cties in a utwk. Thu cost
Ex 2 - 3 - 3

Alucty blw i < is the enty a in the


matix betew
indicals that tua is a meuntain in tho
An infintte eny Dvnine the luast
and the rroad corpol be build.
all the cilies reachable om each othy.
cost of mhig
SH°!l
a. b
13

1
70

co Mountain

w (T) = 3+8+3 47

3
= 21 (4ns)

2.3.5 DIJKS TRA'S ALGORITHM


[ Shertest Rete frem ene docilen to anethu]

a
2 b 1f dCb) + w(be) < d(c)
2
tun, d (c)= d(b)+ w(be)
Loeh for nuaeat wight
Stp 1: Sewe venix (a)
af eb
Heu, we have
’ af is min
Votex
C * Merlisn all slhu undfined
yonex ().
3fep 2 : NGo, from hat
Loek tor min updad

a
d()+ w
(fe) <de)

Repat step2 a 3
Fron, f ne'd x
e 4 b, in which

from that

step 4:
we hae el d, af
updeling we foeand
911, go contu

Dune :)

Ex Set^

AODAa bc o e fg hf
8 9 J4 12 19 2)

(s.) (21)
2
2

(sv)
X 3.
nin =1

6
Next Min =3

o9/aprl25

arcot

idunal venex = a,b, c

bkc ae the
chi ld e a
e is a Iue in ohich ene eex has ben
A osud
daiyatidl
as the o6t and envny edge is ciuad Quay frem the rot
. Vertir e< a sostd tuo s called a la! it has
no childun.
that hae childen ae called intynal vehies
Vetices
A neotd thu ç calld is callud an m-any tue y
totrnal vtx has no moe than m-childun.

ful m-any
is callid aa full m-ony biee
’ The tru iç evey ibnal tn bas
exactly m- childvn .

brae oith m=2 is called a binay


An m-a
a
Ex
Intenal, i = 3 (4,b,c)

Leal, =7
n= i+l= 3+7 =lo

n =itl

intornal vtx

Theorem: A ull may bue with i tntnal wuties contains


n= mi+1
Vetices

Ex ! l=?
n mit1

l= i(m-1) +1
Ey Let Gbe a graph (V,E) and weight tha edge (49)s - |
v(G) = , ,,eo

Find weigkt to minimum spaning tu.

99

)
3 49 hmy

Find tho o. ef minimum spannig Te in gaph G

2
d

2
2

Ex'. Find the no of min sponning 2t 2t2=6

2 T: 4

2
the yals e that wil maximigeu min "
Ex: Choese find
min" spanning bu i for tis Nalu g x,
pi a
3

wold
If we take n= 5, then we
qet too more sponning tra posihit
2+2 - 4

GATE QuUs
the Sum th dees s
Ex: Let T be a tru with I0 velices. whal is
all vertices

So^:
2.9 = 18
Zdy(v) = 2e(1)

You might also like