简体   繁体   English

如何找到最短路径覆盖加权无向图中的一组特定边?

[英]How to find the shortest path cover a specific set of edges in a weighted undirected graph?

Given a weighted undirected graph(say with nodes A,B,C,D,E), and a set of jobs which require to go from one node to another(say A->C,AB,D->E,E->F). 给定一个加权无向图(例如,具有节点A,B,C,D,E),以及一组需要从一个节点移动到另一个节点的工作(例如,A-> C,AB,D-> E,E- > F)。 How to find the shortest path starting from A which covers all jobs in the job set? 如何找到从A开始的最短路径,该路径涵盖了作业集中的所有作业?

PS Triangle inequality applies, which means if there exists an edge from x to y then it is the shortest path from x to y. PS三角不等式适用,这意味着如果存在从x到y的边,那么它是从x到y的最短路径。

Do not need to go back to A. 不需要回到A。

Jobs are directed. 工作是有方向的。

Hinted to use A star algorithm. 提示使用A star算法。

I'm working on something similar. 我正在做类似的事情。 This algorithm might be helpful www.geeksforgeeks.org/travelling-salesman-problem-set-1/ 该算法可能会有所帮助www.geeksforgeeks.org/travelling-salesman-problem-set-1/

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

相关问题 给定一组边和一个无向图,我如何选择最好的边添加到图中以最小化最短路径? - Given a set of edges and an undirected graph, how do I pick the best edge to add to graph to minimize the shortest path? 无向加权图中2个顶点之间的最短路径 - shortest path between 2 vertices in undirected weighted graph 如何在无向图中找到最短路径和最长路径? - how to find shortest path and longest path in an undirected graph? 在 O(V + E) 时间内在加权无向图中找到从源到目标的最短路径 - Find the shortest path from source to target in a weighted-undirected graph in O(V + E) time 为了找到最短路径,如何在有向加权图中将一个边精确设置为零? - How to set exactly one edge to zero in directed weighted graph in order to find shortest path? 如何从加权图中的顶点找到长度为k的最短路径? - How to find the shortest path of length k from a vertex in a weighted graph? 如何查找加权图中是否存在多个最短路径? - How to find if there is more than one shortest path in a weighted graph? 加权无向图上的最长路径 - Longest path on weighted undirected graph 如何计算具有加权顶点的图的最短路径? - How to calculate the shortest path for a graph with weighted vertices? 如何在加权(无向)图中找到两个节点之间的长度X的路径 - How to Find A Path of Length X Between Two Nodes in A Weighted (Undirected) Graph
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM