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

18 TOURS THROUGH GRAPHS

The problem of designing an optimal sightseeing tour lends itself perfectly to a graph formulation. Depending on our travel preferences, we might want to visit each of a set of major landmarks exactly once, minimize the total distance we travel, or visit every shop-lined street in our destination city. Each of these formulations corresponds to a classic graph problem: planning paths through a graph.

In this chapter, we consider several variations of this core problem. Hamiltonian paths visit each node exactly once and can help us plan trips where we want to visit a discrete set of sites. Solving the traveling salesperson ...

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