An Efficient Hierarchy Algorithm for Community Detection in Complex Networks

Community structure is one of the most fundamental and important topology characteristics of complex networks. The research on communitystructurehaswideapplicationsandisveryimportantforanalyzingthetopologystructure,understandingthefunctions, findingthehiddenproperties,andforecastingthetime-varyingofthenetworks.Thispaperanalyzessomerelatedalgorithmsand proposesanewalgorithm—CNagglomerativealgorithmbasedongraphtheoryandthelocalconnectednessofnetworktofind communitiesinnetwork.Weshowthisalgorithmisdistributedandpolynomial;meanwhilethesimulationsshowitisaccurateand fine-grained.Furthermore,wemodifythisalgorithmtogetonemodifiedCNalgorithmandapplyittodynamiccomplexnetworks, andthesimulationsalsoverifythatthemodifiedCNalgorithmhashighaccuracytoo.


Introduction
Today, there are many complex networks in our life, such as, the Internet, the WWW, electrical power grids, transportation, neural networks, metabolic networks, and research collaboration networks.These networks have complex structures, large number of nodes, and complex interactions among the nodes.The research on complex networks has become one of the most popular areas because of their applications in our life and the importance to other research areas.These complex networks share some concepts or research methods.And the study of the complex network provides insight into their structures, properties, and emergent behaviors [1][2][3][4].Of particular interest are the rigorous methods for uncovering and understanding structure or subnetwork structure.For example, in social networks, the important structure is the social connection or community structure.Extracting community structure and leveraging them for predicting the emergent and critical casualties of large networks in a dynamic setting is of growing importance.
Community detection in complex networks has been the focus of many studies over the past eighty years [5].With the development of technology, we are getting more and more data in the complex networks.Nowadays, community detection, especially in large and time-varying social networks, plays a very important role in real life.Community does not have a unique definition, but generally speaking, it consists of a group of nodes that are relatively densely connected to each other but sparsely connected to other dense groups in the network.Communities are often given different physical meanings in different networks.For example, community represents different research areas in the network of citations between papers; it represents different research community in the research collaboration network; it represents some people studying or working at the same university, and so forth.The research of community structure is to analyze network topology, to understand the function of networks, and to discover the hidden patterns in networks and predict the behavior of networks.Community structure also has broad applications.It has currently been used in terrorist organization detection, organizational structure management, network analysis [6], search engines [7][8][9], and many other fields.
With the development of technology, we are getting more and more data from all kinds of networks, such as Facebook, twitter, QQ, and Weixin (two kinds of social networks used in China).But to our best knowledge, the big data processing is one challenge in many research fields nowadays, because the efficiency of previous algorithms can be not guaranteed with the increasing of the data and the networks.So, in complex networks, the efficient algorithm for community detection is also needed.

Related Work
The main algorithms to find community structure include traditional graph partitioning method, spectral bisection method, split method, clustering algorithm, and module optimization algorithm.These algorithms have the different assumptions and advantages when they applied in different occasions, so they have different applications in real life [10].Next we will review and analyze some of the existing methods for community detection.
For convenience, we firstly assume the network as a graph  = (, ), where  is the node set which corresponds to objects in the network, and  is the edge set which corresponds to the relationship between nodes.Generally, based on the different applications, the networks can be modeled as undirected graphs, directed graphs, weighted graphs, or hypergraphs.This paper mainly uses an undirected graph to represent a complex network and find the community structure of the network efficiently.

The Kernighan-Lin
Algorithm.The Kernighan-Lin algorithm, or the KL algorithm, proposed by Kernighan and Lin [11], originated from the graph partitioning algorithm, in other words, it is a graph partitioning method.Also, the KL algorithm is a heuristic optimization method, which divides the network into two given size communities, and the optimization goal is to minimize the difference of the number of connections between communities and the number within communities.Starting from the initial solution, it iterates until it cannot find any better candidate solution.The search strategy of the candidate solution is to move the nodes or exchange the nodes.So the solution it finds is often a local optimum rather than a global optimum.Meanwhile, we need to know the number and the size of existing communities in the network in advance, but it is hard to give the number and the size of the communities, and it is impossible in dynamic networks.So the KL algorithm is very sensitive to initial conditions and it is of low efficiency when applying it in some uncertain networks or dynamic networks.

