Graph Theory37 sections · 1633 units
Open in Course

Algorithm - Path Decomposition

(Trace and subtract)

Compute max flow from s=1s = 1 to t=nt = n with unit capacities. Flow_value = max flow For i=1i = 1 to flow_value: path = [] current = ss While current eqt eq t: Find any edge (current,next)(current, next) with flow >0> 0.

Add (current,next)(current, next) to path. Decrease flow on (current,next)(current, next) by 11. Current = next Add path to result.

Output flow_value and all paths. Each iteration extracts one path and removes it from the flow.