0% found this document useful (0 votes)
11 views9 pages

Graphs (Final)

Notes for graphs

Uploaded by

farazkabbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
11 views9 pages

Graphs (Final)

Notes for graphs

Uploaded by

farazkabbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
Dee “We say that an ordered pair (VE) sa graph EV is a seh and EC {SCV: I8l=33 ° The elements of V ave Known 45 Nodes or ver bees © The elements of E ave Known as edges «if xg}, then we will Say that the Ver hed x and ¥ ave adjacent or neigh bors ° The degree of the vertex xeVv) denoted by dar) ov deqixd, is defined as dea\z | fyev]y is neighbor of xt =| ffaat | fade e}| (so, d0= number of neighbor s of x = number of edges ‘coming’ from xX ) Remark A graph can be wode led by means of cercley representing vertices aad Dunes represen bing edges in such a Way that thee tsoq dine cone} qo © FFF fx yye ke ag ae Deh TP (V,E) wa graph and x EV, the neighborhood of x, denoled by Na), is defined as the set of all neighbors of x ° Also, if ACV, we denote by NCA) the set of all verhees in V that ave adyaceat bo at least one vertex in A, So, N(A)= U New Example For insane, in the above example , n@)={2/6), nis) =fa} and so, N( fa,s})= £2,643 Remar K Tt (VE) ig graph hav ing exactly n verices and xEV Lhen O2xen-| (simply because the number of neighbors of x is bebween O and n-t) ee Exercises 16 and 14 (Sechon 10,3) Prove that in a group of people (having al least hwo People), there must be two people who ave Friends with the wame number of other people in the group. That iS, prove that ina graph with at least two vertices there must be two vertices that have the same deqvee. Prook (by contradic tron) Suppose that Ve { Xo, -+- “Faces /n7a, and that in the graph (V,E) all vertice) have a different de qvee. Sinte all the possi ble degrees are vwmbers between O and N-1, We can asoume that dU6)20, dou )E1, 6 dOXq4 SN] vA pocticlar, Xo docs no} have neighbors and nea 1S neighbor of ever gbody Crachdiag of x.) v i ETE OT aan Def A qroph G2(V,E) 1s said Jo be bi par bile iff there ave two subiels Vy and Va of V such thaf ® Ve VYUV; and ViAVg = (50, Vy ard Vy ave disjoint subsets of Vo whose vaioa is equal bo v) © Every edge in the gveph comecls a vertex in \y and a vertex in Vy (so, no elge comnects either two vertices in Vy or two vertices in V5) Tn such a cue, we say that (Va, \,) wa bipar bi hen of the ver lex we} V of 6 Exercise Prove that the Follounag graph is bipar tite. Solution It is enovyh to pro pose Vi = fa,b,d} and ‘Theevern A simple graph is bi pardite iff it is possible to assign one of two dilfevent colors Jo cach vertex of the graph so that no two adyacent vertices ave assigned the same coloy. Peoot First, suppose that G=(V,E) wa bipar file graph, Th Vz V,UV5 , whee Vy ard Vy ave dis- joint seks and every edge in E connects a verles in Va aad a verkx in Vy. LP we assign color red to each vertex in Vy and coloy green bo each vertex in V3, Shen Mo two adya vent verhces are assigned the sane color. Now, suppose that it us possi ble to assign colors Jo the vertices of the qvaph Using two colors sa that two adyacent verkices ave assigned the same color, Let Vy be the se} of ver tices assigned one color and Va be tre sel of ver tices assigned the other color. Then Vy and V3 are disyoint and V=VYUV, —$—$—$—— Fur thermore, cute edge commecls a verlex in Vy and @ verlex wm Va because no two adyqcend ver hues ace either both in Vy or both in V,. Consequently, G is bipartite. Exam ple 6 Prove thal the graph H In 1s nok bipartite. . ie Sol We will see that i} as impossible to assign ane of two different colors 1, each vertex of the graph So that no two adyacent ver Hes ave assigned the same color, Assume otherwise and that red-bhe is a colova- tion of the graph witnessing that H is bipartite WLOG we con assume that red was assigned to d. Since Q and b ave neighbors of d, then we assigned blue to @ and b which is a con- bradichien Site Q and b ave adyatent // Def *A matching M in a graph G=(V,E) is a subset M of E such that under the (passibly new) graph (v,M), every veelex ia Vhay a} most one neighbor, Ex Suppose that in @ pharmacy there are 4 peop le wailing to be vaccinated with the ° remaining vaccine shots of the day (where possibly some of the shots belong bo Khe Same brand). The graph indicating which vaccine shols ave acceptable for these yeople is as Follows. Rema ining Peo ple Vac cine shots of bhe day | q a b x 4 c a S A matching hee is M= f fa R, {bs\3 which is not good because i+ i4noves Ehe peeferences of Salad _ % —-— D, aso f We say that @ watchin Waa bipartite graph G=(V,E) with bipartihen (V;,Va) isa complete matching From V, to V3 iff, vader the (possibly new) graph (V, M), every verlex ia Vy has exactly one neighbor (so, in the context of the pharmacy, a complete mat- ching isa matching where all the 4 people get one shot of their chore) Theorem (Hall's marriage theorem) If (V,E) is a bi partite qvaph with bipar tition (Vy,V3), then the Following ave equivalent; 1) IN(A)IZ IAL Por all subsets A of Vy (Neve we ave hulking of neighbors with respect to the ori ginal graph (v,€) ) a) Thee is a complete matching From Vy to \y Exam | Exam ple Since Me § §a1} 6,53, fc,a) , {4,433 Is a pertect matching in the case of the phermacy, by Hall's theorem if as tre that For every Ac f4,bc,d), INV < INCI For askance, if A= {a,b}, N(A) = {1,3, s} and so, [Al=a

You might also like