Spectral Bisection Method
. Spectral bisection method is also one of the famous graph partitioning algorithms, which has been applied to complex networks clustering analysis [12] in recent years.The idea of the spectral bisection method mainly applies quadratic optimization techniques to minimize the given "cut" function.And a partition with the minimum "cut" is considered to be optimal.But minimizing "cut" function is NP-complete [13].Based on matrix theory, the spectral bisection method converts the minimum "cut" problem into quadratic optimization problem with constraints, and the approximate optimal solution of the quadratic optimization problems (i.e., the approximation of the optimal partition of the network) can be obtained by calculating the second smallest Laplace matrix eigenvectors of the network graph.Similar to the Kernighan-Lin algorithm, the spectral bisection method also partitions the network into two subnetworks.If we want a network to be divided into more, we need to apply the algorithm to subclusters; meanwhile, the spectral bisection method cannot automatically recognize the number of communities in the network.In other words, the spectral bisection method can be applied only to balanced networks.However, in reality, power law distribution is very common in complex networks, and there are many networks whose topology structures are unbalanced and complex.So graph partitioning methods have obvious limitation.

Divisive Algorithms.
In 2002, Flake and other scholars firstly proposed the MFC clustering algorithm based on maxflow min-cut theorem [14] in graph theory.MFC is one of the frequently used divisive algorithms.It assumes that the network's maximum flow is determined by the network "bottleneck" capacity.By the maximum flow minimum cut theorem, we can get the community structure by simply calculating the minimum cut [13].After that, Palla et al. proposed the GN algorithm in 2002 based on the similar method [6] and the difference is that the GN algorithm uses heuristic rules.Based on the assumption, the edge betweenness between the communities should be larger than that inside the communities.The GN algorithm yields a hierarchical clustering tree (dendrogram) in a top-down manner in the end.
Both MFC algorithm and GN algorithm are only applied in small and medium-sized networks because their time complexity.Besides that, neither of them gives a solution of how to obtain community structure of the networks from the obtained dendrogram finally.

Agglomerative Algorithm.
As for the agglomerative algorithm, the main works are contributed by Newman.Due to the higher time complexity of the GN algorithm, Newman proposed a fast algorithm [15], which can be used for complex networks.The algorithm is greedy, and begins by initializing the network as  communities.The main process is to merge two of the communities by the modularity value.At last the communities will be merged into one, and then the community structure can be obtained by manually choosing different locations in the hierarchical clustering tree.It decreases the time complexity of the algorithm to ( ( + ) ), but it is hard to get a good result if we want to get communities by computer from final hierarchical clustering tree, because the algorithm does not give the method of how to choose the suitable position in the hierarchical clustering tree for dividing the nodes into different communities.

