Answer this two question: Predecessor value for vertices 1, 2 and 3: Predecessor value for vertices 4 and 5

icon
Related questions
Question

Answer this two question:


Predecessor value for vertices 1, 2 and 3:

Predecessor value for vertices 4 and 5

Given the following directed, weighted graph:
9
6
9
8
8
2
3
Use the Bellman-Ford algorithm as demonstrated in the Content, to determine the
shortest path
from vertex 1 to all other vertices, including the predecessor values.
Remember that for each phase, assume the edges examined in numeric order:
(1,1), (1, 2), (1, 3)...(5, 3), (5, 4), (5, 5)
Transcribed Image Text:Given the following directed, weighted graph: 9 6 9 8 8 2 3 Use the Bellman-Ford algorithm as demonstrated in the Content, to determine the shortest path from vertex 1 to all other vertices, including the predecessor values. Remember that for each phase, assume the edges examined in numeric order: (1,1), (1, 2), (1, 3)...(5, 3), (5, 4), (5, 5)
show the values in the Predecessor array P for vertices 1 to 5, after the second
phase.
List the values for vertices 1, 2 and 3 in the FIRST blank.
List the values for vertices 4 and 5 in the SECOND blank.
Separate the values by spaces,
and if a vertex has no predecessor, mark it with 0.
For example:
035
01
Predecessor values for vertices 1, 2 and 3:
Predecessor values for vertices 4 and 5:
Transcribed Image Text:show the values in the Predecessor array P for vertices 1 to 5, after the second phase. List the values for vertices 1, 2 and 3 in the FIRST blank. List the values for vertices 4 and 5 in the SECOND blank. Separate the values by spaces, and if a vertex has no predecessor, mark it with 0. For example: 035 01 Predecessor values for vertices 1, 2 and 3: Predecessor values for vertices 4 and 5:
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer