edited by
9,066 views
31 31 votes

Consider a simple graph with unit edge costs. Each node in the graph represents a router. Each node maintains a routing table indicating the next hop router to be used to relay a packet to its destination and the cost of the path to the destination through that router. Initially, the routing table is empty. The routing table is synchronously updated as follows. In each updated interval, three tasks are performed.

  1. A node determines whether its neighbours in the graph are accessible. If so, it sets the tentative cost to each accessible neighbour as $1$. Otherwise, the cost is set to $∞$.
  2. From each accessible neighbour, it gets the costs to relay to other nodes via that neighbour (as the next hop).
  3. Each node updates its routing table based on the information received in the previous two steps by choosing the minimum cost.

GATE2005-IT_85a

For the graph given above, possible routing tables for various nodes after they have stabilized, are shown in the following options. Identify the correct table.

  1. $\overset{\text{Table for node A}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{-} &\text{-} \\\hline    \text{B}& \text{B} & \text{1} \\\hline \text{C}& \text{C} & \text{1} \\\hline \text{D}& \text{B} & \text{3} \\\hline \text{E}& \text{C} & \text{3} \\\hline  \text{F}& \text{C} & \text{4} \\\hline \end{array}}$
  2. $\overset{\text{Table for node C}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{A} &\text{1} \\\hline    \text{B}& \text{B} & \text{1} \\\hline \text{C}& \text{-} & \text{-} \\\hline \text{D}& \text{D} & \text{1} \\\hline \text{E}& \text{E} & \text{1} \\\hline  \text{F}& \text{E} & \text{3} \\\hline \end{array}}$
  3. $\overset{\text{Table for node B}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{A} &\text{1} \\\hline    \text{B}& \text{-} & \text{-} \\\hline \text{C}& \text{C} & \text{1} \\\hline \text{D}& \text{D} & \text{1} \\\hline \text{E}& \text{C} & \text{2} \\\hline  \text{F}& \text{D} & \text{2} \\\hline \end{array}}$
  4. $\overset{\text{Table for node D}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{B} &\text{3} \\\hline    \text{B}& \text{B} & \text{1} \\\hline \text{C}& \text{C} & \text{1} \\\hline \text{D}& \text{-} & \text{-} \\\hline \text{E}& \text{E} & \text{1} \\\hline  \text{F}& \text{F} & \text{1} \\\hline \end{array}}$

5 Answers

Best answer
26 26 votes

$$\overset{\text{Table for Node A}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{-} &\text{-} \\\hline    \text{B}& \text{B} & \text{1} \\\hline \text{C}& \text{C} & \text{1} \\\hline \text{D}& \text{B} & \text{2} \\\hline \text{E}& \text{C} & \text{2} \\\hline  \text{F}& \text{C} & \text{3} \\\hline \end{array}} \quad 
\overset{\text{Table for Node D}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{B} &\text{2} \\\hline    \text{B}& \text{B} & \text{1} \\\hline \text{C}& \text{C} & \text{1} \\\hline \text{D}& \text{-} & \text{-} \\\hline \text{E}& \text{E} & \text{1} \\\hline  \text{F}& \text{F} & \text{1} \\\hline \end{array}}
\quad \overset{\text{Table for Node C}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{A} &\text{1} \\\hline    \text{B}& \text{B} & \text{1} \\\hline \text{C}& \text{-} & \text{-} \\\hline \text{D}& \text{D} & \text{1} \\\hline \text{E}& \text{E} & \text{1} \\\hline  \text{F}& \text{D} & \text{2} \\\hline \end{array}}
\quad \overset{\text{Table for Node B}}{\begin{array}{|c|c|c|} \hline \text {A} & \text{A} &\text{1} \\\hline    \text{B}& \text{-} & \text{-} \\\hline \text{C}& \text{C} & \text{1} \\\hline \text{D}& \text{D} & \text{1} \\\hline \text{E}& \text{C} & \text{2} \\\hline  \text{F}& \text{D} & \text{2} \\\hline \end{array}}$$

Correct tables are as above. 

Only option C is matching.

edited by
12 12 votes
Answer: C

A, B, D do not give the shortest distance. After stabilizing, distance of all nodes from a specific node should be minimum.
7 7 votes
after stabilizing ,the shortest path is given by option (C) but here some people might think option (B) as answer  but they are mistaken  as in the last row of option (b) although the distance from C to F via E is 3 units but its not the best path or shortest path since we have an alternate path from C to F via D with a distance of 2 units. so option (C) is right.
4 4 votes

Correct option -

3)

Table for node B
 A  A  1
 B  -  -
 C  C  1
 D  D  1
 E  C  2
 F  D  2
1 1 vote
Just a small observation : for the nodes  B, C, D   no one is on cost 3 in the graph so option B,D gone
 now node a has cost 3 only on node F but option a saying multiple cost 3 so option A gone
therefore ans c
Answer:
Position:
Show:

Related questions

72 72 votes
7 answers 7 answers
26.0k
26.0k views
Ishrat Jahan asked Nov 3, 2014
26,041 views
Consider a simple graph with unit edge costs. Each node in the graph represents a router. Each node maintains a routing table indicating the next hop router to be used to...
21 21 votes
4 answers 4 answers
9.2k
9.2k views
Ishrat Jahan asked Nov 3, 2014
9,157 views
Count to infinity is a problem associated with:link state routing protocol.distance vector routing protocolDNS while resolving host nameTCP for congestion control
27 27 votes
3 answers 3 answers
10.6k
10.6k views
Ishrat Jahan asked Nov 3, 2014
10,613 views
Suppose that two parties $A$ and $B$ wish to setup a common secret key (D-H key) between themselves using the Diffie-Hellman key exchange technique. They agree on $7$ as ...
47 47 votes
5 answers 5 answers
32.2k
32.2k views
Ishrat Jahan asked Nov 3, 2014
32,150 views
Consider the following message $M = 1010001101$. The cyclic redundancy check (CRC) for this message using the divisor polynomial $x^5+x^4+x^2+1$ is :$01110$$01011$$10101$...