If you have a graph, and need to find it in diameter (which is the maximum distance between the two nodes) How can you do this in Wikipedia says that you call it Or show a pseudoepod? If you have certain properties in the graph, then you can be better. So the bad news is that, Dish would not be enough in the general case ... O (log v * (v + e)) complexity.
binary heap . But I do not understand how it works. Can anyone please explain?
g = (v, e) for the general graph none < Code> O (Log V * (V + E)) The time-intensity algorithm known to calculate the diameter is the current best solution
O (V * V * V) , for example, Computing all the least paths with the Floyd Warshal algorithm. For the rare graph, that is when
e is in
o (N * N) , then Johnson's algorithm gives you the
O (V * V * log (V) + V with E) The complexity of a better time.
No comments:
Post a Comment