1)
The theory of NP-completeness is a solution to the practical problem of applying complexity theory to individual problems. NP-complete problems are defined in a precise sense as the hardest problems in P. Even though we don't know whether there is any problem in NP that is not in P, we can point to an NP-complete problem and say that if there are any hard problems in NP, that problems is one of the hard ones.(Conversely if everything in NP is easy, those problems are easy. So NP-completeness can be thought of as a way of making the big P=NP question equivalent to smaller questions about the hardness of individual problems.)So if we believe that P and NP are unequal, and we prove that some problem is NP-complete, we should believe that it doesn't have a fast algorithm.
For unknown reasons, most problems we've looked at in NP turn out either to be in P or NP-complete. So the theory of NP-completeness turns out to be a good way of showing that a problem is likely to be hard, because it applies to a lot of problems. But there are problems that are in NP, not known to be in P, and not likely to be NP-complete.
A decision problem L is NP-Hard if
L' ≤p L for all L' ϵ NP.
Def : L is NP-complete if
L ϵ NP and
L' ≤ p L for some known NP-complete problem L.' Given this formal
definition, the complexity classes are:
P : is the set of decision problems that are solvable in polynomial
time.
NP : is the set of decision problems that can be verified in polynomial time.
NP-Hard : L is NP-hard if for all L' ϵ NP, L' ≤p L. Thus if we can solve L in polynomial time, we can solve all NP problems in polynomial time.
NP-Complete: L is NP-complete if
L ϵ NP and
L is NP-hard
If any NP-complete problem is solvable in polynomial time, then
every NP-Complete problem is also solvable in polynomial time.
Conversely, if we can prove that any NP-Complete problem cannot be
solved in polynomial time, every NP-Complete problem cannot be
solvable in polynomial time.
2)
1) Initialize dist[] = {NINF, NINF, ….} and dist[s] = 0 where s
is the source vertex. Here NINF means negative infinite.
2) Create a toplogical order of all vertices.
3) Do following for every vertex u in topological order.
Do following for every adjacent vertex v of u
if (dist[v] < dist[u] + weight(u, v))
dist[v] = dist[u] + weight(u, v)
4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a...
4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a polynomial time algorithm, then a polynomial time algorithm to find a longest path in a directed graph.
4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a polynomial time algorithm, then a polynomial time algorithm to find a longest path in a directed graph. Answer:
4. a) Define the concept of NP-Completeness B) Show that there is a polynomial time algorithm that finds a longest path in a directed graph, under the condition that A is NP-complete and A has a polynomial time algorithm.
please answer and I will rate! 4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a polynomial time algorithm, then a polynomial time algorithm to find a longest path in a directed graph. Answer:
please solve and I will rate! 4. a) Define the concept of NP-Completeness B) Show that there is a polynomial time algorithm that finds a longest path in a directed graph, under the condition that A is NP-complete and A has a polynomial time algorithm.
2. Prove that {a"6"c" |m,n0}is not a regular language. Answer: 3. Let L = { M M is a Turing machine and L(M) is empty), where L(M) is the language accepted by M. Prove L is undecidable by finding a reduction from Aty to it, where Arm {<M.w>M is a Turing machine and M accepts Answer: 4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a polynomial time algorithm, then a polynomial time algorithm...
Hi, this question is from Theory of Computation. Kindly help if you can. Exercise 1 Define a language L to be co-NP-complete if it is in co-NP and a languages in co-NP can be polynomial-time reduced to L. Say that a formula of quantified boolean logic is a universal sentence if it is a sentence (i.e., has no free variables) of the form Vai... Vxn(V) where> is a propositional logic formula (contains no quantifiers). Show that the language to I...
9. Identify which of these problems are NP-complete and which can be exactly solved using a polynomial time algorithm (a) Finding the vertex cover in a line graph (b) Finding the maximum clique in a tree (c) Finding the independent set in complete graph (d) Finding the Hamiltonian cycle in a graph that has exactly one cycle
Write the proof that the given problems are in NP (not NP-complete yet) Longest Path INSTANCE: Graph G = (V, E), positive integer K <= |V|. QUESTION: Does G contain a simple path (that is, a path encountering no vertex more than once) with K or more edges?
Part A: [5 pts] Show that CLIQUE-COVER ∈ NP NP Completeness Proof The CLIQUE-COVER problem is defined as follows: Given a graph G, which has a number of cliques ci, c2, …, cm (m ≥ k), and a number k, the CLIQUE-COVER problem is the problem of determining whether all the nodes of the graph are covered by (i.e., contained in) at most k of the cliques of nodes. See Appendix 2 for an example of a graph with a...