The Analysis of the Previous Works.
Following the analysis described above, we can see that all the algorithms except Newman's fast algorithm quantify the community structure by the number of edges.We use Figure 1 (where the small circles represent the nodes, and the large dot line circle means one cutting line between the node set  and the other nodes in graph ) to demonstrate their same results if we only quantify the edges as the main strategy to find community structure.
In graph theory, an edge-cut is the set of the edges between two disjoint set of nodes.Therefore, the size of the edge-cut and the two disjoint node sets do not contribute to whether there is a community structure between the two node sets.Therefore, the size of the edge-cut is not a sufficient condition for the tightness of the two node sets.As shown in Figure 1, nodes 1, 2, and 3 form a complete graph, so the connectivity of the graph formed by nodes 1, 2, and 3 reaches highest with three nodes.But the existing algorithms will most likely divide node 1 and nodes 2 and 3 to different communities.Therefore, in addition to using the set of edges to quantify the community structure, we also need more criterions to improve the accuracy of the algorithm.
For the above reasons, we propose one hierarchy efficient algorithm for community detection which is different from the previous works in complex networks.Our algorithm not only considers the quantitative description of communities, but also considers the qualitative description based on the connectivity of the neighborhood of the node.The combination of them will make the algorithm more finegrained.And it will work on unbalanced networks, so it is a universality.In the end, we will output the different community structures according to the different conditions on the different levels automatically, which keeps from the disadvantage of manually dividing the nodes into communities.Moreover, this process gives a better understanding of the generating process of communities and the relationship among all communities, which is helpful for understanding the evolution of the community structures.

Definitions and Notations.
We use an undirected simple graph  = (, ) to model the network, so there is exactly one edge between any two nodes which have relationship.In this paper, we assume that  is connected, so there is at least one path between any two nodes, unless otherwise specified.For any two different nodes in the graph  with size , if there is one edge between them, then  is a complete graph, denoted by   .For any node , the degree of node  is the number of nodes (edges) connected to , denoted by   , and the set of nodes connected to node  is called the neighborhood of node , denoted by ().Clearly, And if  is the subgraph of , then the neighborhood of node  in  is defined as the intersection of  and the neighborhood of node  in  is denoted by   ().

Proposition 2. Suppose that the adjacency matrix of
Divide the neighborhood of node  into two subsets, and one of them is the neighborhood of node  in the subgraph , denoted by  in  , the other is the neighborhood of node  in -, denoted by  out  , where - means the graph after deleting the nodes of  from .
Although the communities in a network do not have widely accepted unique definition, generally, we can assume that community members (the nodes belonging to one community) are usually more tightly connected to its group than to other parts of the network.There were many suggestions about the quantitative definition of community structure in networks [15].The following is one of the frequently used ones.
The description of community focuses on the connection relationship within the community or between them, but Definition 3 defines the community based on the in-degree and out-degree of some nodes in one subgraph.Figure 1 has shown the problem if we only consider the number of the edges between two node sets, so Definition 3 sometimes cannot show the tightness of connection relationship within one group and between groups.Then the accuracy and universality of the algorithm cannot be guaranteed if the algorithm designed is exactly based on Definition 3. Therefore, we propose an algorithm for community detection which not only considers the number of edges within the subgraph, but also considers the local connectedness in the graph.
. ., V  (the subscripts are all distinct except the initial and the final nodes) such that V  and V +1 are adjacent for any , then the sequence then  is pancyclic.For any  (3 ≤  ≤ ), if any node of  lies in a -cycle, then  is vertex pancyclic.Definition 5. Let  = (, ) be a graph and ,  be two nonempty subsets of , and any edge of  has one end node in  and the other in , then  is called a bipartite graph, denoted by  , , where ,  denote the number of nodes in  and , respectively.If  = 1,  > 2, then the bipartite graph is called a star; if  = 3, then  1,3 is called a claw.Definition 6.Let  1 = ( 1 ,  1 ) and  2 = ( 2 ,  2 ) be two graphs.If there exists a correspondence between  1 and  2 , and under the correspondence, there is a correspondence between  1 and  2 as well, then  1 and  2 are isomorphic.If  does not contain any subgraph isomorphic to a claw, then  is claw-free.
Theorem 7 (see [16]).Let  = (, ) be a connected clawfree graph.If the neighborhood of any node of  is a connected subgraph of , then  is vertex pancyclic.
From Definitions 4 and 6 and Theorem 7, if the node neighborhood forms a connected graph, the nodes must lie in a triangle when the graph is claw-free; conversely, if a node lies in a triangle, we can always choose one set such that the neighborhood of any node in the set induces a connected subgraph.Therefore, the connectedness of the neighborhood in one graph also implies the connection relationship between the node and its neighborhood and describes qualitatively community structure to some extent.For example, in any complete graph, the neighborhood of any node is connected.In Figure 1, when the distance between nodes is relatively large in the subgraph , the community structure of the network is not obvious, or in other words, there exist some nodes that do not belong to any community, so the community structure is hierarchical and has a priority.But the previous works do not consider them.In this paper, we will consider the hierarchy and priority of the communities in the complex network based on the degree of the node and the connectivity of neighborhood.After that, we will give an agglomerative algorithm to find communities in complex networks.The algorithm will merge communities step by step based on the degree of nodes and connectedness of the neighborhood of the nodes, until all the communities merge into one.
Moreover, in our algorithm, we will output the different community structures by the different level conditions to reflect the hierarchy of the community structures.Because the largest difference of our algorithm is to consider the connectedness of the neighborhood of the nodes besides the in-degree and out-degree of the nodes within one group and between two groups, therefore the algorithm is referred to as the CN (connectedness of the neighborhood) agglomerative algorithm.

