So, I am a little stuck on this particular problem. I have an algorithm that works in some instances, but can fail when there are cycles in the graph. Part of the problem (for me) is that the algorithm needs to run in linear time, but I have't though of a way to do that when there are cycles (I assume O(|V| + |E|) is okay). What would be a good approach here?
Jim--
You received this message because you are subscribed to the Google Groups "BYU CS 312 Summer 2012" group.
To post to this group, send email to byu-cs-3...@googlegroups.com.
To unsubscribe from this group, send email to byu-cs-312-sum...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Because the input is a tree, there are no cycles. For a general graph, the minimum vertex cover problem has been shown to be NP complete. Don't bother looking for a linear time algorithm for that one.
Chris
So, I am a little stuck on this particular problem. I have an algorithm that works in some instances, but can fail when there are cycles in the graph. Part of the problem (for me) is that the algorithm needs to run in linear time, but I have't though of a way to do that when there are cycles (I assume O(|V| + |E|) is okay). What would be a good approach here?Jim
--