0% found this document useful (0 votes)
18 views8 pages

Graph Notes 9.04.2024

The document discusses various concepts related to graph theory, including definitions of vertices, edges, paths, and cycles. It explains the characteristics of simple graphs, connected graphs, and the concepts of open and closed walks. Additionally, it introduces algorithms such as Breadth-First Search (BFS) for finding the shortest paths in graphs.

Uploaded by

aditric
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)
18 views8 pages

Graph Notes 9.04.2024

The document discusses various concepts related to graph theory, including definitions of vertices, edges, paths, and cycles. It explains the characteristics of simple graphs, connected graphs, and the concepts of open and closed walks. Additionally, it introduces algorithms such as Breadth-First Search (BFS) for finding the shortest paths in graphs.

Uploaded by

aditric
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/ 8

A unan

ate calle edges, suek that enok abge ey is identfrod


The vertieas amocate witt
Qud vertieasa K
An adge haimg t Aome vetex as its cnd verias

e,

The alss onoe tmu one edge anociahl


oih a g uáa pai of vtros. Suck elges ufem
t as faallel elges.

'oals a simple grnph.


okeu a Veytex , v au end vertex ot
ane sad b be
ineideut oilh (cm r fo)eack
sthan
Aaid b be alzaoa
toe mon pasalll edges on a Comm
an imdut art
The mumber of edges jndent n a ves tex v,

fa ve tex is sometimes also eferes a as its


Avevtex no imudent is caleb an iaolate
Vertex
Avertor of dgree ne is ca lled a peudrnt vertex
eud veyex.
S0009
set E t be
Called a Gucl a Jraph oihut

Aaid t be a
the veyfiez an al ta elyes f
each

()
one

is comeclel if thoe is a path be toesn auy


A graph graph is stongy conneeted
ted Veriess Adivefed
d'yeeepah
pah betaa cy -twoo ver tters.
betoean
if thene is a dyeeled
as a frnte altenatg wcst
aul elges, begnnng and euding oit vertieas,
f verties it te ver ticss
suek -that ench e ie tinedot
preedig and folasing than om co u a oalk But a
cowbed tavese)moTe

An Open s

1s a waK »a pata
The
oalk wa ttuting a geusn

Veetieas with ohick a coalk begus aud en ds an


cae omimal Veteos
O1 blefoy
Oex. Sueh aa alk b begn aud ed at
Same alk s a closed salk.

An ope alk e ohick ono yey ex appeans mose han

n mot a pat

T Heminal verticss o a ph ae o grea


and the et o the vertias (called itehonecliateA

mo vetex (exeapt the


no
A clsed oalk u cohick finel
inifral yefext and the vertex) apeoe
n0e thau nee

A eiveu u also caled a yele, clemertong


aorl
w
p th, anl poygon, ot
cveuan ee the last vertex n
ycle n a pah

shortest eycle in the graph vs drfondite


The 'as a imple cyele co lick pames
gi thy aokere » Aeudlt be be a
hrgk eack vertex
Hamiltomian Gyole
Ropenties: graph & wik e, edges au n ver foss
4. Cosedr a The suon
Ver ties

2. The umber m a
eVem .

ay vertox mma simple grafh


3.
Maximum
4. The onaxlmn no
Vey tees
) - 1 i leawes ver lex t
euter vex-tex i
oknante..

Breodth Fivs Seaseh (BFS):


Dyketa's singe rure
Rmk MST dhoith aui)

a dis tingiskd Bsuree


Ga a raph q-( È) aul Vo tes tat ismalled
Verdex
staue ver tégs.
computeste reachable
s fron s t eock aus
cuudiveehs
fedyes) diret
a b o km bo# al verhees at dista
ntnben
The agoihm ahoiton disconers any vertes
hees at
dstames
7pha 7hi boove cscovehlng
Kfon s colove each ver
dex
BES
toack of P . A ver hess start
T Kep
bete, rgates become
outohte may hae been
verhes, tafore, to
black dtimxwskes
and BFS dtingishes be toeu thas
back Graybut but bFS e n a B manhey
discoveye, the stnch procea vey tex
eusere that black, the
u is ves hees
a)EE omd verlex that is all
Is then bee dscoveres.
or black;heas Laeadjacnt
i e ter lck verhes
Ver cotte
kaue same betheu
Yer tres may
yer udtcoures vetes.
discoveyes aus Breeth- FretTree lBE
Fist (BFT),
Brs cousthuck a ib Yoot, ohick th sTUree
cmtainin culy 1 a ohte
NCk discovers
the
tu couree
Vertex a aheady dhscoveye ver
ist f au dv) ane aldel to tae tree.
V aul the
that poaot
the BFT
BrS estoe
Algoithom each veytex UeV u tae atfxiL
t color of
deca60r
Uiçolar an t Pre
cescoyeres), Them li= NIL. Th attibute
u ha ot ben
alyerito Tla algoik elo
compute by thu ver treay.
a FIFO mamge
Brs(G.9) vevrtex ue Gv-s
1. eack
u-color= OHITE
2.
3
4.
5. S.colot = GRAY

7: s. = NIL

9 ENQUEUE (4.s)

12
13. 1f u.color == wHTE
0.color = GRAY
14.,
16
( 4 ) v it t fonter
moo m
ENQUEUE
ucolor BLACK
oit
t ws ilus hate
(4)

Tnidiating
(2

n
1

(6) (
3

()

()
fro
dstanca foon
Shortest ah; BES frds the skotesttexa a groph.
each vo
aGusm sturee vertex s to
path on verter
ominuoran nuonben of ebges u auy

SP: k -(VE) be dheetes n amdireet


Bapaty of arbihay ver tex Tsn
raph, avs bt s eV se au

ss ) <S(su)).

You might also like