CS FundamentalsVery hardGATE CS

Synchronous Bellman–Ford runs from S on an undirected graph S–A 4, S–B 1, B–A 2, A–C 1, B–C 6, C–D 2, A–D 7. In each round every node's estimate is recomputed from its neighbours' estimates of the PREVIOUS round. After exactly 2 rounds, what are the estimates for A, C and D?

  1. A. A = 3, C = 5, D = 11
  2. B. A = 3, C = 4, D = 6
  3. C. A = 4, C = 5, D = 11
  4. D. A = 3, C = 7, D = 11

Correct answer: A. A = 3, C = 5, D = 11

Round 1 uses only round-0 values: A = 4, B = 1, others ∞. Round 2: A = min(4, 1 + 2) = 3, C = min(4 + 1, 1 + 6) = 5, D = 4 + 7 = 11. The true values (A = 3, C = 4, D = 6) need more rounds, since the best paths have 3–4 hops.

More Computer Networks questions

Exams that ask this topic