Ranti A.

asked • 10/05/20

Give an algorithm to check whether a given undirected graph has cycles of odd length. The length of a cycle is the number of vertices (or equivalently, the number of edges) in the cycle.

Use Breadth First Search (BFS).


Isaac W.

the length of the cycle is the number of vertices - 1 , since you do not have to use every edge in a graph in order to reach each vertex, using a prim's minumum spanning tree you can find the shortest path to reach all vertecies which will always be the number of vertices in an unweighted graph.
Report

12/04/20

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.