Skip to Main Content
Graph Algorithms the Fun Way
book

Graph Algorithms the Fun Way

by Jeremy Kubica
November 2024
Intermediate to advanced content levelIntermediate to advanced
416 pages
11h 11m
English
No Starch Press
Content preview from Graph Algorithms the Fun Way

10 MINIMUM SPANNING TREES

The minimum spanning tree of a weighted, undirected graph is the set of edges with the smallest total weight that connects all the nodes. We can use this concept to model and optimize a variety of real-world problems, from designing power grids to hypothesizing how chipmunks should be constructing their burrows.

This chapter introduces two classical algorithms for constructing minimum spanning trees. Prim’s algorithm is a nodewise agglomerative algorithm that builds a bigger and bigger set of connected nodes. Kruskal’s algorithm constructs a minimum spanning tree from a sorted list of edges by adding one edge at ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Grokking Algorithms, Second Edition

Grokking Algorithms, Second Edition

Aditya Bhargava
Grokking Algorithms

Grokking Algorithms

Aditya Bhargava
Algorithms: 24-part Lecture Series

Algorithms: 24-part Lecture Series

Robert Sedgewick, Kevin Wayne

Publisher Resources

ISBN: 9781098182519Errata Page