katarzyna sznajd-weron katedra fizyki teoretycznejkatarzynaweron/students/intro... · 6 two basic...

43
Complex networks Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznej

Upload: others

Post on 24-Jan-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

Complex networks

Katarzyna Sznajd-WeronKatedra Fizyki Teoretycznej

Page 2: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

Internet Movie DataBase(IMDB)

A Few Good Man

Robert Wagner

Austin Powers: The spy who shagged me

Wild Things

Let’s make it legal

Barry Norton

What Price Glory

Monsieur Verdoux

Page 3: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

3

Try to play at https://oracleofbacon.org/

Page 4: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

4

Network science

• A.L. Barabasi, Network Science, Cambridge University Press (2016)

• Online at http://networksciencebook.com/

Page 5: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

5

Interdisciplinary research

Arkadiusz JędrzejewskiBachelor: PhysicsMaster: Applied MathPhD: Physics (statistical physics)

Several figures from his thesis will be used during this lecture.

Page 6: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

6

Two basic network parameters

• Number of nodes (𝑵 – the size of the network): the number of components in the system.

• To distinguish the nodes, we label them with 𝑖 = 1, 2, … ,𝑁. • Number of links (𝑳): the total number of interactions

between the nodes. • Links are rarely labeled, as they can be identified through the

pair of nodes they connect: 1,2 , 2,3 , 2,4 , 4,5 , (5,7)

node (vertex)

link (edge)

Page 7: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

7

Network science and graph theory

Network science Graph theory

network graph

node vertex

link edge

• Two terminologies are used interchangeably!• A subtle distinction between them:

• the terms {network, node, link} often refers to real systems

• the terms {graph, vertex, edge} refers to mathematical representation of networks

Page 8: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

8

The same graph for different networks

© 2017 Marcin Weron

The social network

The technological network

The corresponding graph

Page 9: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

9

Adjacency Matrix

A complete description of a network

Page 10: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

10

• The simplest way: a complete list of the links

– {(1, 2), (1, 3), (2, 3), (2, 4)}

• Hint: for contact processes (opinion dynamics)

– For each node a vector of neighbours

Nn[1] = [2,3]

Nn[2] = [1,3]

Nn[3] = [1,2]

Nn[4] = [2]

Another description of a network

Page 11: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

11

Examples of networks

Network Nodes Links Dir / Undir N L

Internet Routers Internet connections Undirected 192,244 609,066

WWW Webpages Links Directed 325,729 1,497,134

Mobile-Phone Calls

Subscribers Calls Directed 36,595 91,826

Email Email add Emails Directed 57,194 103,731

Science Collaboration

Scientists Co-authorships Undirected 23,133 93,437

Actor Network Actors Co-acting Undirected 702,388 29,397,908

Citation Network Papers Citations Directed 449,673 4,689,479

Page 12: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

12

J. J. Potterat et al. (2002): Risk network structure in the early epidemic phase of HIV transmission in Colorado Springs

A social network of sexual contacts

Page 13: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

13

Dating in a high school

nodes: studentsBlue: boysPink: girlslinks: they were on a date

Page 14: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

14

Other examples - puzzle

Page 15: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

15

• Basic properties of a node

– Degree

– Clustering Coefficient

• Basic properties of a network

– Degree distribition

– Average degree

– Average Path Length

– Average Clustering Coefficient

Basic properties

Page 16: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

16

• Degree of 𝑖 − 𝑡ℎ node (𝑘𝑖): number of links attached (in/out in directed) to the node

• Example: 𝑘1 = 1, 𝑘2 = 3, 𝑘3 = 1, 𝑘4 = 2, 𝑘5 =2, 𝑘6 = 0, 𝑘7 = 1

• The total number of links:

𝐿 =1

2

𝑖=1

𝑁

𝑘𝑖

Basic properties of a node: Degree

Page 17: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

17

Directed networks

• Incoming degree (𝑘𝑖𝑖𝑛): the number of links that

point to node 𝑖

• Outgoing degree (𝑘𝑖𝑜𝑢𝑡): the number of links that

point from node 𝑖 to other nodes

• A node’s total degree

𝑘𝑖 = 𝑘𝑖𝑖𝑛 + 𝑘𝑖

𝑜𝑢𝑡

• The total number of links in a directed network:

𝐿 =

𝑖=1

𝑁

𝑘𝑖𝑖𝑛 =

𝑖=1

𝑁

𝑘𝑖𝑜𝑢𝑡

Page 18: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

18

Basic properties of a network: Degreedistribution and average degree

• The probability that a randomly selected node in the network has degree 𝑘

• Average degree:

𝑘 =1

𝑁

𝑖=1

𝑁

𝑘𝑖 =2𝐿

𝑁

Page 19: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

19

Basic properties: average path length

• A path: a route that runs along the links of the network

• A path’s length: the number of links the path contains

• The shortest path between nodes 𝑖 and 𝑗: the path with the fewest number of links that connect nodes 𝑖 and 𝑗

• Diameter: the longest shortest path in a graph

