Lecture 5: Problem P = N P , relativization,
classes coN P and N P ∩ coN P
prof. RNDr. Luděk Kučera, DrSc.
Department of Applied Mathematics
Faculty of mathematiccs and physics, Charles University, Prague
c
Luděk
Kučera, 2011
Complexity theory MI-CPX, ZS 2011/12
https://edux.fit.cvut.cz/MI-CPX
Evropský sociálnı́ fond
Praha & EU: Investujeme do vašı́ budoucnosti
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
1/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
Even though all researchers thing (and hope) that P 6= NP, we are as far
from the solution as we were 35 years ago.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
Even though all researchers thing (and hope) that P 6= NP, we are as far
from the solution as we were 35 years ago.
From the practical point of view, this situation is as if NP were really
larger than P:
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
Even though all researchers thing (and hope) that P 6= NP, we are as far
from the solution as we were 35 years ago.
From the practical point of view, this situation is as if NP were really
larger than P:
Whether no deterministic polynomial-time bounded algorithm solving
NP-complete problems exists or we simply know no such algorithm is the
same in the moment when we are in need of such an algorithm.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
Even though all researchers thing (and hope) that P 6= NP, we are as far
from the solution as we were 35 years ago.
From the practical point of view, this situation is as if NP were really
larger than P:
Thus, proving that certain problem is NP-complete means proving that we
are not able to provide a deterministic algorithm that gives the optimal
solution for all inputs in short time.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
The class P is trivially a subset of NP, because a deterministic algorithm
is a special case of a non-deterministic algorithm that does not use
non-deterministic “forks”.
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
Even though all researchers thing (and hope) that P 6= NP, we are as far
from the solution as we were 35 years ago.
From the practical point of view, this situation is as if NP were really
larger than P:
Thus, proving that certain problem is NP-complete means proving that we
are not able to provide a deterministic algorithm that gives the optimal
solution for all inputs in short time.
However, as it is suggested in the previous paragraph, certain NP-complete
problems can be solved by fast approximation algorithms or by algorithms
that give optimal solution for most imputs (but not for all of them).
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Problem P = N P
Problem P = N P
However, it is not known whether the class NP − P is non-empty, i.e.,
whether P is a proper subset of NP.
Even though all researchers thing (and hope) that P 6= NP, we are as far
from the solution as we were 35 years ago.
From the practical point of view, this situation is as if NP were really
larger than P:
Thus, proving that certain problem is NP-complete means proving that we
are not able to provide a deterministic algorithm that gives the optimal
solution for all inputs in short time.
However, as it is suggested in the previous paragraph, certain NP-complete
problems can be solved by fast approximation algorithms or by algorithms
that give optimal solution for most imputs (but not for all of them).
The question of approximation algorithms and algorithms solving almost
all inputs correctly is, howeer, beyond the scope of this course.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
2/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
A query to the oracle is considered to be a single step of the computation.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
A query to the oracle is considered to be a single step of the computation.
Of course, an algorithm with an oracle can compute much faster than
without it, because sometimes an extreme amount of computation is done
in one step.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
A query to the oracle is considered to be a single step of the computation.
Of course, an algorithm with an oracle can compute much faster than
without it, because sometimes an extreme amount of computation is done
in one step.
Note that both deterministic and non-deterministic algorithms admit
relativization with an oracle.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
Given an oracle O, PO is the class of problems that can be solved in
polynomially bounded time by a deterministic algorithm using the oracle O.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
The concept of relativization, or a Turing machine with an oracle, is useful
in many parts of Computational Complexity. Here we will use it to show
that the problem P 6= NP? is even more difficult that it might seem.
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
Given an oracle O, PO is the class of problems that can be solved in
polynomially bounded time by a deterministic algorithm using the oracle O.
Similarly, NPO is the class of problems solvably in polynomial time by a
non-deterministic algorithm using the oracle O.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
Given an oracle O, PO is the class of problems that can be solved in
polynomially bounded time by a deterministic algorithm using the oracle O.
Similarly, NPO is the class of problems solvably in polynomial time by a
non-deterministic algorithm using the oracle O.
The following result is presented without proof (that is very complex and
long):
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
Given an oracle O, PO is the class of problems that can be solved in
polynomially bounded time by a deterministic algorithm using the oracle O.
Similarly, NPO is the class of problems solvably in polynomial time by a
non-deterministic algorithm using the oracle O.
The following result is presented without proof (that is very complex and
long):
Theorem: There is an oracle A such that PA = NPA and
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
Given an oracle O, PO is the class of problems that can be solved in
polynomially bounded time by a deterministic algorithm using the oracle O.
Similarly, NPO is the class of problems solvably in polynomial time by a
non-deterministic algorithm using the oracle O.
The following result is presented without proof (that is very complex and
long):
Theorem: There is an oracle A such that PA = NPA and
there is an oracle B such that PB 6= NPB .
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Relativization
Relativization
Definition: An oracle O is a subset of {0, 1}∗ . An algorithm with an
oracle O is an algorithm that can (at any point of the computation and
arbitrary many times) generate a string w ∈ {0, 1}∗ , ask the oracle
whether w ∈ O, and use the result in its computation.
Given an oracle O, PO is the class of problems that can be solved in
polynomially bounded time by a deterministic algorithm using the oracle O.
Similarly, NPO is the class of problems solvably in polynomial time by a
non-deterministic algorithm using the oracle O.
The following result is presented without proof (that is very complex and
long):
Theorem: There is an oracle A such that PA = NPA and
there is an oracle B such that PB 6= NPB .
Since all techniques that have ever been used to attack
the P 6= NP? problem were invariant with respect to relativization,
it is clear that they are too week to solve the problem.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
3/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
Informally, coNP is the class of problems, where is is easy to show that
the input is not accepted (i.e., it does not have the property to be tested).
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
Informally, coNP is the class of problems, where is is easy to show that
the input is not accepted (i.e., it does not have the property to be tested).
E.g., it is easy to prove that 51 is not a prime by showing that 51 = 3 × 17.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
Informally, coNP is the class of problems, where is is easy to show that
the input is not accepted (i.e., it does not have the property to be tested).
E.g., it is easy to prove that 51 is not a prime by showing that 51 = 3 × 17.
Of course, P ⊂ coNP, but it is not known whether coNP ⊂ NP or
NP ⊂ coNP, but both inclusions seem unlikely.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
Informally, coNP is the class of problems, where is is easy to show that
the input is not accepted (i.e., it does not have the property to be tested).
E.g., it is easy to prove that 51 is not a prime by showing that 51 = 3 × 17.
Of course, P ⊂ coNP, but it is not known whether coNP ⊂ NP or
NP ⊂ coNP, but both inclusions seem unlikely.
In fact, we will see that any of the two inclusions would imply a collapse at
the second level of the computational hierarchy, see Chapter 7.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
A very interesting class is NP ∩ coNP.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
A very interesting class is NP ∩ coNP.
Again, it is not known, whether the inclusion P ⊂ NP ∩ coNP is proper.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
A very interesting class is NP ∩ coNP.
Again, it is not known, whether the inclusion P ⊂ NP ∩ coNP is proper.
At the moment, for any problem that is known to belong to NP ∩ coNP a
deterministic polynomial time algorithm has been found.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
Classes coN P and N P ∩ coN P
Classes coN P and N P ∩ coN P
Definition: If P ⊂ {0, 1}∗ is a problem, its complement is
the set {0, 1}∗ − P.
Definition: The class coNP is the collection of complements of all
problems from NP.
A very interesting class is NP ∩ coNP.
Again, it is not known, whether the inclusion P ⊂ NP ∩ coNP is proper.
At the moment, for any problem that is known to belong to NP ∩ coNP a
deterministic polynomial time algorithm has been found.
Two famous examples are primality testing and linear programming.
prof. Luděk Kučera (MFF UK)
Problem P = N P
MI-CPX, 2011
4/1
© Copyright 2026 Paperzz