SlideShare una empresa de Scribd logo
1 de 107
Graph
Essentials
SOCIAL
MEDIA
MINING
2Social Media Mining Measures and Metrics 2Social Media Mining Graph Essentialshttp://socialmediamining.info/
Dear instructors/users of these slides:
Please feel free to include these slides in your own
material, or modify them as you see fit. If you decide
to incorporate these slides into your presentations,
please include the following note:
R. Zafarani, M. A. Abbasi, and H. Liu, Social Media Mining:
An Introduction, Cambridge University Press, 2014.
Free book and slides at http://socialmediamining.info/
or include a link to the website:
http://socialmediamining.info/
3Social Media Mining Measures and Metrics 3Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bridges of Konigsberg
• There are 2 islands and 7 bridges that connect
the islands and the mainland
• Find a path that crosses each bridge exactly once
City Map (From Wikipedia) Graph Representation
4Social Media Mining Measures and Metrics 4Social Media Mining Graph Essentialshttp://socialmediamining.info/
Modeling the Problem by Graph Theory
• The key to solve this problem is an ingenious
graph representation
• Euler proved that since except for the starting
and ending point of a walk, one has to enter
and leave all other nodes, thus these nodes
should have an even number of bridges
connected to them
• This property does not hold in
this problem
5Social Media Mining Measures and Metrics 5Social Media Mining Graph Essentialshttp://socialmediamining.info/
Networks
• A network is a graph.
– Elements of the network have meanings
• Network problems can usually be represented in
terms of graph theory
Twitter example:
• Given a piece of information, a
network of individuals, and the
cost to propagate information
among any connected pair, find
the minimum cost to disseminate
the information to all individuals.
6Social Media Mining Measures and Metrics 6Social Media Mining Graph Essentialshttp://socialmediamining.info/
Food Web
7Social Media Mining Measures and Metrics 7Social Media Mining Graph Essentialshttp://socialmediamining.info/
Network are Pervasive
CitationNetworks
TwitterNetworks
8Social Media Mining Measures and Metrics 8Social Media Mining Graph Essentialshttp://socialmediamining.info/
Internet
9Social Media Mining Measures and Metrics 9Social Media Mining Graph Essentialshttp://socialmediamining.info/
Network of the US Interstate Highways
10Social Media Mining Measures and Metrics 10Social Media Mining Graph Essentialshttp://socialmediamining.info/
NY State Road Network
11Social Media Mining Measures and Metrics 11Social Media Mining Graph Essentialshttp://socialmediamining.info/
Social Networks and Social Network Analysis
• A social network
– A network where elements have a social structure
• A set of actors (such as individuals or organizations)
• A set of ties (connections between individuals)
• Social networks examples:
– your family network, your friend network, your
colleagues ,etc.
• To analyze these networks we can use Social
Network Analysis (SNA)
• Social Network Analysis is an interdisciplinary
field from social sciences, statistics, graph theory,
complex networks, and now computer science
12Social Media Mining Measures and Metrics 12Social Media Mining Graph Essentialshttp://socialmediamining.info/
Social Networks: Examples
High school friendship
High school dating
13Social Media Mining Measures and Metrics 13Social Media Mining Graph Essentialshttp://socialmediamining.info/
Graph Basics
14Social Media Mining Measures and Metrics 14Social Media Mining Graph Essentialshttp://socialmediamining.info/
Nodes and Edges
A network is a graph, or a collection of points
connected by lines
• Points are referred to as nodes, actors, or
vertices (plural of vertex)
• Connections are referred to as edges or ties
Node
Edge
15Social Media Mining Measures and Metrics 15Social Media Mining Graph Essentialshttp://socialmediamining.info/
Nodes or Actors
• In a friendship social graph, nodes are people
and any pair of people connected denotes the
friendship between them
• Depending on the context, these nodes are
called nodes, or actors
– In a web graph, “nodes” represent sites and the
connection between nodes indicates web-links
between them
– In a social setting, these nodes are called actors
– The size of the graph is
16Social Media Mining Measures and Metrics 16Social Media Mining Graph Essentialshttp://socialmediamining.info/
Edges
• Edges connect nodes and are also known as
ties or relationships
• In a social setting, where nodes represent
social entities such as people, edges indicate
internode relationships and are therefore
known as relationships or (social) ties
• Number is edges (size of the edge-set) is
denoted as
17Social Media Mining Measures and Metrics 17Social Media Mining Graph Essentialshttp://socialmediamining.info/
Directed Edges and Directed Graphs
• Edges can have directions. A directed edge is sometimes
called an arc
• Edges are represented using their end-points .
• In undirected graphs both representations are the same
18Social Media Mining Measures and Metrics 18Social Media Mining Graph Essentialshttp://socialmediamining.info/
Neighborhood and Degree (In-degree, out-degree)
For any node 𝑣, in an undirected graph, the set of nodes it is
connected to via an edge is called its neighborhood and is
represented as 𝑁 𝑣
– In directed graphs we have incoming neighbors 𝑁𝑖𝑛 𝑣 (nodes that
connect to 𝑣) and outgoing neighbors 𝑁𝑜𝑢𝑡 𝑣 .
The number of edges connected to one node is the degree
of that node (the size of its neighborhood)
– Degree of a node 𝑖 is usually presented using notation 𝑑𝑖
In Directed graphs:
– In-degrees is the number of edges pointing towards a node
– Out-degree is the number of edges pointing away from a node
19Social Media Mining Measures and Metrics 19Social Media Mining Graph Essentialshttp://socialmediamining.info/
Degree and Degree Distribution
• Theorem 1. The summation of degrees in an
undirected graph is twice the number of
edges
• Lemma 1. The number of nodes with odd
degree is even
• Lemma 2. In any directed graph, the
summation of in-degrees is equal to the
summation of out-degrees,
20Social Media Mining Measures and Metrics 20Social Media Mining Graph Essentialshttp://socialmediamining.info/
Degree Distribution
When dealing with very large graphs, how nodes’
degrees are distributed is an important concept to
analyze and is called Degree Distribution
is the number of
nodes with degree 𝑑
(Degree sequence)
21Social Media Mining Measures and Metrics 21Social Media Mining Graph Essentialshttp://socialmediamining.info/
Degree Distribution Plot
The 𝑥-axis represents the degree and the 𝑦-axis
represents the fraction of nodes having that
degree
– On social networking sites
There exist many users with few
connections and there exist a
handful of users with very large
numbers of friends.
(Power-law degree distribution)
Facebook
Degree Distribution
22Social Media Mining Measures and Metrics 22Social Media Mining Graph Essentialshttp://socialmediamining.info/
Subgraph
• Graph 𝐺 can be represented as a pair
where 𝑉 is the node set and 𝐸 is the edge set
• is a subgraph of
1
23
546
1
2
3
5
23Social Media Mining Measures and Metrics 23Social Media Mining Graph Essentialshttp://socialmediamining.info/
• Adjacency Matrix
• Adjacency List
• Edge List
Graph Representation
24Social Media Mining Measures and Metrics 24Social Media Mining Graph Essentialshttp://socialmediamining.info/
Graph Representation
• Graph representation is straightforward
and intuitive, but it cannot be
effectively manipulated using
mathematical and computational tools
• We are seeking representations that can
store these two sets in a way such that
– Does not lose information
– Can be manipulated easily by computers
– Can have mathematical methods applied easily
25Social Media Mining Measures and Metrics 25Social Media Mining Graph Essentialshttp://socialmediamining.info/
Adjacency Matrix (a.k.a. sociomatrix)



ijA
0, otherwise
1, if there is an edge between nodes 𝑣𝑖 and 𝑣𝑗
Social media networks have
very sparse Adjacency matrices
Diagonal Entries are self-links or loops
26Social Media Mining Measures and Metrics 26Social Media Mining Graph Essentialshttp://socialmediamining.info/
Adjacency List
• In an adjacency list for every node, we maintain
a list of all the nodes that it is connected to
• The list is usually sorted based on the node
order or other preferences
27Social Media Mining Measures and Metrics 27Social Media Mining Graph Essentialshttp://socialmediamining.info/
Edge List
• In this representation, each element is an
edge and is usually represented as 𝑢, 𝑣 ,
denoting that node 𝑢 is connected to node
𝑣 via an edge
28Social Media Mining Measures and Metrics 28Social Media Mining Graph Essentialshttp://socialmediamining.info/
• Null, Empty,
Directed/Undirected/Mixed,
Simple/Multigraph, Weighted,
Signed Graph, Webgraph
Types of Graphs
29Social Media Mining Measures and Metrics 29Social Media Mining Graph Essentialshttp://socialmediamining.info/
Null Graph and Empty Graph
• A null graph is one where the node set is
empty (there are no nodes)
– Since there are no nodes, there are also no edges
• An empty graph or edge-less graph is one
where the edge set is empty,
• The node set can be non-empty.
– A null-graph is an empty graph.
30Social Media Mining Measures and Metrics 30Social Media Mining Graph Essentialshttp://socialmediamining.info/
Directed/Undirected/Mixed Graphs
The adjacency
matrix for
undirected graphs is
symmetric (𝑨 = 𝑨 𝑻)
• The adjacency matrix for
directed graphs is often
not symmetric (𝑨 ≠ 𝑨 𝑻)
– 𝑨𝒊𝒋  𝑨𝒋𝒊
– We can have equality
though
31Social Media Mining Measures and Metrics 31Social Media Mining Graph Essentialshttp://socialmediamining.info/
Simple Graphs and Multigraphs
• Simple graphs are graphs where only a single
edge can be between any pair of nodes
• Multigraphs are graphs where you can have
multiple edges between two nodes and loops
• The adjacency matrix for multigraphs can include
numbers larger than one, indicating multiple
edges between nodes
Simple graph Multigraph
32Social Media Mining Measures and Metrics 32Social Media Mining Graph Essentialshttp://socialmediamining.info/
Weighted Graph
• A weighted graph 𝑮(𝑽, 𝑬, 𝑾) is one
where edges are associated with
weights
– For example, a graph could
represent a map where
nodes are airports and edges
are routes between them
• The weight associated with
each edge could represent the
distance between the
corresponding cities


 