• Average path length

Page 20: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

20

Basic properties: clustering coefficient

the number of links between the 𝑘𝑖 neighbors of node 𝑖

𝐶 =1

𝑁

𝑖=1

𝑁

𝐶𝑖

Page 21: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

21

„Small world” by Stanley Milgram

Stanley Milgram, "The Small World Problem", Psychology Today, vol. 1, no. 1,

May 1967, pp61‐67 (8542 cyt.)

Page 22: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

22

Results

Stanley Milgram, "The Small World Problem", Psychology Today, vol. 1, no. 1,

May 1967, pp61‐67 (8542 cyt.)

Page 23: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

23Sociometry, Vol. 32, No. 4 (Dec., 1969), pp. 425-443

Page 24: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

24

Results

Page 25: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

25

Small world of facebook

The New York Times, 21.11.2011: 4.74The world is shrinking!

Page 26: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

26

It began in 1998? Not really ...

Page 27: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

27

• 𝐺(𝑁, 𝐿): 𝑁 labeled nodes are connected with 𝐿 randomly placed links[Erdős & Rényi, 1959-1968]

• 𝑮(𝑵, 𝒑): Each pair of 𝑁 labeled nodes is connected with probability 𝑝 [Gilbert, 1959]

Erdős–Rényi random graphs, 1960

Page 28: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

28

1) Start with N isolated nodes

2) Select a node pair and generate 𝑟 ~𝑈 0,1

3) If 𝑝 < 𝑟 then connect the selected pair

4) Otherwise leave them disconnected

5) Repeat step 2) for each of the 𝑁 𝑁−1

2node

pairs

Random graph algorithm 𝑮(𝑵, 𝒑)

Page 29: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

29

1) Start with N isolated nodes

2) Select a node pair and generate 𝑟 ~𝑈 0,1

3) If 𝑝 < 𝑟 then connect the selected pair

4) Otherwise leave them disconnected

5) Repeat step 2) for each of the 𝑁 𝑁−1

2node

pairs

Random graph algorithm 𝑮(𝑵, 𝒑)

Page 30: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

30

Erdős–Rényi random graphs, 1960

(c) 2016, Arkadiusz Jędrzejewski

𝑘 = 𝑝 𝑁 − 1

𝑝𝑘 =𝑁 − 1𝑘

𝑝𝑘 1 − 𝑝 𝑁−1−𝑘

Most real networks are sparse, i.e. 𝑘 ≪ 𝑁:

𝑝𝑘 = exp(− 𝑘 )𝑘 𝑘

𝑘!Poisson Distribution

Page 31: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

31

• Small diameter

• High clustering coefficient

Properties of a real social network

Source: Wolfram|Alpha Personal Analytics for Facebook

Ego graph: Kasia is not present in the graph

Page 32: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

32

Watts-Strogatz model: small-world network

Watts, D. J.; Strogatz, S. H. (1998)"Collective dynamics of 'small-world' networks„ Nature 393: 440–442.

(c) 2016, Arkadiusz Jędrzejewski

Page 33: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

33

Page 34: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

34

1/2

1/2

2/4

1/4

1/4

1/6

3/6

1/6

1/6

1/8

3/8

2/8

1/8

1/8

...

Barabasi-Albert network

A.-L.Barabási, R. Albert, Science 286, 509 (1999)

Page 35: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

35

Barabási, Albert-László; Albert, Réka (1999) "Emergence of scaling in random networks" Science 286, 509–512.

Scale-free networks

hub

Page 36: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

36

Network robustness

• The Impact of Node Removal1. Attacks 2. Errors

• How to measure robustness?

• Percolation theory

Page 37: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

37

The Impact of Node Removal

How you define an error and how you define an attack?

Page 38: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

38

Think about two types of networks

carbon nanotubessource: https://arstechnica.com

Internet

• The Impact of Node Removal1. Attacks 2. Errors

Page 39: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

39

The Impact of Node Removal

Diameter of the network

Page 40: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

40

Network fragmentation under failures and attacks

the average size of the isolated clusters

the relative size of the largest clusters S

the fraction of removed nodes f

Page 41: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

41

• Spreading phenomena on networks

• Temporal networks

• Multiplex

Petter Holme, Jari Saramäki

Physics Reports

Vol 519, Pages 97–125 (2012)

There is more …

Page 42: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

42

Multiplex (Anna Chmiel)CS-AARHUS

The multiplex social network consists of five kinds of online and offline relationships

(Facebook, Leisure, Work, Co-authorship, Lunch) between the employees of Computer Science department at Aarhus

5 layers Multiplex

Nodes: 61

Edges: 620

Matteo Magnani, Barbora Micenkova, Luca Rossi - Combinatorial Analysis of Multiple Networks. arXiv:1303.4986 (2013)

Page 43: Katarzyna Sznajd-Weron Katedra Fizyki Teoretycznejkatarzynaweron/students/Intro... · 6 Two basic network parameters • Number of nodes (𝑵–the size of the network): the number

43

More on http://networksciencebook.com/