We know the bellman-ford algorithms check all edges in each step, and for each edge if,
d(v)>d(u)+w(u,v)
then d(v) being updated such that w(u,v) is the weight of edge (u, v) and d(u) is the length of best finding path for vertex u
. if in one step we have no update for vertexes, the algorithms terminate. with supposing this algorithms, for finding all shortest path from vertex s
in graph G with n
vertex after k<n
iterate is finished, can we conclude:
1) number of edges in all shortest paths from s
is at most k-1
2) weight of all shortest paths from s
is at most k-1
I Think Neither the number of edges nor their total weight is limited by k-1 with the defining problem, but my TA says (1) is True. How can describe these conditions?