closed by
3,270 views
2 2 votes
Consider following with respect to directed graph where there can be positive,negative edge weights but no negative edge cycle.

S1 : The Bellmann Ford algorithm will compute correctly the shortest path from source vertex S to every other Vertex.

S2 : The Floyd Warshall algorithm will compute correctly the shortest path between every pair of Verices.

Which of Following statements are Correct ?

A. Only S1

B. Only S2

C. Both

D. None

1 Answer

Position:
Show:

Related questions

0 0 votes
2 answers 2 answers
3.6k
3.6k views
iarnav asked May 17, 2018
3,551 views
Is it Dynamic programming?
2 2 votes
0 0 answers
1.1k
1.1k views
Chhotu asked Nov 3, 2017
1,098 views
Hi Guys,As everyone knows Bellman Ford Algorithm works on DP approach. The algorithm calculate shortest paths in bottom-up manner. It first calculates the shortest distan...
1 1 vote
2 2 answers
4.7k
4.7k views
radha gogia asked Dec 20, 2015
4,670 views
I am unable to get the logic behind running bellman-ford for n-1 times , I have already gone through this link , but still couldn't get it clearly .http://cs.stackexchang...
1 1 vote
1 answers 1 answer
1.8k
1.8k views
Sandy Sharma asked Aug 3, 2018
1,844 views
What is the reason behind it? How do we find an optimal substructure and overlapping sub problems in this ? In which line of code memoization is done? BELLMAN-FORD(G,w,s)...