Tour
A tour is a closed route that visits the required locations and returns to its starting location.
Grokking AI Algorithms, Second Edition
A tour is a complete route constructed by an ant through the locations or attractions of a routing problem.
- How it is used
- Uses a complete visit sequence as the unit ants construct, compare, and repeat while solving routing problems.
- How deep it goes
- Explains construction, unvisited-destination constraints, distance comparison, and iteration, while deferring broader route theory.
- Examples
- Demonstrates tours with carnival attractions, an optimal six-stop sequence, distance tables, and Python selection and evaluation routines.
- What you can do after
- Apply it via Python to construct candidate routes, measure their distances, and retain the shortest completed tour.
Read how Grokking AI Algorithms, Second Edition explains tour →
Advanced Algorithms and Data Structures
A tour is a closed sequence of locations that visits the required locations and returns to its starting location.
- How it is used
- Optimizes a delivery truck’s closed route after its destinations and load are fixed.
- How deep it goes
- Defines tour constraints, cost minimization, and symmetry-based pruning, but defers cross-truck assignment.
- Examples
- Uses delivery trucks, city maps, complete graphs, weighted edges, and equivalent city permutations.
- What you can do after
- Evaluate candidate closed routes and reduce redundant permutations before searching for a minimum-cost tour.
Read how Advanced Algorithms and Data Structures explains tour →
What to know first
- edgeAn edge is a connection between two vertices or nodes in a graph or related structure, representing a relationship and optionally carrying direction, labels, or weights.
- graphA graph is a mathematical structure consisting of vertices and edges that connect pairs of vertices to represent relationships or connections.
Related concepts
- permutationequivalent to · A permutation is a bijective rearrangement of the elements of a finite set, equivalently an ordering in which each element appears exactly once.
- objective functionmeasured by · An objective function is a mathematical function that assigns values to candidate solutions or parameter settings, which an optimization procedure seeks to minimize or maximize.
- brute-force searchused by · Brute-force search is a search technique that systematically evaluates candidates in a defined search space, typically examining all possibilities without using selective shortcuts to narrow the search.
- cyclekind of · A cycle is a path in a graph that starts and ends at the same vertex.
- local optimumequivalent to · A local optimum is a feasible point whose objective value is no worse than that of sufficiently nearby feasible points, though a better point may exist elsewhere.
Questions about tour
What is tour?
A tour is a closed route that visits the required locations and returns to its starting location.
Which Manning books explain tour?
Grokking AI Algorithms, Second Edition and Advanced Algorithms and Data Structures.
What should I know before learning tour?
Manning books that teach tour usually introduce edge and graph first.
What is tour a kind of?
Tour is a kind of cycle. A cycle is a path in a graph that starts and ends at the same vertex.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

