where e ij is the fraction of all edges in the network that link nodes in community i to nodes in community j, and a i~X j e ij [15] . Thus, a i represents the fraction of edges in the network that connect to nodes in community i. If edges were to fall between nodes without any regard for communities, we would have e ij = a i a j , and thus Q = 0. There are numerous methods to Figure 6 . Assessing the speed of stochastic immunization algorithms acquaintance2 and CBF. The speed of an algorithm is assessed by counting the nodes that have to be visited by the algorithm until the desired vaccination coverage is achieved. Each visit is counted, even if the same node has been visited before. The bars show the difference of node visits (n visits) between the acquaintance2 method and the CBF method. Red bars mean the CBF method has visited fewer nodes -the difference is given by the height of the bar. A black bar indicates that the acquaintance2 methods has visited fewer nodes. With the exception of vaccination coverage 30% in the North Carolina network, the CBF method is always faster. (Data for speed comparison between acquaintance1 and CBF is not shown -the acquaintance1 method is always faster, but significantly less effectivesee middle column in Figure 5 ). doi:10.1371/journal.pcbi.1000736.g006