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

news2024/9/20 13:29:40

前言

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

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

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.coloradmin.cn/o/2145663.html

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

相关文章

Redis(redis基础,SpringCache,SpringDataRedis)

文章目录 前言一、Redis基础1. Redis简介2. Redis下载与安装3. Redis服务启动与停止3 Redis数据类型4. Redis常用命令5. 扩展数据类型 二、在Java中操作Redis1. Spring Data Redis的使用1.1. 介绍1.2. 环境搭建1.3. 编写配置类,创建RedisTemplate对象1.4. 通过Redis…

助力数字农林业发展服务香榧智慧种植,基于嵌入式端超轻量级模型LeYOLO全系列【n/s/m/l】参数模型开发构建香榧种植场景下香榧果实检测识别系统

作为一个生在北方但在南方居住多年的人,居然头一次听过香榧(fei)这种作物,而且这个字还不会念,查了以后才知道读音(fei),三声,这着实引起了我的好奇心,我相信…

C++入门基础知识75(高级)——【关于C++ Web 编程】

成长路上不孤单😊😊😊😊😊😊 【14后😊///C爱好者😊///持续分享所学😊///如有需要欢迎收藏转发///😊】 今日分享关于C Web 编程的相关内容! 关于…

HomeAssistant显示节假日

先看效果 步骤&#xff1a; 新建卡片时选择“Markdown 卡片”代码在文章最下方&#xff0c;当然你也可以自己修改 点击保存/完成 ### {% if now().hour > 6 and now().hour < 9 -%} 早上好&#xff0c; {%- elif now().hour > 9 and now().hour < 12 -%} 上午好…

【SSM-Day2】第一个SpringBoot项目

运行本篇中的代码&#xff1a;idea专业版或者idea社区版本&#xff08;2021.1~2022.1.4&#xff09;->这个版本主要是匹配插件spring boot Helper的免费版(衰) 【SSM-Day2】第一个SpringBoot项目 框架->Spring家族框架快速上手Spring BootSpring Boot的作用通过idea创建S…

【iOS】引用计数

引用计数 自动引用计数引用计数内存管理的思考方式自己生成的对象&#xff0c;自己所持有非自己生成的对象&#xff0c;自己也能持有不再需要自己持有的对象时释放无法释放非自己持有的对象 自动引用计数 自动引用计数(ARC,Automatic Reference Counting)是指内存管理中对引用…

最新多模板测算系统源码 测算系统海外多语言版

最新多模板测算系统源码 测算系统海外多语言版 源码下载&#xff1a;https://download.csdn.net/download/m0_66047725/89763600 更多资源下载&#xff1a;关注我。

10年408考研真题-数据结构

23.[2010统考真题]若元素 a,b,c,d,e,f 依次进栈&#xff0c;允许进栈、退栈操作交替进行&#xff0c;但不允许连续3次进行退栈操作&#xff0c;不可能得到的出栈序列是(D)。 A.dcebfa B.cbdaef C.bcaefd D.afedcb 解析&#xff1a;直接看D选项&#xff0c…

基于WOA-SVM的乳腺癌数据分类识别算法matlab仿真,对比BP神经网络和SVM

目录 1.算法运行效果图预览 2.算法运行软件版本 3.部分核心程序 4.算法理论概述 4.1 支持向量机&#xff08;SVM&#xff09; 4.2 WOA 4.3 WOA优化SVM参数 5.算法完整程序工程 1.算法运行效果图预览 (完整程序运行后无水印) 2.算法运行软件版本 matlab2022a 3.部分核…

探索开放资源上指令微调语言模型的现状

人工智能咨询培训老师叶梓 转载标明出处 开放模型在经过适当的指令调整后&#xff0c;性能可以与最先进的专有模型相媲美。但目前缺乏全面的评估&#xff0c;使得跨模型比较变得困难。来自Allen Institute for AI和华盛顿大学的研究人员们进行了一项全面的研究&#xff0c;探索…

eNSP简单用法

