0% found this document useful (0 votes)
17 views13 pages

Automata Theory 2

The P versus NP problem questions whether every problem that can be verified quickly (NP) can also be solved quickly (P). While P problems are solvable in polynomial time, NP problems can be verified in polynomial time but may not have efficient solutions. The distinction between these classes remains one of the central questions in theoretical computer science, with implications for various complex problems, including NP-complete problems like the traveling salesman problem.

Uploaded by

Titian Lavador
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views13 pages

Automata Theory 2

The P versus NP problem questions whether every problem that can be verified quickly (NP) can also be solved quickly (P). While P problems are solvable in polynomial time, NP problems can be verified in polynomial time but may not have efficient solutions. The distinction between these classes remains one of the central questions in theoretical computer science, with implications for various complex problems, including NP-complete problems like the traveling salesman problem.

Uploaded by

Titian Lavador
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

P versus NP problem

P versus NP problem, in full polynomial versus nondeterministic polynomial problem, in


computational complexity (a subfield of theoretical computer science and mathematics), the question of whether
all so-called NP problems are actually P problems. A P problem is one that can be solved in “polynomial time,”
which means that an algorithm exists for its solution such that the number of steps in the algorithm is bounded
by a polynomial function of n, where n corresponds to the length of the input for the problem. Thus, P problems
are said to be easy, or tractable. A problem is called NP if its solution can be guessed and verified in polynomial
time, and nondeterministic means that no particular rule is followed to make the guess.
Linear programming problems are NP, as the number of steps in the simplex method, invented in 1947 by
American mathematician George Dantzig, grows exponentially with the size of the input. However, in 1979
Russian mathematician Leonid Khachian discovered a polynomial time algorithm—i.e., the number of
computational steps grows as a power of the number of variables, rather than exponentially—thereby showing
that linear programming problems are actually P. This discovery allowed the solution of formerly
intractable problems.
A problem is NP-hard if an algorithm for its solution can be modified to solve any NP problem—or any P problem,
for that matter, as P problems are a subset of NP problems. (Not all NP-hard problems are members of the class
of NP problems, however.) A problem that is both NP and NP-hard is said to be NP-complete. Thus, finding an
efficient algorithm for any NP-complete problem implies that an efficient algorithm can be found for all NP
problems, since a solution for any problem belonging to this class can be recast into a solution for any other
member of the class. In 1971 American computer scientist Stephen Cook proved that the satisfiability problem (a
problem of assigning values to variables in a formula in Boolean algebra such that the statement is true) is NP-
complete, which was the first problem shown to be NP-complete and opened the way to showing other problems
that are members of the class of NP-complete problems. A famous example of an NP-complete problem is the
traveling salesman problem, which has wide applications in the optimization of transportation schedules. It is not
known whether any polynomial time algorithms will ever be found for NP-complete problems, and determining
whether these problems are tractable or intractable remains one of the most important questions in theoretical
computer science
So let’s figure out what we mean by P and NP.
P problems are easily solved by computers, and NP
problems are not easily solvable, but if you present
a potential solution it’s easy to verify whether it’s
correct or not.
Related
pol·y·no·mi·al time
/ˌpälēˈnōmēəl,ˌpäləˈnōmēəl tīm/
Learn to pronounce
noun COMPUTING
the time required for a computer to
solve a problem,
As you can see from the diagram above, all P problems are NP problems.
That is, if it’s easy for the computer to solve, it’s easy to verify the solution.
So the P vs NP problem is just asking if these two problem types are the
same, or if they are different, i.e. that there are some problems that are
easily verified but not easily solved.
It currently appears that P ≠ NP, meaning we have plenty of examples of
problems that we can quickly verify potential answers to, but that we can’t
solve quickly. Let’s look at a few examples:
•A traveling salesman wants to visit 100 different cities by driving, starting
and ending his trip at home. He has a limited supply of gasoline, so he can
only drive a total of 10,000 kilometers. He wants to know if he can visit all
of the cities without running out of gasoline.
•A farmer wants to take 100 watermelons of different masses to the
market. She needs to pack the watermelons into boxes. Each box can only
hold 20 kilograms without breaking. The farmer needs to know if 10 boxes
will be enough for her to carry all 100 watermelons to market.
All of these problems share a common characteristic that is the key to
understanding the intrigue of P versus NP: In order to solve them you have
The general class of questions for which some algorithm can provide an
answer in polynomial time is "P" or "class P". For some questions, there
is no known way to find an answer quickly, but if one is provided with
information showing what the answer is, it is possible to verify the
answer quickly. The class of questions for which an answer can
be verified in polynomial time is NP, which stands for "nondeterministic
polynomial time".
Some examples of polynomial time algorithms:
•The selection sort sorting algorithm on n integers performs
operations for some constant A. Thus it runs in time and is a
polynomial time algorithm.

•All the basic arithmetic operations (addition, subtraction,


multiplication, division, and comparison) can be done in
polynomial time.
Polynomial time[edit]
An algorithm is said to be of polynomial time if its running time is
upper bounded by a polynomial expression in the size of the input for the
algorithm, that is, T(n) = O(nk) for some positive constant k.[1][11] Problems
for which a deterministic polynomial time algorithm exists belong to the
complexity class P, which is central in the field of
computational complexity theory. Cobham's thesis states that polynomial
time is a synonym for "tractable", "feasible", "efficient", or "fast". [12]
Exponential time[edit]
An algorithm is said to be exponential
time, if T(n) is upper bounded by 2poly(n),
where poly(n) is some polynomial in n

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy