简体   繁体   English

在加权无向图中找到一条具有多项式时间最大代价的简单路径吗? 是NP吗?

[英]Is finding a simple path in a weighted undirected graph with maximum cost in polynomial time? Is it NP?

I need to know if it is possible to find a simple path with maximum cost in any weighted undirected graph. 我需要知道是否有可能在任何加权无向图中找到一条具有最大成本的简单路径。

I mean to find THE MOST expensive path of all for any pair of vertex. 我的意思是找到任何一对顶点的最昂贵的路径。

Input: Graph G = (V,E) 输入:图G =(V,E)

Output: The cost of the most expensive path in the graph G. 输出:图形G中最昂贵路径的成本。

Is this problem NP-Complete?, I think it is. 我认为是NP-Complete吗? Could you provide any reference to an article where I can review this. 您能否提供对本文的任何参考,以便我可以对此进行审查。

You're not the first to think of this problem. 您不是第一个想到此问题的人。 In fact, it was the first link in the google search results. 实际上,它是google搜索结果中的第一个链接。

edit 编辑
Guys, un-weighted graph is a special case of weighted graph: all edges have weight 1 :) 伙计们,未加权图是加权图的特例:所有边的权重为1 :)

This is similar to traveling salesman, except your heuristic is the Max and not Min. 这类似于旅行推销员,除了您的试探法是最大而不是最小。 Read up on the traveling salesman. 阅读旅行推销员上的内容。

The problem is NP complete because it can be derived from a problem that is already proven to be NP-Complete (Traveling salesman). 该问题是NP完整的,因为它可以源自已经被证明是NP完全(旅行推销员)的问题。 The answer is checkable in polynomial time, but an answer cannot be found in polynomial time. 可以在多项式时间内检查答案,但在多项式时间内找不到答案。

Read http://en.wikipedia.org/wiki/Travelling_salesman_problem 阅读http://en.wikipedia.org/wiki/Travelling_salesman_problem

Yes, this problem is NP because you are asking for the maximum which means that you'll need to go through all possible paths. 是的,这个问题是NP,因为您要索取最大值 ,这意味着您需要走所有可能的路径。 The decision version of this problem ("is there a path of length n ?") is known NP-complete (as noted above). 该问题的决策版本(“是否存在长度为n的路径”)是已知的NP完全(如上所述)。

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

相关问题 在具有相同数量的顶点和边NP-Complete的加权无向图中找到具有最大成本的简单路径的问题吗? - Is the problem of finding the simple path with maximum cost in a weighted undirected graph with the same number of vertex and edges NP-Complete? 在加权无向图中找到固定成本的路径? - Finding paths of fixed cost in weighted undirected graph? 使用邻接表的无向加权图上的最小成本路径 - Minimum cost path on a undirected weighted graph using an adjacency list 在完整的无向加权图中找到哈密顿路径 vs 哈密顿回路 - Finding Hamiltonian path vs Hamiltonian circuit in a complete undirected weighted graph 是否有一种算法可以在无向图中找到成本最高的长度为 k 的路径 - Is there an algorithm for finding the path of length k with the highest cost in a undirected graph 加权无向图上的最长路径 - Longest path on weighted undirected graph 查找树中两个顶点之间的简单路径(无向简单图) - Finding simple path between two vertices in a tree (undirected simple graph) 在无向加权图中找到“最公平”的交汇点 - Finding the "fairest" meeting point in an undirected weighted graph 无向图的最小加权路径树 - Minimum Weighted Path Tree of an Undirected Graph 无向加权图中2个顶点之间的最短路径 - shortest path between 2 vertices in undirected weighted graph
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM