CS FundamentalsHardGATE CS (PYQ pattern)

Routers form a 4 x 4 grid with coordinates (row, column), 0 to 3, and links between horizontal and vertical neighbours of equal cost. Two links are down: (1,1)-(1,2) and (2,2)-(3,2). How many equal-cost shortest paths (monotone: only right and down moves) exist from (0,0) to (3,3)?

  1. A. 20
  2. B. 12
  3. C. 10
  4. D. 7

Correct answer: C. 10

Dynamic programming over the grid, skipping the failed links, gives 10 shortest paths (the intact grid has C(6,3) = 20).

More Computer Networks questions

Exams that ask this topic