Algorithm and Analysis.
Let  = (, ) be a graph model of a network and [ 1 ,  2 ] be the induced graph of the edges with one end in  1 and the other end in  2 .The main idea of our algorithm is given as follows.
(1) In the initialization, we divide the network into several communities, and each community is a complete subgraph.This will improve the efficiency of the algorithm.Of course, the worst case is that each community consists of a single node, as the graph exactly contains a node is also considered as a complete graph to some extent.It is rare to find a graph with community structure but does not have any complete subgraphs, so this step is helpful to reduce the time of algorithm.If we want to find more complete subgraph, we can use the output-sensitive algorithm [17] to find the first complete subgraph in graph , and apply the algorithm to -; repeat the above step until the graph is empty.Because the output-sensitive algorithm is polynomial, so the time complexity of this step is polynomial as well.(2) As for the hierarchy of our algorithm, it not only means we can get a hierarchy clustering tree eventually, but also means we can output the community structures on demand timely.We will get the community structures by quantitative description and qualitative description, respectively.Firstly, based on the degree condition we get some communities and the corresponding community structure; secondly, we will get more communities and the corresponding community structure by the connectedness between nodes and neighborhood and then output the community sets and community structures, respectively.(3) In the end, the communities will be merged into one and get the hierarchy clustering tree.
Applying the above hierarchy method to get the communities and different community structures will show a simple evolution process of the community structures and the different community structures by the different conditions.We design our algorithm to output the communities in Steps 2 and 3 respectively and choose the optimum result of the actual community structure as needed.This avoids the inconvenience caused by manually choosing right positions like the GN algorithm or Newman fast algorithm.For example, without knowing the number of communities, the GN algorithm does not know when to stop deleting the edges that have the highest edge betweenness, and in the final hierarchical clustering tree achieved by Newman fast algorithm, in order to get the community structure it has to select the right positions and then disconnect it.Both of these algorithms using the manual method, different people may get different results, and the accuracy of the community analysis will be affected.
The algorithm for static complex networks will be given as follows in detail.First we give some notations and symbols used in our algorithm.
Generally, we use   ( ∈ {0, 1, 2, 3, . ..}) to denote the community structure and   ( ∈ {1, 2, . ..}) to denote one of communities in one community structure, which corresponds to one block in the adjacency matrix.Let  V represent the degree of node V in graph G and  in V represent the degree of node  in one community   .It means the intersection of the neighborhood of node  and the community   .In the adjacency matrix, it is corresponding to the number of 1's which are located on the intersection of node  and the nodes of community   .
Let |(  )| denote the number of the nodes in community   .We refer to |() ∩ (  )|, the number of neighborhood of node  in community   as  out V [  ] (Algorithm 1).In our CN agglomerative algorithm, we use the complete subgraph as the core and origin of the communities.Then we use the degree of the node in each community as one )   (, ), defined as the minimum value of elements in of the conditions to get bigger communities, line 4 in CN agglomerative algorithm gives the specific condition about the quantitative description.After that, line 17 gives the condition of qualitative description for communities.Therefore, we can get the different community structures by the different conditions.
Theorem 8.The computational complexity of CN agglomerative algorithm is (), where  is number of edges and  is the number of vertices.
Proof.Initially,  0 contains at most  communities, so there are at most  − 1 merging operations.Consequently, there are at most  − 1 iterations of all the three while loops.Further note that each iteration of every while loop runs in O(m) time.

