Question: Longest-path-bottom up for a minimum spanning tree* #3 (8 pts) Bottom-Up Longest-Paths In Problem Set 7 you wrote Longest-Path-Memoized, a recursive (top-down) dynamic programming solution

Longest-path-bottom up for a minimum spanning tree*
#3 (8 pts) Bottom-Up Longest-Paths In Problem Set 7 you wrote Longest-Path-Memoized, a recursive (top-down) dynamic programming solution to the longest paths problem. Here you will solve the same problem in (V+E) using a bottom-up dynamic programming approach. Hint: We need to arrange to solve smaller problems before larger ones: use topological sort (which you may assume has already been written). You may want to write the explanation for (b) before writing the pseudocode, but then revise it to reference the lines of code. (a) (4 pts) Write the pseudocode for Longest-Path-Bottom-Up. (b) (2 pts) Explain why your algorithm works; in particular, why topological sort is useful. (c) (2 pts) Analyze its asymptotic run time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
