自学内容网 自学内容网

JACM23 - A New Algorithm for Euclidean Shortest Paths in the Plane

前言

如果你对这篇文章感兴趣,可以点击「【访客必读 - 指引页】一文囊括主页内所有高质量博客」,查看完整博客分类与对应链接。

本文关注的问题为计算几何学中的经典问题,即「在平面上给定一组两两不相交的多边形障碍物,寻找两点之间避开所有障碍物的欧几里得最短路径」,简单理解就是「含多边形障碍物的两点最短路问题」。

n n n 表示所有障碍物的顶点数, h h h 表示障碍物的总数,针对该问题的主要算法发展历程如下所示:

Time ComplexitySpace Complexity
Hershberger and Suri, SIAM J. COMPUT. 1999 O ( n log ⁡ n ) O(n\log n) O(nlogn) O ( n log ⁡ n ) O(n\log n) O(nlogn)
Wang, SODA 2021 O ( n log ⁡ n ) O(n\log n) O(nlogn) O ( n ) O(n) O(n)
Wang, JACM 2023 O ( n + h log ⁡ h ) O(n+h\log h) O(n+hlogh) O ( n ) O(n) O(n)

本篇工作将时间复杂度从之前的 O ( n log ⁡ n ) O(n\log n) O(nlogn) 提升到了 O ( n + h log ⁡ h ) O(n+h\log h) O(n+hlogh),基于的前提条件为「在算法开始执行之前,已经为自由空间(即除去所有障碍物后的平面部分)构建了一个三角剖分」。

三角剖分 (Triangulation) 即一种将平面分割成不重叠的三角形的方法,且这些三角形覆盖整个自由空间。

n ≪ h n\ll h nh 时,本文所提算法对比先前方法提升较明显(最坏情况下 h = Θ ( n ) h=\Theta(n) h=Θ(n)),例如如下场景:
在这里插入图片描述
此外,如果将三角剖分的时间也算上的话,时间复杂度将会变为 O ( n + h log ⁡ 1 + ϵ h ) O(n+h\log^{1+\epsilon}h) O(n+hlog1+ϵh),for any constant ϵ > 0 \epsilon>0 ϵ>0.


Introduction

首先形式化一下问题:

  • P \mathcal{P} P 为一组包含 h h h 个平面上两两不相交的多边形障碍物,共有 n n n 个顶点;
  • F \mathcal{F} F 为自由平面 (Free Space),即原始平面减去所有障碍物的内部空间;
  • 给定 F \mathcal{F} F 中的两个点 s s s t t t,问题被形式化为「在 F \mathcal{F} F 中找到从 s s s t t t 的欧几里得最短路径」。

上述问题有两个变体:

  1. Single shortest path problem: s s s t t t 都已在 input 中给出
  2. Single-source-shortest-paths: s s s 是给定的源点, t t t 是 query 点,需要建立数据结构高效解决每次不同的 query

该问题有两种常用的方法:

  • Visibility Graph Method
    • 该方法需要先构建 Visibility 图,即包含障碍物所有顶点以及起点和终点的图,并连接节点间与障碍物不相交的边。构建完 Visibility 图后,可以直接运行 Dijkstra 最短路算法完成求解。
    • 该类方法的复杂度为 O ( n log ⁡ n + K ) O(n \log n + K) O(nlogn+K),其中 K K K 表示 Visibility 图中边的数量,在最坏情况下 K = Ω ( n 2 ) K=\Omega(n^2) K=Ω(n2)
    • 此类方法只能用于 Single shortest path problem.

在这里插入图片描述

  • Continuous Dijkstra Method
    • 基本思想是模拟从源点出发的 Wavefront 在自由空间中的传播。Wavefront 可以想象为一组以源点为中心、不断扩展的同心圆,表示到源点的等距离点集。
    • 在传播过程中,算法会构建最短路径图 (Shortest Path Map),即 S P M ( s ) SPM(s) SPM(s)。当给定一个目标点 t t t 时, s s s t t t 之间的最短距离可以在 O ( log ⁡ n ) O(\log n) O(logn) 内计算得到。
    • O ( n 3 / 2 + ϵ ) O(n^{3/2+\epsilon}) O(n3/2+ϵ) time, Mitchell, SoCG 1993
    • O ( n log ⁡ n ) O(n\log n) O(nlogn) time, O ( n log ⁡ n ) O(n\log n) O(nlogn) space, Hershberger and Suri, FOCS 1993
    • 此类方法也可以解决 Single-source-shortest-paths,即使用 O ( n ) O(n) O(n) space (SODA’21) 构建 S P M ( s ) SPM(s) SPM(s),并在 O ( log ⁡ n ) O(\log n) O(logn) 时间内解决每次 query。