Modified CN Algorithm for Dynamic Networks
The study of the community structure for a time-varying or dynamic network is still in its infancy.One of the reasons that hinder its development is the different controversial theories about communities, and lack of real world data reflecting the change between the time and the network [10].There is lack of efficient algorithm to detect the communities in timevarying networks [18].CN agglomerative algorithm can be modified to be applied in the time-varying networks.The CN agglomerative algorithm mainly finds the communities or community structures through the degree and the connectedness of the neighborhood of the nodes, so it is local and distributed, and the time complexity will not increase initialize a special set  to be an empty set //When new node  is added to the network (5) let  = [() ∪ ] (6) if there exists some  such that |() ∩ (  )| ≥    then (7) among all such is, find the one that maximizes |() ∩ (  )|, let the found index be  (8) insert node  into community   (9) else (10) insert node  into the special set  (11) if || >  // when more than  new nodes are inserted into , where  is a user-provided threshold then (12) apply CN agglomerative algorithm to , and get the first level community structure and the second level community structure (13) output the first level community structure and the second level community structure ( 14) endif ( 15) endif (16) if new community appears (17) output new community set (18) endif Algorithm 2: Modified CN algorithm.
as fast as the node number grows when applying it to timevarying network.The version of CN agglomerative algorithm applied in time-varying networks is called the modified CN algorithm, for convenience.
First of all, we can consider the network as static network when the time is fixed, so we can apply CN agglomerative algorithm in the static network to get the initial community structures on the two different levels.
Furthermore, we will merge the new nodes and edges to some communities and get new community structures with the networks changing.When a new node is added, we need to find the community that the new node may belong to.In the modified CN algorithm, we also firstly use the in-degree and out-degree of the new node in community detection, and then use the connectedness of the neighborhood of the new node in different communities.
Because the time-varying network frequently changes, and it is good to know the community structure at any time and evolution of the community structures, we will need to apply CN agglomerative algorithm to the snapshot of the network firstly, and then find the evolution of community structure by the modified CN algorithm (Algorithm 2).

Theorem 9. When a new node is added into the network, modified CN agglomerative algorithm runs in either 𝑂(𝑛) time or 𝑂(𝑚𝑛) time, depending on the current network structure, where 𝑚 is the number of edges and 𝑛 is the number of vertices.
Proof.There are three cases when a new node is added: (1) Lines 7-8 are executed; (2) Line 10 is executed; (3) Lines 10, 12, and 13 are executed.In the first two cases, the algorithm terminates in () time, since there are at most  communities.For the third case, CN agglomerative algorithm is called, so we have a running time of ().

Simulation and Evaluation
The experimental environment for the simulation in this section uses the Intel Core 2 Duo 2.26 GHz processor, 2 GB 1067 MHz DDR3 memory, 160 G hard drive, Mac OS X operating system, C + + 4.2.1 compiler, and Cytoscape drawing software.

