【Hacker News搬运】Dijkstra通过超越最坏情况堆的普遍最优性
-
Title: Universal optimality of Dijkstra via beyond-worst-case heaps
Dijkstra通过超越最坏情况堆的普遍最优性
Text:
Url: https://arxiv.org/abs/2311.11793
由于我无法直接访问外部链接,如arXiv.org上的论文,我将无法直接阅读或分析该论文的内容。 但是,我可以提供一个一般性的指导,告诉你如何使用JinaReader(一个基于Jina的文档处理框架)来抓取、分析并总结论文内容,以及如何处理非中文内容。 1. **抓取内容**: - 首先,你需要从arXiv.org下载论文的PDF文件。 - 使用JinaReader中的`PdfReader`组件来加载和解析PDF文件。 ```python from jina.executors import PdfReader pdf_reader = PdfReader() pdf_data = pdf_reader.read("path_to_paper.pdf")
-
分析内容:
- 使用JinaReader中的其他执行器来分析文本内容。例如,可以使用
TextRank
提取摘要。 - 将解析后的数据传递给分析执行器。
from jina.executors.summarization import TextRank summarizer = TextRank() summary = summarizer.process(pdf_data) print(summary)
- 使用JinaReader中的其他执行器来分析文本内容。例如,可以使用
-
处理非中文内容:
- 如果论文不是中文,你需要先使用机器翻译工具将其翻译成中文。
- JinaReader可以与外部API集成,例如Google Translate API,来进行翻译。
from jina.executors.translation import GoogleTranslate translator = GoogleTranslate(target_language='zh-CN') translated_text = translator.translate(pdf_data)
请注意,上述代码仅为示例,实际使用时你需要注册Google Translate API并设置API密钥。
-
总结:
- 使用翻译后的中文内容进行总结。
summarizer = TextRank() summary = summarizer.process(translated_text) print(summary)
请根据实际论文的内容和结构调整上述步骤,并确保你有适当的权限和API密钥来访问翻译服务。如果你有论文的具体内容或摘要,我可以帮助你进行更具体的分析。
## Post by: foweltschmerz ### Comments: **foota**: I've gone down a bit of a rabbit hole on path finding in the last week or two (most recently, this isn't the first time). When you have some knowledge of the topology of the graph you can use different techniques to do better than djikstra's.<p>Of course, if you have lots of time and space and a completely static graph, you can run all pairs shortest paths and simply store all the results for O(1) path lookup, but there are intermediates for varying types of graphs. This stack exchange article is a good overview: <a href="https://cstheory.stackexchange.com/questions/11855/how-do-the-state-of-the-art-pathfinding-algorithms-for-changing-graphs-d-d-l" rel="nofollow">https://cstheory.stackexchange.com/questions/11855/how-do-th...</a>.<p>I've been wondering about how well D* lite would perform in practice with a somewhat varying graph. I read some suggestions that if the graph is changing even a bit on occasion, then it will mostly degrade to A*, since many changed paths would need to be re-evaluated.<p>In the context of games, I've also been thinking about a technique called true distance heurustics (TDH), where you essentially precompute the distances between some fixed set of nodes, and then use those as a part of the heurustic for A* (or D* lite in this case), but it seems like updating these TDH in the case of a changing graph might introduce just as much overhead as not having them in the first place. It might be an interesting trade off though, if you have some "lines" (e.g., think train lines) that are much faster than roadways, you could handle each of these specially via the TDH, and in exchange you would be able to assume a lower "max speed" for use with the A* heurustic, allowing you to explore fewer paths (since with a lower "max speed" paths will more rapidly increase in cost), whereas if you had to assume all car based paths could move as fast as a train, you would have to explore more paths. > **foota**: 我;在过去的一两周里,我在寻路方面遇到了一些困难(最近,这不是第一次)。当你对图的拓扑结构有所了解时,你可以使用不同的技术来做得比djikstra更好;s.<p>当然,如果你有大量的时间和空间以及一个完全静态的图,你可以运行所有最短路径对,并简单地存储所有结果以进行O(1)路径查找,但也有不同类型的图的中间过程。这篇关于堆栈交换的文章是一个很好的概述:<a href=“https:”cstheory.stackchange.com“problems”11855";如何使用更改图-d-d-l的状态寻路算法",rel=“nofollow”>https:/;cstheory.stackchange.com;问题";11855℉;如何…</a><p> 我;我一直想知道D*lite在使用稍微不同的图形时会有多好的表现。我读到一些建议,如果图形偶尔发生一点变化,那么它大多会降级为a*,因为许多改变的路径需要重新评估<p> 在游戏的背景下,我;我也一直在考虑一种称为真距离启发式(TDH)的技术,在这种技术中,你基本上可以预先计算一些固定节点集之间的距离,然后将这些距离用作a*(在这种情况下为D*lite)启发式的一部分,但似乎在图发生变化的情况下更新这些TDH可能会带来与最初没有它们一样多的开销。不过,这可能是一个有趣的权衡,如果你有一些";线条”;(例如,想想火车线路)比公路快得多,你可以通过TDH专门处理每一条线路,作为交换,你可以假设一条较低的";“最大速度”;与A*heuristic一起使用,允许您探索更少的路径(因为“最大速度”较低的路径会更快地增加成本),而如果您必须假设所有基于汽车的路径都可以像火车一样快,您将不得不探索更多的路径。 **blt**: The paper's name is shorter than this post title, and summarizes the result much better. > **blt**: 论文";s的名字比这篇文章的标题短,并且更好地总结了结果。 **vanderZwan**: > <i>Our universal optimality result reveals a surprisingly clean interplay between this property and Dijkstra’s algorithm: Any heap with the working set property enables the algorithm to efficiently leverage every structural attribute of the graph it operates on, to the fullest extent that any comparison-based algorithm possibly can.</i><p>That last bit makes me wonder: what would a shortest path algorithm <i>without</i> comparisons look like? Are there also "radix sort" like approaches to shortest-path algorithms that surpass comparison-based algorithms or something? > **vanderZwan**: ><i> 我们的普遍最优性结果揭示了这个属性和Dijkstra算法之间惊人的干净相互作用:任何具有工作集属性的堆都能使算法有效地利用它所操作的图的每个结构属性,达到任何基于比较的算法可能达到的最大程度</i> <p>最后一点让我想知道:没有</i>比较的最短路径算法<i>会是什么样子?是否也有";基数排序”;比如超越基于比较的算法的最短路径算法或其他方法? **akoboldfrying**: Robert Tarjan's name is on a simply astounding number of breakthrough papers in graph algorithms, spanning decades. > **akoboldfrying**: 罗伯特·塔扬;几十年来,在图算法领域的突破性论文中,s的名字出现在数量惊人的论文中。 **fiddlerwoaroof**: Does this mean that Dijkstra’s algorithm can perform better than something like A*? > **fiddlerwoaroof**: 这是否意味着Dijkstra的算法可以比A*这样的算法表现更好?
-