basics and random graphs - the university of edinburgh · basics and random graphs social and...

Post on 15-Aug-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

BasicsandRandomGraphs

SocialandTechnologicalNetworks

RikSarkar

UniversityofEdinburgh,2017.

Webpage

•  Checkitregularly•  Announcements•  Lectureslides,readingmaterial•  Doexercises1.

Today

•  Somebasicsofgraphtheory– Wikipediaisagoodresourceforbasics

•  Typicaltypesofgraphs&networks•  Whatarerandomgraphs?– Howcanwedefine“randomgraphs”?

•  SomeproperResofrandomgraphs

Graph

•  V:setofnodes•  n=|V|:Numberofnodes

•  E:setofedges•  m=|E|:Numberofedges

•  Ifedgea-bexists,thenaandbarecalledneighbors

Walks

•  AsequenceofverRces•  WheresuccessiveverRcesareneighbors

v1, v2, v3, . . .

vi, vi+1, (vi, vi+1) 2 E

Paths

•  Walkswithoutanyrepeatedvertex

Exercises

•  Atmosthowmanywalkstherecanbeonagraph?

•  Atmosthowmanypathscantherebeonagraph?

Cycle

•  Awalkwiththesamestartandendvertex

SubgraphofG

•  AgraphHwithasubsetofverRcesandedgesofG– Ofcourse,foranyedge(a,b)inH,verRcesaandbmustalsobeinH

•  SubgraphinducedbyasubsetofverRces– GraphwithverRcesXandedgesbetweennodesinX

X ✓ V

Connectedcomponent

•  Asubgraphwhere– AnytwoverRcesareconnectedbyapath

•  Aconnectedgraph– Only1connectedcomponent

Graph

•  Howmanyedgescanagraphhave?

Graph

•  Howmanyedgescanagraphhave?

•  InbigO?

✓n

2

◆OR

n(n� 1)

2

Graph

•  Howmanyedgescanagraphhave?

✓n

2

◆OR

n(n� 1)

2

O(n2)

Sometypicalgraphs

•  Completegraph– Allpossibleedgesexist

•  Treegraphs– Connectedgraphs– Donotcontaincycles

Typicalgraphs

•  Stargraphs

•  BiparRtegraphs– VerRcesin2parRRons– NoedgeinthesameparRRon

Typicalgraphs

•  Grids(finite)– 1Dgrid(orchain,orpath)

– 2Dgrid

– 3Dgrid

Randomgraphs

•  Mostbasic,mostunstructuredgraphs•  Formsabaseline– Whathappensinabsenceofanyinfluences

•  Socialandtechnologicalforces

•  Manyrealnetworkshavearandomcomponent– Manythingshappenwithoutclearreason

Erdos–RenyiRandomgraphs

Erdos–RenyiRandomgraphs

•  n:numberofverRces•  p:probabilitythatanyparRcularedgeexists

•  TakeVwithnverRces•  Considereachpossibleedge.AddittoEwithprobabilityp

G(n, p)

Expectednumberofedges

•  Expectedtotalnumberofedges

•  Expectednumberofedgesatanyvertex

Expectednumberofedges

•  Expectedtotalnumberofedges

•  Expectednumberofedgesatanyvertex

�n2

�p

(n� 1)p

Expectednumberofedges

•  For

•  Theexpecteddegreeofanodeis:?

p =c

n� 1

IsolatedverRces

•  HowlikelyisitthatthegraphhasisolatedverRces?

IsolatedverRces

•  HowlikelyisitthatthegraphhasisolatedverRces?

•  WhathappenstothenumberofisolatedverRcesaspincreases?

ProbabilityofIsolatedverRces

•  IsolatedverRcesare

•  Likelywhen:

•  Unlikelywhen:

•  Let’sdeduce

p < lnnn

p > lnnn

UsefulinequaliRes

✓1 +

1

x

◆x

e

✓1� 1

x

◆x

1

e

Unionbound

•  ForeventsA,B,C…

•  Pr[AorBorC...]≤Pr[A]+Pr[B]+Pr[C]+...

•  Theorem1:•  If

•  Thentheprobabilitythatthereexistsanisolatedvertex

p = (1 + ✏)lnn

n� 1

1

n✏

Terminologyofhighprobability

•  Somethinghappenswithhighprobabilityif

•  Wherepoly(n)meansapolynomialinn•  Apolynomialinnisconsideredreasonably‘large’– Whereassomethinglikelognisconsidered‘small’

•  Thusforlargen,w.h.pthereisnoisolatedvertex•  ExpectednumberofisolatedverRcesisminiscule

Pr[event] �✓1� 1

poly(n)

•  Theorem2•  For

•  Probabilitythatvertexvisisolated

p = (1� ✏)lnn

n� 1

� 1

(2n)1�✏

•  Theorem2•  For

•  Probabilitythatvertexvisisolated

•  ExpectednumberofisolatedverRces:

p = (1� ✏)lnn

n� 1

� 1

(2n)1�✏

� n

(2n)1�✏=

n✏

2Polynomialinn

Thresholdphenomenon:ProbabilityornumberofisolatedverRces

•  TheRppingpoint,phasetransiRon

•  Commoninmanyrealsystems

Clusteringinsocialnetworks•  Peoplewithmutualfriendsareokenfriends

•  IfAandChaveacommonfriendB–  EdgesABandBCexist

•  ThenABCissaidtoformaTriad–  Closedtriad:EdgeACalsoexists– Opentriad:EdgeACdoesnotexist

•  Exercise:Provethatanyconnectedgraphhasatleastntriads(consideringbothopenandclosed).

Clusteringcoefficient(cc)

•  MeasureshowRghtthefriendneighborhoodsare:frequencyofclosedtriads

•  cc(A)fracRonsofpairsofA’sneighborsthatarefriends

•  Averagecc:averageofccofallnodes•  Globalcc:raRo #closedtriads

#alltriads

GlobalCCinERgraphs

•  Whathappenswhenpisverysmall(almost0)?

•  Whathappenswhenpisverylarge(almost1)?

GlobalCCinERgraphs

•  WhathappensattheRppingpoint?

Theorem

•  For

•  GlobalccinERgraphsisvanishinglysmall

p = clnn

n

lim

n!1cc(G) = lim

n!1

# closed triads

# all triads

= 0

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

top related