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)?
- A. 20
- B. 12
- C. 10
- 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
- A leaky bucket holds at most 5 packets and leaks (sends) 1 packet at the end of every tick. In ticks 1 to 8, packets arrive as 3, 4, 0, 5…
- A WFQ scheduler (bit-by-bit round robin approximation) serves three flows backlogged at time 0 with weights A = 2, B = 1, C = 1. Packet…
- Four flows share links: a uses L1; b uses L1 and L2; c uses L2 and L3; d uses L3. Link capacities (Mbps): L1 = 12, L2 = 6, L3 = 10. What…
- A router has four routes to the same prefix (local-pref, AS-path length, origin type, MED, learned via, IGP cost to next hop): R1 (100, 3…
- A TCP sender starts with cwnd = 1 MSS and ssthresh = 16 MSS. Each round trip: if cwnd < ssthresh the window doubles (but never beyond…
- Two TCP flows (Tahoe and Reno) both start with cwnd = 1 MSS and ssthresh = 16 MSS and grow identically (doubling up to ssthresh, then +1…