简体   繁体   English

遍历在同一点结束的所有顶点的加权图

[英]Traversing weighted graph through all vertecies ending up at the same point

Is there an algorithm that will allow me to traverse a weighted graph in the following manner? 是否有一种算法可以让我以以下方式遍历加权图?

  • Start at a specific node 从特定节点开始
  • Go through all vertecies in the graph 遍历图中的所有顶点
  • Do this in the least amount of time (weights are times) 在最短的时间内执行此操作(权重就是时间)
  • End up at the starting node 结束于起始节点

Sounds like the Travelling Salesman Problem to me. 听起来对我来说是旅行商问题 An NP-hard problem. 一个NP难题。 There is no polynomial time algorithm that will give you the optimum solution. 没有多项式时间算法可以为您提供最佳解决方案。 You could use a search heuristic to get a close to optimal solution though. 您可以使用搜索试探法获得接近最佳的解决方案。

I am not sure, if any efficient algorithm exists, but a brute force approach would surely give you the answer. 我不确定是否存在任何有效的算法,但是蛮力方法肯定会给您答案。

In any case, can you give the constraints on the number of vertices/edges. 在任何情况下,都可以限制顶点/边的数量。

As Greg Sexton stated before me, it is a classic example of the Travelling Salesman Problem. 正如格雷格·塞克斯顿(Greg Sexton)在我面前所说的那样,这是旅行商问题的一个典型例子。 There are many advanced algorithms about for handling this style of problem, which is best for your particular situation rather depends on the graph. 有许多用于处理此类问题的高级算法,这最适合您的特定情况,而不是取决于图表。 If the number of vertices is high, you will need substantial computational power to get it done within a realistic time frame. 如果顶点数量很多,您将需要大量的计算能力才能在现实的时间内完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否有经过充分研究的优化,可以找到遍历图形中每个加权边的最短路径? - Is there a well-studied optimization to find the shortest path traversing every weighted edge through a graph? 通过频繁更新,可以模拟滚动加权骰子(或遍历加权图) - Efficently simulate rolling weighted dice (or traversing a weighted graph), with frequent updates 在加权图中寻找最佳起点 - Finding Optimal Starting Point In Weighted Graph 在无向加权图中找到“最公平”的交汇点 - Finding the "fairest" meeting point in an undirected weighted graph 遍历有向图中的所有可用路径 - Traversing through all the available paths in a diagraph 遍历数据结构中所有可能的元素 - Traversing through all possible elements in the data structure 在加权循环有向图中找到从源到目的地的所有路径 - Find all paths from source to destination in a weighted cyclic directed graph 在无向加权图中找到所有循环权重的高效算法 - Efficient algorithm to find weights of all cycles in an undirected weighted graph 仅计算加权图中所有对之间的路径成本 - Compute costs only of paths between all pairs in weighted graph 在有向完整加权图中访问所有顶点的最短路径 - Shortest path that visits all vertices in a directed complete weighted graph
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM