GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
83 views

Apply single source shortest path algorithm on the given graph using vertex ‘A’ as the source. What is the maximum possible distance between vertex A to vertex G. (Assume exclude infinity).

Ans is 28.

asked in Algorithms by Boss (6k points)   | 83 views

1 Answer

+5 votes
Best answer
Queue B C D E F G H  
{ A } 4 5 Select B
{ A,B } - 5 15 Select C
{ A,B,C } - - 15 15 11 select F
{ A,B,C,F } - - 15 15 - 28 12 select H
{ A,B,C,F,H } - - 15 15 - 24 - select D
{ A,B,C,F,H,D } - - - 15 - 24 - select E
{ A,B,C,F,H,D,E } - - - - - 24 - select G

From above table we found that the max distance to reach G is possible by applying single shortest path algorithm costs 28

 

answered by Boss (7.8k points)  
selected by
i got 28 via F

24 via H

30 via E ..

do the math again .would you? and correct me
we have to apply SSSP algo


Top Users May 2017
  1. akash.dinkar12

    3152 Points

  2. pawan kumarln

    1616 Points

  3. sh!va

    1580 Points

  4. Arjun

    1336 Points

  5. Devshree Dubey

    1230 Points

  6. Angkit

    1028 Points

  7. Debashish Deka

    1012 Points

  8. Bikram

    972 Points

  9. LeenSharma

    810 Points

  10. srestha

    662 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. pawan kumarln

    242 Points

  2. Ahwan

    138 Points

  3. joshi_nitish

    112 Points

  4. jjayantamahata

    104 Points

  5. Arjun

    64 Points


22,725 questions
29,056 answers
65,053 comments
27,566 users