You are on page 1of 28

(Social) Network Analysis

Lecture 3
Mohsin Abbas
Thought Provoking Question!
• Salma & Aslam has invited three married couples. Several handshakes
took place when the guests have arrived. No one shook hands with
one self or with his or her spouse. On the dining table, Aslam asked
each person including his wife to write on a slip of paper how many
hands he or she has shaken. Surprisingly each person gave a different
answer but Aslam does not know which answer belongs to whom.
Now Aslam is curious about the following: (a) Did a female shake
hands with a male? (b) Did Salma shake hands with a male friend? (c)
How many times Salma shake hands? (d) How many times Aslam
shake hands? (e) Assume that Salma has not shaken hands with any
male friend then did Aslam shake hands with a female?
2
Mutual Friendship
Example
Consider the statement below
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
• D and E are friends
• The friendships are Mutual

4
Consider the statement below
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
• D and E are friends
• The friendships are Mutual

5
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
• D and E are friends
• The friendships are Mutual

6
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
• D and E are friends
• The friendships are Mutual
• Create a 2D matrix of size |V| x |V|

7
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A
• The friendships are Mutual B
• Create a 2D matrix of size |V| x |V| C
D
E

8
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A 1
• The friendships are Mutual B 1
• Create a 2D matrix of size |V| x |V| C
D
E

9
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A 1
• The friendships are Mutual B 1 1
• Create a 2D matrix of size |V| x |V| C 1
D
E

10
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A 1
• The friendships are Mutual B 1 1 1
• Create a 2D matrix of size |V| x |V| C 1
D 1
E

11
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A 1
• The friendships are Mutual B 1 1 1
• Create a 2D matrix of size |V| x |V| C 1 1
D 1 1
E

12
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A 1
• The friendships are Mutual B 1 1 1
• Create a 2D matrix of size |V| x |V| C 1 1
D 1 1 1
E 1

13
Let’s store this graph somewhere
• There are 5 people: A, B, C, D, E:
• A and B are friends
• B and C are friends
• B and D are friends
• C and D are friends
A B C D E
• D and E are friends
A 1
• The friendships are Mutual B 1 1 1
• Create a 2D matrix of size |V| x |V| C 1 1
D 1 1 1
E 1

14
Let’s store this graph somewhere
• Let us find out the sum of each row

A B C D E
A 1
B 1 1 1
C 1 1
D 1 1 1
E 1

15
Let’s store this graph somewhere
• Let us find out the sum of each row

A B C D E
A 1 1
B 1 1 1 3
C 1 1 2
D 1 1 1 3
E 1 1

16
Let’s store this graph somewhere
• Let us find out the sum of each row

A B C D E
A 1 1
• Resultant sum is called DEGREE of B 1 1 1 3
each vertex C 1 1 2
D 1 1 1 3
E 1 1

17
Let’s store this graph somewhere
• Let us find out the sum of each row

A B C D E
A 1 1
• Resultant sum is called DEGREE of B 1 1 1 3
each vertex C 1 1 2
• The number of edges each vertex has D 1 1 1 3
E 1 1

18
Basic Definitons of
Graph Theory
Simple Graphs
• Graphs with no loops or multiple edges are called Simple Graphs

20
Simple Graphs
• Graphs with no loops or multiple edges are called Simple Graphs

21
Task
• Is this a simple graph?

A B C D E
A 1
B 1 1 1
C 1 1
D 1 1 1
E 1

22
One-way roads
• Consider network having one-way roads only

23
One-way roads
• Consider network having one-way roads only

24
One-way roads
• Consider network having one-way roads only
• Arrows = flow of traffic

25
One-way roads
• Consider network having one-way roads only
• Arrows = flow of traffic
• Arrows = directions

26
One-way roads – Directed Graph
• Consider network having one-way roads only
• Arrows = flow of traffic
• Arrows = directions

• Directed Graph

27
Task
• Is this a directed graph?

A B C D E
A 1
B 1 1 1
C 1 1
D 1 1 1
E 1

28

You might also like