In
computational complexity theory
In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
, P/poly is a
complexity class
In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory.
In general, a complexity class is defined in terms ...
representing problems that can be solved by small circuits. More precisely, it is the set of
formal language
In logic, mathematics, computer science, and linguistics, a formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules.
The alphabet of a formal language consists of s ...
s that have polynomial-size circuit families. It can also be defined equivalently in terms of
Turing machine
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algor ...
s with
advice, extra information supplied to the Turing machine along with its input, that may depend on the input length but not on the input itself. In this formulation, P/poly is the class of
decision problem
In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm whethe ...
s that can be solved by a polynomial-time
Turing machine
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algor ...
with advice strings of length polynomial in the input size.
These two different definitions make P/poly central to
circuit complexity
In theoretical computer science, circuit complexity is a branch of computational complexity theory in which Boolean functions are classified according to the size or depth of the Boolean circuits that compute them. A related notion is the ci ...
and
non-uniform complexity.
For example, the popular
Miller–Rabin primality test
The Miller–Rabin primality test or Rabin–Miller primality test is a probabilistic primality test: an algorithm which determines whether a given number is likely to be prime, similar to the Fermat primality test and the Solovay–Strassen pri ...
can be formulated as a P/poly algorithm: the "advice" is a list of candidate values to test. It is possible to precompute a list of
values such that every composite
-bit number will be certain to have a witness
in the list.
For example, to correctly determine the primality of 32-bit numbers, it is enough to test
. The existence of short lists of candidate witnesses follows from the fact that for each composite
, three out of four candidate values successfully detect that
is composite. From this, a simple counting argument similar to the one in the proof that BPP
P/poly below shows that there exists a suitable list of candidate values for every input size, and more strongly that most long-enough lists of candidate values will work correctly, although finding a list that is guaranteed to work may be expensive.
[
P/poly, unlike other polynomial-time classes such as P or BPP, is not generally considered a practical class for computing. Indeed, it contains every undecidable unary language, none of which can be solved in general by real computers. On the other hand, if the input length is bounded by a relatively small number and the advice strings are short, it can be used to model practical algorithms with a separate expensive preprocessing phase and a fast processing phase, as in the Miller–Rabin example.
]
Formal definition
The complexity class
In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory.
In general, a complexity class is defined in terms ...
P/poly can be defined in terms of SIZE as follows:
:
where is the set of decision problems
In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm whethe ...
that can be solved by polynomial-sized circuit families.
Alternatively, can be defined using Turing machines
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algori ...
that "take advice". Such a machine has, for each , an '' advice string'' , which it is allowed to use in its computation whenever the input has size .
Let be functions. The class of languages decidable by time-T(n) Turing machines
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algori ...
with advice, denoted , contains every language ''L'' such that there exists a sequence of strings with and a TM ''M'' satisfying
:
for every , where on input the machine ''M'' runs for at most steps.
Importance of P/poly
P/poly is an important class for several reasons. For theoretical computer science, there are several important properties that depend on P/poly:
* If NP ⊆ P/poly then PH (the polynomial hierarchy
In computational complexity theory, the polynomial hierarchy (sometimes called the polynomial-time hierarchy) is a hierarchy of complexity classes that generalize the classes NP and co-NP. Each class in the hierarchy is contained within PSPACE. ...
) collapses to . This result is the Karp–Lipton theorem; furthermore, NP ⊆ P/poly implies AM = MA
* If PSPACE
In computational complexity theory, PSPACE is the set of all decision problems that can be solved by a Turing machine using a polynomial amount of space.
Formal definition
If we denote by SPACE(''t''(''n'')), the set of all problems that can b ...
⊆ P/poly then , even PSPACE = MA.
:Proof: Consider a language ''L'' from PSPACE. It is known that there exists an interactive proof system
In computational complexity theory, an interactive proof system is an abstract machine that models computation as the exchange of messages between two parties: a ''prover'' and a ''verifier''. The parties interact by exchanging messages in order t ...
for ''L'', where actions of the prover can be carried out by a PSPACE machine. By assumption, the prover can be replaced by a polynomial-size circuit. Therefore, ''L'' has a MA protocol: Merlin sends the circuit as proof, and Arthur can simulate the IP protocol himself without any additional help.
* If P #P ⊆ P/poly then P#P = MA. The proof is similar to above, based on an interactive protocol for permanent and #P-completeness of permanent.
* If EXPTIME
In computational complexity theory, the complexity class EXPTIME (sometimes called EXP or DEXPTIME) is the set of all decision problems that are solvable by a deterministic Turing machine in exponential time, i.e., in O(2''p''(''n'')) time, ...
⊆ P/poly then (Meyer's theorem), even EXPTIME = MA.
* If NEXPTIME In computational complexity theory, the complexity class NEXPTIME (sometimes called NEXP) is the set of decision problems that can be solved by a non-deterministic Turing machine using time 2^.
In terms of NTIME,
:\mathsf = \bigcup_ \mathsf(2^)
A ...
⊆ P/poly then NEXPTIME = EXPTIME, even NEXPTIME = MA. Conversely, NEXPTIME = MA implies NEXPTIME ⊆ P/poly
* If EXPNP ⊆ P/poly then (Buhrman, Homer)
* It is known that MAEXP, an exponential version of MA, is not contained in P/poly.
: Proof: If MAEXP ⊆ P/poly then PSPACE = MA (see above). By padding
Padding is thin cushioned material sometimes added to clothes. Padding may also be referred to as batting when used as a layer in lining quilts or as a packaging or stuffing material. When padding is used in clothes, it is often done in an attempt ...
, EXPSPACE = MAEXP, therefore EXPSPACE ⊆ P/poly but this can be proven false with diagonalization.
One of the most interesting reasons that P/poly is important is the property that if NP is not a subset of P/poly, then P ≠ NP. This observation was the center of many attempts to prove P ≠ NP. It is known that for a random oracle ''A'', NP''A'' is not a subset of PA/poly with probability 1.
P/poly is also used in the field of cryptography
Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
. Security is often defined 'against' P/poly adversaries. Besides including most practical models of computation like BPP, this also admits the possibility that adversaries can do heavy precomputation for inputs up to a certain length, as in the construction of rainbow table
A rainbow table is an efficient way to store data that has been computed in advance to facilitate cracking passwords. To protect stored passwords from compromise in case of a data breach, organizations avoid storing them directly, instead transfo ...
s.
Although not all languages in P/poly are sparse language In computational complexity theory, a sparse language is a formal language (a set of strings) such that the complexity function, counting the number of strings of length ''n'' in the language, is bounded by a polynomial function of ''n''. They are ...
s, there is a polynomial-time Turing reduction from any language in P/poly to a sparse language.
Bounded-error probabilistic polynomial is contained in P/poly
Adleman's theorem states that BPP ⊆ P/poly, where BPP is the set of problems solvable with randomized algorithms with two-sided error in polynomial time. A weaker result was initially proven by Leonard Adleman
Leonard Adleman (born December 31, 1945) is an American computer scientist. He is one of the creators of the RSA encryption algorithm, for which he received the 2002 Turing Award, often called the Nobel prize of Computer science. He is also know ...
, namely, that RP ⊆ P/poly; and this result was generalized to BPP ⊆ P/poly by Bennett and Gill.[Charles H. Bennett, John Gill. ''Relative to a Random Oracle A, PA ≠ NPA ≠ co-NPA with probability 1'']
/ref>
Variants of the theorem show that BPL (complexity), BPL is contained in L/poly and AM is contained in NP/poly.
Proof
Let ''L'' be a language in BPP, and let ''M''(''x'',''r'') be a polynomial-time algorithm that decides ''L'' with error ≤ 1/3 (where ''x'' is the input string and ''r'' is a set of random bits).
Construct a new machine ''M''(''x'',''R''), which runs ''M'' 48''n'' times and takes a majority vote of the results (where ''n'' is the input length and ''R'' is a sequence of 48''n'' independently random ''r''s). Thus, ''M'' is also polynomial-time, and has an error probability ≤ 1/''e''''n'' by the Chernoff bound
In probability theory, the Chernoff bound gives exponentially decreasing bounds on tail distributions of sums of independent random variables. Despite being named after Herman Chernoff, the author of the paper it first appeared in, the result is d ...
(see BPP). If we can fix ''R'' then we obtain an algorithm that is deterministic.
If is defined as , we have:
:
The input size is ''n'', so there are 2''n'' possible inputs. Thus, by the union bound
In probability theory, Boole's inequality, also known as the union bound, says that for any finite or countable set of events, the probability that at least one of the events happens is no greater than the sum of the probabilities of the individu ...
, the probability that a random ''R'' is bad for at least one input ''x'' is
:
In words, the probability that ''R'' is bad for some ''x'' is less than 1, therefore there must be an ''R'' that is good for all ''x''. Take such an ''R'' to be the advice string in our P/poly algorithm.
References
{{DEFAULTSORT:P poly
Complexity classes