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.

  1. assume given problem can solved in polynomial time.
  2. use given problem solve problem know np-hard in polynomial time
  3. this creates contradiction, assumption must incorrect
  4. thus, given problem mustn't solvable in polynomial time

so, problem this, proper approach?

  1. if choose k length of hamiltonian cycle in graph (assuming there one) means problem used find hamiltonian cycle in graph.
  2. 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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -