Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
342 views
in Technique[技术] by (71.8m points)

turing machines - approximation algorithm for hamiltonian cycle

Assume g(G,v) is an approximation function (algorithm) that returns the size (number of edges) of the longest simple cycle that v belongs to in a directed graph G, with a mistake range of +5 -5.

Meaning:

Size of the longest simple cycle in G that v belongs to - 5 <= g(G,v) <= Size of the longest simple cycle in G that v belongs to +5

Prove that if g runs in polynomial time N=NP.

I tried to use the obvious - find an Hamiltonian path (or cycle) from a to b in Graph G by deleting all edges from all the vertices to a, and adding an edge from b to a, then if there is an Hamiltonian path, g(G,a) must return Size >= V-5, lets say it returns V, but if there isn't an Hamiltonian path, g(G,a) could also return V. I tried to use different variations of the graph, but still same result.

Is there a different approach I could use, maybe a different NP-complete problem ?

question from:https://stackoverflow.com/questions/65920793/approximation-algorithm-for-hamiltonian-cycle

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...