Data Structures & AlgorithmsVery hardGATE CS · Advanced
A flow network has source S = A and sink T = G (vertices A–G) with arcs and capacities: A→D (1), A→E (6), A→G (6), B→C (2), B→E (5), C→F (2), D→B (4), D→E (2), D→F (6), D→G (1), F→B (4), F→E (3). How many different minimum S–T cuts (sets of vertices on the source side) does it have?
- A. 1
- B. 2
- C. 3
- D. 4
Correct answer: C. 3
Compute the maximum flow (7), then count source-side sets whose outgoing capacity equals it: 3 distinct sets. The flow value equals the capacity of each of them, and uniqueness of the flow does not imply a unique cut.
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
- How many structurally different binary search trees can be built on the keys 1, 2, ..., 8 (all distinct shapes, one per key set) whose…
- A rooted tree has the vertices A–M with root A, given by parents: A is the parent of B, B is the parent of C, B is the parent of D, B is…
- A weighted undirected graph on A–H has the edges (weights): A–D (16), A–E (22), A–F (26), A–G (5), A–H (4), B–C (9), B–H (23), C–D (13)…
- Keys 45, 25, 65, 15, 35, 55, 75, 30 are inserted in this order into an empty binary search tree. What is its postorder traversal?
- What is the maximum number of nodes in a binary tree of height 5, where the height is the number of edges on the longest root-to-leaf path?
- A complete binary tree stored level by level has exactly 40 nodes. How many of them are leaves?