Simulation on CN Agglomerative Algorithm.
First of all, we apply the CN agglomerative algorithm to the classic graph  [19] and graph .The results are shown in Figures 2 and  3, where level 1 in the hierarchical clustering tree indicates the initialization of the corresponding community structure, and level 2 and level 3 show the corresponding community structures after the implementation of Step 2 and Step 3.
From Figures 2 and 3, the graph  and graph  both have clear community structures, because the first level community structure is the same as the second level community structure.
For graph , we compared the efficiency of the different algorithms and the results are shown in Figure 4. Nodes  within a big circle belong to the same community; there are different community structures applying different algorithms on the graph .From Figure 4, we can see that the CN agglomerative algorithm is both accurate and fine-grained compared to the other algorithms.Furthermore, in order to verify the universality of our algorithm, we test the following random network, in which each community random network is defined as RN (, , , pin), where  is the number of network communities, s is the number of nodes, and  is the average degree of nodes in the network.The higher the pin value is, the more obvious the community structure of the random network is.Otherwise, the fuzzier the community structure is.In particular, when pin <0.5, the random network does not have community structures.Figure 5 shows the topology structure of the random graph with  decreasing.The simulation results on the accuracy of CN agglomerative algorithm and the community structures of network are shown in Figures 6 and 7, respectively, where  represents pin value.Figure 6 shows that the accuracy of the CN agglomerative algorithm is always high although  takes different values.In Figure 7, the number in the rectangle represents the size of the community; the first column shows the first level community structure, and the second column shows the second level community structure.
As the community structure is still not universally defined, the calculation of the accuracy has inevitable errors, but from Figure 7, we can see that the CN agglomerative algorithm is fine-grained compared to the graph in Figure 5, especially when  = 0.6.When  = 0.6, we can see that the topology structure of the random graph is becoming more random, and the community structure is becoming not obvious.But in Figure 7, we can find the difference between the first level community structure and the second level community structure when  = 0.6; it means our algorithm can still work when the network topology is random.Meanwhile, applying the different community structure, we can predict the evolution of the communities.
Moreover, in order to verify the accuracy of our algorithm in the real network, we collect data from QQ users.Let   denote this real network, and the size of   is  1 = 210.Figure 8 shows the topology structure of   .The ellipses in Figure 8   that graph   has the obvious community structure.The simulation results of CN agglomerative algorithm and the accuracy of each community are shown in Figures 9 and 10.In Figure 9, letter A means the real network, CN means the simulation results.

Simulation on Modified CN Algorithm.
In this section, we apply the modified CN algorithm to growing random network RN (, , , pin), which is one classic kind of time-varying network, and the parameters have the same meaning as the static random network.
In the growing random graphs, the pin value remains unchanged when the network grows, as shown in Figure 11, where pin = 0.9.For convenience, we denote pin as p, where the network growth process of the network topology increases from 80 nodes to 128 nodes.
The simulation topology in Figure 11 shows the final community structure in a network of 128 nodes.This section simulates the searching process of community structure in order to keep the accuracy of the community structure in network growth process.The simulation results are shown in Figures 12 and 13. Figure 12 shows the accuracy of the algorithm when applied to the growing random networks, and Figure 13 shows the change of the community structure in the algorithm implementation process, where the number of nodes in rectangle in Figure 13 represents the size of the corresponding communities, and the columns correspond the community structures of the random graphs with nodes 80, 96, 112, and 128 orderly; the number in the rectangle means the size of the community.
Finally, we apply the modified CN algorithm to the timevarying network of   .Let  1 =   denote the initial time of network, and we know that     1, it can be seen that our algorithm can still keep high accuracy and good performance when applied on the real networks.