S P M ( s ) SPM(s) SPM(s) 构建完成后, F \mathcal{F} F 将会被切分为多个区域, s s s 距区域内每个点的最短路都将经过该区域的根结点(对于 Wavefront 来说,即圆心),如下图所示:

在这里插入图片描述


Main Result

  • O ( n + h log ⁡ h ) O(n+h\log h) O(n+hlogh) time
    • Match Ω ( n + h log ⁡ h ) \Omega(n+h\log h) Ω(n+hlogh) lower bound
    • Space: O ( n ) O(n) O(n)
    • Compute a shortest path map S P M ( s ) SPM(s) SPM(s)
    • Assumption: a triangulation of the space is given
      • Triangulation: O ( n + h log ⁡ 1 + ϵ h ) O(n+h\log^{1+\epsilon}h) O(n+hlog1+ϵh) time, Bar-Yehuda and Chazelle, IJCGA 1994
  • Main idea
    • Follow Hershberger and Suri’s main algorithm framework
    • Continuous Dijkstra’s approach
    • Use a smaller conforming subdivision of the free space
    • Use Wang’s technique to reduce the space to O(n)

Review of the HS algorithm (Hershberger and Suri)

  • The difficulty of continuous Dijkstra: how to maintain the wavefront (consisting of all points with the same distance from s)
    • a sequence of wavelets, each centered at an obstacle vertex, called a generator (shortest path from s to every point of the wavelet through its generator)
    • a wavefront is represented by a list of generators

在这里插入图片描述

A conforming subdivision S S S of the free space (the HS algorithm)

HS 算法的基础是需要先将一个复杂的几何区域(即自由平面)切分为多个简单区域的集合(如四边形区域),如下图所示。这个过程称为 Conforming subdivision,具体所使用的算法为 quad-tree-style subdivision of the plane(四叉树划分)。

下图中展示的是 1-conforming subdivision of free space,即 d ( e , f ) ≥ max ⁡ ( 1 ∣ e ∣ , 1 ∣ f ∣ ) d(e,f)\geq \max(1|e|,1|f|) d(e,f)max(1∣e,1∣f). HS 算法基于的则是 2-conforming subdivision, 即 d ( e , f ) ≥ max ⁡ ( 2 ∣ e ∣ , 2 ∣ f ∣ ) d(e,f)\geq \max(2|e|,2|f|) d(e,f)max(2∣e,2∣f).

在这里插入图片描述

Well-covering region U ( e ) U(e) U(e) 的定义要求它包含透明边 e e e, 并且它的边界与 e e e 之间的距离满足一定的最小距离约束条件, 即其他边与 e e e 的距离至少是 2 × max ⁡ { ∣ e ∣ , ∣ f ∣ } 2 \times \max \{|e|,|f|\} 2×max{e,f} 。换句话说,边界上的边与 e e e 的距离足够大,以便波前在 U ( e ) U(e) U(e) 内部不会被远离它的其他边过早影响。

通过定义 U ( e ) U(e) U(e),可以确保只需要考虑该区域内的波前扩展,而无需处理更远区域的波前。因此, U ( e ) U(e) U(e) 提供了一个局部的计算空间,简化了复杂的全局波前交互问题。

在满足这些条件的前提下, 算法倾向于选择面积最小的区域 U ( e ) U(e) U(e), 以便最有效地进行计算。这意味着, 对于每个透明边 e e e 来说, 虽然理论上可以有多个区域满足 U ( e ) U(e) U(e) 的定义, 但算法会选择一个面积最小、最紧凑的区域来优化计算。

Using S S S to guide the wavefront expansion

在这里插入图片描述

Bisector events

Bisector 是两个 wavelets 之间的角平分线,而 Bisector events 则代表 wavelets 的消失,通常有如下两种情况。

在这里插入图片描述


Reducing time to O ( n + h log ⁡ h ) O(n+h\log h) O(n+hlogh)

  • Reduce the problem to the convex case by a corridor structure
  • Solve the convex case: all obstacles are convex
    • By generalizing the HS algorithm

在这里插入图片描述

V V V 表示每个障碍物上 X 和 Y 轴上达到极值的顶点 (Rectilinear Extreme Vertices) 集合, ∣ V ∣ = O ( h ) |V|=O(h) V=O(h),如下图中黄色点所示。

  • 计算 a conforming subdivision S ( V ) S(V) S(V) of V V V 的时间复杂度为 O ( h log ⁡ h ) O(h\log h) O(hlogh),其中 S ( V ) S(V) S(V) 的大小为 O ( h ) O(h) O(h).
  • V V V 中顶点将每个 obstacle boundary 切分为最多四个 convex chains(如下图红线所示),其总数也为 O ( h ) O(h) O(h).

