cycle - Using NP Reductions -
i have been having difficulty understanding reductions using np problems , clarification. consider following problem:
show following problem np-complete designing polynomial-time reduction algorithm known np-complete problem. problem: given undirected graph g=(v,e) , integer k, test whether g has cycle of length k.
i know there other topics regarding subject, still not sure understand how reductions done.
it understanding how approach problem such this.
- assume given problem can solved in polynomial time.
- use given problem solve problem know np-hard in polynomial time
- this creates contradiction, assumption must incorrect
- thus, given problem mustn't solvable in polynomial time
so, problem this, proper approach?
- if choose k length of hamiltonian cycle in graph (assuming there one) means problem used find hamiltonian cycle in graph.
- because can find hamiltonian cycle in np time, problem must solvable in np time.
this looks rather homework i'll give hint, try consider unweighted graph v
, k
nodes. equivalent finding cycle length k
, solvable algorithm assumed polynomial? try proceed this.
Comments
Post a Comment