Robert Kosara, a research scientist at data visualization software company Tableau, has been solving puzzles using the US’s nearly 4,2000 ZIP codes for years, writes Christopher Ingraham at The Washington Post. Kosara had a question:

What would it look like if you drew a single line through all Zip codes in the lower 48 in numeric order? Kosara wrote some code and let it rip, and what he ended up with was a map that clearly delineated state boundaries and gave a reasonable approximation of population density to boot. Since it looked as though it were created by scribbling in arbitrary regions of a U.S. map, he dubbed it the ZIPScribble map.

Kosara ran some calculations and discovered that if you started at the lowest-numbered Zip code (00544, Holtsville, NY) and walk through every Zip code in the continental U.S. in numeric order all the way up to the highest-numbered Zip code (99403, Clarkston, WA), the path you’d need to take would be roughly 1,155,268 miles long. Which naturally brought up a second question: What would be the shortest route you could take through all 37,000 of those zip codes?

What, then, of a traveling salesman problem with more than 37,000 points?

Kosara took a crack at it. He called it the Traveling Presidential Candidate Problem, after a hypothetical presidential candidate who wanted to visit all 37,000 contiguous Zip codes to clinch the nomination.