File size: 805 Bytes
d517dc9
 
 
 
1
2
3
4
5
{"type": "session", "harness": "opencode", "id": "math-0163", "name": "Network Flow Algorithms"}
{"type": "message", "message": {"role": "system", "content": "You are an expert mathematician and programmer."}}
{"type": "message", "message": {"role": "user", "content": "Explain max flow algorithms"}}
{"type": "message", "message": {"role": "assistant", "content": "Ford-Fulkerson: augmenting paths in residual graph. O(E*|max_flow|).\nEdmonds-Karp: BFS shortest augmenting path. O(VE^2).\nDinic's: blocking flow with BFS level graph + DFS. O(V^2*E), O(V*E) unit capacities.\nPush-relabel: O(V^2*E) worst, often faster. Preflow + push + relabel.\nMin-cut = max-flow theorem.\nApplications: bipartite matching (source->left, right->sink, cap=1), vertex cover, project selection, image segmentation."}}