Is P.

asked • 11/13/19

Give an algorithm that takes as input a directed graph with positive edge lengths, and returns the length of the shortest cycle in the graph

Give an algorithm that takes as input a directed graph with positive edge lengths, and returns the length of the shortest cycle in the graph (if the graph is acyclic, it should say so). Your algorithm should take time at most O(n*m*log(n)), where n is the number of vertices and m is the number of edges.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.