A greedy descent algorithm written in python that iteratively adds a set of links on a Graph partitioned into two sets Q and C, in order to optimize a supermodular set function. The function represents the average time a random walker spends in a set of nodes Q before it is absorbed in a set of nodes C.
Necessary libraries to run the code are numpy, scipy and networkx.