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

在这里插入图片描述


参考资料

  • STOC 2021 - A New Algorithm for Euclidean Shortest Paths in the Plane (YouTube)
  • Demo - Geometric k-th Shortest Paths
  • Tutorial - Euclidean Shortest Path Planning
  • An Output Sensitive Algorithm for Computing Visibility Graphs
  • An O ( n 2 log ⁡ n ) O(n^2\log n) O(n2logn) Algorithm for Computing Visibility Graphs
  • Computational Geometry Algorithms and Applications - Chapter 15
  • 平面中多边形障碍下最短路径的求解
  • 障碍最短路径算法研究
  • 空间加速结构 - 四叉树

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/54571.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

linux设置常见开机自启动命令

本文介绍了三种开机自启的方式,重点介绍使用systemctl的方式自启动的 方式一、修改 /etc/rc.d/rc.local 文件 /etc/rc.d/rc.local 文件会在 Linux 系统各项服务都启动完毕之后再被运行。所以你想要自己的脚本在开机后被运行的话,可以将自己脚本路径加到…

C++——关联式容器(4):set和map

在接触了诸如二叉搜索树、AVL树、红黑树的树形结构之后,我们对树的结构有了大致的了解,现在引入真正的关联式容器。 首先,先明确了关联式容器的概念。我们之前所接触到的如vector、list等容器,我们知道他们实际上都是线性的数据结…

51单片机——矩阵键盘

