This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 GRAPH UTILITIES PACKAGE SYMBOL

# CommunityModularity

 gives the community modularity of a partition. gives the community modularity of an assignment.
• A community in a network is a group of vertices such that there is a higher density of edges within the group than between them.
• Given a graph , let the vertex set V be partitioned into k subsets such that each subset belongs to one community. The community modularity Q of this partition is defined as
• where is the percentage of number of edges that has both ends in community , and is the percentage of edges that start from community . In other words,
• and
• .
• The community modularity Q is a number less than or equal to 1. A large positive value indicates that the vertex partition gives significant community structure.
• The following option can be given:
 Weighted False whether edges with higher weights are preferred during matching
This defines a small graph:
This gives the community modularity, assuming a partition :
This gives the community modularity, assuming a partition :
This defines a small graph:
Needs["GraphUtilities`"]
 Out[3]=
This gives the community modularity, assuming a partition :
 Out[4]=
This gives the community modularity, assuming a partition :
 Out[5]=
 Options   (1)
This defines a graph with edge weights:
The community modularity of partition , ignoring edge weights:
The community modularity of partition , taking into account edge weights:
When taking into account edge weights, partition has higher community modularity: