Algorithm to reproduce percolation on a genetic graph.