Compute max flow from to with unit capacities. Flow_value = max flow For to flow_value: path = [] current = While current : Find any edge with flow .
Add to path. Decrease flow on by . Current = next Add path to result.
Output flow_value and all paths. Each iteration extracts one path and removes it from the flow.