![Page 1: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/1.jpg)
BasicsandRandomGraphs
SocialandTechnologicalNetworks
RikSarkar
UniversityofEdinburgh,2017.
![Page 2: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/2.jpg)
Webpage
• Checkitregularly• Announcements• Lectureslides,readingmaterial• Doexercises1.
![Page 3: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/3.jpg)
Today
• Somebasicsofgraphtheory– Wikipediaisagoodresourceforbasics
• Typicaltypesofgraphs&networks• Whatarerandomgraphs?– Howcanwedefine“randomgraphs”?
• SomeproperResofrandomgraphs
![Page 4: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/4.jpg)
Graph
• V:setofnodes• n=|V|:Numberofnodes
• E:setofedges• m=|E|:Numberofedges
• Ifedgea-bexists,thenaandbarecalledneighbors
![Page 5: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/5.jpg)
Walks
• AsequenceofverRces• WheresuccessiveverRcesareneighbors
v1, v2, v3, . . .
vi, vi+1, (vi, vi+1) 2 E
![Page 6: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/6.jpg)
Paths
• Walkswithoutanyrepeatedvertex
![Page 7: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/7.jpg)
Exercises
• Atmosthowmanywalkstherecanbeonagraph?
• Atmosthowmanypathscantherebeonagraph?
![Page 8: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/8.jpg)
Cycle
• Awalkwiththesamestartandendvertex
![Page 9: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/9.jpg)
SubgraphofG
• AgraphHwithasubsetofverRcesandedgesofG– Ofcourse,foranyedge(a,b)inH,verRcesaandbmustalsobeinH
• SubgraphinducedbyasubsetofverRces– GraphwithverRcesXandedgesbetweennodesinX
X ✓ V
![Page 10: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/10.jpg)
Connectedcomponent
• Asubgraphwhere– AnytwoverRcesareconnectedbyapath
• Aconnectedgraph– Only1connectedcomponent
![Page 11: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/11.jpg)
Graph
• Howmanyedgescanagraphhave?
![Page 12: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/12.jpg)
Graph
• Howmanyedgescanagraphhave?
• InbigO?
✓n
2
◆OR
n(n� 1)
2
![Page 13: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/13.jpg)
Graph
• Howmanyedgescanagraphhave?
✓n
2
◆OR
n(n� 1)
2
O(n2)
![Page 14: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/14.jpg)
Sometypicalgraphs
• Completegraph– Allpossibleedgesexist
• Treegraphs– Connectedgraphs– Donotcontaincycles
![Page 15: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/15.jpg)
Typicalgraphs
• Stargraphs
• BiparRtegraphs– VerRcesin2parRRons– NoedgeinthesameparRRon
![Page 16: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/16.jpg)
Typicalgraphs
• Grids(finite)– 1Dgrid(orchain,orpath)
– 2Dgrid
– 3Dgrid
![Page 17: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/17.jpg)
Randomgraphs
• Mostbasic,mostunstructuredgraphs• Formsabaseline– Whathappensinabsenceofanyinfluences
• Socialandtechnologicalforces
• Manyrealnetworkshavearandomcomponent– Manythingshappenwithoutclearreason
![Page 18: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/18.jpg)
Erdos–RenyiRandomgraphs
![Page 19: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/19.jpg)
Erdos–RenyiRandomgraphs
• n:numberofverRces• p:probabilitythatanyparRcularedgeexists
• TakeVwithnverRces• Considereachpossibleedge.AddittoEwithprobabilityp
G(n, p)
![Page 20: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/20.jpg)
Expectednumberofedges
• Expectedtotalnumberofedges
• Expectednumberofedgesatanyvertex
![Page 21: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/21.jpg)
Expectednumberofedges
• Expectedtotalnumberofedges
• Expectednumberofedgesatanyvertex
�n2
�p
(n� 1)p
![Page 22: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/22.jpg)
Expectednumberofedges
• For
• Theexpecteddegreeofanodeis:?
p =c
n� 1
![Page 23: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/23.jpg)
IsolatedverRces
• HowlikelyisitthatthegraphhasisolatedverRces?
![Page 24: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/24.jpg)
IsolatedverRces
• HowlikelyisitthatthegraphhasisolatedverRces?
• WhathappenstothenumberofisolatedverRcesaspincreases?
![Page 25: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/25.jpg)
ProbabilityofIsolatedverRces
• IsolatedverRcesare
• Likelywhen:
• Unlikelywhen:
• Let’sdeduce
p < lnnn
p > lnnn
![Page 26: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/26.jpg)
UsefulinequaliRes
✓1 +
1
x
◆x
e
✓1� 1
x
◆x
1
e
![Page 27: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/27.jpg)
Unionbound
• ForeventsA,B,C…
• Pr[AorBorC...]≤Pr[A]+Pr[B]+Pr[C]+...
![Page 28: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/28.jpg)
• Theorem1:• If
• Thentheprobabilitythatthereexistsanisolatedvertex
p = (1 + ✏)lnn
n� 1
1
n✏
![Page 29: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/29.jpg)
Terminologyofhighprobability
• Somethinghappenswithhighprobabilityif
• Wherepoly(n)meansapolynomialinn• Apolynomialinnisconsideredreasonably‘large’– Whereassomethinglikelognisconsidered‘small’
• Thusforlargen,w.h.pthereisnoisolatedvertex• ExpectednumberofisolatedverRcesisminiscule
Pr[event] �✓1� 1
poly(n)
◆
![Page 30: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/30.jpg)
• Theorem2• For
• Probabilitythatvertexvisisolated
p = (1� ✏)lnn
n� 1
� 1
(2n)1�✏
![Page 31: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/31.jpg)
• Theorem2• For
• Probabilitythatvertexvisisolated
• ExpectednumberofisolatedverRces:
p = (1� ✏)lnn
n� 1
� 1
(2n)1�✏
� n
(2n)1�✏=
n✏
2Polynomialinn
![Page 32: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/32.jpg)
Thresholdphenomenon:ProbabilityornumberofisolatedverRces
• TheRppingpoint,phasetransiRon
• Commoninmanyrealsystems
![Page 33: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/33.jpg)
Clusteringinsocialnetworks• Peoplewithmutualfriendsareokenfriends
• IfAandChaveacommonfriendB– EdgesABandBCexist
• ThenABCissaidtoformaTriad– Closedtriad:EdgeACalsoexists– Opentriad:EdgeACdoesnotexist
• Exercise:Provethatanyconnectedgraphhasatleastntriads(consideringbothopenandclosed).
![Page 34: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/34.jpg)
Clusteringcoefficient(cc)
• MeasureshowRghtthefriendneighborhoodsare:frequencyofclosedtriads
• cc(A)fracRonsofpairsofA’sneighborsthatarefriends
• Averagecc:averageofccofallnodes• Globalcc:raRo #closedtriads
#alltriads
![Page 35: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/35.jpg)
GlobalCCinERgraphs
• Whathappenswhenpisverysmall(almost0)?
• Whathappenswhenpisverylarge(almost1)?
![Page 36: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/36.jpg)
GlobalCCinERgraphs
• WhathappensattheRppingpoint?
![Page 37: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/37.jpg)
Theorem
• For
• GlobalccinERgraphsisvanishinglysmall
p = clnn
n
lim
n!1cc(G) = lim
n!1
# closed triads
# all triads
= 0
![Page 38: Basics and Random Graphs - The University of Edinburgh · Basics and Random Graphs Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Webpage • Check it](https://reader036.vdocument.in/reader036/viewer/2022081613/5fb638366124397f8808b762/html5/thumbnails/38.jpg)
AvgCCInrealnetworks
• Facebook(olddata)~0.6• hpps://snap.stanford.edu/data/egonets-Facebook.html
• Googlewebgraph~0.5• hpps://snap.stanford.edu/data/web-Google.html
• Ingeneral,ccof~0.2or0.3isconsidered‘high’– thatthenetworkhassignificantclustering/communitystructure