Chapter 4: Q12E (page 133)
Give an
Input:An undirected graph
Output:The length of the shortest cycle containing edge e
Short Answer
Algorithm:
Input: An undirected graph G=(V,E) ; edge lengths
Output: The length of the shortest cycle containing edge
remove e to form
Compute shortest path between endpoints in
Add e to
Cycle completed
The runtime of the algorithm is