recategorized by
4,535 views
8 votes
8 votes

Let SHAM$_3$ be the problem of finding a Hamiltonian cycle in a graph $G=(V,E)$  with $|V|$  divisible by $3$ and DHAM$_3$  be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true? 

  1. Both DHAM$_3$ and SHAM$_3$ are NP-hard 
  2. SHAM$_3$ is NP-hard, but DHAM$_3$ is not 
  3. DHAM$_3$ is NP-hard, but SHAM$_3$ is not 
  4. Neither DHAM$_3$ nor SHAM$_3$ is NP-hard
recategorized by

2 Answers

Best answer
18 votes
18 votes

The only difference between SHAM and DHAM, in SHAM |V| is divisible by $3$ which can be check in constant amount of time.

S,o the hardness of the two problem will the same. Next, finding hamiltonian cycle comes under NPC problem and NPC problem is a subset of NPH, so both are NPH.

So, option (A).

edited by
1 votes
1 votes
actually  DHAM is well known npc problem. SHAM is optimization problem which is more harder than decision problem so if decison problem is npc then optimization problem willl also be npc as it is more harder .Now DHAM is poly time reducible to SHAM as with DHAM we can have 3 possible cases :1) no of vertices is exactly divisible by 3 then it iss direectly reducible to SHAM 2) if no of vertex is 1mod 3just add 2 extraa vertices 3) if no of vertex 2mod3 add 1 extraa vertex thus every instance of DHAM can be converted to SHAM morever SHAM is verifiable hence np so SHAM is also np complete
edited by
Answer:

Related questions

93 votes
93 votes
8 answers
2
Rucha Shelke asked Sep 22, 2014
33,981 views
Consider the regular language $L=(111+11111)^{*}.$ The minimum number of states in any DFA accepting this languages is:$3$$5$$8$$9$