Explain P and NP class of problems. Explain P=NP? argument. What would happen if P=NP is found to be true? Why do we classify problems into different complexity classes such as P, NP, NP-Complete, NP-Hard etc? Why it is so important to study these complexity classes?
Every decision problem can have only two answers, yes or no. Hence, a decision problem may belong to a language if it provides an answer ‘yes’ for a specific input. A language is the totality of inputs for which the answer is Yes. Most of the algorithms discussed in the previous chapters are polynomial time algorithms.
For input size n, if worst-case time complexity of an algorithm is O(nk), where k is a constant, the algorithm is a polynomial time algorithm.
Algorithms such as Matrix Chain Multiplication, Single Source
Shortest Path, All Pair Shortest Path, Minimum Spanning Tree, etc.
run in polynomial time. However there are many problems, such as
traveling salesperson, optimal graph coloring, Hamiltonian cycles,
finding the longest path in a graph, and satisfying a Boolean
formula, for which no polynomial time algorithms is known. These
problems belong to an interesting class of problems, called the
NP-Complete problems, whose status is unknown.
P-Class
The class P consists of those problems that are solvable in
polynomial time, i.e. these problems can be solved in time O(nk) in
worst-case, where k is constant.
These problems are called tractable, while others are called intractable or superpolynomial.
Formally, an algorithm is polynomial time algorithm, if there exists a polynomial p(n) such that the algorithm can solve any instance of size n in a time O(p(n)).
Problem requiring Ω(n50) time to solve are essentially intractable for large n. Most known polynomial time algorithm run in time O(nk) for fairly low value of k.
The advantages in considering the class of polynomial-time algorithms is that all reasonable deterministic single processor model of computation can be simulated on each other with at most a polynomial slow-d
NP-Class
The class NP consists of those problems that are verifiable in
polynomial time. NP is the class of decision problems for which it
is easy to check the correctness of a claimed answer, with the aid
of a little extra information. Hence, we aren’t asking for a way to
find a solution, but only to verify that an alleged solution really
is correct.
Every problem in this class can be solved in exponential time using exhaustive search.
P versus NP
Every decision problem that is solvable by a deterministic
polynomial time algorithm is also solvable by a polynomial time
non-deterministic algorithm.
The difference between P and NP problems
Adding two number is really easy. Surely, as the numbers get larger the computation becomes harder to us human. But to a computer adding large numbers are fairly simple. We can say computers can add two numbers in polynomial time. These types of problem which can be solved in polynomial time by a computer are known as P problems.
But what about a little complex problem like prime factorization? We know that every composite number can be expressed as a product of two or more prime factors. Our normal PCs can handle this problem within seconds for numbers up to a billion. But as the numbers grow this problem becomes lot harder even for the fastest of computers. So this is not solvable in Polynomial time.
But what if I give you the factors? Can you verify the solution? Like if I say, 35 can be factorized as 5*7. Can you verify it? You can easily multiply 5 and 7 real quick and find that it indeed produces 35. In fact, multiplication is a P problem. Computers can multiply fairly large numbers in no time. So factorization is not solvable in polynomial time but the solution is verifiable in polynomial time. These problems are known as NP problems.
All problems in P can be solved with polynomial time algorithms,
whereas all problems in NP - P are intractable.
It is not known whether P = NP. However, many problems are known in NP with the property that if they belong to P, then it can be proved that P = NP.
If P ≠ NP, there are problems in NP that are neither in P nor in NP-Complete.
The problem belongs to class P if it’s easy to find a solution for the problem. The problem belongs to NP, if it’s easy to check a solution that may have been very tedious to find.
NP problems have their own significance in programming, but the
discussion becomes quite hot when we deal with differences between
NP, P , NP-Complete and NP-hard.
P and NP- Many of us know the difference between them.
P- Polynomial time solving . Problems which can be solved in polynomial time, which take time like O(n), O(n2), O(n3). Eg: finding maximum element in an array or to check whether a string is palindrome or not. so there are many problems which can be solved in polynomial time.
NP- Non deterministic Polynomial time solving. Problem which can't be solved in polynomial time like TSP( travelling salesman problem) or An easy example of this is subset sum: given a set of numbers, does there exist a subset whose sum is zero?.
but NP problems are checkable in polynomial time means that given a solution of a problem , we can check that whether the solution is correct or not in polynomial time.
So till now you have got what is NP and what is P.
Now we will discuss about NP-Complete and NP-hard.
but first we need to know what is reducibility .
Take two problems A and B both are NP problems.
Reducibility- If we can convert one instance of a problem A into problem B (NP problem) then it means that A is reducible to B.
NP-hard-- Now suppose we found that A is reducible to B, then it means that B is at least as hard as A.
NP-Complete -- The group of problems which are both in NP and NP-hard are known as NP-Complete problem.
In computational complexity theory, a complexity class is a set
of problems of related resource-based complexity. A typical
complexity class has a definition of the form: the set of problems
that can be solved by an abstract machine M using O(f(n)) of
resource R, where n is the size of the input.
Now suppose we have a NP-Complete problem R and it is reducible to
Q then Q is at least as hard as R and since R is an NP-hard
problem. therefore Q will also be at least NP-hard , it may be
NP-complete also.
All the classes you mention are classes of languages, formally,
even if P and NP are often discussed in different terms. Note that
terminology revolving around decision problems is equivalent to
formal languages; the decision is always whether a word is in the
given language, i.e. the problem is to solve the word problem.
What you need to do is go back to the formal definitions. Summarising:
RE contains languages which are accepted by any TM.
REC contains all languages which are decided by any TM.
NP contains all languages which are accepted by any polynomial-time
TM.
P contains all languages which are decided by any polynomial-time
and deterministic TM.
It's already quite clear from the definitions that we have
P⊆NP⊆REC⊆RE.
So, essentially, computability and complexity theory deal with the same kind of questions: which kinds of problems can I solve with which type of machine?
In fact, the famous Complexity Zoo diagram displays "computability", "complexity" and "Chomsky" classes in a single inclusion hierarchy -- because they all use the same formalism.
What would happen if someone proves P=NP or P!=NP
Actually, to add a word of caution to these answers saying that P = NP would mean public key encryption is insecure, and all famous problems with short proofs would be quickly proved - actually that doesn't follow at all.
Polynomial time doesn't tell you anything about the coefficients of the polynomial. What if the coefficients are all of the order of 10^(10^10) (1 followed by 10,000,000,000 zeros) or higher?
Even a solution in linear time would be of no practical use at all if the coefficient is huge.
To take an example, suppose someone found a solution of the traveling salesman problem which requires at most 10^(10^10) * n steps, where n is the number of cities?
That's a linear time solution, and if anyone found such a solution it would prove P = NP, (because it is an NP complete problem) - they'd be immediately famous - but it's not a practical solution.
It wouldn't be at all astonishing if it came up with really huge coefficients like that. Maybe even coefficients that need Knuth's up-arrow notation (similarly to Graham's number). Then it would still be a theoretically very interesting result, even if the coefficients are too large to be expressed with exponential notation.
Of course many mathematicians would then work away at the proof to try to reduce the size of the coefficients - but no a priori reason why they have to succeed in reducing them to the extent that it becomes practically useful.
Explain P and NP class of problems. Explain P=NP? argument. What would happen if P=NP is...
Suppose X and Y are decision problems, and suppose that X ≤P Y, What can you say if you are told that and why: a. X is NP-complete b. Y is in NP c. X is not in NP d. Y is in P e. X in NP-hard f. X is in co-NP
Why is it important to recognize team problems early? What can happen if not addressed? What are five important things a team member must do to be a good team member? How do you repair a stalled team?
QUESTION 3 Symbolize the following argument using the variables p, q, and r. Then construct a complete truth table to show whether or not the argument is valid. Use 1 for T(true) and 0 for F(false). Valid or Invalid? Why? Prove. Explain what your truth table shows. 10 points Total: 3 points for correct symbolic form, 4 points for valid/invalid and reason, 3 points for correct truth table. If Max studies hard, then Max gets an 'A' or Max gets...
6. Application problems -- Explain the effect of poisons at various pathway points, what would happen immediately ... and after a while. Compare the action of cyanide (or rotenone or barbituate) vs DNP vs oligomycin.
(ESSAY) why is "commitment" important in everything (workplace,goals, etc) without "commitment" what would happen?
Key Elements of Argument and -Entering the Use pages 43-45 in The Little Seagull Handbook as well as pages complete the following notes. The Glossary/Index will well. 1-18 in They Say, I Say to be helpful in the Seagull Handbook as 1. How do Bullock, Brody, and college writing? Weinberg detine the term "claim"? Why are claims important in 2. Bullock, Brody, and Weinberg explain, "we need to provide some on a topic so that readers can understand what is...
Describe and explain what would happen to the shape growth curve (what phase, the slope, etc) of the culture if: The chemostat was placed at 27°C.
The Hubble Constant, the density of the universe, and the cosmological constant are all vital to the evolution of our universe. Briefly discuss why each is so important -and- what would happen if we tweaked each one up or down a little. Are there other constants that are equally important? If so, which and why?
For propositional calculus, I have a HW assignment out of the
textbook Applied Discrete Structures by Alan Doerr and Kenneth
Levasseur. I'm having a hard time figuring which statements should
be propositions and what arguments imply which.
Here's the problem is question:
So far this is what I have (but I'm not sure if it's
correct):
Let a be the proposition, "Students do well in a
discrete mathematics course."
Let b be the proposition, "It is necessary to study
hard."...
Note: different VSEPR families do not have the same number of members. (The members of each family are the VSEPR classes that belong to that family. For example, thenext VSEPR class of the AX6 family after AX4E2 would be the hypothetical AX3E3. This would require a central atom with nine valence electrons to combine with threeelectrons contributed by three X atoms to give a total of 12 electrons on the central A atom. So why would you expect that the...