max_flow algorithm ISAP
block algorithm on a tree