Graph Theory and Social Networks: Alexandru Costan
Graph Theory and Social Networks: Alexandru Costan
Graph Theory and Social Networks: Alexandru Costan
• G = (V,E)
• V represents the set of vertices (nodes)
• E represents the set of edges (links)
• Both vertices and edges may contain additional information
• Google’s Pregel
• Large-scale graph processing
• Vertex centered computation
• Apache Giraph
• Open source
• Iterative graph processing
• Used at Facebook
• Twitter’s Cassovary
• In-memory computation
• Used for: “Who to Follow” and “Similar to”
• Very simple to use (no need for persistence, databases or partitions)
• Neo4j Graph Database
• Flexible schema
• Powerful query language, ACID
Representing graphs 8
• Adjacency matrix
• Adjacency list
Adjacency matrices 9
2
1 2 3 4
1 0 1 0 1 1
3
2 1 0 1 1
3 1 0 0 0
4 1 0 1 0 4
Adjacency matrices: critique 10
Advantages:
• Easy mathematical manipulation
• Iteration over rows and columns corresponds
to computations on outlinks and inlinks
Disadvantages:
• Lots of zeros for sparse matrices
• Lots of wasted space
Adjacency lists 11
1 2 3 4
1 0 1 0 1 1: 2, 4
2 1 0 1 1 2: 1, 3, 4
3 1 0 0 0 3: 1
4: 1, 3
4 1 0 1 0
Adjacency lists: critique 12
Advantages:
• Much more compact representation
• Easy to compute over outlinks
Disadvantages:
• Much more difficult to compute over inlinks
Social graphs 13
14
Social graphs
• Asymmetric follow
relationship: very
skewed graphs
• Huge graphs:
15
What can networks tell us?
Question: What are the mechanisms by which node arrive and depart
and by which edges form and vanish?
BC closes
the triangle
Over time…
• Opportunity
• Trust
• Incentive
20
Strength of weak ties
• Structural approach:
• Local bridges or not
• Interpersonal approach:
• Weak or strong
23
Strong Triadic Closure
• Applies to Twitter/Facebook
Tie strength on Facebook 27
Tie strength on Twitter 28
• Stronger…
• Directed tweets: @someone
• … and weaker ties
• Followers