建立一个简单的拓扑图 点击绿色三角开启设备 双击设备可以进行命令编辑 视图 分为三个视图&#xff1a;用户视图、系统视图、接口视图 用户视图 在默认模式下就是&#xff0c;为<huawei> 按ctrlz返回用户视图 系统视图&#xff1a; 在用户视图下输入sys切换&#…

【数据可视化】Arcgis api4.x 热力图、时间动态热力图、timeSlider时间滑块控件应用 (超详细、附免费教学数据、收藏!)

1.效果 目录 1.效果 2.安装配置 3.热力图 4.TimeSlider滑块应用 4.1 时间滑块控件 4.2 添加控件 5.时间动态热力图 2.安装配置 这里不教大家如何在前端框架使用arcgis api。不过npm安装、css如何引入、教学数据存放与图层加载的教程&#xff0c;可以浏览我之前发的一篇文…

基于DeepCFD模型和CNN/U-Net模型的流场预测

1.遇到问题 计算流体力学&#xff08;Computational fluid dynamics, CFD&#xff09;通过对Navier-Stokes方程&#xff08;简称N-S方程&#xff09;的精确求解&#xff0c;能够精准获取流体在不同状态下的物理量分布详情&#xff0c;这些物理量包括但不限于密度、压力及速度等…

Nginx从入门到入土(二): 学习内容与安装

Nginx学习内容 1.理解Nginx在实际项目中的应用场景 2.理解正向代理和反向代理 3.Nginx在Linux和Windows上的安装 4.Nginx的运行模型概念与日志管理 5.Nginx.config核心配置文件与配置HTTPS证书 6.基于Nginx解决跨域&#xff0c;实现防盗链&#xff0c;缓存&#xff0c;压…

windows C++ 并行编程-异步消息块(一)

代理库提供了多种消息块类型&#xff0c;使你能够以线程安全的方式在应用程序组件之间传播消息。 这些消息块类型通常与 concurrency::send、concurrency::asend、concurrency::receive 和 concurrency::try_receive 等各种消息传递例程配合使用。 本文包含以下各节&#xff1…

C#通过MXComponent与三菱PLC通信

1&#xff0c;MXComponent安装包与手册。 https://download.csdn.net/download/lingxiao16888/89767137 2&#xff0c;使用管理员权限打开MXComponent&#xff0c;并进行配置。 3&#xff0c;引用相应的类库。 //通信类库 ActUtlTypeLib.dll或者ActProgType.dll 注明&#x…

Excel常用函数大全

Excel常用函数介绍与示例应用 在Excel中&#xff0c;函数是进行数据处理和分析的强大工具。对于新手来说&#xff0c;掌握一些基本的函数使用方法能够大大提升工作效率。以下是一份通俗易懂、适合新手的Excel函数使用方法总结&#xff1a; 1. 求和函数&#xff08;SUM&#x…

leetcode75-9 压缩字符串 双指针原地算

题目太复杂了 没做出来 计算过程大概是双指针处理数组&#xff0c; 其中两个知识点一个是length 字符数组直接加 不用加括号 还有就是数字转字符需要转换 数字转换成字符 不能直接转换&#xff01; 需借助数字转字符串&#xff0c; 首先将数字转为字符串&#xff0c;…

C++---类与对象一

类的定义 class className{//成员字段//成员函数 };class定义类的关键字&#xff0c;className是自己决定的类名&#xff0c;{ } 为类的主体&#xff0c;花括号里是类的内容。类的内容大致分为类的成员属性&#xff08;变量&#xff09;和类的成员函数。注意定义类后面需要跟;…

SpringBoot - 基于 Java的超市进销存系统

专业团队&#xff0c;咨询就送开题报告&#xff0c;欢迎大家私信&#xff0c;留言&#xff0c;联系方式在文章底部 摘 要 随着信息化时代的到来&#xff0c;管理系统都趋向于智能化、系统化&#xff0c;超市进销存系统也不例外&#xff0c;但目前国内仍都使用人工管理&#xf…