CS FundamentalsVery hardGATE CS (PYQ pattern)

Router X has neighbours A, B, C at link costs 2, 5, 1. It receives distance vectors (to D1, D2, D3, D4): from A (4, 9, 3, 7), from B (1, 2, 8, 1), from C (9, 6, 5, 6). After one Bellman-Ford update, what is the sum of X's costs to D1..D4?

  1. A. 26
  2. B. 23
  3. C. 24
  4. D. 28

Correct answer: C. 24

For each destination take min over neighbours of (link cost + advertised cost): {'D1': (6, 'A'), 'D2': (7, 'B'), 'D3': (5, 'A'), 'D4': (6, 'B')}. Their sum is 24.

More Computer Networks questions

Exams that ask this topic