Mathematica Asked by Tugrul Temel on February 5, 2021
With this question, I like to know the difference between the community structure of an unconditional
directed graph and a conditional
community graph. Here is a minimal example.
1 I have a directed graph called finalG
below:
EdgeList[finalG]
finalG= {
"MA2" [DirectedEdge] "CO12", "MA2" [DirectedEdge]
"WHS", "MA2" [DirectedEdge] "AGF", "MA2" [DirectedEdge] "EST",
"MA2" [DirectedEdge] "CST", "CO12" [DirectedEdge] "MA2",
"CO12" [DirectedEdge] "AGF", "WHS" [DirectedEdge] "MA2",
"WHS" [DirectedEdge] "AGF", "WHS" [DirectedEdge] "CO12",
"AGF" [DirectedEdge] "CO12", "EST" [DirectedEdge] "WHS",
"EST" [DirectedEdge] "MA2", "CST" [DirectedEdge] "EST"
}
2 This list produces the following community structure:
CommunityGraphPlot[finalG, CommunityRegionStyle -> LightGray,
Method -> "Hierarchical"]
[3] Now I find connected components in the graph finalG
by
scc = ConnectedComponents[finalG]
which yields one connected component with elements, including
{{"MA2", "CO12", "WHS", "AGF", "EST", "CST"}}
[4] Finally, I like to draw the community structure contained in this single component by:
CommunityGraphPlot[
finalG, scc,
CommunityRegionStyle -> LightGray, Method -> "Hierarchical"
]
which yields the following community structure:
As is clear from my explanation, the difference between the two graphs (between 2 and [4]) of community structures is that the first one does not condition the graph to connected components, while the second one does. That is why (I think) we get two different community structures. In the community structure shown in [4], the vertex EST
is not a member of the community.
My questions are as follows:
finalG
in both cases and scc
has the same directed linkages?EST
?finalG
and the elements and linkages of the connected component scc
are exactly the same.Thanks for your explanations.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP