Data Structures & AlgorithmsVery hardGATE CSE · Advanced
In a flow network with capacities S->A 10, S->B 8, A->B 5, A->C 7, B->D 10, C->D 4, C->T 9, D->T 10, what is the maximum flow from S to T?
- A. 18
- B. 19
- C. 15
- D. 17
Correct answer: D. 17
The cut separating {S, A, B} from {C, D, T} has capacity A->C 7 + B->D 10 = 17, and 17 units can be routed, so max flow = min cut = 17.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- A directed graph has edges 1->2, 2->3, 2->5, 3->1, 3->4, 4->8, 5->6, 6->5, 6->7, 7->8, 8->4, 9->7, 9->8. How many strongly connected…
- A max-heap is built from the ascending array 1, 2, ..., 15 in two ways: (a) inserting the elements one at a time with sift-up, (b) the…
- A DAG has edges A->B, A->C, B->D, C->D, E->C and F->E (six vertices). How many distinct topological orderings does it have?
- What is the minimum number of nodes in an AVL tree of height 7, where a single-node tree has height 0?
- The Floyd-Warshall algorithm runs on the 4-vertex directed graph with weights 1->2: 3, 1->4: 7, 2->1: 8, 2->3: 2, 3->1: 5, 3->4: 1, 4->1…
- A weighted graph has vertices A, B, C, D and edges A-B 1, B-C 1, C-A 1, C-D 2, B-D 2, A-D 2. How many distinct minimum spanning trees does…