Top Banner
Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex Networks and their Properties Dr. Anthony Bonato Ryerson University Hamilton Institute - NUI May 2013
54

Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Jul 10, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex Networks

and their Properties Dr. Anthony Bonato

Ryerson University

Hamilton Institute - NUI May 2013

Page 2: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Networks - Bonato 2

Complex Networks • web graph, social networks, biological networks, internet

networks, …

Page 3: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

What is a complex network? • no precise definition • however, there is general consensus on the

following observed properties 1. large scale 2. evolving over time 3. power law degree distributions 4. small world properties

• other properties depend on the kind of network being discussed

3

Page 4: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Examples of complex networks • technological/informational: web graph, router

graph, AS graph, call graph, e-mail graph

• social: on-line social networks (Facebook, Twitter, LinkedIn,…), collaboration graphs, co-actor graph

• biological networks: protein interaction networks, gene regulatory networks, food networks

4

Page 5: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Networks - Bonato 5

Example: the web graph

• nodes: web pages • edges: links • one of the first

complex networks to be analyzed

• viewed as directed or undirected

Page 6: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Anthony Bonato - The web graph 6

Example: On-line Social Networks (OSNs)

• nodes: users on some OSN

• edges: friendship (or following) links

• maybe directed or undirected

Page 7: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Example: Co-author graph

7

• nodes: mathematicians and scientists

• edges: co-authorship

• undirected

Page 8: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Example: Co-actor graph

8

• nodes: actors • edges: co-stars

• Hollywood graph

• undirected

Page 9: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Heirarchical social networks

9

• social networks which are oriented from top to bottom • information flows

one way • examples: Twitter,

executives in a company, terrorist networks

Page 10: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Introducing the Web Graph - Anthony Bonato

10

Example: protein interaction networks

• nodes: proteins in a

living cell • edges: biochemical

interaction

• undirected

Page 11: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Properties of complex networks

1. Large scale: relative to order and size

• web graph: order > trillion – some sense infinite: number of strings entered into

Google • Facebook: > 1 billion nodes; Twitter: > 500 million

nodes – much denser (ie higher average degree) than the

web graph • protein interaction networks: order in thousands

11

Page 12: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Properties of complex networks

2. Evolving: networks change over time

• web graph: billions of nodes and links appear and disappear each day

• Facebook: grew to 1 billion users – denser than the web graph

• protein interaction networks: order in the thousands

– evolves much more slowly

12

Page 13: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 13

Properties of Complex Networks 3. Power law degree distribution

• for a graph G of order n and i a positive integer, let Ni,n

denote the number of nodes of degree i in G

• we say that G follows a power law degree distribution if for some range of i and some b > 2, • b is called the exponent of the power law

niN bni

−≈,

Page 14: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 14

Properties of Complex Networks • power law degree distribution in the web

graph:

(Broder et al, 01) reported an exponent b = 2.1 for the in-degree distribution (in a 200 million vertex crawl)

Page 15: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 15

Many low-

degree nodes

Few high-

degree nodes

Interpreting a power law

Page 16: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 16

Binomial Power law

Highway network Air traffic network

Page 17: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

17

Notes on power laws

• b is the exponent of the power law • note that the law is

– approximate: constants do not affect it – asymptotic: holds only for large n – may not hold for all degrees, but most

degrees (for example, sufficiently large or sufficiently small degrees)

Complex Networks

Page 18: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

18

Degree distribution (log-log plot) of a power law graph

Complex Networks

Page 19: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Power laws in OSNs

Complex Networks 19

Page 20: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Discussion

Which of the following are power law graphs?

1. High school/secondary school graph. Nodes: students

in a high school; edges: friendship links. 2. Power grids. Nodes: generators, power plants, large

consumers of power; edges: electrical cable. 3. Banking networks. Nodes: banks; edges: financial

transaction.

20

Page 21: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

21

Page 22: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 22

Graph parameters

• average distance:

• clustering coefficient:

∑∈

