TransWikia.com

difference between unconditional and conditional community graphs

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"]

enter image description here

[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:

enter image description here

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:

  1. Can someone explain why the two community structures differ, although I use the same graph finalG in both cases and scc has the same directed linkages?
  2. What is that I am doing (without knowing) in the second case with connected components that create a large community excluding EST?
  3. I expected both cases to generate the same community structures because the graph finalG and the elements and linkages of the connected component scc are exactly the same.

Thanks for your explanations.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP