logoalt Hacker News

Some combinatorial applications of spacefilling curves

50 pointsby shraiwilast Saturday at 5:37 PM5 commentsview on HN

Comments

shootoday at 7:31 AM

> To target a space-based laser for the Strategic Defense Iniative (commonly known as the "Star Wars" program)

I'm guessing this application would be selecting an ordering to engage multiple simultaneous targets in minimal-ish time - MIRV warheads or missiles launched in a barrage.

kmschaaltoday at 6:35 AM

Space-filling curves as a traveling salesman heuristic is a really nice application I was not aware of. I have mostly seen them in the context of domain decomposition for parallel computing, where you cut the curve at n points to obtain n+1 disjoint domains.

shootoday at 7:40 AM

space filling curves can also be used under the hood in data structures that support efficient spatial queries: https://en.wikipedia.org/wiki/Hilbert_R-tree

shraiwilast Saturday at 5:37 PM

Space filling curves can be used to compute good TSP tours in O(n log n) time and linear space.

This describes an implementation using a Rolodex to plan Meals on Wheels routes.

akoboldfryingtoday at 6:49 AM

Neat!

Another benefit I see is that you could quickly generate many heuristic solutions by randomly translating, rotating and/or uniformly scaling the curve, and then choose the best.

It does look like it can produce crossing edges, which are suboptimal in Euclidean space, but these are easy to rectify -- whenever 2 edges cross, just swap their endpoints for a quick guaranteed improvement. Because doing this strictly decreases the total tour length, and every such decrease is lower-bounded by the smallest such decrease among all (nCities choose 4) possible sets of 4 cities, repeatedly doing this must eventually terminate in a crossing-free tour.