I dont think you take question correctly:
Consider the following statements with respect to a directed graph G in which edges can have positive or negative edge length but that has no negative cycles:
S1 : The Bellman-Ford algorithm correctly computes shortest path lengths from a given origin ‘s’ to every other vertex ‘v ’.
Lets take 1st one : Yes :Now if you take disconnected graph then graph has path b/w every vertex? No so graph can give the shortest path only b/w those vertices which have path initially.
So you cannot expect from Bellman ford that he will connect two vertexes, it programmer error that he give wrong input and expect correct output.
S2 : The Floyd-Warshall algorithm correctly computes shortest path lengths between every pair of vertices.
If bellman ford can do it then why cant Floyd warshal.
Here correctly compute the shortest path means if the original graph has two paths then it give the best path , but if graph itself hasnt the path then the algorithm will show only infinite.