54
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

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

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

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

Networks - Bonato 2

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

networks, …

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

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

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

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

Example: Co-author graph

7

• nodes: mathematicians and scientists

• edges: co-authorship

• undirected

Example: Co-actor graph

8

• nodes: actors • edges: co-stars

• Hollywood graph

• undirected

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

Introducing the Web Graph - Anthony Bonato

10

Example: protein interaction networks

• nodes: proteins in a

living cell • edges: biochemical

interaction

• undirected

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

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

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

−≈,

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)

Complex Networks 15

Many low-

degree nodes

Few high-

degree nodes

Interpreting a power law

Complex Networks 16

Binomial Power law

Highway network Air traffic network

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

18

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

Complex Networks

Power laws in OSNs

Complex Networks 19

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

21

Complex Networks 22

Graph parameters

• average distance:

• clustering coefficient:

∑∈

=

)(,

1

2),()(

GVvu

nvudGL

∑=

=

)(

1-1

)()( ,2

)deg(|))((| )(

GVxxcnGC

xxNExc

Wiener index, W(G)

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

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

25

Ryerson

Greenland Tourism

Frommer’s

Four Seasons Hotel

City of Toronto

Nuit Blanche

Complex Networks 26

Sample data: Flickr, YouTube, LiveJournal, Orkut

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

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

Complex Networks 28

Densification – Physics Citations

1.69

Complex Networks 29

Densification – Autonomous Systems

n(t)

e(t)

1.18

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

Complex Networks 31

Diameter – ArXiv citation graph

time [years]

diameter

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

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

34

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

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

Indexing

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

37

User interface

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

38

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

Challenges of web search

1. Massive size.

2. Multimedia.

3. Authorities.

40

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

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

Then came

43

44

Google uses graph theory!

Google founders: Larry Page, Sergey Brin

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

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

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

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

49

Example

50

Example, continued

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

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.

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)

54

Example, continued

PageRank vector: