空间填充曲线的一些组合数学应用
Some combinatorial applications of spacefilling curves

原始链接: https://www2.isye.gatech.edu/~jjb/research/mow/mow.html

由 L. Platzman 与本文作者共同开发的填空曲线(SFC)启发式算法,为解决旅行商问题(TSP)提供了一种高效方法。该算法通过将二维空间中的点映射到一条连续曲线上,对位置进行排序,使相邻点保持在曲线的邻近位置,从而在无需显式计算距离的情况下生成可行的路径。 尽管 SFC 解通常比理论最优解长 25%–34%,但该算法具有显著的实际优势:它速度极快,仅需 $O(n \log n)$ 的时间,且高度可并行化,易于更新。此外,它还允许对曲线进行简单划分,从而简化了多车辆物流管理。 这些效率优势使其在现实世界中得到了广泛应用,涵盖了“送餐上门”服务、红十字会血液配送、工业绘图仪优化以及商业地理信息系统(GIS)软件等领域。SFC 启发式算法是计算密集型“重型”优化软件包的一种“轻量级”替代方案。虽然重型方法可能需要数年时间才能计算出完美路线,但 SFC 启发式算法能在几秒钟内提供近乎最优的解。这种以牺牲绝对路径长度为代价,换取极致速度与简洁性的权衡,使其成为解决大规模路径规划难题的有力工具。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 空间填充曲线的一些组合应用 (gatech.edu) 19 点,由 shraiwi 发布于 3 小时前 | 隐藏 | 过往 | 收藏 | 1 条评论 帮助 shraiwi 3 小时前 [–] 空间填充曲线可用于以 O(n log n) 的时间复杂度和线性空间复杂度计算出优秀的旅行商问题(TSP)路径。本文描述了一个使用卡片索引(Rolodex)来规划“送餐上门”(Meals on Wheels)路线的实现。 回复 考虑申请 YC 2026 年秋季班!申请截止日期为 7 月 27 日。 准则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文
Home page for spacefilling curves and applications

The spacefilling curve suggests a heuristic tour of a set of points

Figure 1: A heuristic solution to the Traveling Salesman Problem is to visit the points in the same sequence as the Sierpinski spacefilling curve.

A spacefilling curve is a continuous mapping from a lower-dimensional space into a higher-dimensional one. A famous spacefilling curve is that due to Sierpinski, which is formed by repeatedly copying and shrinking a simple pattern (the convoluted tour in Figure 1).

A useful property of a spacefilling curve is that it tends to visit all the points in a region once it has entered that region. Thus points that are close together in the plane will tend to be close together in appearance along the curve.

This forms the basis of the heuristic, invented by L. Platzman and me, to produce a reasonably short tour of n given locations (the so-called Travelling Salesman's Tour): Simply visit them in the same sequence as does the spacefilling curve. For example, a short tour of the points marked in read is indicated by the green lines, which connect the points in the same sequence as their appearance on the spacefilling curve.

The spacefilling curve heuristic (SFC) has many advantages, if you are willing to accept solutions that are about 25% longer than optimum (expected, for random point sets). These advantages include:

  • The SFC algorithm is fast: Only O(n log n) effort to construct a tour of n points and only O(log n) effort to update the solution by adding or removing points.
  • The SFC heuristic does not need explicit distances between points and so there is no need to compute or measure these, as most other heuristics must.
  • The algorithm is parallelizable. (In comparison, the comparable algorithm, Nearest Neighbor, is apparently not parallelizable.)
  • The length of links in the SFC tour of random points is expected to be small and of small variance, so that (1/k)-th of the stops account for about (1/k)-th of the travel time. This means that an SFC tour can easily be converted to tours for k vehicles simply by partitioning the SFC route into k segments.

The spacefilling curve heuristic has been used in many applications, including:

  • To build a routing system for Meals-on-Wheels in Fulton County (Atlanta, GA), which delivers hundreds of meals daily to those too ill or old to shop for themselves. We built this on two rolodex card files.
  • To route blood delivery by the American Red Cross to hospitals in the Atlanta metropolitan area.
  • To target a space-based laser for the Strategic Defense Iniative (commonly known as the "Star Wars" program). This application was communicated to us by scientists from TRW Systems, an SDI contractor, who chose the spacefilling curve heuristic over alternatives because it was well-analyzed, parallelizable, and could run on a computer that was boostable to orbit.
  • To control a pen-plotter for the drawing of maps. (M. Iri and co-workers at the University of Tokyo showed how it could be used to reduce drawing time for large road maps by routing the pen efficiently. They gave an example in which drawing time was reduced from ten hours to one-half of one hour.)

The idea of routing by spacefilling curve has subsequently been incorporated into the ARC/Info Geographical Information System, the CAPS Logistics Toolkit of Baan Systems, and other commercial systems managing 2-dimensional data.

A summary of the ideas, minus technical details but with pointers to technical literature, may be found in my class notes A routing system based on spacefilling curves [pdf format, 22 pages]. To accompany this is a table of Sierpinski indices of the points of a 100 x 100 grid [pdf format, 22 pages], with which you can set up your own routing system in an afternoon. Technical details about algorithm performance, along with citations to related work, may be found in “Spacefilling curves and the planar travelling salesman problem” with L. K. Platzman, Journal of the Association for Computing Machinery 36(4):719-737 (1989).

The spacefilling curve solution to the problem of visiting 15,112 cities in Germany

Figure 2: A TSP tour of 15,112 cities in Germany. This tour was induced by the Sierpinski spacefilling curve in less than a second and is about 1/3 again as long as the shortest possible.

It is interesting to compare this lightweight heuristic with a heavy-duty optimization package, such as the one developed by D. Applegate, R. Bixby, V. Chvatal, and W. Cook. Their TSP package is a tour-de-force of mathematical optimization technology and it has been used to solve a traveling salesman problem for 15,112 cities in Germany. This is the largest non-trivial problem for which a provably optimal solution has been generated. Applegate et al. describe the computational resources used: “The computation was carried out on a network of 110 processors located at Rice University and at Princeton University. The total computer time used in the computation was 22.6 years, scaled to a Compaq EV6 Alpha processor running at 500 MHz. The optimal tour has length 1,573,084 in the units used in TSPLIB; this translates to a trip of approximately 66,000 kilometers through Germany.”

For comparison, Paul Goldsman used the spacefilling curve heuristic to solve the same instance. Our solution was about 34% longer (Figure 2). At a leisurely 600 km of travel per day this means the total driving time would be about 147 days versus 110 days. But our computation took less than a second on a cheap laptop. So here is the tradeoff: Use our heuristic and you get a route immediately, but you must travel for an extra month. Alternatively, configure a network of 110 processors and spend two months to compute the shortest route — to save a month of driving.

A triangulated irregular network in which the triangles have been sequenced to form a path

Figure 3: All the points of a triangulated irregular network can be indexed continuously by finding a Hamiltonian path or circuit of the triangles and filling each with a suitably-oriented spacefilling curve.

Bill Nulty, Paul Goldsman, and I have extended some of these ideas in several directions:

联系我们 contact @ memedata.com