Traveling the World
Lately, I’ve been having a lot of fun generating high-resolution satellite images of the Earth using Mathematica.
Mathematica has great built-in functionality for querying and manipulating satellite images, which I am just learning how to use. I generated this world map using
The world is beautiful from this high up.
There is a famous problem in mathematics known as the Traveling Salesman problem. A traveling salesman must visit a number of cities. In which order should the salesman visit the cities so that he travels the least distance?
This question is of mathematical interest because, in the general case, it tends to be very difficult to solve. Technically, the Traveling Salesman problem is “NP-hard,” which means that finding a solution generally takes an exponential amount of computation. This is because the number of possible routes between the cities grows very quickly as you increase the number of cities.
However, for small numbers of cities, even an exponential amount of computation does not take too long. This means that we can actually solve the Traveling Salesman problem for many real-world scenarios. Suppose our salesman wants to visit all the world’s capitals. What route should he take?
Using Mathematica, this becomes quite easy to solve.
That’s it! Here’s what it looks like (in high-res, of course!)
And here is the code I used to generate that image:
We may not have solved the general Traveling Salesman problem, but I think this is a visually and conceptually interesting solution to a particular case.
Thank you for visiting my blog. As a statement of my affection and gratitude, I leave you with the Werner Projection...