Is Determining Whether a Regular Expression Denotes 0* an NP-Complete Problem?

  • MHB
  • Thread starter mathmari
  • Start date
In summary: It means that the problem is polynomial time reducible to a problem that we know is polynomial time reducible to an NP-complete problem.In this case, it means that the problem is polynomial time reducible to a problem that we know is polynomial time reducible to the halting problem.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

Show that the problem of determining whether a regular expression over the alphabet $\{0\}$ does not denote $0^*$ is NP-complete.

Could you give me some hints how I could do that?? (Wondering)
 
Technology news on Phys.org
  • #2
In general, to show that a problem is NP-complete we have to show that it is polynomially transformable to an other problem that we know that it is NP-complete, right?? (Wondering)

How do we know which problem we have to use?? (Wondering)
 
  • #3
mathmari said:
In general, to show that a problem is NP-complete we have to show that it is polynomially transformable to an other problem that we know that it is NP-complete, right?
No, it's the other way around. And it is usually called "polynomial time reducible".
 
  • #4
In my book there is the following definition:

A language $L_0$ in $\mathcal{NP}$ is nondeterministic polynomial-time complete (NP-complete for short) if the following condition is satisfied:
If we are given a deterministic algorithm of time complexity $T(n)\geq n$ to recognize $L_0$, then for every language $L$ in $\mathcal{NP}$ we can effectively find a deterministic algorithm of time complexity $T(p_L(n))$, where $p_L$ is a polynomial that depends on $L$. We say $L$ is reducible to $L_0$.

One way to prove that a language $L_0$ is NP-complete is to show that $L_0$ is in $\mathcal{NP}$ and that every language $L$ in $\mathcal{NP}$ can be ``polynomially transformed`` to $L_0$.

First of all, could you explain me the definition oif NP-complete?? (Wondering)
 
  • #5
$L$ is NP-complete if (1) $L\in NP$ and (2) every $L'\in NP$ is polynomial time reducible to $L$. Condition (2) means that there is a function $f$ that is computable in polynomial time on a deterministic Turing machine (DTM) (i.e., there is a DTM that makes at most $p(n)$ steps on any input of length $n$ for some polynomial $p$, and the content of the tape after the machine stops on input $w$ is considered $f(w)$) such that $\forall w\in\Sigma^*\;w\in L'\iff f(w)\in L$.
 
  • #6
Evgeny.Makarov said:
$L$ is NP-complete if (1) $L\in NP$ and (2) every $L'\in NP$ is polynomial time reducible to $L$. Condition (2) means that there is a function $f$ that is computable in polynomial time on a deterministic Turing machine (DTM) (i.e., there is a DTM that makes at most $p(n)$ steps on any input of length $n$ for some polynomial $p$, and the content of the tape after the machine stops on input $w$ is considered $f(w)$) such that $\forall w\in\Sigma^*\;w\in L'\iff f(w)\in L$.

Ok! I see... Thanks for the explanation! (Smile)

Could you explain me what it means that for example the Hamilton circuit is NP-complete?? (Wondering)
 
  • #7
