Prove that the Weighted Feedback Vertex Set is NP-Complete - set

I need to show that the Weighted Feedback Vertex Set (WFVS) is NP-Complete. How do I do this, I got confused. I'm not sure how to do this.
Thanks! :)

There are 3 basic steps to showing that a problem is in NP
Decision Problem: Can you turn your problem into a decision problem? In the case of the WFVS problem, the decision problem might be "Given a graph G and real number K, is there a set of vertices V such that V satisfies the conditions of WFVS?
Certificate: Can you identify an answer to your decision question? Again, in the case of the WFVS problem, an answer might be the set of vertices in the Graph
Verification: Can you verify a certificate in polynomial time. By verifying in polynomial time, you know that the problem is not NP-Hard. Some verification steps might be: are all of the vertices/edges in the graph? is the sum of the weighted edges <= K? etc.
That is how you know that your problem is in NP.
NP Complete
To show that a problem is NP-Complete, you must find a commonly known NP-Complete problem, such as vertex cover or the travelling salesman problem, and show that your problem is just as hard as that problem by transforming the known problem into your problem, then proving that a 'yes' certificate to your problem implies a 'yes' certificate to the other problem, and vice versa.
This is how you show that your problem is NP-complete.

Related

Is the NO-VERTEX-COVER in NP or not?

This is the reverse version of vertex cover problem. Consider a decision problem that asks whether, given a graph G = (V, E) and a nonnegative integer k, there does not exist a vertex cover of size no larger than k. Answer whether this problem is NP or not ? Please explain to me.
A short answer would be no (unless co-NP=NP).
Your decision problem, NO-VERTEX-COVER, is exactly the complement of the well-known VERTEX-COVER problem; the latter problem is NP-complete (and is, of course, in NP). Your problem NO-VERTEX-COVER is thus in co-NP. (Recall that a problem is in co-NP if and only if its complement is in NP.)
Because VERTEX-COVER, the complement of you problem, is NP-complete, it follows that unless co-NP=NP, the NO-VERTEX-COVER problem is not in NP. (This follows from a theorem that says that if co-NP is not equal to NP then no NP-complete problem is in co-NP.)

Why is TSP NP-hard while the Hamiltonian path NP-complete?

Why aren't these 2 problems, namely TSP and Hamiltonian path problem, both NP-complete?
They seem identical.
For a problem X to be NP-complete, it has to satisfy:
X is in NP, given a solution to X, the solution can be verified in polynomial time.
X is in NP-hard, that is, every NP problem is reduceable to it in polynomial time (you can do this through a reduction from a known NP-hard problem (e.g. Hamiltonian Path)).
There are two versions of the The Travelling Salesman Problem (TSP):
The optimization version (probably the one you are looking at), namely, find the optimum solution to the TSP. This is not a decision problem, and hence cannot be in NP, but it is however in NP-hard which can be proven via a Hamiltonian Path reduction. Therefore this isn't an NP complete problem.
The decision version - given an integer K is there a path through every vertex in the graph of length < K? This is a decision (yes/no) problem, and a solution can be verified in polynomial time (just traverse the path and see if it touches every vertex) and so it is in NP, but it is also in NP-hard (by an identical proof as above). Since it satisfies both requirements for NP-completeness, it is an NP-complete problem.
The definitions of NP-hardness and NP-completeness are related but different. Specifically, a problem is NP-hard if every problem in NP reduces to it in polynomial time, and a problem is NP-complete if it's both NP-hard and itself in NP.
The class NP consists of decision problems, problems that have a yes/no answer. As a result, TSP cannot be in NP because the expected answer is a number rather than yes or no. Therefore, TSP can be NP-hard, but it can't be NP-complete.
On the other hand, the Hamiltonian path problem asks for a yes/no answer, and it happens to be in NP. Therefore, since it's NP-hard as well, it's NP-complete.
Now, you can take TSP and convert it to a decision problem by changing the question from "what's the cheapest path?" to "is there a path that costs X or less?," and that latter formulation is in NP and also happens to be NP-complete.

