2 votes 2 votes 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. Algorithms algorithms shortest-path + – vaishali jhalani asked Nov 5, 2016 vaishali jhalani 717 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 5 votes 5 votes 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 Digvijaysingh Gautam answered Nov 5, 2016 selected Nov 5, 2016 by Prashant. Digvijaysingh Gautam comment Share Follow See all 2 Comments See all 2 2 Comments reply alpha commented Nov 17, 2016 reply Follow Share i got 28 via F 24 via H 30 via E .. do the math again .would you? and correct me 0 votes 0 votes Digvijaysingh Gautam commented Nov 17, 2016 reply Follow Share we have to apply SSSP algo 0 votes 0 votes Please log in or register to add a comment.