Shortest-possible walking tour to 81,998 bars in South Korea

2 months ago (math.uwaterloo.ca)

If you find this impressive, take a look at the 1.33 billion stars TSP solution provided by the same authors.

- Gaia DR2 (1,331,906,450 Stars): https://www.math.uwaterloo.ca/tsp/star/gaia2.html

> "The tour is at most 1.0038 times the length of a shortest-possible route."

If you just use the simple-minded Bell Labs probabilistic algorithm, how much worse is that result?

The classic TSP approach is:

1. Hook up all the nodes in some arbitrary path.

2. Cut the path in two places to create three pieces.

3. Rearrange those three pieces in the six possible ways and keep the shortest.

4. Iterate steps 2-3 until no improvement has been observed for a while.

This is not guaranteed to be optimal, but for most real-world problems either finds the optimal result or is very close.

  • Note that the tour itself was found quickly using a heuristic solver (https://www.math.uwaterloo.ca/tsp/korea/computation.html), the achievement here and all the computation is to establish that this is the lower bound (assuming I understood correctly).

    So, the heuristic solver worked pretty darn well :) Although, I’m not sure how close it would have been the heuristic algorithm you are describing (I suspect that it is considerably more advanced for good reasons, randomly picking will take too long to converge).

  • Iirc the (probably simplified) LKH heuristic they used:

      For each iteration:
         apply some randomisation
         starting at each place
             cut the path in 2..n places
               reconnect in the most optimal way 
               if the new tour is the new best, save
    

    n is a small number like 4 maybe 5?

    • 2-opt: [a, b, ..., d, e]

      reversing subarray from b to d is a 2-opt move.

      3-opt (1 particular move):

      a b c d e f

      a e d c b f -- reversal from b to e

      a e d b c f -- reversal from c to b

      LK heuristic is a bit more involved, but focuses on continuing to reverse the subarray on the [b, ..., d] segment, with search and backtracking involved. (I think that's refered to as sequential k-opt moves, but I think it's already quite hard to know what exactly LK is, and LKH does much more)

      By focusing on the subarray, assuming distance symmetry (length from b to e is same as length from e to b, but there are correct workarounds if this does not hold), you can evaluate the cost of the new route in constant time (but with bigger k there's more moves to evaluate https://oeis.org/A001171)

It's strange that they don't mention the total distance. I understand that the point-to-point travel time is what they're solving for, but it would be interesting to know what the actual distance of travel was, if for no other reason than calculating caloric burn. But then you could also see how much it deviated from the shortest-distance path.

  • Proper routing is also an expensive computation. Yes you could just run A* or something on the roads but that would assume no closures, no one way roads, wouldn’t account for elevation change, ect. Using a proper routing API is almost certainly cost prohibitive

I am overwhelmed with the thought of nearly 82 thousand bars within a country roughly the size of Ohio.

I'm impressed they found a dataset this hard, but not much harder. It's a delicate balance between beating the last Traveling Salesman hiscore (Netherlands), and never finishing your compute

reminds me of a question they used to ask in the Irish army back in the 60s. My Dad told me this. "How do you get from Bachelor's Walk to Collins Barracks without passing a bar?". People would spend hours and days working on the answer. In the end, the answer was "Go in to every one".

So NP is like P again. I learned in school 13 is the max and one of my algebra professors advanced it to 15 (in the 80ies). Then came 20, then came 20.000, this is 80k with proof, and at the World TSP page we see the record was 1m.

http://webhotel4.ruc.dk/~keld/research/LKH/

The biggest proven optimum is for 3178031 right now.

This should be really done with CUDA, not plain C, btw.

  • The thing is that Euclidean TSP needs a lot of data to encode hard instances.

    N=15 was even considered solved in the 60s, and N=20 has never been considered large instances, especially not of Euclidean TSP.

    I cannot see how anyone could say 13 is the max: you need 100k memory slots and 1M comparisons. This has been trivial for quite some time.

    • Yeah, I probably mixed it up with the Hamiltonian Path problem. It was a long time ago

During COVID I made it a goal to walk every street in my town using the web-based CityStrides (https://citystrides.com/) tracker. It keeps tracks of streets you have walked and lets you know what percentage of a town you have walked. It didn't optimize my routes for coverage, but it was a fun mental puzzle to plan out my walks to hit as many streets as possible without duplication. An automated tool might be fun, but doing it by hand was part of the journey as it were.

As you browse the CityStrides site you can find people's LifeMaps which show all their walking. Some people have done amazing amounts of walking. See this user for example and their coverage of Paris, France...

https://citystrides.com/users/15259/map#48.85741101618777,2....

Branch-and-bound is an algorithm "from the book" to me. Fundamentally very simple, provided you view the LP solver as a black box, but incredibly useful.

I looked at near my home, they missed a few. A issue is that in Korea a lot of the local spots are not on any public maps.

This is both hilarious and genuinely impressive. A TSP solution involving nearly 82 000 bars? That's a level of dedication to both math and beer I didn't know I needed in my life

Would be nice if they could briefly describe the algorithm. Sounds like they’ve turned the TSP into an integer linear program that they can do branch and bound on, but I’m not sure.

Is that one of the problem quantum computers would resolve instantly if it is actually possible to scale them up?

Very interesting..

Is anything supposed to happen if you click on those red circles? I was hoping it will show name or other info!

It would suck to get to bar 51,248 only to find out it's now permanently closed

  • There was a man who documented his travel to every country in the world. Not long before he was finished, South Sudan gained independence and he had to take a special trip there to complete his journey, which apparently had already completed all the other countries in Africa long ago.

“The locations were downloaded from a database maintained by the Korean National Police Agency.”

Title is incorrect. 178 days is the walking time of the optimal tour, not how long it took to solve for the best route

[flagged]

  • Not sure what you expected to get. The Concorde TSP solver is an exact solver that uses branch and bound search, it will return either a solution with a specified bound or the optimal bound. They provide the dataset and the solution they found (and I believe their solver is open source), if you don't believe them you can go ahead and find a better tour.

  • These claims are provisional. Until someone produces a better tour or a valid counter-proof, this stands as the best-known solution.

    • >Our computation produced a tour together with a proof that it is a shortest-possible route [...]

      >These claims are provisional. Until someone produces a better tour or a valid counter-proof, this stands as the best-known solution.

      Are we looking at the same website? Because those two are quite different things.