Conclusions
A good algorithm must be able to determine the existence of community structures in a graph and determine the hierarchy of the communities.However, the existing community detection methods in complex networks have some limitations [20], as most of the algorithms only consider quantitative description of the communities when designing the algorithm.In this paper, the CN agglomerative algorithm proposed considers both the quantitative and qualitative properties of the communities, and we show that our algorithm runs in polynomial time.Furthermore, the simulations also show that our algorithm is highly accurate and finegrained.On the other hand, we proposed the modified CN algorithm for time-varying networks to find the community structure, which is a new idea for the design of time-varying network community detection algorithm.In addition, our algorithm can output the different community structures by   the different level conditions, which can better show the evolution of the community structure and the hierarchy between the different communities.More and more complex and dynamic networks have appeared, such as Facebook, Twitter, Weixin, and QQ.But the community detection algorithms mainly focus on static networks, so the community detection algorithm on time-varying network is urgent.In addition, finding the overlapping community structure in networks is also a popular research field.In fact, there is no unified quantitative definition for overlapping community [10].Therefore, there are still a lot of open questions in community detection of complex networks.The CN agglomerative algorithm uses the node's neighbor information to determine the community structure, therefore, the overlap between the different communities can be converted into a problem having the same node belonging to two or more than two different communities.For the overlap of the communities in networks, how to better quantify the relationship between the nodes and the communities is very important.The authors will continue to apply the idea of the CN agglomerative algorithm to overlap community in complex networks in the future.

Figure 2 :
Figure 2: Graph  and its community structure got by CN agglomerative algorithm.

Figure 3 :
Figure 3: Graph  and its community structure got by CN agglomerative algorithm.
represent the communities according to the real network, and the letters in ellipses mean the name of the communities.According to the topology structure of   , we know that |( 1 )| = 37, |( 2 )| = 42, |( 3 )| = 31, |( 4 )| = 52, and | ( 5 )| = 48, respectively.Applying CN agglomerative algorithm on graph   , there are two people in  1 that are divided into  2 , others are in the same community as the real.And the first level community structure is the same as the second level community structure, so it shows

Figure 12 :
Figure 12: Accuracy of modified CN algorithm on growing random graph with different .

Figure 17 :
Figure 17: The accuracy of our algorithm.
Input Adjacency matrix of the graph model Output Communities, community structures, hierarchy clustering tree (1)  0 ← { 1 ,  2 , . ..},  ← 0 (2) while           > 1 (3) perform a BFS traversal over the graph to compute for each vertex V ∈   (1)  in V , (2)  out V [  ], (3) (, ), defined as |{V ∈   |  in V ≤  out V [  ]}|, (4) (, ), defined as the minimum value of elements in { out V [  ]/ in V |V ∈   ,  in (4)ut Adjacency matrix of snapshot of the network Output Community structures (1) let  be the graph of the snapshot of the network (2) apply CN agglomerative algorithm to graph  and get the first level and second level community structures, respectively.Let all the communities in the two community structure be one set  0 = { 1 ,  2 , ...} (3) compute the minimum degree of the node in each community   , denoted by   (4) , the data we collected shows that  2 = 223 at time  2 ,  3 = 230 at time  3 , and  4 = 236 at time  4 .The community structure of the time-varying network of   according to the actual situation and the community structure of the growing   got by the modified CN algorithm are shown in Figure14.The first column shows the actual situation, the second column shows the community structure got by the modified CN algorithm, and the number in the rectangle means the size of the community.Figure15shows the accuracy of the modified CN algorithm with the time growing, and Table1shows the results of the modified CN algorithm, the column of A in Table1means the actual community structure, and CN means the simulation results.At the same time, if the number of nodes will reduce with the time growing, we can get the snapshot of the network and then output the communities again.Figures16 and 17show the results of our algorithm when the nodes disappeared.Every time we removed ten nodes and the corresponding edges randomly, the first level community structure is the same as the second level community structure.
1 = 210.With the timeFigure 7: Community structures of the random graph with different  got by CN agglomerative algorithm.5 Figure 8: The topology structure of   .5Figure10:The accuracy of CN agglomerative algorithm on each community.growing

Table 1 :
The results of the modified CN algorithm.
Figure 13: Community structure of the growing random graph got by the modified CN algorithm with different .Figure 14: The comparison of community structure of the growing   between our algorithm and the real network.Figure 15: The accuracy of the modified CN algorithm.