Back to the 2024 paper

Module 3: Graph and Tree Algorithms

20247m

Given the flow network below with capacities:

EDGE CAPACITY
S -> A 10
S -> C 10
A -> B 4
A -> C 2
C -> D 9
B -> T 10
D -> B 6
D -> T 10

Answer the following:
(i) Use the Ford-Fulkerson algorithm to find the maximum flow from source (S) to sink (T).
(ii) Show the augmenting paths selected, the bottleneck capacities on each path, and the updated residual capacities after each augmentation.
(iii) Calculate the final maximum flow value.

Worked SolutionAI Assisted

Ford-Fulkerson Max Flow — S→A10,S→C10,A→B4,A→C2,C→D9,B→T10,D→B6,D→T10S→A10,S→C10,A→B4,A→C2,C→D9,B→T10,D→B6,D→T10

Network Structure

Source SS, sink TT, intermediate A,B,C,D.

Execution (Edmonds-Karp BFS for shortest augmenting path, but any path works; show one valid sequence)

Init flow 0, residual = capacities.

Augment 1: S−A−B−TS-A-B-T bottlenecks min(10,4,10)=4

  • Push 4: residual S−AS-A6, A−BA-B0, B−TB-T6. Flow=4

Augment 2: S−A−C−D−TS-A-C-D-T (via A→CA→C)

  • Path capacities: S-A6, A-C2, C-D9, D-T10 → bottleneck 2
  • Push 2: S−AS-A4, A−CA-C0, C−DC-D7, D−TD-T8. Flow=6
  • Note alternative S−C−D−TS-C-D-T also available but we use through A to show.

Augment 3: S−C−D−TS-C-D-T bottleneck min(S-C10, C-D7, D-T8)=7

  • Push 7: S−CS-C3, C−DC-D0, D−TD-T1. Flow=13

Augment 4: S−C−D−B−TS-C-D-B-T ??? Need residual check: After 1, A→BA→B saturated, but reverse B→AB→A 4 exists. However D→BD→B6 is forward.
Path S−CS-C3 → C−DC-D is 0 residual (saturated) so no. Let's instead use remaining S−AS-A4 → but A−CA-C0 and A−BA-B0 blocked, so S−AS-A cannot reach T via A. So remaining flow must go S−C−D−B−TS-C-D-B-T if C−DC-D0 no. Actually after step3 C−DC-D0, so D only reachable not via C. So need alternative.

Let's choose better order: Instead of exhausting C-D early, more systematic:

Re-run with better path selection (standard max flow =13? Let's compute min cut).

Min Cut analysis: Cut (S,A)(S,A)? Edges crossing: S−AS-A10 + S−CS-C10 =20. Cut (S,A,C)(S,A,C) → edges A−BA-B4, C−DC-D9 → 13. Cut (S,A,C,D)(S,A,C,D) → A−BA-B4, D−BD-B6? Actually D−BD-B internal, B−TB-T10, D−TD-T10 → cut includes B−TB-T10 + D−TD-T10 =20? Wait compute: Partition {S,A,C}\{S,A,C\} vs {B,D,T}\{B,D,T\} edges A−BA-B4, C−DC-D9 →13. Add D→TD→T and B→TB→T are from right to T but crossing? Actually T in right, B,D in right, so not crossing? Need correct: Let's compute max flow via brute: The bottleneck is C−DC-D9 + A−BA-B4 =13, and S−CS-C10 + A−BA-B4 =14, so min is 13. So max flow =13 (limited by A−BA-B4 + C−DC-D9). Another cut {S,A,C,D}\{S,A,C,D\} vs {B,T}\{B,T\} edges A−BA-B4 + D−BD-B6 + D−TD-T10 =20? Not min. So max is 13.

Our earlier flow 13 already achievable (4+2+7=13). After step3 flow=13, indeed max reached.
Check residual: S−AS-A4, S−CS-C3 remain but no path to T because A−BA-B0, A−CA-C0, C−DC-D0 blocks; alternative S−CS-C → ??? D−BD-B still has 6 but DD unreachable (since C−DC-D0). So no augmenting path → algorithm terminates.

Updated Residual After Each Augmentation (summary)

Path Bottleneck Flow Residual key edges
S-A-B-T 4 4 S-A6, A-B0(+4 reverse), B-T6
S-A-C-D-T 2 6 S-A4, A-C0(+2), C-D7, D-T8
S-C-D-T 7 13 S-C3, C-D0(+7), D-T1

Max Flow value =13 (4 via A-B-T, 9 via C-D-T split as 2+7). Achieved.

Any valid augmenting order yielding 13 is acceptable; another order S-C-D-B-T (6) etc also yields 13.

Similar questions

Design and Analysis of Algorithms Consider a TSP with 4 cities A, B, C, D and the following distance matrix: | | A | B | C | D | |---|---|---|---|---| | A | 0 | 10 | 15 | 20 | | B | 10 | 0 | 35 | 25 | | C | 15 | 35 | 0 | 30 | | D | 20 | 25 | 30 | 0 | Answer the following: (i) Use the branch-and-bound algorithm to find the shortest possible route that visits all cities exactly once and returns to the starting city. (ii) Show the branching steps and calculate lower bounds for each partial solution. (iii) Identify how the bounding helps prune the search tree.20247mDesign and Analysis of Algorithms Which algorithm is typically used in maximum flow problems? (i) Kruskal's Algorithm (ii) Floyd-Warshall (iii) Ford-Fulkerson (iv) Prim's Algorithm20242mComputer NetworksAssume that source S and destination D are connected through two intermediate routers labelled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D. ![network_diagram](image_needs_human_verification_S-R-R-D_topology)20167mDesign and Analysis of Algorithms A graph with five nodes is represented using the adjacency list as follows: | | | | | | |---|---|---|---|---| | A | -> | B (10) | C (3) | | | B | -> | C (1) | D (5) | | | C | -> | B (4) | D (8) | E (2) | | D | -> | E (7) | | | | E | -> | D (9) | | | Answer the following: (i) Draw the graph for the above adjacency list. (ii) Write the algorithm for the Breadth-First Traversal (BFS). (iii) Show the BFS traversal of the graph with the starting node as A.20247m
Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.