Verification algorithm for minimum vertex cover?

We know that the minimum vertex cover is NP complete, which means that it is in the set of problems that can be verified in polynomial time.
As I understand it, the verification process would require the following:
Verify that the solution is a vertex cover at all
Verify that the solution is the smallest possible subset of the source graph that satisfies condition #1
I'm finding it hard to establish that step #2 can be done in polynomial time. Can anyone explain how it is?
The minimum vertex cover is NP-hard. It is only NP-complete if it is restated as a decision problem which can be verified in polynomial time.
The minimum vertex cover problem is the optimization problem of finding a smallest vertex cover in a given graph.
INSTANCE: Graph G
OUTPUT: Smallest number k such that G has a vertex cover of size k.
If the problem is stated as a decision problem, it is called the vertex cover problem:
INSTANCE: Graph G and positive integer k.
QUESTION: Does G have a vertex cover of size at most k?
Restating a problem as a decision problem is a common way to make problems NP-complete. Basically you turn an open-ended problem of the form "find the smallest solution k" into a yes/no question, "for a given k, does a solution exist?"
For example, for the travelling salesman problem, verifying that a proposed solution the shortest path between all cities is NP-hard. But if the problem is restated as only having to find a solution shorter than k total distance for some k, then verifying a solution is easy. You just find the length of the proposed solution and check that it's less than k.
The decision problem formulation can be easily used to solve the general formulation. To find the shortest path all you have to do is ratchet down the value of k until there are no solutions found.

How is TSP NP-Hard?

I read the following in one of the answer on SO :
The Traveling Salesman Problem, as normally posed, is to find the cheapest route connecting all cities. That isn't a decision problem, and we can't verify any proposed solution directly. We can restate it as a decision problem: given a cost C, is there a route that's cheaper than C? This problem is NP-complete, and with a little work we can solve the original TSP about as easily as the modified, NP-complete, form. Therefore, the TSP is NP-hard, since it's at least as hard as an NP-complete problem.
I understand that a TSP is NP-Complete but how the problem is NP-Hard ? I read that problems that are in NP but not in P are NP-Hard. I cannot relate this thing to the TSP . Please explain this.
NP-Hard problems are those problems for which every problem in NP has a polynomial time (Cook or Karp, multiple definitions) reduction to. These could contain problems which are not in NP and in fact need not even contain decideable problems (like the Halting problem).
NP-Complete problems are those problems in NP which are also NP-Hard.
If P is not equal to NP, then there are infinitely many problems in NP which are neither in P, nor NP-Complete (Ladner's theorem).
The optimization version of TSP problem has been shown NP-hard, but yet known whether it's in NP or not since there is yet known verification algorithms.
The decision version of the TSP problem has been shown NP-complete (both in-NP and NP-hard).

Is finding a simple path in a weighted undirected graph with maximum cost in polynomial time? Is it NP?

I need to know if it is possible to find a simple path with maximum cost in any weighted undirected graph.
I mean to find THE MOST expensive path of all for any pair of vertex.
Input: Graph G = (V,E)
Output: The cost of the most expensive path in the graph G.
Is this problem NP-Complete?, I think it is. Could you provide any reference to an article where I can review this.
You're not the first to think of this problem. In fact, it was the first link in the google search results.
edit
Guys, un-weighted graph is a special case of weighted graph: all edges have weight 1 :)
This is similar to traveling salesman, except your heuristic is the Max and not Min. Read up on the traveling salesman.
The problem is NP complete because it can be derived from a problem that is already proven to be NP-Complete (Traveling salesman). The answer is checkable in polynomial time, but an answer cannot be found in polynomial time.
Read http://en.wikipedia.org/wiki/Travelling_salesman_problem
Yes, this problem is NP because you are asking for the maximum which means that you'll need to go through all possible paths. The decision version of this problem ("is there a path of length n?") is known NP-complete (as noted above).

Resources