ContentsFoundations to FrontierBezhig

graduate_code/starters/flow.py

All lab code. Download this file.

# Exercise scaffold. Reference implementation is in a separate directory.
"""G03: Edmonds-Karp with a residual matrix and a min-cut certificate."""
from collections import deque

def max_flow(capacity, source, sink):
    raise NotImplementedError('Implement this contract from the book.')

def cut_capacity(capacity, reachable):
    raise NotImplementedError('Implement this contract from the book.')