一、矩阵键盘原理图 我们发现: P17,P16,P15,P14控制行, P13,P12,P11,P10控制列。 所以我们如果要选择第四列,只需要把整个P1先给高电位1,再把P10给低电位0。 二、代码 P10xFF; P100; if(P170){Delay(20);while(P170);Delay(20);KeyNum…

【Linux笔记】虚拟机内Linux内容复制到宿主机的Window文件夹(文件)中

一、共享文件夹 I、Windows宿主机上创建一个文件夹 目录:D:\Centos_iso\shared_files II、在VMware中设置共享文件夹 1、打开VMware Workstation 2、选择需要设置的Linux虚拟机,点击“编辑虚拟机设置”。 3、在“选项”标签页中,选择“共…

【Stm32】从零建立一个工程

这里我们创建“STM32F103”系列的文件,基于“固件库” 1.固件库获取 https://www.st.com.cn/zh/embedded-software/stm32-standard-peripheral-libraries.html 2.使用Keil创建.uvprojx文件 前提是已经下载好了“芯片对应的固件” 3.复制底层驱动代码 将固件库下的…

LeetcodeTop100 刷题总结(一)

LeetCode 热题 100:https://leetcode.cn/studyplan/top-100-liked/ 文章目录 一、哈希1. 两数之和49. 字母异位词分组128. 最长连续序列 二、双指针283. 移动零11. 盛水最多的容器15. 三数之和42. 接雨水(待完成) 三、滑动窗口3. 无重复字符的…

嵌入式入门小工程

此代码基于s3c2440 1.点灯 //led.c void init_led(void) {unsigned int t;t GPBCON;t & ~((3 << 10) | (3 << 12) | (3 << 14) | (3 << 16));t | (1 << 10) | (1 << 12) | (1 << 14) | (1 << 16);GPBCON t; }void le…

上位机图像处理和嵌入式模块部署(linux小系统开发)

【 声明&#xff1a;版权所有&#xff0c;欢迎转载&#xff0c;请勿用于商业用途。 联系信箱&#xff1a;feixiaoxing 163.com】 和若干年前相比较&#xff0c;现在嵌入式linux开发要简单得多。稍微贵一点的有树莓派&#xff0c;国产的有各种水果派&#xff0c;基本上都可以按照…

Google 扩展 Chrome 安全和隐私功能

过去一周&#xff0c;谷歌一直在推出新特性和功能&#xff0c;旨在让用户在 Chrome 上的桌面体验更加安全&#xff0c;最新的举措是扩展在多个设备上保存密钥的功能。 到目前为止&#xff0c;Chrome 网络用户只能将密钥保存到 Android 上的 Google 密码管理器&#xff0c;然后…

【学习笔记】STM32F407探索者HAL库开发(四)F103时钟系统配置

【学习笔记】STM32F407探索者HAL库开发&#xff08;四&#xff09;F103时钟系统配置 1 STM32F1时钟树1.1 STM32F103时钟系统图1.2 STM32F103时钟树简图1.2.1 高速部分1.2.2 低速部分 1.3 函数配置1.4 时钟输出1.5 STM32CubeMX时钟树配置F11.6 时钟系统对与嵌入式开发的重要性 1…

Spring IDEA 2024 自动生成get和set以及toString方法

1.简介 在IDEA中使用自带功能可以自动生成get和set以及toString方法 2.步骤 在目标类中右键&#xff0c;选择生成 选择Getter和Setter就可以生成每个属性对应的set和get方法&#xff0c; 选择toString就可以生成类的toString方法&#xff0c;

Linux 文件系统(下)

目录 一.文件系统 1.文件在磁盘上的存储方式 a.盘面、磁道和扇区 b.分区和分组 2.有关Block group相关字段详解 a.inode编号 b.inode Table&#xff08;节点表&#xff09; c.Data blocks&#xff08;数据区&#xff09; d.小结 二.软硬链接 1.软链接 a.软链接的创建…

数据湖 Data Lake-概述

Data Lake 1. 数据湖的定义 数据湖是一种存储系统&#xff0c;用于集中存储大量的原始数据&#xff0c;可以按数据本来的原始格式进行存储&#xff0c;用户可以在需要时提取和分析这些数据。 A data lake is a centralized repository designed to hold vast volumes of data …

OpenCV特征检测(4)检测图像中的角点函数cornerHarris()的使用

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 Harris 角点检测器。 该函数在图像上运行 Harris 角点检测器。类似于 cornerMinEigenVal 和 cornerEigenValsAndVecs&#xff0c;对于每个像素 (…

如何将生物序列tokenization为token?

原理讲解 tokenization是自然语言处理领域非常成熟的一项技术&#xff0c;tokenization就是把我们研究的语言转换成计算机能够识别的数字——token。 在生物领域&#xff0c;如何把核苷酸或氨基酸序列tokenization成token呢&#xff1f; 我们可以使用k-mer技术&#xff1a; k-m…

网络设备登录——《路由与交换技术》实验报告

目录 一、实验目的 二、实验设备和环境 三、实验记录 1.通过 Console 登录 步骤1:连接配置电缆。 步骤2:启动PC,运行超级终端。 步骤3:进入Console 配置界面 2.通过 Telnet 登录 步骤1:通过 Console 接口配置 Telnet 用户。 步骤2:配置 super 口令 步骤3:配置登录欢迎…

神经网络构建原理(以MINIST为例)

神经网络构建原理(以MINIST为例) 在 MNIST 手写数字识别任务中&#xff0c;构建神经网络并训练模型来进行分类是经典的深度学习应用。MNIST 数据集包含 28x28 像素的手写数字图像&#xff08;0-9&#xff09;&#xff0c;任务是构建一个神经网络&#xff0c;能够根据输入的图像…

吉首大学--23级题目讲解

7-1 单链表基本操作 在 C/C 中&#xff0c;.&#xff08;点&#xff09;和 ->&#xff08;箭头&#xff09;运算符用于访问结构体或类的成员&#xff0c;但它们的使用场景不同。 1. . 运算符 . 运算符用于访问结构体或类的成员&#xff0c;通过对象或结构体变量直接访问。…

es的封装

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、类和接口介绍0.封装思想1.es的操作分类 二、创建索引1.成员变量2.构造函数2.添加字段3.发送请求4.创建索引总体代码 三.插入数据四.删除数据五.查询数据 前…

Element Plus 中Input输入框

通过鼠标或键盘输入字符 input为受控组件&#xff0c;他总会显示Vue绑定值&#xff0c;正常情况下&#xff0c;input的输入事件会正常被响应&#xff0c;他的处理程序应该更新组件的绑定值&#xff08;或使用v-model&#xff09;。否则&#xff0c;输入框的值将不会改变 不支…