GATE | GATE CS 2020 | Question 5

There are multiple routes to reach from node 1 to node 2, as shown in the network.

The cost of travel on an edge between two nodes is given in rupees. Nodes ‘a’, ‘b’, ‘c’, ‘d’, ‘e’, and ‘f’ are toll booths. The toll price at toll booths marked ‘a’ and ‘e’ is Rs. 200, and is Rs. 100 for the other toll booths. Which is the cheapest route from node 1 to node 2 ?
(A) 1−a−c−2
(B) 1−f−b−2
(C) 1−b−2
(D) 1−f−e−2


Answer: (B)

Explanation: (A) Cost of 1-a-c-2 :

100 + 100 + 200 = 400

(B) Cost of 1-f-b-2 :

100 + 0 + 200 = 300 

(C) Cost of 1-b-2 :



300 + 200 = 500 

(D) Cost of 1-f-e-2 :

200 + 100 + 100 = 400 

Hence, 1-f-b-2 is having minimum cost.

Option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.