»
Reverse-delete: This is actually a reversal of Kruskal’s algorithm. It isn’t
commonly used.
These algorithms use a greedy approach. Greedy algorithms appear in Chapter 2
among the families of algorithms, and you see them in detail in Chapter 15. In a
greedy approach, the algorithm gradually arrives at a solution by taking, in an irre-
versible way, the best decision available at each step. For instance, if you need the
shortest path between many vertexes, a greedy algorithm takes the shortest edges
among those available between all vertexes.
Do'stlaringiz bilan baham: |