Docsity

Johnson's Algorithm for Shortest Paths: Homework Solution - Prof. Jun Huan, Assignments of Data Structures and Algorithms

Toggle sidebar
bg1
Homework 4
Assigned Nov 25th
Due: Dec 4th
8.1 (15 pts)
9.1 (15 pts)
9.4 (15 pts)
9.5 (20 pts)
9.15 (20 pts)
Given the following graph, show the results of running Johnson’s algorithm for all pair
shortest path problem in three steps (15 pts)
(1) construct a new graph with a synthetic node
(2) compute the weight (potential) of each node in the new graph
(3) update the edge weight of the new graph
2
-
1
-
4
3
1
8
2

Partial preview of the text

Download Johnson's Algorithm for Shortest Paths: Homework Solution - Prof. Jun Huan and more Assignments Data Structures and Algorithms in PDF only on Docsity!

Homework 4 Assigned Nov 25th Due: Dec 4th

8.1 (15 pts) 9.1 (15 pts) 9.4 (15 pts) 9.5 (20 pts) 9.15 (20 pts)

Given the following graph, show the results of running Johnson’s algorithm for all pair shortest path problem in three steps (15 pts) (1) construct a new graph with a synthetic node (2) compute the weight (potential) of each node in the new graph (3) update the edge weight of the new graph