+f Graphs
A gsaph G -(V,£) cansisks +f V,
@ nonem seh of vertices (or nodes)
ard Ea sebop edger,
An edge Rom vote te itself?
‘s called a lovp . Two edges Sth Same
endpoints ase called pacclle} edge .
The graph sithout Joop and pasalte|
edges js called & stonple Jeaph :
Graphs ith parallel edges ave
called mulhignaphs .
Fr eennp se ae:
a c
LbGis a mulkgroph Shere H
[Sa simple goeph /
ae taae
A directed graph (or kgroph )
(ve) cansicts of a Nom-emphy seh
od vestice V and seb f rected
edge (ox orcs ) _
a
Example -
eaewo: L
=
4
Basic Tesminokgy -
@® Two vestices u&v in an undisected
graph G ore called adjacent (ov neighbors)w & e ULV ae He endp aiaks of
Some edge e of & Suh edge e
ts Catied incident with a vertex wand vy.
® The seh f oll neighbors of a
vetier yo of © =(V/E) , derofed by
NCv), is clea neigh borhood fv
We denote by NCA), He cok of alt
vetHcer in G Wot ave adjacrt to
at Jeast one vester in A
So, NA) = DU RO)
veV
@® ake: degree Sow VO VV In an
undirected graph ts the number
of edgey ‘incidenE aith if & [oop
Counted Fuice - Tt is denofed Sy deg(v)
Example ©
What are the degrees aml Dhot are
neig hborhosds opt the vette in a
georh G ZH DY/t Ee
b Cc
a - e 3 A d
a H
—> Golehm :
Th G, the degrees ave
deg (a)=1 deg G)=4 , deg =4 ,
deg (4)=1 , deg (e)-3, deeW=-2 ,
Aan (S)=o .
a neighborhoods ore
Na) = {bh , NA@)- 44, c,2,43 ,
NCo = {br d.e,F} _ Nd) = ich o
Ne =~be Fh, MOM=t beet |
N=
on H, the degrees ave
deg Gs Ge Aen (b) =6 _ deglo)= |
deg (t)= 6 ( dgle=S |
The neighborhoods are
ni Ca) = ] bends , N(by=Zabcdyey
Ncey = Uh, N)=fa bey NO=fab4)® A wetter f degree 1 is called
pendant verter A verter
&tnce dAenlv) ts odd fo ah vinY,
| v5] must be ever. °
- The number KL odd-degree vedtiay
4 Wo.Def”:
QM Ina areced geoph, Az Were.
wean edge Awom utp v,
Use cabled initial vettex 4a v is
colled feeminal vette or endl voter |
@ wa drected groph ) the indegree
fa vertex denoted by degC’) ,
is the num ber op edgn orth via
a 2nd verter
Atso,, the Ovt-doree Ff v denoted
by Aca) yrs the nur bev op eclgcs
coitthy yo G4 @ Smitial vertercThe in-degrees & oud-degeeey are
deg (4) = 2 Aga tlay= 4
deg Cb) = _ degthy= |
dep Cc) = 2 — degt(c) = 2
Aeg (4) = 2 degt (d= 2
dey (e) = 3 / Aens*(e) 23
dex (f) = 0 _ degt(f) zo.
Theorern © :
Wha Ty A cbrevted geoph (r= (vy, ED
S_ keg vy) = S aegto) \.
veV
vey
42 Some Ipecio) Simple Graphs :
O Complete. Qvephs -
A Complete graph m o verttce ,
olancted by Ky, iv a Sirmple gooph
en ahich every Votton 4s adjacent te
every other Vvestex.ite & Bt dy
Ks Ky
Q Cycles :
A cycle Cy M23) consisis of nh
verHoeg V, Me Vs »- vn and
dor LHt,2p.-gn.
When the gph iW Simple, we
Aerote path by its vestex Sequence
Re, Ai Aa, An ,
® The path is @ cirett TF st begins
and endg at He came Vestex , 42+, U=V.
® A path ox cect is simple TH
s+ olges nol cantein came Age reer
than omce . L ©Ade ee no simple peth of
leith 4 From a toe.
However, de,c, & 1S mh o pot
Lecause there is no edge bLetreen ede
hk ae.
Also , b,c,t,e a,b as & simple
civenif of length &. However the
Pparh «4,b,e,4,b as nof Simple
because edge Ia, by vrepeater twolce
@ An undirected greph ws calleal
Connected #F theress & beth betwee,
every paie of olistinct vedic Ff the
geoph: af the geph is not connected |
ah is Codled Axccomnected -
iE
Q
©
XN
Cennected ctiscannected© Somehimes , removal BP Vetter produces
more connected components . Such
verhcey ave Called cut Vvetticey .
An edge Dhose ecemoval prod ued
a geen Dith Move Connected component
iw the osigin al geoph js called aw
out edge or bridge |
fox aemple ,
Consider He h & ven bear,
. cere |g
aA é
¢ LEE 1,
c e
(eu
The edges tees Aabh ave
cut edges (or bridga). However ,
edges Yb At Pod, Fd}, Pehd, Php
96,9), 1 FF, 7F,9) ge nop cub ecb yaf
The vettivey b,c, € are cut verhicey
bit ad, #,9,h ave rob cut vette,© Vetter Connechvity -
A subsee Woot the vertex veh V
& G=(V,E) 16 & vettex ow Th OG-W
iS discdmmected .
The vertex connectivity oa A non—
complete bh G, denoted by KG)
rae Gsm mum ber of Co ‘
try vefex cut,
@ Edge Ceanectivity :
A set of edge BE! ic called eee cut
rE He subeet oph (-E! is discannected .
The edge Connectivity of Qa graph oe
denoted by ACG), 1S the voinieoum number
of edges in an edge ent of G.
em atk :
Kr) 4 AG) & min fd9(v) |vev}
Example ©
Find we vetlex & edge coomectivity ofeach of the Following. geophe , b
a aA + d cd
Lt 1 “
7 h
Cc 7 e A
Gj Gy
Lb «© 2 bb « 2
AT I a psx
7 Gg £ & 6 a
a, Gr,
[lit Nn
Solution :
Because Gi wwonected with cub yeferc
and cub edge ‘ce |
KC&) = 1 and ACG))=] |
Go hag cub vertex @ & but if hyTO cw edge.
KC Gp) = |
As removal f edgy Jac} kabey
Aisconneot? He gop Go,
A G2) = 2.
Gy ho vertex cut Abay &
edge Cat j iavy,ra,a7J :
K(G,)= 2 & ACGg)=2.
Gy ha Vettex cul % ba} and
edge cot {itbech dash thar.
KG) = 2 G AG,)=3.
Gz ha vertex tuk tbc, F4 and
edge Cub Adah daay Vahry,
» KCGs) = 3
& AGY=S.
A diwected qeaph iS Shrongly
comected a there iS a path tam
a&o and rem bb toa Aheneyer
a &b are vertioy FG.
A directed geaph is weak|y
c2annected
\
TR there 4c w poth befoeenany tno vetHee in the undeclying-
undirected — graph .
Rermat +
strongty eannected > wwealely connect ed
Example @.:
Ave tHe clirected h G& KH Shrongty
onnnected 2 Axe Hoy haedkly connected 2
O b a
{b> [p>
e A © a
G H
solution ~
the geoph Geis steongt enanedted
becawye there. as a th € pucon any
Two vettee . Hence , G& is weakly
cannested -
The geoph H is mop Skong ty
Connected because there is no
A reckeal path derom a + b in H,However, H is Seakly connecte
of ats underlying undirected graph
is c@nnecteal .
Example © ;
Determine Whether the Poll owing grephy
G &H Ove asomosphie .
Uy
v
@ Ms Ma. Ve Va
u Vs Vp G
U 4 Va
ae H
Uy. Ve ;
@ yu,
Us l,
Ue Uy ~
G Yay
Soluhion «
@ Poth G&H have Six verhces
and eight edga . Alco they have
four vertices of degree 3 and twWo
woth, legvee 2.However, H hes * Simple Cow ted
ot length 3, name |4 V2 MeV,
ahereay G hot no simple civcut of
Jength 3. Hence, G&H are not
ssomaophic ,
© Both G&H have Five vestices and
six edge, Also, they have. two vechegy
of degree 2 and three vedtces of}
degree 2. Both have a simple cirauh
oF lengthy 3, 4,5.
We will tey to define a tuncton £
fom v(G) to VW) os Follvau s
E(W)= Vs, Fluay ave, Hud ey,
Fu) =vo , Pur) = %
HL is eay te check ther F is
one-to-one and mito. Also. Ff is
a gesph 1S orovephism
Thesefre, GEH are isomosphieEwer and Hamilton Paths
Def” 5
@ An
Ewer circa In a geaph a
1S a simple circ osntaining everr
edge of G.,
An Ewer pth inG@ is a Simple
path containing enory edge of G
Example @ :
Which <- the Following gqearhs have
Ewer cixcuib 2 Which have an Euler
pee 2
SS
re !
The geaph G, hu an EWer circut
A,b,e,d,c,e, a,
nd
Gp & Ge hoy
Ewer Cirest. However
Ge heaan Ewer both €,b,a,c,d,a.
Ga does not have Evler poth.
Theorem © 7
A Comected muttigeaph eith at
Jeast Two veticey hoy an Ewer circuit
TF and only Te each of its veaticey hoy
wen degree.
Theorem © :
A connected mulkigeoph hoy an Ewer
ety but not an Ewer cireust Ff and
only F if hay exactly two vestces of
odd dearee.
# Algrsithes te canshuck Euler ctrcuth
let G be « Connected muttigeaph ith
au the vettca ere egret .
® censhuch a Grevih in & begioning at
an actipory Chosen vertex .
@ Remove the edge of the ciecur
Dem GO.© Conshuct & chreuet “in erating,
grat G & remove these ecru
@ Continve +his process ttl] atl the
edge of G veniche .
© treest these craits in the Past
creed at the oppraprote verter.
Example @ :
Determine chethe- the fellosing geoph
hod fuller chremt. Cgashuch suth oa
ctreuip When one exisls. If no Euler
Crrewt exacts | determine whether the
aeeph an Ewer path and cansteuct—
sudh a path f exists -Soluhon ;
@ Gince oa the verhces ave of een
Apovee , the geoph hoy an Euler
Civcue> .
We canstuct an Ewer Cracwih ap follows:
Fisst , we oom a creweb a4,e,F,d,C ba.
We eblain 2 -srlgrash G ft & by
Aeleting the edge jn the abore circul.
Z\
Then we Poon a crue in G of
folios: b,e,i,h,9,4,b.
Ne obfain a svkgreth Go Ff &, by
yemoving Re edges in Re Circus.Now. Fem a coroth 1,5, h,4,9,F
ta Ge. Atl the edge have used .
Noo insert cecond & Hhied cisceit in
the Fish, we geb aw Ever chrcust
4,e5,i,5,h,k,9,f,4,c,6,e,3,h,9,
Aba
OQ G hes no Euler civcosf but if has
an Evler path because vt har ecaclly
+o vertices of odd degree.
How, we conspuch an Euler path :
Foss, a peth stating, ab a vetter
F odd degree.
b, Cc, A 7 er £ |
Rermere thae edge Pon G we hae
Noo , Peer a path stating at 4
f,4,a,i,h,aBe ~seynove the edgy _ re have_
he “9 of
/Hyso , feem 4 per stating apa -
ad, 1,4,b,7,¢ & remove the
edgs , we hove
=
ae et pt ee
ho °g of
No edgy leFfL nos .
Combine aU the puths , we gel
an Euler path :
bye;-d,e,F,d,9¢,i1,h, 4,4, 1,4,b,3,¢
Det”:
@ A simple path in a geoph G Hot
passes throngh every verter exactly
once 1S called a Hawilkm poh .@ A siraple Create am a geoph G Het
parses tyrongh ewer) vetter exactly
once 1S Called a Hamilkn cise.
Example @
Which of the Floaing Sienple eeophs
have a Hamilton circuct or, not a
Harm|ton path 2
®t ou,
Soluhin :
Gi hog a Hamilton ctrewt a, 6,c,d,e,4
Thee fs no Hamilton circwk in Ge
bot G2 have a Hamilton path a, br cya.
Ga Wax nethe~ Hawilten cercub nor
Ram: |ton path
Divac's Theorem :
FG Gis a Sineple gesph with n vettcy
with n>? such that He degree ofencry vettex in & is ot Aeast Mo then
G hoy a Hawilten circuit
Ove's Theorem -
#H (ris a simple geoph with n_ ved}ces
WH, N23 Such that deg(uy +4e9(Vv) 2n
Sor ver paie of nom—agdjacent vertice
w&v in G@, Hen G ha « Hawilbn cient.
HL Shorterb-Path Problems ;
To Pad shovteat path farm vettves
atzcsa simple un directed
weighted geath G.
Lobe a with o & Other vertices
With 0 ie L(aj=o & LW)= 00 fos V~a.
thee fabels are the shotat paths
fam a to che veathes Whore the
pry contains only the vettex 4-
La) Se conote the Seb after lkfevaHos) ot | obeling procecluve ,
We begin aif SF The set Sk
is Peomed fom Shey by adding
a vole Ww not in Sey with the
Soest | abel .
One wu is addeol to C,,we update
the lobelp oP the verHeed nob in && So
Hot LeCv) , the label of fhe veslac v
of the KA stage ,is He length of He
Chote poth Prom a tev that
Gifains vetoes only in Ser
Example ©:
Use Diksfals algarithay te Find Re
length a shvitest poth between the
vee 0 &Z IN the Following weighted
ppeaph.
b 3 cSh ¢ Preriows
Vertex er velox
a °
b a
c ee
A
7 _|
€ ee
z oo
Shaya | peemious]”
Verkex seul vetlex
a 3 |
b 4 a
c ee
-
d = a
e a)
Zz oeVertex Shut Resor
a °
L 4 a
c oe
d a a
€ 5s | a
zm @
vedex| Seger | Seer”
a °
b 4 a
c | F b
d pE a
e | a
me Oo
vertex | See | Seen”
a °
b 4 a
¢ 7 b
J 5 a
e€ 5 a
za 6 eSSh + ~ Peeviows
Vertex ai veilex
a °
b 4a a
c F b
d a a
e 5 a
= 6 |e
Shayfea | _Proriows
Verkex| “Difane | vel
a °
b 4 a
® © ¢ 3 b
o ' Ad 2 a
e 5 a
5
@m@* © z 6 e
The chetat path from a fo z is
A,4,2,Z ot distin 6.
© Step a: Vertex oe a
elo} els
8] 8} s]8lg]o
N]aao °
b 4 a
c Zz oO
2 | ©
€ ry
z ~
vedex| See | Ser”
a °
b 3 e
¢ 2 ee
a [to Cc
e€ (2 cS
z «
Shorea | Previous
Vertex | Distane |_vetler
oa °
b 3 Se
¢ 2 a
a z E
€ (2 iS
z oo
vortex] Sila | wr
a °
b 3 c
€ D o
a 3 b
e 7) a
z (4 avertex] SU] te
a °
b 3 Cc
c Qa a
4 g b
e 10 Ad
z iz e
Sep F: vetex| Seti] Tier
a °
b 3. cS
c a a
é 8 b
€ 10 d
z IZ e
the shovtest peth fama toz is
a,c, ,d,e,Z of length IZ,
© Exercise :
Aniwer > The shetest path from % to
Za SOs Cy eee
fen oth 124.Vveten | Chodelt dat. | prewar vetew
a °
b 2 a
c 4 an
dl 6 b
g g A
L Vl ec
9 12 £
Zs 14 g
% Planay_Grvophe :
Det”.
A geoph nS CUed planar - \t con be
dsaan in te plane SUA any edgesCOSSina . Such A creasing, is called a
planer vepreserdstion ot the yep
ia examrley
Ky &Q, is a planar geoph becavse Hey
aan be dreaan withowtd Crossing as
foo ws ce oo ie
]
2 ‘ AN
A <
Planax represented ms Ee K4R Os .
Example 1+
Ts Ky,2 a” planar gaa 9
soludhio - v, Ve Ve
The vertices V, 2%a. PSB]
are adjacent to Vi Ve -
Va & Vp both. Thee Ka/s
four edges ern Oreut hob splitsthe plane mie two epi, Vy Vg
R, R,
sag RiSRs. The verter Ve =
1f im either Ry or Re. Ve Ve
N. Ma;
When vs is in R,_ then 2
Ry splits te two subwegions
Ra, <= Rar. Gr this Cue | Ye Me
Hreee if Me Day te place te Fin ad
Vestex aifhout facing a Crossing ,
For, FH v2 is in Ry then edge between
Ve E Ve cannvt be drawn ithe CHEK ND
af Ve ts io Ray then the adage betwee
Ve &Vy Cannot be deewn aithenp a crowing.
af Ve 1S in Ron, then the edge bebseen
Vy and Ve Cannot be deaan eithout a
ESSN,
A similar argument ean be used ahen
Vz is in Ry,
Hence Kaa ts not plenary.
Theorem @ (Ewer's formula )
bt G be a connected planar simplegraph with e edges and v vertices.
lobe vy be the number of Vwegomns In a
planar representahm ot G. Then
ws e-v+2],
Example Qo.
Suppue thar a cannected planar
simple gesph hos 20 yerhce, each
of degree S. Into hoo mony vegery
Avex O rrepyesentation sf this planar
gzeph split the plane 2
soluhon :
The gqearh Wot 20 vewHees, each of
degree S.
Ses, V=20,
Ry Hand — sheking fermma
Q2etz 2oxk.
tc Gz So.
By Euler's theorem ,
Y= 2—-V +2
“ Ws Bo- 2072 = 12.Remark -
@ FF | ts 2 cannected planar Simple
graph with e edayey & v vertices ,
where V23, thn e 4 Bv-6.
@ # G is a Connected planar Simple
geoph » then G hos a vertex of degree
not exceeding. -
Example 3 :
Show ther Ks ts non-planar
Solution :
the geoph has = vesticep and 10 edge.
However, the Inequality e@ £ 3V—-6
ys sb Satufied for this geoph
jecause C=l|0 and B@v-6= IF -€=39
e=|0 #43 =dsv-6é.
Therefore L Ke is non- Planar.
te Kur@touski's Theoyem :
A geeph is noen- planar fond oly
it conteanms a Meg raph homeomorphic to
Kr oe Ke,2 :de Geaph Coloring
Def”:
@A coloxing fa Simple geeph vs the
assignment of a color ts each yestex
of the geeaph so that no tas adjacent
yestices ave astigned the Same calor.
@ The chromate number