Interconnected networks have been shown to be much more vulnerable to random
and targeted failures than isolated ones, raising several interesting questions
regarding the identification and mitigation of their risk. The paradigm to
address these questions is the percolation model, where the resilience of the
system is quantified by the dependence of the size of the largest cluster on
the number of failures. Numerically, the major challenge is the identification
of this cluster and the calculation of its size. Here, we propose an efficient
algorithm to tackle this problem. We show that the algorithm scales as O(N log
N), where N is the number of nodes in the network, a significant improvement
compared to O(N^2) for a greedy algorithm, what permits studying much larger
networks. Our new strategy can be applied to any network topology and
distribution of interdependencies, as well as any sequence of failures.Comment: 5 pages, 6 figure