在本文算法中,each convex chain 被视作一个 “unit”. Insert these convex chains into S ( V ) S(V) S(V) to obtain a comforming subdivision S ( F ) S(F) S(F) of the free space, 时间复杂度为 O ( n + h log ⁡ h ) O(n+h\log h) O(n+hlogh).

在这里插入图片描述

Conforming subdivision S ( F ) S(F) S(F) of the free space (the new algorithm)

  • Each cell of S ( F ) S(F) S(F) is a square or a square annulus (i.e., an outer square with an inner square hole).
  • Each vertex of V V V is contained in the interior of a square cell and each square cell contains at most one vertex of V V V.
  • The boundary ∂ c \partial c c of each cell c c c in S S S consists of O ( 1 ) O(1) O(1) transparent edges (非障碍物的边) and O ( 1 ) O(1) O(1) convex chains.

在这里插入图片描述

Wavelet of a convex chain

  • A generator is a couple α = ( A , a ) \alpha=(A,a) α=(A,a),其中 A A A 是 elementary chain, a a a A A A 上的一个障碍物点
  • Wavelet is not of O ( 1 ) O(1) O(1) size anymore, but can be implicitly determined
  • A wavelet generated by a generator α = ( A , a ) \alpha = (A,a) α=(A,a) at time τ \tau τ is a contiguous set of reachable points q q q such that d ( α , q ) = τ d(\alpha, q) = \tau d(α,q)=τ and d ( α ′ , q ) ≥ τ d(\alpha', q) \geq \tau d(α,q)τ for all other generators α ′ \alpha' α in the wavefront.
  • A wavalet actually consists of a contiguous sequence of circular arcs centered at the obstacle vertices(如下图所示).

在这里插入图片描述

A bisector of two convex chains

  • Bisector is not of O ( 1 ) O(1) O(1) size anymore, can be implicityly determined by the two convex chains.

  • The bisector between the wavelets of two generators α \alpha α and α ′ \alpha' α , denoted by B ( α , α ′ ) B(\alpha,\alpha') B(α,α), consists of points q q q with d ( α , q ) = d ( α ′ , q ) d(\alpha, q)=d(\alpha',q) d(α,q)=d(α,q).

  • 如下图所示, B ( α , α ′ ) B(\alpha, \alpha') B(α,α) has multiple pieces each of which is a hyperbola defined by two obstacle vertices v ∈ α v\in \alpha vα and v ′ ∈ α ′ v'\in \alpha' vα such that the hyperbola consists of all points that have two shortest paths from s s s with v v v and v ′ v' v as the anchors, respectively.
    在这里插入图片描述

  • Issues: some operations on bisectors may not be solved in O ( 1 ) O(1) O(1) time

    • Compute the intersection of two bisectors
    • Compute the intersection between a bisector and an obstacle
  • This algorithm: O ( log ⁡ n ) O(\log n) O(logn) time using the tentative prune-and-search technique (Kirkpatrick and Snoeyink, 1995)

Wavefront propagation in a cell of S ( F ) S(F) S(F)

  • Sweep a line from bottom upwards and process events

在这里插入图片描述

  • Wavefronts of the other three edges of the cell will be obtained after all events are processed

在这里插入图片描述

Wavefront propagation in a non-empty cell of S ( F ) S(F) S(F)

  • The left/right side of the cell is a convex chain on the boundary of an obstacle
  • A new generator may be created at the tangent point q ′ q' q

在这里插入图片描述


Reducing the general case to the convex case

If the convex hulls of all obstacles are disjoint:

  • compute the convex hulls
  • compute shortest path map outside convex hulls
  • extend map into those pockets (障碍物凸壳内的空白部分) through their gates(绿色边)
    • the key subproblem

在这里插入图片描述

The key subproblem: Extend the shortest path map into a pocket through its gate cd

  • m m m: number of vertices of the map on cd
  • N N N: number of vertices of the pocket
  • G G G: number of vertices on the generators
  • O ( m log ⁡ m + N + G ) O(m \log m+N+G) O(mlogm+N+G) time and O ( m + N + G ) O(m+N+G) O(m+N+G) space to extend the map into the pocket
  • Over all pockets
    • ∑ m = O ( h ) \sum m=O(h) m=O(h)
    • ∑ N = O ( n ) \sum N=O(n) N=O(n)
    • ∑ G = O ( n ) \sum G=O(n) G=O(n)
  • Total complexity for all pockets: O ( n + h log ⁡ h ) O(n+h \log h) O(n+hlogh) time and O ( n ) O(n) O(n) space

在这里插入图片描述


参考资料


原文地址:https://blog.csdn.net/qq_41552508/article/details/141650682

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!