Problem 3 Bellman-Ford Algorithm [5 marks]
Follow the steps of the Bellman-Ford algorithm on the following directed graph, using vertex
s as the source. In each pass, relax edges in the following order, and show the d and ?
values after each pass (after each iteration). For the ? values, it suffices to shade or color the
edges from predecessors to nodes. The algorithm makes five passes and you need to show
the values at the end of each pass.
(z,p),(w,x), (x,p), (w,z), (y,z), (z,x)(s,w), (s,y), (w,y)