Ford-Fullkerson and Edmond-Karp algorithm