3 PATHS THROUGH GRAPHS
The concept of a path through a graph is another foundational building block we’ll use throughout the book. For example, we may be interested in determining the lowest-cost path between two nodes (shortest path algorithm) or whether it is even possible to reach one node from another using any path at all. Multiple subsequent chapters are devoted to computing paths with different properties.
The general concept of a path mirrors its real-world counterpart. Just as the paths in your favorite park provide routes for moving from one place to the next, paths in graphs provide the same mechanism. They are sequences of nodes ...
Get Graph Algorithms the Fun Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.