=

)(,

1

2),()(

GVvu

nvudGL

∑=

=

)(

1-1

)()( ,2

)deg(|))((| )(

GVxxcnGC

xxNExc

Wiener index, W(G)

Page 23: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Examples • Cliques have average distance 1, and clustering

coefficient 1 • Triangle-free graphs have clustering coefficient 0 • Clustering coefficient of following graph is 0.75.

• Note: average distance bounded above by diameter

23

Page 24: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 24

Properties of Complex Networks 4. Small world property

• small world networks introduced by social

scientists Watts & Strogatz in 1998 – low distances

• diam(G) = O(log n) • L(G) = O(loglog n)

– higher clustering coefficient than random graph with same expected degree

Page 25: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

25

Ryerson

Greenland Tourism

Frommer’s

Four Seasons Hotel

City of Toronto

Nuit Blanche

Page 26: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 26

Sample data: Flickr, YouTube, LiveJournal, Orkut

• (Mislove et al,07): short average distances and high clustering coefficients

Page 27: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 27

Other properties of complex networks – many complex networks (including on-line

social networks) obey two additional laws: 1. Densification Power Law (Leskovec,

Kleinberg, Faloutsos,05): – networks are becoming more dense over

time; i.e. average degree is increasing |(E(Gt)| ≈ |V(Gt)|a

where 1 < a ≤ 2: densification exponent

Page 28: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 28

Densification – Physics Citations

1.69

Page 29: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 29

Densification – Autonomous Systems

n(t)

e(t)

1.18

Page 30: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 30

2. Decreasing distances (Leskovec, Kleinberg,

Faloutsos,05): • distances (diameter and/or average distances)

decrease with time

(Kumar et al,06):

Presenter
Presentation Notes
Diameter first, DPL second Check diameter formulas As the network grows the distances between nodes slowly grow
Page 31: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Complex Networks 31

Diameter – ArXiv citation graph

time [years]

diameter

Page 32: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Other properties • Connected component structure: emergence of

components; giant components

• Spectral properties: adjacency matrix and Laplacian matrices, spectral gap, eigenvalue distribution

• Small community phenomenon: most nodes belong to small communities (ie subgraphs with more internal than external links)

32

Page 33: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Discussion

Compute the average distance of each of the following graphs.

1. A star with n nodes (i.e. a tree of order n

with one vertex of order n-1, the rest degree 1)

2. A path with n nodes 3. A wheel with n nodes, n>2.

33

Page 34: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

34

Page 35: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Web Search

• the web contains large amounts of information (≈ 0.5 zettabyte = 1021 bytes) – rely on web search engines, such as Google,

Yahoo! Search, Bing, …

35

Page 36: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Search Engines

• search engines are tools designed to hunt for information on the web

• they do this by first crawling the web by making copies of pages and their links

36

Page 37: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Indexing

• the search engine then indexes the information crawled from the web, storing and sorting it

37

Page 38: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

User interface

• users type in queries and get back a sorted list of web pages and links

38

Page 39: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Key questions

1. How do search engines choose their rankings?

2. What makes modern search engines more accurate than the first search engines?

3. What does math have to do with it?

39

Page 40: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Challenges of web search

1. Massive size.

2. Multimedia.

3. Authorities.

40

Page 41: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Text based search • first search engines ranked

pages using word frequency – eg: if “baseball’’ appears

many times on page X, then X is ranked higher on a search for “baseball’’

• easily spammed: insert “baseball” 100s of times on page!

41

Page 42: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Analogy: evil librarian

42

• you are looking for a book on baseball in a library

• evil librarian spends her time moving books to fool you

Page 43: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

Then came

43

Page 44: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

44

Google uses graph theory!

Google founders: Larry Page, Sergey Brin

Page 45: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

45

• PageRank models web surfing via a random walk

• surfer usually moves via out-links

• on occasion, the surfer teleports to a random page

• Pagerank is the probability a random surfer visits a page

Page 46: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

How PageRank addresses the challenges of web search

• PageRank can be computed quickly, even for large matrices

• PageRank relies only on the link structure – popular pages are those with many in-links, or

linked to other popular pages • “authorities” have higher PageRank

46

Page 47: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

47

Google random walk

• this modification of the usual random walk is called the Google random walk

• note that it takes place on a directed graph

Page 48: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

48

The Google Matrix • given a digraph G with nodes {1,…,n}, define the matrix P1

• form P2 by replacing any zero rows of P1 by 1/nJ1,n

• define the Google matrix P as

-c in (0,1) is the teleportation constant

Page 49: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

49

Example

Page 50: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

50

Example, continued

Page 51: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

51

Motivation

• P1 corresponds to the random walk using out-links

• P2 takes care of spider traps: nodes with zero out-degree

• P(G) adds in the teleportation: – 85% of the time follow out-links, 15% of the

time use jump to a new node chosen at random from all nodes

Page 52: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

52

PageRank defined Theorem (Brin, Page, 2000) The Google random

walk converges to a stationary distribution s, which is the dominant eigenvector of P(G).

That is, the PageRank vector s solves the linear

system:

P(G)s = s.

Page 53: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

53

Power method • for a fixed integer n > 0, let z0 be the stochastic vector

whose every entry is 1/n

• define zt+1

T = ztTP = …= z0

TPt

Lemma 6 (Power Method): The limit of the sequence of (zt : t ≥ 0) is the dominant eigenvector. • gives a simple method of computing Pagerank: multiply

by powers of P(G)

Page 54: Topics in Applied Graph Theory – Modeling and Searching ...abonato/Teaching/TGI/Lecture2.pdf · Topics in Applied Graph Theory – Modeling and Searching Networks Lecture 2 - Complex

54

Example, continued

PageRank vector: