Is HSC NP-Complete in Graph Theory?

  • MHB
  • Thread starter mathmari
  • Start date
In summary, HSC (Hamiltonian Cycle problem) is a famous mathematical problem in graph theory, while NP-complete is a complexity class consisting of the most difficult problems in the class NP. To prove that HSC is NP-complete, we must demonstrate that it is a member of NP and that any other NP problem can be reduced to HSC in polynomial time. HSC is considered a difficult problem as it is a special case of the even more complex Hamiltonian Path problem, and no efficient algorithm has yet been found to solve it in polynomial time. It is important to show that HSC is NP-complete as it helps us understand its complexity and its relationship to other NP-complete problems, which can be useful in developing more efficient algorithms for solving
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

I am looking at the following solved exercise:
A cycle $C$ in a graph is called simple, if no vertex in $C$ is appeared more than twice. For example a hamiltonian cycle is a simple cycle, that goes through every vertex of a graph.
The HALF-SIMPLE-CYCLE (HSC) Problem asks if in a graph with $n$ vertices there is a simple cycle of length $\geq \frac{n}{2}$.
Show that HSC is NP-complete. The solution is the following:
Let $G=(V,E)$ a graph with $V=\{1, \dots, n\}$. We add to $G$ $n$ vertices, but no other edges. That means that we define $V'=\{1, \dots , 2n\}$ and $G'=(V',E)$. Then it holds that $G\in \text{ HAM } \Leftrightarrow G'\in \text{ HSC }$. First of all, to show that the problem is NP-complete, we have to show that it is NP and that it is NP-hard, right? (Wondering)

To show that the problem is in NP, we do the following:
A non-deterministic Turing machine guesses a cycle of length $\geq \frac{n}{2}$ and checks if this cycle is simple. This takes linear time, which is equal to the size of the cycle.
Is this correct? (Wondering)

Then to show that the problem is NP-hard, we want to reduce the HAM Problem to the HSC Problem.
The HAM Problem is to determine if there is a simple path that crosses each vertex of the graph.
When we consider for the HSC Problem a graph $G'$ that is created by $G$ when we add $n$ more vertices, without edges, we have the following:
When $G$ is in HAM, we know that there is a simple path that crosses each vertex of the graph. That means that for $G'$ there is a simple path that crosses the half number of all vertices of the graph, so $G'$ is in HSC.
Is this correct? (Wondering)
Is this an iff statement, or do we have to prove also the other direction? (Wondering)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
mathmari said:
A cycle $C$ in a graph is called simple, if no vertex in $C$ is appeared more than twice.
I am bothered by this definition. So, if $a,b,c\dots$ are vertices, is the following cycle simple: $a,b,c,d,b,e,a$ (provided adjacent vertices in this sequence are connected)? Wikipedia defines a simple cycle as a "closed walk with no repetitions of vertices and edges allowed, other than the repetition of the starting and ending vertex".

mathmari said:
First of all, to show that the problem is NP-complete, we have to show that it is NP and that it is NP-hard, right?
Yes.

mathmari said:
To show that the problem is in NP, we do the following:
A non-deterministic Turing machine guesses a cycle of length $\geq \frac{n}{2}$ and checks if this cycle is simple. This takes linear time, which is equal to the size of the cycle.
Is this correct?
Yes, though I am not sure about linear time. The Turing machine model of computation is robust only with respect to polynomial time, meaning that this concept does not depend on the implementation details of the machine (whether the tape is infinite in both directions and so on). Within polytime, computations that take linear time on a two-tape machine generally take quadratic time on a single-tape machine. So if we insist on linear time, it may be necessary to define a TM more precisely.

mathmari said:
Then to show that the problem is NP-hard, we want to reduce the HAM Problem to the HSC Problem.
Yes.

mathmari said:
The HAM Problem is to determine if there is a simple path that crosses each vertex of the graph.
This is not precise enough. The key is visiting each vertex (except for the first and last one) exactly once.

mathmari said:
When $G$ is in HAM, we know that there is a simple path that crosses each vertex of the graph. That means that for $G'$ there is a simple path that crosses the half number of all vertices of the graph, so $G'$ is in HSC.
Is this correct?
Yes.

mathmari said:
Is this an iff statement, or do we have to prove also the other direction?
The answer is yes to both questions.
 

FAQ: Is HSC NP-Complete in Graph Theory?

What is HSC and NP-complete?

HSC stands for Hamiltonian Cycle problem, which is a famous mathematical problem in graph theory. NP-complete is a complexity class, which is a set of problems that are considered to be the most difficult problems in the class NP.

How can you show that HSC is NP-complete?

To show that HSC is NP-complete, we need to prove two things: first, that HSC is a member of the class NP, meaning that a proposed solution can be verified in polynomial time; and second, that any other NP problem can be reduced to HSC in polynomial time. This reduction is often done through a reduction from the well-known NP-complete problem, the Hamiltonian Path problem.

What makes HSC a difficult problem?

HSC is considered a difficult problem because it is a special case of the NP-complete problem, the Hamiltonian Path problem. This means that if we can solve HSC, then we can also solve the more general Hamiltonian Path problem. However, to date, there is no known efficient algorithm that can solve HSC in polynomial time.

Why is it important to show that HSC is NP-complete?

Showing that HSC is NP-complete has significant implications in both mathematics and computer science. It helps us understand the complexity of HSC and its relationship to other NP-complete problems. This knowledge can also be used in developing more efficient algorithms for solving HSC and other NP-complete problems.

Can we use this knowledge to solve other real-world problems?

Yes, the knowledge that HSC is NP-complete can be applied to real-world problems. For example, in network design, the HSC can be used to determine the shortest route that visits all nodes exactly once, which is a useful application in logistics and transportation planning. Additionally, understanding the complexity of HSC can help in developing more efficient algorithms for solving other real-world problems that are also NP-complete.

Similar threads

Replies
1
Views
2K
Replies
6
Views
2K
Replies
22
Views
1K
Replies
1
Views
2K
Replies
1
Views
1K
Replies
2
Views
2K
Replies
1
Views
2K
Back
Top