vandbetween vedgenoisThere0,
Rwj),or w(i,w
ji
ij
ijA
33Social Media Mining Measures and Metrics 33Social Media Mining Graph Essentialshttp://socialmediamining.info/
Signed Graph
• When weights are binary (0/1, -1/1, +/-) we
have a signed graph
• It is used to represent friends or foes
• It is also used to represent social status
34Social Media Mining Measures and Metrics 34Social Media Mining Graph Essentialshttp://socialmediamining.info/
Webgraph
• A webgraph is a way of representing how
internet sites are connected on the web
• In general, a web graph is a directed
multigraph
• Nodes represent sites and edges represent
links between sites.
• Two sites can have multiple links pointing to
each other and can have loops (links pointing
to themselves)
35Social Media Mining Measures and Metrics 35Social Media Mining Graph Essentialshttp://socialmediamining.info/
Webgraph
Government Agencies
Bow-tie structure
Broder et al –
200 million pages, 1.5 billion links
36Social Media Mining Measures and Metrics 36Social Media Mining Graph Essentialshttp://socialmediamining.info/
• Adjacent nodes/Edges,
Walk/Path/Trail/Tour/Cycle
Connectivity in Graphs
37Social Media Mining Measures and Metrics 37Social Media Mining Graph Essentialshttp://socialmediamining.info/
Adjacent nodes and Incident Edges
Two nodes are adjacent if they are connected
via an edge.
Two edges are incident, if they share on end-
point
When the graph is directed, edge directions
must match for edges to be incident
An edge in a graph can be traversed when one
starts at one of its end-nodes, moves along the
edge, and stops at its other end-node.
38Social Media Mining Measures and Metrics 38Social Media Mining Graph Essentialshttp://socialmediamining.info/
Walk, Path, Trail, Tour, and Cycle
Walk: A walk is a sequence of incident edges visited
one after another
– Open walk: A walk does not end where it starts
– Closed walk: A walk returns to where it starts
• Representing a walk:
– A sequence of edges: 𝑒1, 𝑒2, … , 𝑒𝑛
– A sequence of nodes: 𝑣1, 𝑣2, … , 𝑣𝑛
• Length of walk:
the number of visited edges
Length of walk= 8
39Social Media Mining Measures and Metrics 39Social Media Mining Graph Essentialshttp://socialmediamining.info/
Trail
• A trail is a walk where no edge is visited
more than once and all walk edges are
distinct
• A closed trail (one that ends where it starts) is
called a tour or circuit
40Social Media Mining Measures and Metrics 40Social Media Mining Graph Essentialshttp://socialmediamining.info/
Path
• A walk where nodes and edges are distinct is
called a path and a closed path is called a
cycle
• The length of a path or cycle is the number of
edges visited in the path or cycle
Length of path= 4
41Social Media Mining Measures and Metrics 41Social Media Mining Graph Essentialshttp://socialmediamining.info/
Examples
Eulerian Tour
• All edges are traversed only once
– Konigsberg bridges
Hamiltonian Cycle
• A cycle that visits all nodes
42Social Media Mining Measures and Metrics 42Social Media Mining Graph Essentialshttp://socialmediamining.info/
Random walk
• A walk that in each step the next node is
selected randomly among the neighbors
– The weight of an edge can be used to define the
probability of visiting it
– For all edges that start at 𝑣𝑖 the following equation
holds
43Social Media Mining Measures and Metrics 43Social Media Mining Graph Essentialshttp://socialmediamining.info/
Random Walk: Example
Mark a spot on the ground
– Stand on the spot and flip the coin (or more than one
coin depending on the number of choices such as left,
right, forward, and backward)
– If the coin comes up heads, turn to the right and take a
step
– If the coin comes up tails, turn to the left and take a step
– Keep doing this many times and see where you end up
44Social Media Mining Measures and Metrics 44Social Media Mining Graph Essentialshttp://socialmediamining.info/
Connectivity
• A node 𝒗𝒊 is connected to node 𝒗𝒋 (or reachable
from 𝑣𝑗) if it is adjacent to it or there exists a path
from 𝑣𝑖 to 𝑣𝑗.
• A graph is connected, if there exists a path
between any pair of nodes in it
– In a directed graph, a graph is strongly connected if
there exists a directed path between any pair of nodes
– In a directed graph, a graph is weakly connected if
there exists a path between any pair of nodes, without
following the edge directions
• A graph is disconnected, if it not connected.
45Social Media Mining Measures and Metrics 45Social Media Mining Graph Essentialshttp://socialmediamining.info/
Connectivity: Example
46Social Media Mining Measures and Metrics 46Social Media Mining Graph Essentialshttp://socialmediamining.info/
Component
• A component in an undirected graph is a
connected subgraph, i.e., there is a path between
every pair of nodes inside the component
• In directed graphs, we have a strongly
connected components when there is a path
from 𝑢 to 𝑣 and one from 𝑣 to 𝑢 for every pair of
nodes 𝑢 and 𝑣.
• The component is weakly connected if replacing
directed edges with undirected edges results in a
connected component
47Social Media Mining Measures and Metrics 47Social Media Mining Graph Essentialshttp://socialmediamining.info/
Component Examples:
3 components 3 Strongly-connected
components
48Social Media Mining Measures and Metrics 48Social Media Mining Graph Essentialshttp://socialmediamining.info/
Shortest Path
• Shortest Path is the path between two nodes
that has the shortest length.
– We denote the length of the shortest path between
nodes 𝑣𝑖 and 𝑣𝑗 as 𝑙𝑖,𝑗
• The concept of the neighborhood of a node
can be generalized using shortest paths. An
n-hop neighborhood of a node is the set of
nodes that are within n hops distance from
the node.
49Social Media Mining Measures and Metrics 49Social Media Mining Graph Essentialshttp://socialmediamining.info/
Diameter
The diameter of a graph is the length of the
longest shortest path between any pair of nodes
between any pairs of nodes in the graph
• How big is the diameter of the web?
50Social Media Mining Measures and Metrics 50Social Media Mining Graph Essentialshttp://socialmediamining.info/
Adjacency Matrix and Connectivity
• Consider the following adjacency matrix
• Number of Common neighbors between node
𝑖 and node 𝑗
• That’s element of [ij] of matrix 𝐴 × 𝐴 𝑇 = 𝐴2
• Common neighbors are paths of length 2
• Similarly, what is 𝐴3?
ji
51Social Media Mining Measures and Metrics 51Social Media Mining Graph Essentialshttp://socialmediamining.info/
Special Graphs
52Social Media Mining Measures and Metrics 52Social Media Mining Graph Essentialshttp://socialmediamining.info/
Trees and Forests
• Trees are special cases of undirected graphs
• A tree is a graph structure that has no cycle in it
• In a tree, there is exactly one path between any
pair of nodes
• In a tree: |𝑉| = |𝐸| + 1
• A set of disconnected
trees is called a forest
A forest containing 3 trees
53Social Media Mining Measures and Metrics 53Social Media Mining Graph Essentialshttp://socialmediamining.info/
Special Subgraphs
54Social Media Mining Measures and Metrics 54Social Media Mining Graph Essentialshttp://socialmediamining.info/
Spanning Trees
• For any connected graph, the spanning tree is a
subgraph and a tree that includes all the nodes
of the graph
• There may exist multiple spanning trees for a
graph.
• In a weighted graph, the weight of a spanning
tree is the summation of the edge weights in the
tree.
• Among the many spanning trees found for a
weighted graph, the one with the minimum
weight is called the
minimum spanning tree (MST)
55Social Media Mining Measures and Metrics 55Social Media Mining Graph Essentialshttp://socialmediamining.info/
Steiner Trees
Given a weighted graph G(V, E, W) and a subset
of nodes 𝑉’ ⊆ 𝑉 (terminal nodes ), the Steiner
tree problem aims to find a tree such that it
spans all the 𝑉’ nodes and the weight of this tree
is minimized
What can be the terminal
set here?
56Social Media Mining Measures and Metrics 56Social Media Mining Graph Essentialshttp://socialmediamining.info/
Complete Graphs
• A complete graph is a graph where for a set of
nodes 𝑉, all possible edges exist in the graph
• In a complete graph, any pair of nodes are
connected via an edge
57Social Media Mining Measures and Metrics 57Social Media Mining Graph Essentialshttp://socialmediamining.info/
Planar Graphs
A graph that can be drawn in such a way that no
two edges cross each other (other than the
endpoints) is called planar
Planar Graph Non-planar Graph
58Social Media Mining Measures and Metrics 58Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bipartite Graphs
A bipartite graph 𝐺(𝑉, 𝐸) is a graph where the
node set can be partitioned into two sets such
that, for all edges, one end-point is in one set
and the other end-point is in the other set.
59Social Media Mining Measures and Metrics 59Social Media Mining Graph Essentialshttp://socialmediamining.info/
Affiliation Networks
An affiliation network is a bipartite graph. If an
individual is associated with an affiliation, an
edge connects the corresponding nodes.
60Social Media Mining Measures and Metrics 60Social Media Mining Graph Essentialshttp://socialmediamining.info/
People Companies
Affiliation Networks: Membership
Affiliation of people on
corporate boards of
directors
61Social Media Mining Measures and Metrics 61Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bipartite Representation / one-mode Projections
• We can save some space by keeping
membership matrix X
– What is 𝑋𝑋 𝑇?
– What is 𝑋 𝑇
𝑋?
Similarity between users - [Bibliographic Coupling]
Similarity between groups - [Co-citation]
Elements on the diagonal are number of groups
the user is a member of
OR
number of users in the group
62Social Media Mining Measures and Metrics 62Social Media Mining Graph Essentialshttp://socialmediamining.info/
Social-Affiliation Network
Social-Affiliation network is a combination of a
social network and an affiliation network
63Social Media Mining Measures and Metrics 63Social Media Mining Graph Essentialshttp://socialmediamining.info/
Regular Graphs
• A regular graph is one in which all
nodes have the same degree
• Regular graphs can be connected or
disconnected
• In a 𝑘-regular graph, all nodes have
degree 𝑘
• Complete graphs are examples of
regular graphs
Regular graph
With 𝑘 = 3
64Social Media Mining Measures and Metrics 64Social Media Mining Graph Essentialshttp://socialmediamining.info/
Egocentric Networks
• Egocentric network: A focal actor (ego) and a
set of alters who have ties with the ego
• Usually there are limitations for nodes to
connect to other nodes or have relation with
other nodes
– Example: In a network of mothers and their
children:
• Each mother only holds mother-children relations with her
own children
• Additional examples of egocentric networks are
Teacher-Student or Husband-Wife
65Social Media Mining Measures and Metrics 65Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bridges (cut-edges)
• Bridges are edges whose removal will increase
the number of connected components
66Social Media Mining Measures and Metrics 66Social Media Mining Graph Essentialshttp://socialmediamining.info/
Graph Algorithms
67Social Media Mining Measures and Metrics 67Social Media Mining Graph Essentialshttp://socialmediamining.info/
Graph/Network
Traversal Algorithms
68Social Media Mining Measures and Metrics 68Social Media Mining Graph Essentialshttp://socialmediamining.info/
Graph/Tree Traversal
• We are interested in surveying a social media site
to computing the average age of its users
– Start from one user;
– Employ some traversal technique to reach her friends
and then friends’ friends, …
• The traversal technique guarantees that
1. All users are visited; and
2. No user is visited more than once.
• There are two main techniques:
– Depth-First Search (DFS)
– Breadth-First Search (BFS)
69Social Media Mining Measures and Metrics 69Social Media Mining Graph Essentialshttp://socialmediamining.info/
Depth-First Search (DFS)
• Depth-First Search (DFS) starts from a node 𝑣𝑖,
selects one of its neighbors 𝑣𝑗 from 𝑁(𝑣𝑖) and
performs Depth-First Search on 𝑣𝑗 before
visiting other neighbors in 𝑁(𝑣𝑖)
• The algorithm can be used both for trees and
graphs
– The algorithm can be implemented using a stack
structure
70Social Media Mining Measures and Metrics 70Social Media Mining Graph Essentialshttp://socialmediamining.info/
DFS Algorithm
71Social Media Mining Measures and Metrics 71Social Media Mining Graph Essentialshttp://socialmediamining.info/
Depth-First Search (DFS): An Example
72Social Media Mining Measures and Metrics 72Social Media Mining Graph Essentialshttp://socialmediamining.info/
Breadth-First Search (BFS)
• BFS starts from a node and visits all its
immediate neighbors first, and then moves to
the second level by traversing their neighbors.
• The algorithm can be used both for trees and
graphs
– The algorithm can be implemented using a queue
structure
73Social Media Mining Measures and Metrics 73Social Media Mining Graph Essentialshttp://socialmediamining.info/
BFS Algorithm
74Social Media Mining Measures and Metrics 74Social Media Mining Graph Essentialshttp://socialmediamining.info/
Breadth-First Search (BFS)
75Social Media Mining Measures and Metrics 75Social Media Mining Graph Essentialshttp://socialmediamining.info/
Finding Shortest Paths
76Social Media Mining Measures and Metrics 76Social Media Mining Graph Essentialshttp://socialmediamining.info/
Shortest Path
When a graph is connected, there is a chance that
multiple paths exist between any pair of nodes
– In many scenarios, we want the shortest path between
two nodes in a graph
• How fast can I disseminate information on social media?
Dijkstra’s Algorithm
– Designed for weighted graphs with non-negative edges
– It finds shortest paths that start from a provided node 𝑠
to all other nodes
– It finds both shortest paths and their respective lengths
77Social Media Mining Measures and Metrics 77Social Media Mining Graph Essentialshttp://socialmediamining.info/
Dijkstra’s Algorithm: Finding the shortest path
1. Initiation:
– Assign zero to the source node and infinity to all other nodes
– Mark all nodes as unvisited
– Set the source node as current
2. For the current node, consider all of its unvisited
neighbors and calculate their tentative distances
– If tentative distance is smaller than neighbor’s distance, then
Neighbor’s distance = tentative distance
3. After considering all of the neighbors of the current
node, mark the current node as visited and remove it
from the unvisited set
4. If the destination node has been marked visited or if
the smallest tentative distance among the nodes in
the unvisited set is infinity, then stop
5. Set the unvisited node marked with the smallest
tentative distance as the next "current node" and go
to step 2
A visited node will
never be checked
again and its
distance recorded
now is final and
minimal
Tentative distance =
current distance +
edge weight
78Social Media Mining Measures and Metrics 78Social Media Mining Graph Essentialshttp://socialmediamining.info/
Dijkstra’s Algorithm: Execution Example
79Social Media Mining Measures and Metrics 79Social Media Mining Graph Essentialshttp://socialmediamining.info/
Dijkstra’s Algorithm: Notes
• Dijkstra’s algorithm is source-dependent
– Finds the shortest paths between the source node and
all other nodes.
• To generate all-pair shortest paths,
– We can run Dijsktra’s algorithm 𝑛 times, or
– Use other algorithms such as Floyd-Warshall algorithm.
• If we want to compute the shortest path from
source 𝑣 to destination 𝑑,
– we can stop the algorithm once the shortest path to the
destination node has been determined
80Social Media Mining Measures and Metrics 80Social Media Mining Graph Essentialshttp://socialmediamining.info/
Finding
Minimum Spanning Tree
81Social Media Mining Measures and Metrics 81Social Media Mining Graph Essentialshttp://socialmediamining.info/
Prim’s Algorithm: Finding Minimum Spanning Tree
Finds MST in a weighted graph
1. Selecting a random node and add it to the MST
2. Grows the spanning tree by selecting edges which
have one endpoint in the existing spanning tree and
one endpoint among the nodes that are not selected
yet. Among the possible edges, the one with the
minimum weight is added to the set (along with its
end-point).
3. This process is iterated until the graph is fully
spanned
82Social Media Mining Measures and Metrics 82Social Media Mining Graph Essentialshttp://socialmediamining.info/
Prim’s Algorithm Execution Example
83Social Media Mining Measures and Metrics 83Social Media Mining Graph Essentialshttp://socialmediamining.info/
Network Flow
84Social Media Mining Measures and Metrics 84Social Media Mining Graph Essentialshttp://socialmediamining.info/
Network Flow
• Consider a network of pipes that connects an
infinite water source to a water sink.
– Given the capacity of these pipes, what is the maximum
flow that can be sent from the source to the sink?
• Parallel in Social Media:
– Users have daily cognitive/time limits (the capacity,
here) of sending messages (the flow) to others,
– What is the maximum number of messages the
network should be prepared to handle at any time?
85Social Media Mining Measures and Metrics 85Social Media Mining Graph Essentialshttp://socialmediamining.info/
Flow Network
• A Flow network G(V,E,C) is a directed weighted
graph, where we have the following:
– ∀ (𝑢, 𝑣) ∈ 𝐸, 𝑐(𝑢, 𝑣) ≥ 0 defines the edge capacity.
– When 𝑢, 𝑣 ∈ 𝐸, 𝑣, 𝑢 ∉ 𝐸 (opposite flow is impossible)
– 𝑠 defines the source node and 𝑡 defines the sink node.
An infinite supply of flow is connected to the source.
86Social Media Mining Measures and Metrics 86Social Media Mining Graph Essentialshttp://socialmediamining.info/
Flow
• Given edges with certain capacities, we can fill
these edges with the flow up to their capacities
(capacity constraint)
• The flow that enters any node other than source
𝑠 and sink 𝑡 is equal to the flow that exits it so
that no flow is lost (flow conservation constraint)
• ∀ (𝑢, 𝑣) ∈ 𝐸, 𝑓(𝑢, 𝑣) ≥ 0 defines the flow passing
through the edge.
• ∀ (𝑢, 𝑣) ∈ 𝐸, 0 ≤ 𝑓(𝑢, 𝑣) ≤ 𝑐(𝑢, 𝑣)
• ∀𝑣 ∈ 𝑉 − 𝑠, 𝑡 , 𝑘: 𝑘,𝑣 ∈𝐸 𝑓 𝑘, 𝑣 = 𝑙:(𝑣,𝑙)∈𝐸 𝑓 𝑣, 𝑙
(capacity constraint)
(flow conservation constraint)
87Social Media Mining Measures and Metrics 87Social Media Mining Graph Essentialshttp://socialmediamining.info/
A Sample Flow Network
• Commonly, to visualize an edge with capacity
𝑐 and flow 𝑓 , we use the notation 𝑓/𝑐.
88Social Media Mining Measures and Metrics 88Social Media Mining Graph Essentialshttp://socialmediamining.info/
Flow Quantity
• The flow quantity (or value of the flow) in any
network is the amount of
– Outgoing flow from the source minus the incoming
flow to the source.
– Alternatively, one can compute this value by
subtracting the outgoing flow from the sink from
its incoming value
89Social Media Mining Measures and Metrics 89Social Media Mining Graph Essentialshttp://socialmediamining.info/
What is the flow value?
• 19
– 11+8 from s, or
– 4+15 to t
90Social Media Mining Measures and Metrics 90Social Media Mining Graph Essentialshttp://socialmediamining.info/
Ford-Fulkerson Algorithm
• Find a path from source to sink such that
there is unused capacity for all edges in the
path.
• Use that capacity (the minimum capacity
unused among all edges on the path) to
increase the flow.
• Iterate until no other path is available.
91Social Media Mining Measures and Metrics 91Social Media Mining Graph Essentialshttp://socialmediamining.info/
Residual Network
• Given a flow network 𝐺(𝑉, 𝐸, 𝐶), we define
another network 𝐺(𝑉, 𝐸 𝑅, 𝐶 𝑅)
• This network defines how much capacity
remains in the original network.
• The residual network has an edge between
nodes 𝑢 and 𝑣 if and only if either (𝑢, 𝑣) or
(𝑣, 𝑢) exists in the original graph.
– If one of these two exists in the original network,
we would have two edges in the residual network:
one from (𝑢, 𝑣) and one from (𝑣, 𝑢).
92Social Media Mining Measures and Metrics 92Social Media Mining Graph Essentialshttp://socialmediamining.info/
Intuition
• When there is no flow going through an edge
in the original network, a flow of as much as
the capacity of the edge remains in the
residual.
• In the residual network, one has the ability to
send flow in the opposite direction to cancel
some amount of flow in the original network.
93Social Media Mining Measures and Metrics 93Social Media Mining Graph Essentialshttp://socialmediamining.info/
Residual Network (Example)
• Edges that have zero capacity in the residual
are not shown
94Social Media Mining Measures and Metrics 94Social Media Mining Graph Essentialshttp://socialmediamining.info/
Augmentation / Augmenting Paths
1. In the residual graph, when edges are in the
same direction as the original graph,
– Their capacity shows how much more flow can be
pushed along that edge in the original graph.
2. When edges are in the opposite direction,
– their capacities show how much flow can be
pushed back on the original graph edge.
• By finding a flow in the residual, we can
augment the flow in the original graph.
95Social Media Mining Measures and Metrics 95Social Media Mining Graph Essentialshttp://socialmediamining.info/
Augmentation / Augmenting Paths
• Any simple path from 𝑠 to 𝑡 in the residual graph
is an augmenting path.
– All capacities in the residual are positive,
• These paths can augment flows in the original, thus increasing
the flow.
– The amount of flow that can be pushed along this path
is equal to the minimum capacity along the path
• The edge with the minimum capacity limits the amount of flow
being pushed
• We call the edge the Weak link
96Social Media Mining Measures and Metrics 96Social Media Mining Graph Essentialshttp://socialmediamining.info/
How do we augment?
• Given flow 𝑓 (𝑢, 𝑣) in the original graph and
flow 𝑓𝑅(𝑢, 𝑣) and 𝑓𝑅(𝑣, 𝑢) in the residual graph,
we can augment the flow as follows:
Flow Quantity: 1
97Social Media Mining Measures and Metrics 97Social Media Mining Graph Essentialshttp://socialmediamining.info/
Augmenting
98Social Media Mining Measures and Metrics 98Social Media Mining Graph Essentialshttp://socialmediamining.info/
The Ford-Fulkerson Algorithm
99Social Media Mining Measures and Metrics 99Social Media Mining Graph Essentialshttp://socialmediamining.info/
Maximum Bipartite Matching
10Social Media Mining Measures and Metrics 100Social Media Mining Graph Essentialshttp://socialmediamining.info/
Example
• Given 𝑛 products and
𝑚 users
– Some users are only
interested in certain
products
– We have only one copy
of each product.
– Can be represented as a
bipartite graph
– Find the maximum
number of products
that can be bought by
users
• No two edges selected
share a node
Matching Maximum
Matching
10Social Media Mining Measures and Metrics 101Social Media Mining Graph Essentialshttp://socialmediamining.info/
Matching Solved with Max-Flow
• Create a flow graph
𝐺(𝑉’, 𝐸’, 𝐶) from our
bipartite graph 𝐺(𝑉, 𝐸)
1. Set 𝑉’ = 𝑉 ∪ 𝑠 ∪ 𝑡
2. Connect all nodes in 𝑉𝐿
to 𝑠 and all nodes in 𝑉𝑅
to 𝑡
3. Set 𝑐(𝑢, 𝑣) = 1, for all
edges in 𝐸’
10Social Media Mining Measures and Metrics 102Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bridges, Weak Ties, and
Bridge Detection
10Social Media Mining Measures and Metrics 103Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bridge and a Local Bridge
• Bridge: Bridges are edges
whose removal will increase
the number of connected
components
– Bridges are extremely rare in
real-world social networks.
• Local Bridge: when the
endpoints have no friend in
common
– the removal increases the
length of shortest path to
more than 2
– Span of the local bridge:
How much the distance
between the endpoints would
become if the edge is
removed
• Large span is desirable to find
communities
Source: Easley and Kleinberg – Networks, Crowds, and Markets
10Social Media Mining Measures and Metrics 104Social Media Mining Graph Essentialshttp://socialmediamining.info/
Strength of Ties
• Assume that you can
divide connections
into two categories:
– Strong tie (S):
• friends
– Weak ties (W):
• acquaintances
• Strong Triadic Closure:
– Consider a node 𝒖 that has two strong ties to nodes 𝒗 and 𝒘
– If there is no edge between 𝒗 and 𝒘 (weak or strong tie) then 𝒖
does not exhibit a strong triadic closure
10Social Media Mining Measures and Metrics 105Social Media Mining Graph Essentialshttp://socialmediamining.info/
Connection between Bridges and Tie Strength
Why?
If a node exhibits Strong Triadic Closure and
has at least two strong ties, then if it part of
a local bridge, that bridge must be a weak tie
Source: Easley and Kleinberg – Networks, Crowds, and Markets
10Social Media Mining Measures and Metrics 106Social Media Mining Graph Essentialshttp://socialmediamining.info/
Generalizing to Real-World Networks
• Consider a cell-phone network
– We have an edge if both end points
call each other
– Tie Strength: it does not have to be
weak/strong
• For (𝑢, 𝑣), the number of minutes
spent 𝑢 and 𝑣 spent talking to each
other on the phone
– Local Bridge: can be generalized
using neighborhood overlap:
The numerator is
called embeddedness
of an edge
When numerator is zero we have a local bridge
Tie Strength
Neighborhood
Overlap
10Social Media Mining Measures and Metrics 107Social Media Mining Graph Essentialshttp://socialmediamining.info/
Bridge Detection

Más contenido relacionado

La actualidad más candente

Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...
Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...
Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...Xiaohan Zeng
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network AnalysisSujoy Bag
 
Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011guillaume ereteo
 
Social Network Analysis Workshop
Social Network Analysis WorkshopSocial Network Analysis Workshop
Social Network Analysis WorkshopData Works MD
 
Community detection in graphs
Community detection in graphsCommunity detection in graphs
Community detection in graphsNicola Barbieri
 
Network measures used in social network analysis
Network measures used in social network analysis Network measures used in social network analysis
Network measures used in social network analysis Dragan Gasevic
 
Social Network Analysis power point presentation
Social Network Analysis power point presentation Social Network Analysis power point presentation
Social Network Analysis power point presentation Ratnesh Shah
 
Social Media Mining - Chapter 5 (Data Mining Essentials)
Social Media Mining - Chapter 5 (Data Mining Essentials)Social Media Mining - Chapter 5 (Data Mining Essentials)
Social Media Mining - Chapter 5 (Data Mining Essentials)SocialMediaMining
 
Social Network Analysis Introduction including Data Structure Graph overview.
Social Network Analysis Introduction including Data Structure Graph overview. Social Network Analysis Introduction including Data Structure Graph overview.
Social Network Analysis Introduction including Data Structure Graph overview. Doug Needham
 
Social Network Analysis (SNA) 2018
Social Network Analysis  (SNA) 2018Social Network Analysis  (SNA) 2018
Social Network Analysis (SNA) 2018Arsalan Khan
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network AnalysisScott Gomer
 
CS6010 Social Network Analysis Unit IV
CS6010 Social Network Analysis Unit IVCS6010 Social Network Analysis Unit IV
CS6010 Social Network Analysis Unit IVpkaviya
 
Social Media Mining: An Introduction
Social Media Mining: An IntroductionSocial Media Mining: An Introduction
Social Media Mining: An IntroductionAli Abbasi
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network AnalysisFred Stutzman
 
CS6010 Social Network Analysis Unit III
CS6010 Social Network Analysis   Unit IIICS6010 Social Network Analysis   Unit III
CS6010 Social Network Analysis Unit IIIpkaviya
 
Introduction to Social Network Analysis
Introduction to Social Network AnalysisIntroduction to Social Network Analysis
Introduction to Social Network AnalysisPatti Anklam
 

La actualidad más candente (20)

Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...
Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...
Social Network Analysis: What It Is, Why We Should Care, and What We Can Lear...
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011
 
Social Network Analysis Workshop
Social Network Analysis WorkshopSocial Network Analysis Workshop
Social Network Analysis Workshop
 
Community detection in graphs
Community detection in graphsCommunity detection in graphs
Community detection in graphs
 
Network measures used in social network analysis
Network measures used in social network analysis Network measures used in social network analysis
Network measures used in social network analysis
 
Social Network Analysis power point presentation
Social Network Analysis power point presentation Social Network Analysis power point presentation
Social Network Analysis power point presentation
 
Social Media Mining - Chapter 5 (Data Mining Essentials)
Social Media Mining - Chapter 5 (Data Mining Essentials)Social Media Mining - Chapter 5 (Data Mining Essentials)
Social Media Mining - Chapter 5 (Data Mining Essentials)
 
06 Community Detection
06 Community Detection06 Community Detection
06 Community Detection
 
Social Network Analysis Introduction including Data Structure Graph overview.
Social Network Analysis Introduction including Data Structure Graph overview. Social Network Analysis Introduction including Data Structure Graph overview.
Social Network Analysis Introduction including Data Structure Graph overview.
 
Social Network Analysis (SNA) 2018
Social Network Analysis  (SNA) 2018Social Network Analysis  (SNA) 2018
Social Network Analysis (SNA) 2018
 
Social Data Mining
Social Data MiningSocial Data Mining
Social Data Mining
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
CS6010 Social Network Analysis Unit IV
CS6010 Social Network Analysis Unit IVCS6010 Social Network Analysis Unit IV
CS6010 Social Network Analysis Unit IV
 
Social Media Mining: An Introduction
Social Media Mining: An IntroductionSocial Media Mining: An Introduction
Social Media Mining: An Introduction
 
Social Network Analysis (SNA)
Social Network Analysis (SNA)Social Network Analysis (SNA)
Social Network Analysis (SNA)
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
CS6010 Social Network Analysis Unit III
CS6010 Social Network Analysis   Unit IIICS6010 Social Network Analysis   Unit III
CS6010 Social Network Analysis Unit III
 
Domain Specific IoT
Domain Specific IoTDomain Specific IoT
Domain Specific IoT
 
Introduction to Social Network Analysis
Introduction to Social Network AnalysisIntroduction to Social Network Analysis
Introduction to Social Network Analysis
 

Destacado

Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisDataminingTools Inc
 
Graph mining 2: Statistical approaches for graph mining
Graph mining 2: Statistical approaches for graph miningGraph mining 2: Statistical approaches for graph mining
Graph mining 2: Statistical approaches for graph miningtuxette
 
Social Network Analysis in Two Parts
Social Network Analysis in Two PartsSocial Network Analysis in Two Parts
Social Network Analysis in Two PartsPatti Anklam
 
Mining the social graph
Mining the social graphMining the social graph
Mining the social graphshunya kimura
 
Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...ACMBangalore
 
Large Graph Mining – Patterns, tools and cascade analysis by Christos Faloutsos
Large Graph Mining – Patterns, tools and cascade analysis by Christos FaloutsosLarge Graph Mining – Patterns, tools and cascade analysis by Christos Faloutsos
Large Graph Mining – Patterns, tools and cascade analysis by Christos FaloutsosBigMine
 
Mining Social Web APIs with IPython Notebook (PyCon 2014)
Mining Social Web APIs with IPython Notebook (PyCon 2014)Mining Social Web APIs with IPython Notebook (PyCon 2014)
Mining Social Web APIs with IPython Notebook (PyCon 2014)Matthew Russell
 
Complex and Social Network Analysis in Python
Complex and Social Network Analysis in PythonComplex and Social Network Analysis in Python
Complex and Social Network Analysis in Pythonrik0
 
Prof. Hendrik Speck - Social Network Analysis
Prof. Hendrik Speck - Social Network AnalysisProf. Hendrik Speck - Social Network Analysis
Prof. Hendrik Speck - Social Network AnalysisHendrik Speck
 
Kick start graph visualization projects
Kick start graph visualization projectsKick start graph visualization projects
Kick start graph visualization projectsLinkurious
 
Large Graph Mining
Large Graph MiningLarge Graph Mining
Large Graph MiningSabri Skhiri
 
Data Mining Seminar - Graph Mining and Social Network Analysis
Data Mining Seminar - Graph Mining and Social Network AnalysisData Mining Seminar - Graph Mining and Social Network Analysis
Data Mining Seminar - Graph Mining and Social Network Analysisvwchu
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisDatamining Tools
 
Social Network Analysis: applications for education research
Social Network Analysis: applications for education researchSocial Network Analysis: applications for education research
Social Network Analysis: applications for education researchChristian Bokhove
 
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...Lauri Eloranta
 
Social network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and moreSocial network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and moreWael Elrifai
 
Social network analysis intro part I
Social network analysis intro part ISocial network analysis intro part I
Social network analysis intro part ITHomas Plotkowiak
 
Powerpoint presentation on internet and its uses
Powerpoint presentation on internet and its usesPowerpoint presentation on internet and its uses
Powerpoint presentation on internet and its usessumitsc
 
Internet of Things and its applications
Internet of Things and its applicationsInternet of Things and its applications
Internet of Things and its applicationsPasquale Puzio
 

Destacado (20)

Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 
Graph mining
Graph miningGraph mining
Graph mining
 
Graph mining 2: Statistical approaches for graph mining
Graph mining 2: Statistical approaches for graph miningGraph mining 2: Statistical approaches for graph mining
Graph mining 2: Statistical approaches for graph mining
 
Social Network Analysis in Two Parts
Social Network Analysis in Two PartsSocial Network Analysis in Two Parts
Social Network Analysis in Two Parts
 
Mining the social graph
Mining the social graphMining the social graph
Mining the social graph
 
Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...
 
Large Graph Mining – Patterns, tools and cascade analysis by Christos Faloutsos
Large Graph Mining – Patterns, tools and cascade analysis by Christos FaloutsosLarge Graph Mining – Patterns, tools and cascade analysis by Christos Faloutsos
Large Graph Mining – Patterns, tools and cascade analysis by Christos Faloutsos
 
Mining Social Web APIs with IPython Notebook (PyCon 2014)
Mining Social Web APIs with IPython Notebook (PyCon 2014)Mining Social Web APIs with IPython Notebook (PyCon 2014)
Mining Social Web APIs with IPython Notebook (PyCon 2014)
 
Complex and Social Network Analysis in Python
Complex and Social Network Analysis in PythonComplex and Social Network Analysis in Python
Complex and Social Network Analysis in Python
 
Prof. Hendrik Speck - Social Network Analysis
Prof. Hendrik Speck - Social Network AnalysisProf. Hendrik Speck - Social Network Analysis
Prof. Hendrik Speck - Social Network Analysis
 
Kick start graph visualization projects
Kick start graph visualization projectsKick start graph visualization projects
Kick start graph visualization projects
 
Large Graph Mining
Large Graph MiningLarge Graph Mining
Large Graph Mining
 
Data Mining Seminar - Graph Mining and Social Network Analysis
Data Mining Seminar - Graph Mining and Social Network AnalysisData Mining Seminar - Graph Mining and Social Network Analysis
Data Mining Seminar - Graph Mining and Social Network Analysis
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 
Social Network Analysis: applications for education research
Social Network Analysis: applications for education researchSocial Network Analysis: applications for education research
Social Network Analysis: applications for education research
 
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
 
Social network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and moreSocial network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and more
 
Social network analysis intro part I
Social network analysis intro part ISocial network analysis intro part I
Social network analysis intro part I
 
Powerpoint presentation on internet and its uses
Powerpoint presentation on internet and its usesPowerpoint presentation on internet and its uses
Powerpoint presentation on internet and its uses
 
Internet of Things and its applications
Internet of Things and its applicationsInternet of Things and its applications
Internet of Things and its applications
 

Similar a Social Media Mining - Chapter 2 (Graph Essentials)

SocialCom09-tutorial.pdf
SocialCom09-tutorial.pdfSocialCom09-tutorial.pdf
SocialCom09-tutorial.pdfBalasundaramSr
 
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social NetworksThe Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social NetworksEditor IJCATR
 
Preso on social network analysis for rtp analytics unconference
Preso on social network analysis for rtp analytics unconferencePreso on social network analysis for rtp analytics unconference
Preso on social network analysis for rtp analytics unconferenceBruce Conner
 
Social Network Analysis Using Gephi
Social Network Analysis Using Gephi Social Network Analysis Using Gephi
Social Network Analysis Using Gephi Goa App
 
20120622 web sci12-won-marc smith-semantic and social network analysis of …
20120622 web sci12-won-marc smith-semantic and social network analysis of …20120622 web sci12-won-marc smith-semantic and social network analysis of …
20120622 web sci12-won-marc smith-semantic and social network analysis of …Marc Smith
 
Social Network Analysis with NodeXL Part 1
Social Network Analysis with NodeXL Part 1Social Network Analysis with NodeXL Part 1
Social Network Analysis with NodeXL Part 1Dr Wasim Ahmed
 
An Introduction to NodeXL for Social Scientists
An Introduction to NodeXL for Social ScientistsAn Introduction to NodeXL for Social Scientists
An Introduction to NodeXL for Social ScientistsDr Wasim Ahmed
 
Mining and analyzing social media part 1 - hicss47 tutorial - dave king
Mining and analyzing social media   part 1 - hicss47 tutorial - dave kingMining and analyzing social media   part 1 - hicss47 tutorial - dave king
Mining and analyzing social media part 1 - hicss47 tutorial - dave kingDave King
 
CS6010 Social Network Analysis Unit V
CS6010 Social Network Analysis Unit VCS6010 Social Network Analysis Unit V
CS6010 Social Network Analysis Unit Vpkaviya
 
User Behaviour Pattern Recognition On Twitter Social Network
User Behaviour Pattern Recognition On Twitter Social NetworkUser Behaviour Pattern Recognition On Twitter Social Network
User Behaviour Pattern Recognition On Twitter Social NetworkGeorge Konstantakopoulos
 
Evolving social data mining and affective analysis
Evolving social data mining and affective analysis  Evolving social data mining and affective analysis
Evolving social data mining and affective analysis Athena Vakali
 
Social Friend Overlying Communities Based on Social Network Context
Social Friend Overlying Communities Based on Social Network ContextSocial Friend Overlying Communities Based on Social Network Context
Social Friend Overlying Communities Based on Social Network ContextIRJET Journal
 
Sampling of User Behavior Using Online Social Network
Sampling of User Behavior Using Online Social NetworkSampling of User Behavior Using Online Social Network
Sampling of User Behavior Using Online Social NetworkEditor IJCATR
 
Data mining in social network
Data mining in social networkData mining in social network
Data mining in social networkakash_mishra
 

Similar a Social Media Mining - Chapter 2 (Graph Essentials) (20)

Web Mining
Web MiningWeb Mining
Web Mining
 
Q046049397
Q046049397Q046049397
Q046049397
 
Web Mining .ppt
Web Mining .pptWeb Mining .ppt
Web Mining .ppt
 
Web Mining .ppt
Web Mining .pptWeb Mining .ppt
Web Mining .ppt
 
SocialCom09-tutorial.pdf
SocialCom09-tutorial.pdfSocialCom09-tutorial.pdf
SocialCom09-tutorial.pdf
 
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social NetworksThe Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
 
Preso on social network analysis for rtp analytics unconference
Preso on social network analysis for rtp analytics unconferencePreso on social network analysis for rtp analytics unconference
Preso on social network analysis for rtp analytics unconference
 
Social Network Analysis Using Gephi
Social Network Analysis Using Gephi Social Network Analysis Using Gephi
Social Network Analysis Using Gephi
 
20120622 web sci12-won-marc smith-semantic and social network analysis of …
20120622 web sci12-won-marc smith-semantic and social network analysis of …20120622 web sci12-won-marc smith-semantic and social network analysis of …
20120622 web sci12-won-marc smith-semantic and social network analysis of …
 
Murphy Open Social Mapping Workshop
Murphy  Open Social Mapping WorkshopMurphy  Open Social Mapping Workshop
Murphy Open Social Mapping Workshop
 
Social Network Analysis with NodeXL Part 1
Social Network Analysis with NodeXL Part 1Social Network Analysis with NodeXL Part 1
Social Network Analysis with NodeXL Part 1
 
An Introduction to NodeXL for Social Scientists
An Introduction to NodeXL for Social ScientistsAn Introduction to NodeXL for Social Scientists
An Introduction to NodeXL for Social Scientists
 
Mining and analyzing social media part 1 - hicss47 tutorial - dave king
Mining and analyzing social media   part 1 - hicss47 tutorial - dave kingMining and analyzing social media   part 1 - hicss47 tutorial - dave king
Mining and analyzing social media part 1 - hicss47 tutorial - dave king
 
CS6010 Social Network Analysis Unit V
CS6010 Social Network Analysis Unit VCS6010 Social Network Analysis Unit V
CS6010 Social Network Analysis Unit V
 
User Behaviour Pattern Recognition On Twitter Social Network
User Behaviour Pattern Recognition On Twitter Social NetworkUser Behaviour Pattern Recognition On Twitter Social Network
User Behaviour Pattern Recognition On Twitter Social Network
 
Evolving social data mining and affective analysis
Evolving social data mining and affective analysis  Evolving social data mining and affective analysis
Evolving social data mining and affective analysis
 
Social Friend Overlying Communities Based on Social Network Context
Social Friend Overlying Communities Based on Social Network ContextSocial Friend Overlying Communities Based on Social Network Context
Social Friend Overlying Communities Based on Social Network Context
 
Sampling of User Behavior Using Online Social Network
Sampling of User Behavior Using Online Social NetworkSampling of User Behavior Using Online Social Network
Sampling of User Behavior Using Online Social Network
 
SSRI_pt1.ppt
SSRI_pt1.pptSSRI_pt1.ppt
SSRI_pt1.ppt
 
Data mining in social network
Data mining in social networkData mining in social network
Data mining in social network
 

Último

Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 

Último (20)

Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 

Social Media Mining - Chapter 2 (Graph Essentials)

  • 2. 2Social Media Mining Measures and Metrics 2Social Media Mining Graph Essentialshttp://socialmediamining.info/ Dear instructors/users of these slides: Please feel free to include these slides in your own material, or modify them as you see fit. If you decide to incorporate these slides into your presentations, please include the following note: R. Zafarani, M. A. Abbasi, and H. Liu, Social Media Mining: An Introduction, Cambridge University Press, 2014. Free book and slides at http://socialmediamining.info/ or include a link to the website: http://socialmediamining.info/
  • 3. 3Social Media Mining Measures and Metrics 3Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bridges of Konigsberg • There are 2 islands and 7 bridges that connect the islands and the mainland • Find a path that crosses each bridge exactly once City Map (From Wikipedia) Graph Representation
  • 4. 4Social Media Mining Measures and Metrics 4Social Media Mining Graph Essentialshttp://socialmediamining.info/ Modeling the Problem by Graph Theory • The key to solve this problem is an ingenious graph representation • Euler proved that since except for the starting and ending point of a walk, one has to enter and leave all other nodes, thus these nodes should have an even number of bridges connected to them • This property does not hold in this problem
  • 5. 5Social Media Mining Measures and Metrics 5Social Media Mining Graph Essentialshttp://socialmediamining.info/ Networks • A network is a graph. – Elements of the network have meanings • Network problems can usually be represented in terms of graph theory Twitter example: • Given a piece of information, a network of individuals, and the cost to propagate information among any connected pair, find the minimum cost to disseminate the information to all individuals.
  • 6. 6Social Media Mining Measures and Metrics 6Social Media Mining Graph Essentialshttp://socialmediamining.info/ Food Web
  • 7. 7Social Media Mining Measures and Metrics 7Social Media Mining Graph Essentialshttp://socialmediamining.info/ Network are Pervasive CitationNetworks TwitterNetworks
  • 8. 8Social Media Mining Measures and Metrics 8Social Media Mining Graph Essentialshttp://socialmediamining.info/ Internet
  • 9. 9Social Media Mining Measures and Metrics 9Social Media Mining Graph Essentialshttp://socialmediamining.info/ Network of the US Interstate Highways
  • 10. 10Social Media Mining Measures and Metrics 10Social Media Mining Graph Essentialshttp://socialmediamining.info/ NY State Road Network
  • 11. 11Social Media Mining Measures and Metrics 11Social Media Mining Graph Essentialshttp://socialmediamining.info/ Social Networks and Social Network Analysis • A social network – A network where elements have a social structure • A set of actors (such as individuals or organizations) • A set of ties (connections between individuals) • Social networks examples: – your family network, your friend network, your colleagues ,etc. • To analyze these networks we can use Social Network Analysis (SNA) • Social Network Analysis is an interdisciplinary field from social sciences, statistics, graph theory, complex networks, and now computer science
  • 12. 12Social Media Mining Measures and Metrics 12Social Media Mining Graph Essentialshttp://socialmediamining.info/ Social Networks: Examples High school friendship High school dating
  • 13. 13Social Media Mining Measures and Metrics 13Social Media Mining Graph Essentialshttp://socialmediamining.info/ Graph Basics
  • 14. 14Social Media Mining Measures and Metrics 14Social Media Mining Graph Essentialshttp://socialmediamining.info/ Nodes and Edges A network is a graph, or a collection of points connected by lines • Points are referred to as nodes, actors, or vertices (plural of vertex) • Connections are referred to as edges or ties Node Edge
  • 15. 15Social Media Mining Measures and Metrics 15Social Media Mining Graph Essentialshttp://socialmediamining.info/ Nodes or Actors • In a friendship social graph, nodes are people and any pair of people connected denotes the friendship between them • Depending on the context, these nodes are called nodes, or actors – In a web graph, “nodes” represent sites and the connection between nodes indicates web-links between them – In a social setting, these nodes are called actors – The size of the graph is
  • 16. 16Social Media Mining Measures and Metrics 16Social Media Mining Graph Essentialshttp://socialmediamining.info/ Edges • Edges connect nodes and are also known as ties or relationships • In a social setting, where nodes represent social entities such as people, edges indicate internode relationships and are therefore known as relationships or (social) ties • Number is edges (size of the edge-set) is denoted as
  • 17. 17Social Media Mining Measures and Metrics 17Social Media Mining Graph Essentialshttp://socialmediamining.info/ Directed Edges and Directed Graphs • Edges can have directions. A directed edge is sometimes called an arc • Edges are represented using their end-points . • In undirected graphs both representations are the same
  • 18. 18Social Media Mining Measures and Metrics 18Social Media Mining Graph Essentialshttp://socialmediamining.info/ Neighborhood and Degree (In-degree, out-degree) For any node 𝑣, in an undirected graph, the set of nodes it is connected to via an edge is called its neighborhood and is represented as 𝑁 𝑣 – In directed graphs we have incoming neighbors 𝑁𝑖𝑛 𝑣 (nodes that connect to 𝑣) and outgoing neighbors 𝑁𝑜𝑢𝑡 𝑣 . The number of edges connected to one node is the degree of that node (the size of its neighborhood) – Degree of a node 𝑖 is usually presented using notation 𝑑𝑖 In Directed graphs: – In-degrees is the number of edges pointing towards a node – Out-degree is the number of edges pointing away from a node
  • 19. 19Social Media Mining Measures and Metrics 19Social Media Mining Graph Essentialshttp://socialmediamining.info/ Degree and Degree Distribution • Theorem 1. The summation of degrees in an undirected graph is twice the number of edges • Lemma 1. The number of nodes with odd degree is even • Lemma 2. In any directed graph, the summation of in-degrees is equal to the summation of out-degrees,
  • 20. 20Social Media Mining Measures and Metrics 20Social Media Mining Graph Essentialshttp://socialmediamining.info/ Degree Distribution When dealing with very large graphs, how nodes’ degrees are distributed is an important concept to analyze and is called Degree Distribution is the number of nodes with degree 𝑑 (Degree sequence)
  • 21. 21Social Media Mining Measures and Metrics 21Social Media Mining Graph Essentialshttp://socialmediamining.info/ Degree Distribution Plot The 𝑥-axis represents the degree and the 𝑦-axis represents the fraction of nodes having that degree – On social networking sites There exist many users with few connections and there exist a handful of users with very large numbers of friends. (Power-law degree distribution) Facebook Degree Distribution
  • 22. 22Social Media Mining Measures and Metrics 22Social Media Mining Graph Essentialshttp://socialmediamining.info/ Subgraph • Graph 𝐺 can be represented as a pair where 𝑉 is the node set and 𝐸 is the edge set • is a subgraph of 1 23 546 1 2 3 5
  • 23. 23Social Media Mining Measures and Metrics 23Social Media Mining Graph Essentialshttp://socialmediamining.info/ • Adjacency Matrix • Adjacency List • Edge List Graph Representation
  • 24. 24Social Media Mining Measures and Metrics 24Social Media Mining Graph Essentialshttp://socialmediamining.info/ Graph Representation • Graph representation is straightforward and intuitive, but it cannot be effectively manipulated using mathematical and computational tools • We are seeking representations that can store these two sets in a way such that – Does not lose information – Can be manipulated easily by computers – Can have mathematical methods applied easily
  • 25. 25Social Media Mining Measures and Metrics 25Social Media Mining Graph Essentialshttp://socialmediamining.info/ Adjacency Matrix (a.k.a. sociomatrix)    ijA 0, otherwise 1, if there is an edge between nodes 𝑣𝑖 and 𝑣𝑗 Social media networks have very sparse Adjacency matrices Diagonal Entries are self-links or loops
  • 26. 26Social Media Mining Measures and Metrics 26Social Media Mining Graph Essentialshttp://socialmediamining.info/ Adjacency List • In an adjacency list for every node, we maintain a list of all the nodes that it is connected to • The list is usually sorted based on the node order or other preferences
  • 27. 27Social Media Mining Measures and Metrics 27Social Media Mining Graph Essentialshttp://socialmediamining.info/ Edge List • In this representation, each element is an edge and is usually represented as 𝑢, 𝑣 , denoting that node 𝑢 is connected to node 𝑣 via an edge
  • 28. 28Social Media Mining Measures and Metrics 28Social Media Mining Graph Essentialshttp://socialmediamining.info/ • Null, Empty, Directed/Undirected/Mixed, Simple/Multigraph, Weighted, Signed Graph, Webgraph Types of Graphs
  • 29. 29Social Media Mining Measures and Metrics 29Social Media Mining Graph Essentialshttp://socialmediamining.info/ Null Graph and Empty Graph • A null graph is one where the node set is empty (there are no nodes) – Since there are no nodes, there are also no edges • An empty graph or edge-less graph is one where the edge set is empty, • The node set can be non-empty. – A null-graph is an empty graph.
  • 30. 30Social Media Mining Measures and Metrics 30Social Media Mining Graph Essentialshttp://socialmediamining.info/ Directed/Undirected/Mixed Graphs The adjacency matrix for undirected graphs is symmetric (𝑨 = 𝑨 𝑻) • The adjacency matrix for directed graphs is often not symmetric (𝑨 ≠ 𝑨 𝑻) – 𝑨𝒊𝒋  𝑨𝒋𝒊 – We can have equality though
  • 31. 31Social Media Mining Measures and Metrics 31Social Media Mining Graph Essentialshttp://socialmediamining.info/ Simple Graphs and Multigraphs • Simple graphs are graphs where only a single edge can be between any pair of nodes • Multigraphs are graphs where you can have multiple edges between two nodes and loops • The adjacency matrix for multigraphs can include numbers larger than one, indicating multiple edges between nodes Simple graph Multigraph
  • 32. 32Social Media Mining Measures and Metrics 32Social Media Mining Graph Essentialshttp://socialmediamining.info/ Weighted Graph • A weighted graph 𝑮(𝑽, 𝑬, 𝑾) is one where edges are associated with weights – For example, a graph could represent a map where nodes are airports and edges are routes between them • The weight associated with each edge could represent the distance between the corresponding cities      vandbetween vedgenoisThere0, Rwj),or w(i,w ji ij ijA
  • 33. 33Social Media Mining Measures and Metrics 33Social Media Mining Graph Essentialshttp://socialmediamining.info/ Signed Graph • When weights are binary (0/1, -1/1, +/-) we have a signed graph • It is used to represent friends or foes • It is also used to represent social status
  • 34. 34Social Media Mining Measures and Metrics 34Social Media Mining Graph Essentialshttp://socialmediamining.info/ Webgraph • A webgraph is a way of representing how internet sites are connected on the web • In general, a web graph is a directed multigraph • Nodes represent sites and edges represent links between sites. • Two sites can have multiple links pointing to each other and can have loops (links pointing to themselves)
  • 35. 35Social Media Mining Measures and Metrics 35Social Media Mining Graph Essentialshttp://socialmediamining.info/ Webgraph Government Agencies Bow-tie structure Broder et al – 200 million pages, 1.5 billion links
  • 36. 36Social Media Mining Measures and Metrics 36Social Media Mining Graph Essentialshttp://socialmediamining.info/ • Adjacent nodes/Edges, Walk/Path/Trail/Tour/Cycle Connectivity in Graphs
  • 37. 37Social Media Mining Measures and Metrics 37Social Media Mining Graph Essentialshttp://socialmediamining.info/ Adjacent nodes and Incident Edges Two nodes are adjacent if they are connected via an edge. Two edges are incident, if they share on end- point When the graph is directed, edge directions must match for edges to be incident An edge in a graph can be traversed when one starts at one of its end-nodes, moves along the edge, and stops at its other end-node.
  • 38. 38Social Media Mining Measures and Metrics 38Social Media Mining Graph Essentialshttp://socialmediamining.info/ Walk, Path, Trail, Tour, and Cycle Walk: A walk is a sequence of incident edges visited one after another – Open walk: A walk does not end where it starts – Closed walk: A walk returns to where it starts • Representing a walk: – A sequence of edges: 𝑒1, 𝑒2, … , 𝑒𝑛 – A sequence of nodes: 𝑣1, 𝑣2, … , 𝑣𝑛 • Length of walk: the number of visited edges Length of walk= 8
  • 39. 39Social Media Mining Measures and Metrics 39Social Media Mining Graph Essentialshttp://socialmediamining.info/ Trail • A trail is a walk where no edge is visited more than once and all walk edges are distinct • A closed trail (one that ends where it starts) is called a tour or circuit
  • 40. 40Social Media Mining Measures and Metrics 40Social Media Mining Graph Essentialshttp://socialmediamining.info/ Path • A walk where nodes and edges are distinct is called a path and a closed path is called a cycle • The length of a path or cycle is the number of edges visited in the path or cycle Length of path= 4
  • 41. 41Social Media Mining Measures and Metrics 41Social Media Mining Graph Essentialshttp://socialmediamining.info/ Examples Eulerian Tour • All edges are traversed only once – Konigsberg bridges Hamiltonian Cycle • A cycle that visits all nodes
  • 42. 42Social Media Mining Measures and Metrics 42Social Media Mining Graph Essentialshttp://socialmediamining.info/ Random walk • A walk that in each step the next node is selected randomly among the neighbors – The weight of an edge can be used to define the probability of visiting it – For all edges that start at 𝑣𝑖 the following equation holds
  • 43. 43Social Media Mining Measures and Metrics 43Social Media Mining Graph Essentialshttp://socialmediamining.info/ Random Walk: Example Mark a spot on the ground – Stand on the spot and flip the coin (or more than one coin depending on the number of choices such as left, right, forward, and backward) – If the coin comes up heads, turn to the right and take a step – If the coin comes up tails, turn to the left and take a step – Keep doing this many times and see where you end up
  • 44. 44Social Media Mining Measures and Metrics 44Social Media Mining Graph Essentialshttp://socialmediamining.info/ Connectivity • A node 𝒗𝒊 is connected to node 𝒗𝒋 (or reachable from 𝑣𝑗) if it is adjacent to it or there exists a path from 𝑣𝑖 to 𝑣𝑗. • A graph is connected, if there exists a path between any pair of nodes in it – In a directed graph, a graph is strongly connected if there exists a directed path between any pair of nodes – In a directed graph, a graph is weakly connected if there exists a path between any pair of nodes, without following the edge directions • A graph is disconnected, if it not connected.
  • 45. 45Social Media Mining Measures and Metrics 45Social Media Mining Graph Essentialshttp://socialmediamining.info/ Connectivity: Example
  • 46. 46Social Media Mining Measures and Metrics 46Social Media Mining Graph Essentialshttp://socialmediamining.info/ Component • A component in an undirected graph is a connected subgraph, i.e., there is a path between every pair of nodes inside the component • In directed graphs, we have a strongly connected components when there is a path from 𝑢 to 𝑣 and one from 𝑣 to 𝑢 for every pair of nodes 𝑢 and 𝑣. • The component is weakly connected if replacing directed edges with undirected edges results in a connected component
  • 47. 47Social Media Mining Measures and Metrics 47Social Media Mining Graph Essentialshttp://socialmediamining.info/ Component Examples: 3 components 3 Strongly-connected components
  • 48. 48Social Media Mining Measures and Metrics 48Social Media Mining Graph Essentialshttp://socialmediamining.info/ Shortest Path • Shortest Path is the path between two nodes that has the shortest length. – We denote the length of the shortest path between nodes 𝑣𝑖 and 𝑣𝑗 as 𝑙𝑖,𝑗 • The concept of the neighborhood of a node can be generalized using shortest paths. An n-hop neighborhood of a node is the set of nodes that are within n hops distance from the node.
  • 49. 49Social Media Mining Measures and Metrics 49Social Media Mining Graph Essentialshttp://socialmediamining.info/ Diameter The diameter of a graph is the length of the longest shortest path between any pair of nodes between any pairs of nodes in the graph • How big is the diameter of the web?
  • 50. 50Social Media Mining Measures and Metrics 50Social Media Mining Graph Essentialshttp://socialmediamining.info/ Adjacency Matrix and Connectivity • Consider the following adjacency matrix • Number of Common neighbors between node 𝑖 and node 𝑗 • That’s element of [ij] of matrix 𝐴 × 𝐴 𝑇 = 𝐴2 • Common neighbors are paths of length 2 • Similarly, what is 𝐴3? ji
  • 51. 51Social Media Mining Measures and Metrics 51Social Media Mining Graph Essentialshttp://socialmediamining.info/ Special Graphs
  • 52. 52Social Media Mining Measures and Metrics 52Social Media Mining Graph Essentialshttp://socialmediamining.info/ Trees and Forests • Trees are special cases of undirected graphs • A tree is a graph structure that has no cycle in it • In a tree, there is exactly one path between any pair of nodes • In a tree: |𝑉| = |𝐸| + 1 • A set of disconnected trees is called a forest A forest containing 3 trees
  • 53. 53Social Media Mining Measures and Metrics 53Social Media Mining Graph Essentialshttp://socialmediamining.info/ Special Subgraphs
  • 54. 54Social Media Mining Measures and Metrics 54Social Media Mining Graph Essentialshttp://socialmediamining.info/ Spanning Trees • For any connected graph, the spanning tree is a subgraph and a tree that includes all the nodes of the graph • There may exist multiple spanning trees for a graph. • In a weighted graph, the weight of a spanning tree is the summation of the edge weights in the tree. • Among the many spanning trees found for a weighted graph, the one with the minimum weight is called the minimum spanning tree (MST)
  • 55. 55Social Media Mining Measures and Metrics 55Social Media Mining Graph Essentialshttp://socialmediamining.info/ Steiner Trees Given a weighted graph G(V, E, W) and a subset of nodes 𝑉’ ⊆ 𝑉 (terminal nodes ), the Steiner tree problem aims to find a tree such that it spans all the 𝑉’ nodes and the weight of this tree is minimized What can be the terminal set here?
  • 56. 56Social Media Mining Measures and Metrics 56Social Media Mining Graph Essentialshttp://socialmediamining.info/ Complete Graphs • A complete graph is a graph where for a set of nodes 𝑉, all possible edges exist in the graph • In a complete graph, any pair of nodes are connected via an edge
  • 57. 57Social Media Mining Measures and Metrics 57Social Media Mining Graph Essentialshttp://socialmediamining.info/ Planar Graphs A graph that can be drawn in such a way that no two edges cross each other (other than the endpoints) is called planar Planar Graph Non-planar Graph
  • 58. 58Social Media Mining Measures and Metrics 58Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bipartite Graphs A bipartite graph 𝐺(𝑉, 𝐸) is a graph where the node set can be partitioned into two sets such that, for all edges, one end-point is in one set and the other end-point is in the other set.
  • 59. 59Social Media Mining Measures and Metrics 59Social Media Mining Graph Essentialshttp://socialmediamining.info/ Affiliation Networks An affiliation network is a bipartite graph. If an individual is associated with an affiliation, an edge connects the corresponding nodes.
  • 60. 60Social Media Mining Measures and Metrics 60Social Media Mining Graph Essentialshttp://socialmediamining.info/ People Companies Affiliation Networks: Membership Affiliation of people on corporate boards of directors
  • 61. 61Social Media Mining Measures and Metrics 61Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bipartite Representation / one-mode Projections • We can save some space by keeping membership matrix X – What is 𝑋𝑋 𝑇? – What is 𝑋 𝑇 𝑋? Similarity between users - [Bibliographic Coupling] Similarity between groups - [Co-citation] Elements on the diagonal are number of groups the user is a member of OR number of users in the group
  • 62. 62Social Media Mining Measures and Metrics 62Social Media Mining Graph Essentialshttp://socialmediamining.info/ Social-Affiliation Network Social-Affiliation network is a combination of a social network and an affiliation network
  • 63. 63Social Media Mining Measures and Metrics 63Social Media Mining Graph Essentialshttp://socialmediamining.info/ Regular Graphs • A regular graph is one in which all nodes have the same degree • Regular graphs can be connected or disconnected • In a 𝑘-regular graph, all nodes have degree 𝑘 • Complete graphs are examples of regular graphs Regular graph With 𝑘 = 3
  • 64. 64Social Media Mining Measures and Metrics 64Social Media Mining Graph Essentialshttp://socialmediamining.info/ Egocentric Networks • Egocentric network: A focal actor (ego) and a set of alters who have ties with the ego • Usually there are limitations for nodes to connect to other nodes or have relation with other nodes – Example: In a network of mothers and their children: • Each mother only holds mother-children relations with her own children • Additional examples of egocentric networks are Teacher-Student or Husband-Wife
  • 65. 65Social Media Mining Measures and Metrics 65Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bridges (cut-edges) • Bridges are edges whose removal will increase the number of connected components
  • 66. 66Social Media Mining Measures and Metrics 66Social Media Mining Graph Essentialshttp://socialmediamining.info/ Graph Algorithms
  • 67. 67Social Media Mining Measures and Metrics 67Social Media Mining Graph Essentialshttp://socialmediamining.info/ Graph/Network Traversal Algorithms
  • 68. 68Social Media Mining Measures and Metrics 68Social Media Mining Graph Essentialshttp://socialmediamining.info/ Graph/Tree Traversal • We are interested in surveying a social media site to computing the average age of its users – Start from one user; – Employ some traversal technique to reach her friends and then friends’ friends, … • The traversal technique guarantees that 1. All users are visited; and 2. No user is visited more than once. • There are two main techniques: – Depth-First Search (DFS) – Breadth-First Search (BFS)
  • 69. 69Social Media Mining Measures and Metrics 69Social Media Mining Graph Essentialshttp://socialmediamining.info/ Depth-First Search (DFS) • Depth-First Search (DFS) starts from a node 𝑣𝑖, selects one of its neighbors 𝑣𝑗 from 𝑁(𝑣𝑖) and performs Depth-First Search on 𝑣𝑗 before visiting other neighbors in 𝑁(𝑣𝑖) • The algorithm can be used both for trees and graphs – The algorithm can be implemented using a stack structure
  • 70. 70Social Media Mining Measures and Metrics 70Social Media Mining Graph Essentialshttp://socialmediamining.info/ DFS Algorithm
  • 71. 71Social Media Mining Measures and Metrics 71Social Media Mining Graph Essentialshttp://socialmediamining.info/ Depth-First Search (DFS): An Example
  • 72. 72Social Media Mining Measures and Metrics 72Social Media Mining Graph Essentialshttp://socialmediamining.info/ Breadth-First Search (BFS) • BFS starts from a node and visits all its immediate neighbors first, and then moves to the second level by traversing their neighbors. • The algorithm can be used both for trees and graphs – The algorithm can be implemented using a queue structure
  • 73. 73Social Media Mining Measures and Metrics 73Social Media Mining Graph Essentialshttp://socialmediamining.info/ BFS Algorithm
  • 74. 74Social Media Mining Measures and Metrics 74Social Media Mining Graph Essentialshttp://socialmediamining.info/ Breadth-First Search (BFS)
  • 75. 75Social Media Mining Measures and Metrics 75Social Media Mining Graph Essentialshttp://socialmediamining.info/ Finding Shortest Paths
  • 76. 76Social Media Mining Measures and Metrics 76Social Media Mining Graph Essentialshttp://socialmediamining.info/ Shortest Path When a graph is connected, there is a chance that multiple paths exist between any pair of nodes – In many scenarios, we want the shortest path between two nodes in a graph • How fast can I disseminate information on social media? Dijkstra’s Algorithm – Designed for weighted graphs with non-negative edges – It finds shortest paths that start from a provided node 𝑠 to all other nodes – It finds both shortest paths and their respective lengths
  • 77. 77Social Media Mining Measures and Metrics 77Social Media Mining Graph Essentialshttp://socialmediamining.info/ Dijkstra’s Algorithm: Finding the shortest path 1. Initiation: – Assign zero to the source node and infinity to all other nodes – Mark all nodes as unvisited – Set the source node as current 2. For the current node, consider all of its unvisited neighbors and calculate their tentative distances – If tentative distance is smaller than neighbor’s distance, then Neighbor’s distance = tentative distance 3. After considering all of the neighbors of the current node, mark the current node as visited and remove it from the unvisited set 4. If the destination node has been marked visited or if the smallest tentative distance among the nodes in the unvisited set is infinity, then stop 5. Set the unvisited node marked with the smallest tentative distance as the next "current node" and go to step 2 A visited node will never be checked again and its distance recorded now is final and minimal Tentative distance = current distance + edge weight
  • 78. 78Social Media Mining Measures and Metrics 78Social Media Mining Graph Essentialshttp://socialmediamining.info/ Dijkstra’s Algorithm: Execution Example
  • 79. 79Social Media Mining Measures and Metrics 79Social Media Mining Graph Essentialshttp://socialmediamining.info/ Dijkstra’s Algorithm: Notes • Dijkstra’s algorithm is source-dependent – Finds the shortest paths between the source node and all other nodes. • To generate all-pair shortest paths, – We can run Dijsktra’s algorithm 𝑛 times, or – Use other algorithms such as Floyd-Warshall algorithm. • If we want to compute the shortest path from source 𝑣 to destination 𝑑, – we can stop the algorithm once the shortest path to the destination node has been determined
  • 80. 80Social Media Mining Measures and Metrics 80Social Media Mining Graph Essentialshttp://socialmediamining.info/ Finding Minimum Spanning Tree
  • 81. 81Social Media Mining Measures and Metrics 81Social Media Mining Graph Essentialshttp://socialmediamining.info/ Prim’s Algorithm: Finding Minimum Spanning Tree Finds MST in a weighted graph 1. Selecting a random node and add it to the MST 2. Grows the spanning tree by selecting edges which have one endpoint in the existing spanning tree and one endpoint among the nodes that are not selected yet. Among the possible edges, the one with the minimum weight is added to the set (along with its end-point). 3. This process is iterated until the graph is fully spanned
  • 82. 82Social Media Mining Measures and Metrics 82Social Media Mining Graph Essentialshttp://socialmediamining.info/ Prim’s Algorithm Execution Example
  • 83. 83Social Media Mining Measures and Metrics 83Social Media Mining Graph Essentialshttp://socialmediamining.info/ Network Flow
  • 84. 84Social Media Mining Measures and Metrics 84Social Media Mining Graph Essentialshttp://socialmediamining.info/ Network Flow • Consider a network of pipes that connects an infinite water source to a water sink. – Given the capacity of these pipes, what is the maximum flow that can be sent from the source to the sink? • Parallel in Social Media: – Users have daily cognitive/time limits (the capacity, here) of sending messages (the flow) to others, – What is the maximum number of messages the network should be prepared to handle at any time?
  • 85. 85Social Media Mining Measures and Metrics 85Social Media Mining Graph Essentialshttp://socialmediamining.info/ Flow Network • A Flow network G(V,E,C) is a directed weighted graph, where we have the following: – ∀ (𝑢, 𝑣) ∈ 𝐸, 𝑐(𝑢, 𝑣) ≥ 0 defines the edge capacity. – When 𝑢, 𝑣 ∈ 𝐸, 𝑣, 𝑢 ∉ 𝐸 (opposite flow is impossible) – 𝑠 defines the source node and 𝑡 defines the sink node. An infinite supply of flow is connected to the source.
  • 86. 86Social Media Mining Measures and Metrics 86Social Media Mining Graph Essentialshttp://socialmediamining.info/ Flow • Given edges with certain capacities, we can fill these edges with the flow up to their capacities (capacity constraint) • The flow that enters any node other than source 𝑠 and sink 𝑡 is equal to the flow that exits it so that no flow is lost (flow conservation constraint) • ∀ (𝑢, 𝑣) ∈ 𝐸, 𝑓(𝑢, 𝑣) ≥ 0 defines the flow passing through the edge. • ∀ (𝑢, 𝑣) ∈ 𝐸, 0 ≤ 𝑓(𝑢, 𝑣) ≤ 𝑐(𝑢, 𝑣) • ∀𝑣 ∈ 𝑉 − 𝑠, 𝑡 , 𝑘: 𝑘,𝑣 ∈𝐸 𝑓 𝑘, 𝑣 = 𝑙:(𝑣,𝑙)∈𝐸 𝑓 𝑣, 𝑙 (capacity constraint) (flow conservation constraint)
  • 87. 87Social Media Mining Measures and Metrics 87Social Media Mining Graph Essentialshttp://socialmediamining.info/ A Sample Flow Network • Commonly, to visualize an edge with capacity 𝑐 and flow 𝑓 , we use the notation 𝑓/𝑐.
  • 88. 88Social Media Mining Measures and Metrics 88Social Media Mining Graph Essentialshttp://socialmediamining.info/ Flow Quantity • The flow quantity (or value of the flow) in any network is the amount of – Outgoing flow from the source minus the incoming flow to the source. – Alternatively, one can compute this value by subtracting the outgoing flow from the sink from its incoming value
  • 89. 89Social Media Mining Measures and Metrics 89Social Media Mining Graph Essentialshttp://socialmediamining.info/ What is the flow value? • 19 – 11+8 from s, or – 4+15 to t
  • 90. 90Social Media Mining Measures and Metrics 90Social Media Mining Graph Essentialshttp://socialmediamining.info/ Ford-Fulkerson Algorithm • Find a path from source to sink such that there is unused capacity for all edges in the path. • Use that capacity (the minimum capacity unused among all edges on the path) to increase the flow. • Iterate until no other path is available.
  • 91. 91Social Media Mining Measures and Metrics 91Social Media Mining Graph Essentialshttp://socialmediamining.info/ Residual Network • Given a flow network 𝐺(𝑉, 𝐸, 𝐶), we define another network 𝐺(𝑉, 𝐸 𝑅, 𝐶 𝑅) • This network defines how much capacity remains in the original network. • The residual network has an edge between nodes 𝑢 and 𝑣 if and only if either (𝑢, 𝑣) or (𝑣, 𝑢) exists in the original graph. – If one of these two exists in the original network, we would have two edges in the residual network: one from (𝑢, 𝑣) and one from (𝑣, 𝑢).
  • 92. 92Social Media Mining Measures and Metrics 92Social Media Mining Graph Essentialshttp://socialmediamining.info/ Intuition • When there is no flow going through an edge in the original network, a flow of as much as the capacity of the edge remains in the residual. • In the residual network, one has the ability to send flow in the opposite direction to cancel some amount of flow in the original network.
  • 93. 93Social Media Mining Measures and Metrics 93Social Media Mining Graph Essentialshttp://socialmediamining.info/ Residual Network (Example) • Edges that have zero capacity in the residual are not shown
  • 94. 94Social Media Mining Measures and Metrics 94Social Media Mining Graph Essentialshttp://socialmediamining.info/ Augmentation / Augmenting Paths 1. In the residual graph, when edges are in the same direction as the original graph, – Their capacity shows how much more flow can be pushed along that edge in the original graph. 2. When edges are in the opposite direction, – their capacities show how much flow can be pushed back on the original graph edge. • By finding a flow in the residual, we can augment the flow in the original graph.
  • 95. 95Social Media Mining Measures and Metrics 95Social Media Mining Graph Essentialshttp://socialmediamining.info/ Augmentation / Augmenting Paths • Any simple path from 𝑠 to 𝑡 in the residual graph is an augmenting path. – All capacities in the residual are positive, • These paths can augment flows in the original, thus increasing the flow. – The amount of flow that can be pushed along this path is equal to the minimum capacity along the path • The edge with the minimum capacity limits the amount of flow being pushed • We call the edge the Weak link
  • 96. 96Social Media Mining Measures and Metrics 96Social Media Mining Graph Essentialshttp://socialmediamining.info/ How do we augment? • Given flow 𝑓 (𝑢, 𝑣) in the original graph and flow 𝑓𝑅(𝑢, 𝑣) and 𝑓𝑅(𝑣, 𝑢) in the residual graph, we can augment the flow as follows: Flow Quantity: 1
  • 97. 97Social Media Mining Measures and Metrics 97Social Media Mining Graph Essentialshttp://socialmediamining.info/ Augmenting
  • 98. 98Social Media Mining Measures and Metrics 98Social Media Mining Graph Essentialshttp://socialmediamining.info/ The Ford-Fulkerson Algorithm
  • 99. 99Social Media Mining Measures and Metrics 99Social Media Mining Graph Essentialshttp://socialmediamining.info/ Maximum Bipartite Matching
  • 100. 10Social Media Mining Measures and Metrics 100Social Media Mining Graph Essentialshttp://socialmediamining.info/ Example • Given 𝑛 products and 𝑚 users – Some users are only interested in certain products – We have only one copy of each product. – Can be represented as a bipartite graph – Find the maximum number of products that can be bought by users • No two edges selected share a node Matching Maximum Matching
  • 101. 10Social Media Mining Measures and Metrics 101Social Media Mining Graph Essentialshttp://socialmediamining.info/ Matching Solved with Max-Flow • Create a flow graph 𝐺(𝑉’, 𝐸’, 𝐶) from our bipartite graph 𝐺(𝑉, 𝐸) 1. Set 𝑉’ = 𝑉 ∪ 𝑠 ∪ 𝑡 2. Connect all nodes in 𝑉𝐿 to 𝑠 and all nodes in 𝑉𝑅 to 𝑡 3. Set 𝑐(𝑢, 𝑣) = 1, for all edges in 𝐸’
  • 102. 10Social Media Mining Measures and Metrics 102Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bridges, Weak Ties, and Bridge Detection
  • 103. 10Social Media Mining Measures and Metrics 103Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bridge and a Local Bridge • Bridge: Bridges are edges whose removal will increase the number of connected components – Bridges are extremely rare in real-world social networks. • Local Bridge: when the endpoints have no friend in common – the removal increases the length of shortest path to more than 2 – Span of the local bridge: How much the distance between the endpoints would become if the edge is removed • Large span is desirable to find communities Source: Easley and Kleinberg – Networks, Crowds, and Markets
  • 104. 10Social Media Mining Measures and Metrics 104Social Media Mining Graph Essentialshttp://socialmediamining.info/ Strength of Ties • Assume that you can divide connections into two categories: – Strong tie (S): • friends – Weak ties (W): • acquaintances • Strong Triadic Closure: – Consider a node 𝒖 that has two strong ties to nodes 𝒗 and 𝒘 – If there is no edge between 𝒗 and 𝒘 (weak or strong tie) then 𝒖 does not exhibit a strong triadic closure
  • 105. 10Social Media Mining Measures and Metrics 105Social Media Mining Graph Essentialshttp://socialmediamining.info/ Connection between Bridges and Tie Strength Why? If a node exhibits Strong Triadic Closure and has at least two strong ties, then if it part of a local bridge, that bridge must be a weak tie Source: Easley and Kleinberg – Networks, Crowds, and Markets
  • 106. 10Social Media Mining Measures and Metrics 106Social Media Mining Graph Essentialshttp://socialmediamining.info/ Generalizing to Real-World Networks • Consider a cell-phone network – We have an edge if both end points call each other – Tie Strength: it does not have to be weak/strong • For (𝑢, 𝑣), the number of minutes spent 𝑢 and 𝑣 spent talking to each other on the phone – Local Bridge: can be generalized using neighborhood overlap: The numerator is called embeddedness of an edge When numerator is zero we have a local bridge Tie Strength Neighborhood Overlap
  • 107. 10Social Media Mining Measures and Metrics 107Social Media Mining Graph Essentialshttp://socialmediamining.info/ Bridge Detection

Notas del editor

  1. Graph theory (more on topology, Poincare conjecture) Network theory (less abstract, nodes and edges have meanings, hence, often optimization problems arise)
  2. Twitter Network: http://blog.ouseful.info/2010/09/13/first-pass-quick-look-at-the-uk-mps-twitter-network/ http://scienceoftheinvisible.blogspot.com/2008/05/network-arithmetic.html Citation Network: http://www.cmth.bnl.gov/~maslov/citerank/HowItWorks.php http://www.public.asu.edu/~majansse/pubs/papernetwork2.jpg
  3. http://antiwar.com/blog/2006/06/27/defense-highways/
  4. http://www.autoblog.com/2011/12/21/new-art-reimagines-u-s-road-network-system-as-a-subway-map/
  5. http://en.wikipedia.org/wiki/Social_network Network science studies the laws and patterns of different networks in one context.
  6. http://www-personal.umich.edu/~mejn/networks/ James Moody, Race, school integration, and friendship segregation in America, American Journal of Sociology 107, 679-716 (2001): Yellow = girls, Green = boys, Red = sexually active High school dating: Data drawn from Peter S. Bearman, James Moody, and Katherine Stovel, Chains of affection: The structure of adolescent romantic and sexual networks, American Journal of Sociology 110, 44-91 (2004) image was made by M Newman
  7. It is important for social network analysis as a pair can have more than one relations.
  8. Image: http://www.cs.ucr.edu/~neal/2004/cs141/?ShortestPathsByDijkstras
  9. Image: http://research.library.unt.edu/eotcd/wiki/File:gov_20.png
  10. http://www.cs.auckland.ac.nz/~jmor159/PLDS210/prim.html Prim's algorithm is very similar to Kruskal's: whereas Kruskal's "grows" a forest of trees, Prim's algorithm grows a single tree until it becomes the minimum spanning tree. Both algorithms use the greedy approach - they add the cheapest edge that will not cause a cycle. But rather than choosing the cheapest edge that will connect any pair of trees together, Prim's algorithm only adds edges that join nodes to the existing tree. (In this respect, Prim's algorithm is very similar to Dijkstra's algorithm for finding shortest paths.)
  11. Source: D. Easley and J. Kleinberg. Networks, Crowds, and Markets: Reasoning about a Highly Connected World. Cambridge University Press, 2010.
  12. Source: D. Easley and J. Kleinberg. Networks, Crowds, and Markets: Reasoning about a Highly Connected World. Cambridge University Press, 2010.