Answer:
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
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
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. Answer:
4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a polynomial time algorithm, then show that there is a polynomial time algorithm to find a longest path in a directed graph.
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:
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 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?
NP-completeness. We are given an undirected graph where each edge has a positive weight. Given (k, alpha), the problem asks whether there is a subgraph with k nodes such that the total weight of the edges in the subgraph is at least alpha. Prove this problem is NP-Complete.