The Directed Graph Model
A directed graph G consists of a set of vertices V and an edge set E of ordered pairs of vertices. For our purposes, each vertex corresponds to an artist. If
(
Y
,
X
)
∈
E
(Y,X) \in E
(Y,X)∈E then there is an arrow pointing from
Y
Y
Y to
X
X
X, called edge.
For instance,
V
=
{
i
n
f
l
u
e
n
c
e
r
,
f
o
l
l
o
w
e
r
}
,
E
=
{
(
i
n
f
l
u
e
n
c
e
r
,
f
o
l
l
o
w
e
r
)
}
V=\{influencer,follower\}, E = \{(influencer,follower)\}
V={influencer,follower},E={(influencer,follower)}, The relationship between influencers and followers can be represented in the graph G consist of V and E.
Construct a Directed Graph
In the directed graph G, each edge (arrow) represents a binary relation where a vertex points to another.
An example will explain this modeling process in more detail:
In Figure:G(Example), the vertex set contains
1
,
2
,
3
,
4
,
5
,
6
1, 2, 3, 4, 5, 6
1,2,3,4,5,6 .
The relationship of vertex includes:
- 6 points to 1,
- 1 points to 2 and 5,
- 2 points to 3,
- 3 points to 4,
- 4 points to 2 and 7.
Strongly Connected Component(SCC)
Strongly Connected: A directed graph is strongly connected if each vertex is reachable from other vertex.
Strongly Connected Components: Strongly connected is a binary equivalence relation, and the induced subgraphs of its equivalence classes are called strongly connected components.
s
c
c
(
G
)
scc(G)
scc(G): The set of strongly connected components in graph G.
In Figure: G(Eample),
s
c
c
(
G
)
=
{
[
2
,
3
,
4
]
}
scc(G) = \{[2,3,4]\}
scc(G)={[2,3,4]}
Directed Acyclic Graph(DAG)
If each strongly connected component of the original graph contract to a single vertex, the resulting graph is a directed acyclic graph called directed acyclic graph(DAG).
Find the strongly connected components( s c c ( G ) scc(G) scc(G)) in a directed graph G, replace the circle in G with the strongly connected components as a vertex, and get new directed graph C(must be DAG).