The existance of a cycle of length $n/2$ in a simple graph is NP-Complete

1.1k Views Asked by At

Definition:
A hamiltonian cycle is a cycle which crosses all of the vertices.


Problem (i): An arbitrary simple graph $G$ is given. Does $G$ have a hamiltonian cycle?


Assume that we know problem (i) is NP-Complete. How can we show that problem (ii) is NP-Complete, too?

Problem (ii): A simple graph $G$ is given. Does $G$ have a cycle of length $n/2$? ($n$ is the number of vertices)


Note 1: I know that i should use a reduction. But, The problem is that i don't know a way to translate the input of problem (ii) into an input of problem (i). Any idea?

Note 2: I want to learn a reduction. So, The thing that matters is the reduction, not just the answer of the question. I want a translation function which takes a simple graph as input and returns another simple graph which can be seen as the input of problem (i).

Thanks in advance.

1

There are 1 best solutions below

4
On BEST ANSWER

Problem (ii) is NP-complete even for graphs with $n/2$ isolated vertices. :-)