@Bikram ans 1 ??

The Gateway to Computer Science Excellence

+32 votes

Consider a network with $6$ routers $R1$ to $R6$ connected with links having weights as shown in the following diagram.

Suppose the weights of all unused links are changed to $2$ and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused?

- $0$
- $1$
- $2$
- $3$

+35 votes

Best answer

First we need to find which are the unused links in the graph

For that we need not make distance vector tables,

We can do this by simply looking into the graph or else DVT can also give the answer.

So, $R1-R2$ and $R4-R6$ will remain unused.

Now If We changed the unused links to value $2$.

$R5-R6$ will Now remain unused.

So, the correct answer is option **B).**

+4

I think no link will remain unused as routing tables of r6 and r5 will not be updated for 2+1=3 because their distance already 3.

0

@bad_engineer

when cost of two paths are same then we consider hop count which is less for R5-R6.So, there are no unused links right?

when cost of two paths are same then we consider hop count which is less for R5-R6.So, there are no unused links right?

0

No! R5---R6 edge is never present in any shortest path between any two pairs of nodes.

Hence B)1 is the correct answer.

0

@rohith1001 yes u r right. Actually in previous year book there is a misprint ( it is given cost of R5-- R6 link is 3) so if u take 3 then answer will be zero.. But in the actual question R5--R6 link is 4. Thus answer will be 1.

+6 votes

If those two link weights are changed to 2, now only one link ie R5-R6 will never be used.

+6 votes

Option-B

SImple reason for this.Use your intuition like below way

Find all the shortest path from each node to other and mark your visited edge .Then automatically in first searching u will find that only two edge are unused example edge R1---->R2 as well as R4---->R6.

When u change it into 2,Then again apply your intuition to find out shortest path from each node to other in this satuation u again find on link is unused.

SImple reason for this.Use your intuition like below way

Find all the shortest path from each node to other and mark your visited edge .Then automatically in first searching u will find that only two edge are unused example edge R1---->R2 as well as R4---->R6.

When u change it into 2,Then again apply your intuition to find out shortest path from each node to other in this satuation u again find on link is unused.

0 votes

As DVR is same as Dijkstra algorithm, so simply make Minimum cost spanning tree and then first confirm it by manually traversing for each source to Destination to confirm that it's same as that we'll get using SSSP, as Greedy need not be Optimal, so after it just the ones not in mst will be unused.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,322 answers

198,394 comments

105,144 users