networking_flow.minimum_cut

Attributes

test_graph

Functions

bfs(graph, s, t, parent)

mincut(graph, source, sink)

This array is filled by BFS and to store path

Module Contents

networking_flow.minimum_cut.bfs(graph, s, t, parent)
networking_flow.minimum_cut.mincut(graph, source, sink)

This array is filled by BFS and to store path >>> mincut(test_graph, source=0, sink=5) [(1, 3), (4, 3), (4, 5)]

networking_flow.minimum_cut.test_graph = [[0, 16, 13, 0, 0, 0], [0, 0, 10, 12, 0, 0], [0, 4, 0, 0, 14, 0], [0, 0, 9, 0, 0, 20], [0, 0, 0,...