mathmari said:
Could you explain me what it means that for example the Hamilton circuit is NP-complete?
Intuitively, it means that Hamilton circuit is the hardest problem in NP (but there are many other hardest problems). Do you want a proof (I can't go into it right now, but it can be found in standard textbooks, such as Lewis & Papadimitriou), or do you want me express the definition in different words?

If you are studying polynomial reducibility, you should have covered m-reducibility used for proving that some languages are undecidable. Usually textbooks, such as the one by Sipser, have a good description of m-reducibility and the idea behind it. Polynomial reducibility has the same idea, but an additional requirement that it should be done in polynomial time.
 
  • #8
Evgeny.Makarov said:
Intuitively, it means that Hamilton circuit is the hardest problem in NP (but there are many other hardest problems). Do you want a proof (I can't go into it right now, but it can be found in standard textbooks, such as Lewis & Papadimitriou), or do you want me express the definition in different words?

I want to know what it means that the Hamilton circuit is NP-complete.
 
  • #9
Replace $L$ in post #5 with "Hamilton circuit", and you will get the meaning of the phrase "Hamilton circuit is NP-complete".
 
  • #10
Evgeny.Makarov said:
Replace $L$ in post #5 with "Hamilton circuit", and you will get the meaning of the phrase "Hamilton circuit is NP-complete".

To check if the given graph has a hamilton circuit, we have to check if the vertices except from the first one, is appeared once, right?? To do that, is polynomial time complexity needed?? (Wondering)

What does the second condition mean in this case?? (Wondering)
 
  • #11
mathmari said:
To check if the given graph has a hamilton circuit, we have to check if the vertices except from the first one, is appeared once, right?
What you said is not precise enough to be true or false. A circuit is called Hamilton if it contains every vertex of the graph exactly once (with the exception of the initial vertex, which may be counted twice depending on the definition). But this describes what it means for a graph to have a Hamiltonian circuit, not what it means for the "Hamiltonian circuit" problem to be NP-complete.

mathmari said:
To do that, is polynomial time complexity needed?
This is not precise enough, either. Needed for what?

mathmari said:
What does the second condition mean in this case?
You have a definition. What more do you want? I asked you if you want me to express it in different words (which I can't really do right now), but you did not answer.

I don't mind giving quick answers (due to lack of time), but you don't seem to have the grasp of the background knowledge needed to discuss this. You need to understand the following concepts: Hamilton circuit (preferably with examples), language HAMGRAPH, m-reducibility and polynomial time reducibility.
 
  • #12
Evgeny.Makarov said:
What you said is not precise enough to be true or false. A circuit is called Hamilton if it contains every vertex of the graph exactly once (with the exception of the initial vertex, which may be counted twice depending on the definition). But this describes what it means for a graph to have a Hamiltonian circuit, not what it means for the "Hamiltonian circuit" problem to be NP-complete.

The "Hamiltonian circuit" problem is NP-complete, does it mean that p(n) steps are needed to check if the property of a hamiltonian circuit is satisfied, for some polynomial p?? (Wondering)
 
  • #13
mathmari said:
The "Hamiltonian circuit" problem is NP-complete, does it mean that p(n) steps are needed to check if the property of a hamiltonian circuit is satisfied, for some polynomial p?
Yes, but on a nondeterministic Turing machine. As for deterministic TMs, no polynomial algorithm is known and most people believe that it does not exist.

Edit: This is what it means that "Hamiltonian circuit" is in NP. The second condition of NP-completeness additionally says that every other problem in NP is polynomial time reducible to "Hamiltonian circuit".
 

FAQ: Is Determining Whether a Regular Expression Denotes 0* an NP-Complete Problem?

What does it mean for a problem to be NP-complete?

Being NP-complete means that a problem is both in the complexity class NP (nondeterministic polynomial time) and is also one of the hardest problems in NP. This means that if a problem is NP-complete, it can be solved in polynomial time by a nondeterministic Turing machine, but we do not currently have an efficient algorithm to solve it on a classical computer.

How do you prove that a problem is NP-complete?

To prove that a problem is NP-complete, you must first show that it is in the complexity class NP by providing a nondeterministic algorithm that can solve it in polynomial time. Then, you must also show that it is NP-hard by reducing another known NP-complete problem to it. This reduction must be done in polynomial time and show that if the NP-complete problem can be solved, then the new problem can also be solved.

What is the significance of a problem being NP-complete?

The significance of a problem being NP-complete is that it is considered one of the most difficult problems in NP. Many real-world problems have been shown to be NP-complete, so finding efficient algorithms to solve them would have significant practical implications. Additionally, showing that a problem is NP-complete can also help researchers identify commonalities and relationships between different problems.

Can an NP-complete problem ever be solved efficiently?

No, an NP-complete problem cannot be solved efficiently using a classical computer. However, it is possible that a breakthrough in computer science or technology could lead to more efficient algorithms for solving NP-complete problems. Alternatively, quantum computers may be able to efficiently solve NP-complete problems.

How does the concept of NP-completeness relate to the P vs NP problem?

The P vs NP problem is a famous unsolved question in computer science that asks whether every problem in NP can be solved in polynomial time. The concept of NP-completeness is related to this problem because if a problem is shown to be NP-complete, it means that it is one of the hardest problems in NP, and therefore cannot be solved in polynomial time unless P=NP. Thus, proving that a problem is NP-complete provides evidence that P is not equal to NP.

Similar threads

Replies
4
Views
1K
Replies
14
Views
4K
Replies
1
Views
2K
Replies
6
Views
2K
Replies
1
Views
3K
Replies
4
Views
2K
Replies
6
Views
1K
Back
Top