Graph Theory37 sections · 1633 units
Open in Course

Handling Bidirectional Roads

(Each road becomes two edges)

Since roads are bidirectional, represent each road as two directed edges: one from uu to vv and one from vv to uu, both with capacity 11. This is standard for flow networks. When you block a road, you block both directions. In the cut, you might see (u,v)(u, v) from SS to TT or (v,u)(v, u) from SS to TT, but they represent the same physical road.

When listing cut edges, make sure you do not count the same road twice. Use the original edge list to avoid duplicates.