Question: a) [20 points] Show that the following algorithm does not correctly solve this problem, by giving an example of an ordered graph on which it
a) [20 points] Show that the following algorithm does not correctly solve this problem, by giving an example of an ordered graph on which it does not return the correct answer.
while there is an edge out of the node w choose the edge (w; vj) for which j is as small as possible set w = vj increase L by 1 end while return L as the length of the longest path 1
In your example, say what the correct answer is and also what the algorithm above finds.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
