Polynomial time with a PP oracle #
P^PP relative to the encoding enc of instances (Cslib.Complexity.PWithPPOracle) consists of
the problems L decided by one deterministic oracle program, strict oracle PPT as in
Cslib.Complexity.ComputableInPolyTimeWithOracle, that is correct against every oracle language
agreeing with some problem B ∈ PP on the encoded instances of B, for some encoded type of
instances of B. As for Cslib.Complexity.PWithSharpPOracle, the program is fixed before the
oracle and the answers on words that are not codes are arbitrary.
A bit of a value f b of a function f ∈ #P is computed in P^PP by binary search: the
problem {(b, k) | k ≤ f b} is in PP, by the characterisation through GapP
(Cslib.Complexity.setOf_le_mem_PP), and N queries lo + 2 ^ (j - 1) ≤ f b, for
j = N, …, 1, determine f b < 2 ^ N (Cslib.Complexity.BinarySearch.fst_iterate_step,
Cslib.Complexity.BinarySearch.interpret_id_search), within strict oracle PPT
(Cslib.Complexity.BinarySearch.isOraclePPTOn_search). Hence P^#P ⊆ P^PP
(Cslib.Complexity.PWithSharpPOracle_subset_PWithPPOracle): every request of a P^#P program
for bit i of f b, sent as the code (b, i), is answered by a binary search
(Cslib.Complexity.BinarySearch.bitQuery), substituted into the program by stateless open
oracle substitution (Cslib.Probability.IsOraclePPTOn.interpret_preprocess_open'). The search reads
the code of b and the position i from the request without decoding b, and runs for
r (n) + 1 rounds, for the length n of the request and f b ≤ 2 ^ r (|b|).
A problem in ModP k is decided by reading all bits of its #P count, as in a metric reduction
(Cslib.Complexity.MetricReducible.polyTimeOracleProgram), and testing the residue modulo k.
So ModP k ⊆ P^#P ⊆ P^PP for every modulus k (Cslib.Complexity.ModP_subset_PWithSharpPOracle,
Cslib.Complexity.ModP_subset_PWithPPOracle), with ⊕P ⊆ P^PP
(Cslib.Complexity.ParityP_subset_PWithPPOracle) as the modulus-two case via ModP_two.
With Toda's theorem PH ⊆ P^#P (Cslib.Complexity.PH_subset_PWithSharpPOracle), P^#P ⊆ P^PP
gives Toda's theorem PH ⊆ P^PP Toda
(Cslib.Complexity.PH_subset_PWithPPOracle). The classes do not count queries.
Main definitions #
Cslib.Complexity.PWithPPOracle: polynomial time with aPPoracle.Cslib.Complexity.BinarySearch.step,Cslib.Complexity.BinarySearch.search: binary search, by itself and with an oracle.Cslib.Complexity.BinarySearch.bitQuery: answering a bit request to a#Pfunction by binary search.
Main results #
Cslib.Complexity.P_subset_PWithPPOracle,Cslib.Complexity.PP_subset_PWithPPOracle:P ⊆ P^PPandPP ⊆ P^PP.Cslib.Complexity.PWithOracle_subset_PWithPPOracle,Cslib.Complexity.exists_mem_PP_mem_PWithOracle_image:P^A ⊆ P^PPforA ∈ PP, andP^PPlies inPrelative to the codes of aPPproblem.Cslib.Complexity.setOf_le_mem_PP: comparing with a#Pvalue is inPP.Cslib.Complexity.BinarySearch.interpret_id_search,Cslib.Complexity.BinarySearch.isOraclePPTOn_search: binary search with an oracle is correct and strict oracle PPT.Cslib.Complexity.PWithSharpPOracle_subset_PWithPPOracle:P^#P ⊆ P^PP.Cslib.Complexity.ModP_subset_PWithSharpPOracle,Cslib.Complexity.ModP_subset_PWithPPOracle:ModP k ⊆ P^#PandModP k ⊆ P^PPfor everyk.Cslib.Complexity.ParityP_subset_PWithPPOracle:⊕P ⊆ P^PP, the modulus-two case.Cslib.Complexity.mem_PWithPPOracle_of_testBit: one bit of a#Pvalue is inP^PP.Cslib.Complexity.BPOp_ParityP_subset_PWithPPOracle:BP·⊕P ⊆ P^PP.Cslib.Complexity.PH_subset_PWithPPOracle: Toda's theorem,PH ⊆ P^PP.
References #
P^PP: the problems L such that, for some type β with encoding encβ and some
B ∈ PP encβ, one deterministic oracle program, strict oracle PPT on the encoding enc of
instances, decides L against every oracle language containing the code encβ b exactly when
b ∈ B. Answers on words that are not codes are arbitrary.
P ⊆ P^PP: a polynomial-time decider makes no query.
PP ⊆ P^PP: the program asks the oracle about its instance, with one query.
P^A ⊆ P^PP for A ∈ PP: a polynomial-time oracle program relative to a language in
PP over words encoded as themselves decides its problem against every oracle agreeing with that
language, since every word is a code.
P^PP lies in polynomial time relative to the codes of a PP problem: against the image
of its PP problem under the encoding, the program of a problem in P^PP decides it.
Comparing with a #P value #
Answering bit requests #
The handler answering a request for bit i of f b, sent as the code
encPair encβ encNat (b, i), by binary search for f b < 2 ^ N with N = r (n) + 1 rounds,
where n is the length of the request: the code of b is read from the request without decoding
b, and the position is read in binary and capped at N.
P^#P ⊆ P^PP #
P^#P ⊆ P^PP: every request of a P^#P program for a bit of a #P value f b is
answered by binary search with queries k ≤ f b to the PP problem {(b, k) | k ≤ f b}.
Modular counting #
ModP k ⊆ P^#P, for every modulus k: the program reads the bits of the #P count
f a ≤ 2 ^ r (|enc a|) and tests whether f a is nonzero modulo k. At k = 0 this is
NP ⊆ P^#P (Cslib.Complexity.ModP_zero). The argument is elementary.
ModP k ⊆ P^PP, for every modulus k: the count is read in P^#P, and
P^#P ⊆ P^PP.
⊕P ⊆ P^PP: the modulus-two case of ModP_subset_PWithPPOracle, via ModP_two. It sits
in the setting of Toda's theorem Toda, whose step BP·⊕P ⊆ P^PP
(BPOp_ParityP_subset_PWithPPOracle) allows a bounded-error randomized reduction first.
Toda's theorem #
One bit of a #P value is in P^PP: a problem decided by the bit at a polynomial
position of a function f ∈ #P on its own instances is in P^PP, found by binary search with
queries k ≤ f a to the PP problem {(a, k) | k ≤ f a}.
BP·⊕P ⊆ P^PP: a problem decided with bounded error by a problem in ⊕P about pairs of
an instance and a random string is decided by one bit of a function in #P, found by binary
search with a PP oracle.
Toda's theorem: PH ⊆ P^PP Toda. Every problem in the polynomial hierarchy is
decided by a polynomial-time oracle program against every oracle language agreeing with a problem
in PP on its encoded instances.