O'Reilly logo

Hands-On Machine Learning with C# by Matt R. Cole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Traveling salesman problem

We have a salesman who must travel between n cities. He doesn't care about which order this happens in, nor which city he visits first or last. His only concern is that he visits each city only once and finishes at home, where he started.

Each city is a node, and each node is connected to other close nodes by an edge (think of it like a road, plane, train, car, and so on).

Now, each of those connections has one or more weights associated with it, which we will call the cost.

The cost describes the difficulty of travel along that connection, such as the cost of the plane ticket, the amount of gas the car needs, and so on.

Our salesman has a boss as we met in Chapter 1Machine Learning Basics, so his marching orders ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required