The purpose of this post is to describe an odd complexity class, \(\oplus \text{P}\) (pronounced parity-P), which wasn't known to be powerful or even useful until the discovery of Toda's theorem (which I'm going to prove). Toda's theorem claims that the computational power of the polynomial hierarchy (the set of all problems that can be solved in polynomial time, irrespective of other resources) is completely equal to the ability to count polynomially long things. This is a cool result because it highlights the intricate value of being able to count things - the ability to count allows you to also solve any problem in the polynomial hierarchy.
I'm going to start by defining \(\text{NP}, \text{BPP}\), and \(\oplus \text{P}\) in terms of computational paths. Specifically, a language \(L\) is in:
1) \(\text{NP}\) iff there is such a polynomial-time nondeterministic Turing Machine \(M\) for which \(π β π³\) implies that at least one of the computation paths accepts, and \(π β π³\) implies that no computation paths accept.
2) \(\text{BPP}\) iff there is such a polynomial-time nondeterministic Turing Machine \(M\) for which \(x β L\) implies that at least \(\frac{2}{3}\) of the computation paths accept, and \(π β π³\) implies that at most \(\frac{1}{3}\) of the computation paths accept.
3) \(\oplus \text{P}\) iff there is such a polynomial-time nondeterministic Turing Machine \(M\) for which \(x β L\) implies that an odd number of the computation paths accept, and \(π β π³\) implies that an even number of the computation paths accept.
Next, I'm going to describe the notion of Turing Machines with Oracles, and the specific classes of problems they solve. For instance, consider the classes \(\text{NP}^A\), \(\text{BPP}^A\), \((\oplus \text{P})^A\). These are the classes obtained by replacing the polynomial-time nondeterministic Turing Machine \(M\) in the definitions above with a polynomial-time nondeterministic oracle Turing Machine \(M\) that is equipped with language \(A\) as its oracle. As usual, if we write \(C\) instead of \(A\) in the exponent, for some complexity class \(C\), we mean that any language \(A β C\) is permitted as the oracle. If \(C\) has a complete language (as \(\text{NP}^A\) and \((\oplus \text{P})^π¨\) do, for any oracle \(A\)), then by using that language as the oracle we can solve any instance of a problem in \(C\) with a single call to this specific oracle.
Finally, I'm going to describe the polynomial-time hierarchy. Define \(\Delta_0^P := \Sigma_0^P := \Pi_0^P:= \text{P}\), where \(\text{P}\) is the set of problems that can be solved in polynomial time (with respect to the size of the instance of the problem). Then, for all \(i \geq 0\), define:
$$\Delta_{i+1}^P:=\text{P}^{\Sigma_i^P}$$
$$\Sigma_{i+1}^P:=\text{NP}^{\Sigma_i^P}$$
$$\Pi_{i+1}^P:=\text{coNP}^{\Sigma_i^P}$$
The polynomial-time hierarchy is defined as
$$PH = \bigcup\limits_{i} \{\Delta_i^P, \Sigma_i^P, \Pi_i^P\}$$
The result that I want to show here is that every language in the polynomial hierarchy can be solved by Turing Machines of the counting complexity class \(\text{P}^{\#\text{P}}\) (pronounced P sharp-P), which really illuminates the significance of counting as a fundamental computational resource.
The generalized Valiant-Vazirani theorem states that for any \(n\), there is a randomized procedure that runs in \(poly(n)\) time and outputs a \(poly(n)\)-size circuit \(C\) such that for each subset \(T\subseteq\{0,1\}^n\) if \(|T|>0\), then
$$\Pr[|\{x:x\in T \text{ and }C(x) = 1\}|=1] \geq \frac{1}{8n}$$
This lemma seeks to show that the generalized Valiant-Vazirani theorem implies that for every oracle \(A\), that \(\text{NP}^A \subseteq \text{BPP}^{(\bigoplus P^A)}\).
Let \(πΏ\) be an arbitrary language in \(\text{NP}^A\) that is decided by a nondeterministic oracle turing machine \(M\) that runs in polynomial time. Then, given an input \(x\) we can decide whether it is in \(L\) by using a probabilistic turing machine oracle equipped with the polynomial-time nondeterministic Turing Machine oracle \(\oplus P^A\). Let \(P\) be the list of all the computation paths of \(M\) upon input \(x\) such that for all\(π β π, p\) ends in an accept state and let the count of the number of accepting computation paths be \(m\). Using lemma 5.1, produce separate circuits \(πΆ_π\) for each computation path \(π_π β π\), such that \(πΆ_π(π_π) = 1\). Then, a nondeterministic turing machine oracle \(π_π\) would guess \(x\) such that \(\{π₯: π₯ β π \text{ and } C_i(x) = 1\}_{π=1,...,π}\). Then, \(π_π\) would verify that the guess belongs in the set by using an oracle \(A\) in polynomial time and returns ACCEPT if the verification is successful. Therefore, \(π_i^π΄ β \oplus \text{P}^π΄\).
Therefore, using \(π_i^π΄\) as an oracle, simulate the \(\text{BPP}\) behavior on a probabilistic turing machine by calling
\(\text{M}_i^π΄, βπ, 1 β€ π β€ π\) and counting the number of ACCEPTS returned from the oracle:
If the number of ACCEPTS is odd, then the probabilistic TM returns ACCEPT.
If number of ACCEPTS is even, then the probabilistic TM returns REJECT.
To show that this procedure maps βyesβ to βyesβ:
If \(π₯ β πΏ β \text{NP}^π΄\), then
$$π(|\{π₯:π₯βπ \text{ and }C_i(x)=1\}_π|=1) β₯ \frac{1}{8π}$$
from lemma 5.1. Therefore, for \(k\) circuits, the probability of all of them deciding incorrectly becomes:
$$\leq \bigg(1-\frac{1}{8m}\bigg)^k \approx 1 - \frac{k}{8m} \quad \text{(by taylor expansion)}$$
For this to be in \(\text{BPP}\), the probability of incorrectly deciding a string in \(L\) should be atmost \(\frac{1}{3}\).
Therefore, we can choose the number of circuits, \(k\), that the \(\text{BPP}\) would have to make to satisfy this property.
If \(π β₯ \frac{16}{3} π\), the probability of incorrectly deciding it is atmost \(\frac{1}{3}\). So, the probability of correctly deciding it is atleast \(\frac{2}{3}\).
Therefore, βyesβ maps to βyesβ.
To show that this procedure maps βnoβ to βnoβ:
If \(π₯ β πΏ\), then the number of accepting configurations in \(\oplus \text{P}^A\) will be \(0\) which is even.
Therefore, the probabilistic turing machine will return a REJECT.
So, βnoβ maps to βnoβ.
Therefore, we now have that for all \(A\):
$$\text{NP}^A β \text{BPP}^{(β¨ \text{P}^π΄)}$$
QED.
Given an arbitrary language \(πΏ β \text{NP}^{\text{BPP}}\) that is decided by a polynomial-time nondeterministic turing machine \(M\) and queries oracle \(\text{A} β \text{BPP}\), we can decide a string of the language using a \(\text{BPP}\) probabilistic turing machine \(Mβ\) that queries oracle \(\text{B} β \text{NP}\).
Given an input \(x\), there are \(2^{|π₯|^{π(1)}} = 2^{|π₯|^π}\) possible computation paths that are generated by \(M\).
Therefore, let the \(\text{BPP}\) machine \(Mβ\) query its \(\text{NP}\) turing machine oracle \(2^{|π₯|^π}\) times (one time for each computation path). On each query let \(Mβ\) build up an array of size \(|x|\) of βtrueβ or βfalseβ for each path such that if the oracle returns βtrueβ for every bit, then \(M\) returns βtrueβ.
Then, through repeated error reduction, we can reduce the error of the \(\text{BPP}\) machine to atmost \(\frac{1}{3|x|^k} \times \frac{1}{2^{|x|^k}}\)
Therefore, upon the \(2^{|π₯|^π}\) computational paths that a nondeterministic turing machine would take, where the number of queries to the oracle are atmost \(|π₯|^π\), we have that the probability of incorrectly deciding the string becomes:
$$β€ \frac{1}{3|x|^k \times 2^{|x|^k}} \times (2^{|π₯|^π} \times |π₯|^π) = \frac{1}{3}$$
It follows then that the probability of correctly deciding the string is atleast \(\frac{2}{3}\). Since this is simulated on a \(\text{BPP}\) machine with a turing machine oracle in \(\text{NP}\), we have that
$$\text{L} β \text{BPP}^{\text{NP}}$$
Therefore, we conclude that:
$$\text{NP}^{\text{BPP}} β \text{BPP}^{\text{NP}}$$
QED.
Given a language \(πΏ β \text{BPP}^{\text{BPP}}\) that is decided by a \(\text{BPP}\) probabilistic turing machine \(M\) and queries oracle \(π΄ β \text{BPP}\), we can decide a string of the language by using a \(\text{BPP}\) probabilistic turing machine \(M'\), and we can use error reduction to show that \(πΏ β \text{BPP}\) by simulating the oracle, where the probability of errors for \(M'\) is \(π_2\) and the probability of errors for \(M\) is \(π_1\).
Given an input \(x\), query the oracle atleast once on each bit of \(x\). Therefore, the total number of queries would be \(|π₯|^π\). Hence, the probability of getting an error on a single query is \(π_1\) whereas the probability
of getting an error in the entire simulation would be \(|π₯|^π π_1\). Then, adding in the probability of getting an error in \(M\), we have that the probability of error is: \(|π₯|^π π_1 + π_2\).
Through repeated error reduction, we can reduce the values of \(π_1\) and \(π_2\) from \(\frac{1}{3}\). However, to show that \(π₯ β \text{BPP}\), we would need:
$$|π₯|^π π_1 + π_2 β€ \frac{1}{3}$$
Note that this is satisfied if we do repeated error reduction as many times as needed until:
$$π_1= \frac{1}{6|x|^k},\quad \quad π_2=\frac{1}{6},$$
since
$$|π₯|^π π_1 + π_2 = \frac{1}{6} + \frac{1}{6} = \frac{1}{3}.$$
If the probability of an error is \(\frac{1}{3}\), then the probability of success will be \(\frac{2}{3}\). Therefore, through simulating the \(\text{BPP}\) oracle on a \(\text{BPP}\) machine \(M\), we have that:
$$\text{BPP}^{\text{BPP}} \subseteq \text{BPP}$$
QED.
Given lemma 1, \((\text{NP}^{\text{BPP}} β \text{BPP}^{\text{NP}})\) and lemma 2 \((\text{BPP}^{\text{BPP}} β \text{BPP})\), we can finally use induction to show that:
$$\text{NP}^π΄ β \text{BPP}^π΄ β \text{NP}^{(\text{NP}^{(\text{NP}^{(...^{(\text{NP}^π΄)}... )))}}} β \text{BPP}^π΄,$$
where we induct on the height, \(i\), of the \(NP\) tower.
Base Case: \(i = 1\):
When \(i = 1\), the formulation becomes \(\text{NP}^π΄ β \text{BPP}^π΄\), which is known to be true.
Assumptive Case: \(i = k\)
Assume that for height \(k\),
$$\text{NP}^{(\text{NP}^{(...^{(\text{NP}^π΄)))}}} β \text{BPP}^A$$ Inductive Case: \(i = k + 1\)
Given an arbitrary language \(πΏ β \text{co}\)-\((\oplus \text{P})\) that is decided by a nondeterministic polynomial-time turing machine \(M(x, y)\) s.t. \(π₯ β πΏ\) implies that an even number of computation paths (\(y\) is even) end up on an ACCEPT state and \(π₯ β πΏ\) implies that an odd number of computation paths (\(y\) is odd) end up on a REJECT state, we can also decide \(L\) on a \(\oplus \text{P}\) machine \(M'\).
Therefore, we use the following procedure:
\(Mβ(x)\):
If \(πΏ = \{π₯ | \text{ number of }y's \text{ s. t. }π(π₯, π¦) = 1 \text{ is even}\}\), then construct \((\oplus \text{P})\) machine \(M'\) that runs on \(π'(π₯, π¦)\).
Then, we allow \(Mβ(π₯, ty)\) to have an additional computational path than \(M\) by letting it do the following:
The additional computational path simulates \(M\). If \(M\) accepts, then return ACCEPT. Else, REJECT.
The remaining computational paths decides \(x\) nondeterministically.
It does this by choosing a βyesβ or βnoβ branch at every step of the decision tree.
In this case, it would only return ACCEPT if all paths reached the βnoβ leaf. Otherwise, it would REJECT.
We see here that \(M'\) has exactly 1 more accepting computation path than \(M\). Since \(M\) had an even number of paths, we have that \(Mβ\) has an odd number of paths. Therefore, \(πΏ = \{ π₯ | \text{ number of y's s.t. } π'(π₯, π¦) =
1 \text{ is odd}\}\). Hence, \(πΏ β \oplus \text{P}\).
Since \(πΏ β \oplus \text{P}, πΏ β \text{co}\)-\(\oplus \text{P}\), we use the transitivity property to conclude that:
$$\text{co -}\oplus \text{P} β \oplus \text{P}$$
QED.
Given an arbitrary language \(πΏ β (\oplus \text{P})^{\oplus \text{P}}\) that is decided by a nondeterministic turing machine \(M\) which queries an oracle \(π΄ β \oplus\text{P}\), we can show that it is also decided by a nondeterministic turing machine \(M'\) s.t. \(πΏ = \{x: |\{y: M'(x,y)=1\}| \text{ is odd}\}\).
First use the method suggested in the hint, knowing that there exists some nondeterministic guess that produces a correct transcript that concurs with \(M\) on the specified computation path.
Then, we use the following strategy to decide on an input \(x\).
\(Mβ(x)\):
Guess a transcript of \(M\) on \(x\). If the transcript is not accurate, then REJECT immediately.
If the transcript is not an accepting configuration, then return REJECT.
For all accurate queries (as determined by the transcript):
Nondeterministically guess the computation path of a TM \(B\) for \(A\) on each query it is sent.
If each of these computation paths leads to an accept state in \(B\), then return ACCEPT.
For all inaccurate queries (as determined by the transcript):
Nondeterministically guess the computation path of a TM \(B'\) for \(\bar{A}\)) on each query it is sent.
If each of these computation paths leads to an accept state in \(B'\), then also return ACCEPT.
Therefore, we claim that this nondeterministic polynomial-time turing machine \(M'\) described above can decide \(x\). To prove this, we show that βyesβ maps to βyesβ and βnoβ maps to βnoβ.
To show that βyesβ maps to βyesβ:
The transcript that was guessed would let \(M'\) guess \(\chi\) accepting computation paths.
\(\chi\) is the total number of paths that can be taken.
There are an odd number of computation paths for queries that the transcript says are accurate.
There are an odd number of computation paths for queries that the transcript says are not accurate. So:
Therefore, we have that βyesβ instances of \(L\) will get mapped to βyesβ by \(M'\).
To show that βnoβ maps to βnoβ:
If the instance is βnoβ, then:
1) The transcript guessed would not be accurate
2) The transcript guessed would not be an accepting configuration.
3) The number of computation paths for accurate queries / inaccurate queries are even.
3)The number of accepting configurations are not even either
The procedure outlined above, however, ensures that \(M'\) REJECTs on all of these possibilities.
Since we have shown that βyesβ maps to βyesβ and βnoβ maps to βnoβ, we conclude the proof of correctness for this procedure, and therefore we have that:
$$L \in \oplus \text{P}$$
Then, by the property of transitivity, we have that:
$$(\oplus \text{P})^{\oplus \text{P}} \subseteq \oplus \text{P}$$
QED.
Let \(L\) be an arbitrary language such that \(πΏ β \text{PH}\), where
$$ \text{PH} = \bigcup\limits_{k \in \mathbb{N}} \Sigma_k^P$$
It follows then that we need to show that \(βπ, Ξ£_k^π β BPP^{\bigoplus \text{P}}\). Therefore,
$$\text{NP}^A β \text{BPP}^{(\oplus \text{P}^A)} \quad \text{(from Lemma 1)}$$
Let \(A β \oplus \text{P}\). It follows then that since \((\oplus \text{P})^{\oplus \text{P}} β \oplus \text{P}\) (proven in Lemma 2), we can simply replace \(\oplus \text{P}^A\)
with some language \(A' β \oplus \text{P}\). Therefore, we have that:
$$\text{NP}^A β \text{BPP}^{A'}$$
Then, let \(B β \oplus \text{P}\)-complete. It follows then that since \(B\) can be reduced to \(π΄\), \(A'\) , we can rewrite the above set inclusion as:
$$\text{NP}^B β \text{BPP}^B$$
Given the above set-inclusion to be true, we also know that:
$$\text{NP}^{\text{NP}^B} \subseteq \text{BPP}^B$$
$$\text{NP}^{\text{NP}^{\text{NP}^B}} \subseteq \text{BPP}^B$$
$$\text{NP}^{\text{NP}^{\text{NP}^{\text{NP}^{\text{NP}^{...^{\text{NP}^B}}}}}} \subseteq \text{BPP}^B$$
Therefore, we have that for all \(k\) levels in the \(\text{NP}\)-tower:
$$\{\text{NP}^{\text{NP}^{...^{\text{NP}^π΅}}}\} β \text{BPP}^B$$
However, by definition the LHS (with a height of \(k\)) is equal to \(Ξ£_k^P\). Therefore, we now have that for all \(k\), we can just construct the \(\text{NP}\)-tower of height \(k\) and it would still be contained in \(\text{BPP}^π΅\).
$$βπ, Ξ£_k^π β \text{BPP}^π΅$$
$$ \text{PH} = \bigcup\limits_{k \in \mathbb{N}} \Sigma_k^P \in \text{BPP}^B$$
$$\text{PH} \subseteq \text{BPP}^B, \quad B \in \oplus \text{P-complete}$$
This then yields:
$$\text{PH} β \text{BPP}^{\oplus \text{P}}$$
QED.
Our aim over the next 3 lemmas is to show that the ability to count is sufficient to capture the entire computational power of the polynomial hierarchy.
So, let \(C\) be Boolean circuit, and let \(g\) be a polynomial with nonnegative integer coefficients. The broad goal of this lemma is to describe a deterministic procedure that, given \(C\), produces a circuit \(C'\) such that
$$|\{π: πͺ'(π) = π\}| = π(|\{π: πͺ(π) = π\}|)$$
Additionally, this construction should run in polynomial-time in the size of \(C\) and use space atmost in the size of \(g\), when it is encoded in the natural way as a vector of coefficients.
Sub-Lemma 6.1: Given two circuits \(A\) and \(B\) with \(\alpha\) and \(\beta\) satisfying assignments respectively, we can produce a circuit \(C\) with \(\alpha + \beta\) satisfying assignments:
We first start by examining the result when \(C = A \vee B\).
\(A\)
\(B\)
\(C\)
\(0\)
\(0\)
\(0\)
\(0\)
\(1\)
\(1\)
\(1\)
\(0\)
\(1\)
\(1\)
\(1\)
\(1\)
However, noting that A and B might have inputs of differing dimensions:
The total number of satisfying assignments when A and B are combined simply using the OR operator is:
On the other hand, when \(πΆ = π΄ β¨ π΅\), where \(dim(π΄) = dim(π΅) = 1\):
\(A\)
\(B\)
\(C\)
\(0\)
\(0\)
\(0\)
\(0\)
\(1\)
\(1\)
\(1\)
\(0\)
\(1\)
\(1\)
\(1\)
\(0\)
$$\#ππ΄π(πΆ) = πΌ + π½$$
Therefore, we then try the following approach (letting \(dim(π΄) = π_π΄\), \(dim(π΅) = π_π΅\)):
\(d_A\)
If the first \(π_π΄\) bits are true and the last \(π_π΅\) bits satisfy \(B\), then return true.
\(d_B\)
If the first \(π_π΄\) bits satisfy \(A\) and the last \(π_π΅\) bits are true, then return true.
The resultant circuit produces \(Ξ± + π½\) satisfying instances in all cases except when \(π΄\) and \(B\) are both satisfying instances (here the resultant circuit produces \(Ξ± + Ξ² β 1\) satisfying instances).
Therefore, in this case we can then attempt a workaround by introducing a dummy variable \(π\) that negates both the instances when \(π΄ = π΅ = \text{ True}\).
Therefore, we let:
$$πΆ = (Β¬π β§ \tilde{A}) β¨ (π β§ \tilde{π΅}),$$
where \(\tilde{π΄}\) is the circuit that checks satisfiability of the first \(d_A\) assignments to the \(π΄\) circuit and checks that the remaining bits are all TRUE (by ANDing them), and where \(\tilde{π΅}\) is the circuit that
checks that the first \(d_A\) assignments are all TRUE (by ANDing them), and that the remaining \(d_B\) bits are satisfying assignments to the \(π΅\) circuit.
Therefore, the negated Boolean variable \(π\) in one of the clauses is then able to add the additional count for when \(A\) and \(B\) are true.
QED.
Sub-Lemma 6.2: Given two circuits \(A\) and \(B\) with \(πΌ\) and \(π½\) satisfying assignments respectively, we can produce a circuit \(C\) with \(\alpha\beta\) satisfying assignments:
We claim that \(C = A \wedge B\). To prove that \(C\) yields \(πΌπ½\) satisfying assignments, let \(\tilde{π΄}\) be the set of satisfying assignments of \(A\), and let \(\tilde{B}\) be the set of satisfying assignments of \(B\). Therefore, the cardinality of the set of tuples \(\tilde{π΄} Γ \tilde{π΅} = |\tilde{A}| Γ |\tilde{B}|\).
The onus is then to prove that:
1) \(βπ₯ β \tilde{π΄} Γ \tilde{π΅}, π₯\) is a satisfying assignment of \(C\):
If \(βπ₯ β \tilde{A} Γ \tilde{π΅}\), then \(π₯\) consists of a (satisfying, satisfying) assignment, one from \(\tilde{π΄}\) and another from \(\tilde{π΅}\).
Therefore, \(π₯\) will clearly satisfy an AND gate which takes as input any possible value of \(x\).
Therefore, \(πΆ = π΄ β§ π΅\) will have \(πΌπ½\) satisfying assignments where \(A\) has \(πΌ\) satisfying assignments and \(B\) has \(π½\) satisfying assignments.
QED.
Sub-Lemma 6.3: We can construct a circuit C with π‘ satisfying assignments:
We create a circuit \(π\) that has \(π‘_i\) satisfying assignments by noting that we can just return TRUE if the bit-value \(< t_i\). The minimum number of bits necessary here would be equivalent to the minimum number of bits necessary to represent \(π‘_π\) which would be \(log(π‘_π)\).
Therefore, to now prove the main lemma, given a circuit \(C\) with \(π\) satisfying assignments and a positive-coefficient polynomial \(π:\mathbb{N} \rightarrow\mathbb{N}\), we can construct a deterministic procedure that simply produces a circuit \(C'\) with \(π(π)\) satisfying assignments. The polynomial \(g\) is:
$$ g(x) = \sum\limits_{i=0} t_i x^i$$
To evaluate the circuit and the lemmas on this polynomial (the wording here is intentional), we need to start by finding \(π₯_π\), then using that to find \(t_i x^i\) and then adding that \(βi's\):
For each \(i\), we can create a circuit \(πΆ_{π_1}\) with \(π^i\) assignments by ANDβing the existing circuit to \(C\) \(i\) times (using lemma 6.2).
We then create a circuit \(π\) that has \(π‘\) satisfying assignments by using lemma 6.3.
Then, by lemma 6.2, we have that the \(i\)βth term in the polynomial would be represented by a circuit \(πΆ_{i_2} = πΆ_{i_1} \text{ AND } π_i\).
Finally, we perform lemma 6.1 on \(C_{i_2}, \forall i\) to produce \(πΆ'\) with \(Ξ£_{i=0}^{deg(π)}[\#\text{SAT}(πΆ_{π_2})] = π(π)\) satisfying assignments.
Then, return \(πΆ'\).
Finally, the onus of the proof is to show that the run-time of the procedure is in the size of \(C\) and \(g\):
Everytime lemmas 6.1, 6.2, and 6.3 are applied, an \(π(|πΆ|)\), \(π(1)\) and \(π(\log t_i)\) number of gates are added (each of which can be added in \(π(1)\) time) respectively. Therefore, the total number of gates that would need to be added throughout the entire procedure would be atmost:
$$π(π, πΆ) β€ π(|πΆ|)(\text{deg}(π) + π(1)) \text{deg}(π) + \max\limits_i π(\log t_i)$$
$$π(π, πΆ) β€ π(|πΆ|)\text{deg}(π) + π(|πΆ|) + \max\limits_i π(\log t_i) = \text{poly}(|C|, g) π$$
Therefore, the runtime of this procedure is in the size of \(C\), and takes space atmost \(g\). Hence, we now have a procedure that produces a circuit \(C'\) given \(C\) such that:
$$|{π¦: πΆ'(π¦) = 1}| = π(|{π₯: πΆ(π₯) = 1}|)$$
QED.
The purpose of this lemma is to create a deterministic procedure that, given \(m\) a power of two, outputs (as a sequence of coefficients) a polynomial \(π: \mathbb{Z} β \mathbb{Z}\) with nonnegative integer coefficients for which
$$t \equiv 0 \mod 2 \Rightarrow g(t) \equiv 0 \mod 2^m$$
$$t \equiv 1 \mod 2 \Rightarrow g(t) \equiv 1 \mod 2^m$$
and that runs in time \(poly(m)\).
Given that \(g_0(t) = 3t^2 β 2t^3 = t^2(3 β 2t)\) and that \(t \equiv 1 \mod 2^{2^i}\), we let \(t=k\cdot 2^{2^i}+1\), for \(k \in \mathbb{N}\). It follows then that
$$g_0(t) = t^2(3 β 2t)$$
$$=(1+k^2\cdot 2^{2^{π+1}} + k\cdot 2^{2^{i+1}})(3 - 2 - k\cdot 2^{1+2^i})$$
$$ = 1 + 2^{2^{1+i}}k^2 β 2^{2+2^{1+i}}k^2 β 2^{1+2^i+2^{1+i}}k^3$$
$$= 1 + 2^{2^{1+i}}(β3π^2) β (1 + 2^i)k^3 2^{2^{1+i}}$$
$$= 1 + 2^{1+2^i}(-(2^i+1)k^3 - 3k^2)$$
Then, since \(π, π β \mathbb{N}\), it follows that:
$$g_0(t)=1+2^{1+2^π}π½,\quad π½β\mathbb{N}$$
Hence,
$$π_0(t)=1+\beta\cdot 2^{2^{i+1}} \equiv 1 \mod 2^{2^{i+1}}$$
QED.
Our goal is now to construct a deterministic procedure that outputs the coefficients of a polynomial \(π: \mathbb{Z} β \mathbb{Z}\) with nonnegative integer coefficients for which:
$$π‘ \equiv 0 \mod 2 \Rightarrow π(π‘) \equiv 0 \mod 2^π$$
$$π‘ \equiv 1 \mod 2 \Rightarrow π(π‘) \equiv 1 \mod 2^π$$
and that runs in \(ππππ¦(π)\) where \(m\) is a power of \(2\). Therefore, let \(π = 2^π\), for \(π β \mathbb{N}\). It follows then that we want to construct a procedure that outputs the coefficients to a polynomial \(g: \mathbb{Z} \rightarrow \mathbb{Z}\) such that
$$π‘ \equiv 0 \mod 2 \Rightarrow π(π‘) β‘ 0 \mod 2^{2^π}$$
$$t β‘ 1 \mod 2 \Rightarrow π(π‘) β‘ 1 \mod 2^{2^k}$$
To do so, we recall lemmas 7.1 and 7.2 with \(π_0(t) = 3t^2 β 2t^3\) in that every application of \(π_0\) causes the exponent of the exponent of the mod to increment by 1. Therefore, we claim that the coefficients of \(π_0 β π_0 β ... β π_0(π‘) = π(π‘)\) where \(k\) compositions are done.
To prove this, we use mathematical induction on \(k\):
Base Case: \(π = 1, π = 0\)
No compositions would be done, so we would require \(π(π‘) = π‘\). However, when
$$π‘\equiv 0 \mod 2, g(t) \equiv 0 \mod 2^{2^0} \equiv 0\mod 2 = t$$
$$π‘\equiv 1 \mod 2, g(t) \equiv 1 \mod 2^{2^0} \equiv 1\mod 2 = t$$
Hence the base case is satisfied.
Assumptive case: We assume that \(g(π‘) = π_0 β ... β π_0 (π‘)\) for \(π β€ π\) compositions is true.
Inductive case: When \(π = π + 1\), we have that from the \((π β 1)\)th composition (by the assumptive step), we would have:
$$t\equiv 0 \mod 2 \Rightarrow π'(t) \equiv 0 \mod 2^{2^{k-1}}$$
$$t\equiv 1 \mod 2 \Rightarrow π'(t) \equiv 1 \mod 2^{2^{k-1}}$$
Therefore, when we perform the \(k\)βth composition, we would then get:
$$π‘\equiv 0 \mod 2 \Rightarrow π(π‘) \equiv 0\mod 2^{2^k}$$
$$π‘\equiv 1 \mod 2 \Rightarrow π(π‘) \equiv 1\mod 2^{2^k}$$
Therefore, by the inductive hypothesis from the base case, we now have that \(π_0 β π_0 β ... β π_0 (π‘) = π(π‘)\) where \(k\) compositions are done. As desired.
Finally, the onus of this proof is to show that this procedure runs in polynomial time in \(m\):
To do this, we note that each step of the composition involves atleast \(k\) evaluations through multiplication.
Therefore, the total number of multiplications would across all the steps would be \(O(2^k) = O(m)\).
Each multiplication runs in \(ππππ¦(π(π)) β ππππ¦(π)\) time.
The total time complexity of this procedure is \(ππππ¦(π) Γ π(π) = ππππ¦(π)\).
QED.
Recall Lemmas \(1\) and \(2\) which state that
$$\text{PH} β \text{BPP}^{\oplus \text{P}} $$
$$(\oplus \text{P})^{\oplus \text{P}} β \oplus \text{P} $$
Lemma 8.1: any language in \(\text{BPP}^{\oplus \text{P}}\) can be decided in \(BPP^{\oplus \text{P}}\) with the oracle machine making a single query and then immediately entering \(q_\text{accept}\) or \(q_\text{reject}\).
Let \(πΏ β \text{BPP}^{\oplus \text{P}}\). Let \(M\) be a probabilistic \(TM\) with oracle \(\text{P}^{\oplus \text{P}}\) that decides a string \(x\) through the following procedure (and only tossing the coins redundantly):
\(M(x)\):
Toss the \(c = |π₯|\) coins and write down the results (what is actually done with the results is not relevant right now).
Query the oracle \(\text{P}^{\oplus \text{P}}\) on \(x\).
If the oracle returns ACCEPT, then enter \(π_\text{ππππππ‘}\). If the oracle returns REJECT, then enter \(π_\text{ππππππ‘}\).
Therefore, we have that \(M\) decides \(L\) in \(\text{BPP}^{\text{P}^{\oplus \text{P}}}\). Recall Lemma 2 which states that \((\oplus \text{P})^{\oplus \text{P}} β \oplus \text{P}\). Since \(\text{P} β \oplus \text{P}\), we have that \(\text{P}^{\oplus \text{P}} β \oplus \text{P}\). Therefore, \(M\) decides \(L\) in \(\text{BPP}^{\oplus \text{P}}\).
QED.
Lemma 8.2: The outcome of the query is determined by the number of satisfying assignments of some circuit \(C\).
For the query made by \(M\) to \(\oplus \text{P}\), we let the turing machine that decides \(\oplus \text{P}\) be denoted as \(M'\). It follows then that \(M'\) has an equivalent circuit \(C\). It follows immediately that the outcome of the query (of form \(q: \{0, 1\}^c \rightarrow \{0, 1\}\) (where \(c\) is the number of coins)) depends on \(C\).
To determine the relationship further, we recall that \(\oplus \text{P}\) returns ACCEPT if the number of computation paths is odd and REJECT if it is even. Therefore, for an oracle query \(q\) to return ACCEPT, the number of satisfying assignments for \(C\) would have to be odd (\(\equiv 1 \mod 2)\), and for it to return REJECT, the number of satisfying assignments for \(C\) would have to be even \((\equiv 0 \mod 2)\).
Hence, we conclude that the outcome of the query is determined by the number of satisfying assignments of some circuit \(C\).
QED.
We now use Lemma \(7\) to produce a polynomial \(π: \mathbb{N} β \mathbb{N}\) such that \(π‘ \equiv 0 \mod 2 \Rightarrow g(t) \equiv 0 \mod 2^m\) and \(π‘ \equiv 1 \mod 2 \Rightarrow g(t) \equiv 1 \mod 2^m\), where \(m = c\) (the number of coins used by the turing machine \(M\)).
We then use part a (providing circuit \(C\) with \(s\) satisfying assignments as an input) to produce circuit \(C'\) with \(π(π )\) satisfying assignments). Therefore, \(C'\) would have
$$0 \mod 2^c \text{ satisfying assignments if } πΆ \text{ had } 0 \mod 2 \text{ satisfying assignments}.$$
$$1 \mod 2^c \text{ satisfying assignments if } πΆ \text{ had } 1 \mod 2 \text{ satisfying assignments}.$$
The onus of the proof is to now show that the language can be decided by a deterministic polynomial-time
turing machine \(Q\) that uses nondeterministic polynomial-time turing machine oracle \(Q'\) that runs in \(\#π\).
From lemma \(8.1\), we have that since the language \(L\) is decided by \(\text{BPP}\), atleast \(\frac{2}{3}\) of the computation paths correctly produce circuit \(C'\) when \(π₯ β πΏ\) such that \(C'\) has \(1 \mod 2^c\) satisfying assignments. Similarly, atmost \(\frac{1}{3}\) of the computation paths correctly produce circuit \(C'\) when \(π₯ β πΏ\) such that \(C'\) has \(0 \mod 2^c\) satisfying assignments. Therefore, the total number of paths that produce \(C'\) with \(1 \mod 2^c\) satisfying assignments when \(π₯ β πΏ\) is \(β₯ \frac{2}{3}\cdot 2^c\), whereas the total number of paths that produce \(C'\) with \(0 \mod 2^c\) satisfying assignments when \(π₯ β πΏ\) is \(β€ \frac{1}{3} \cdot 2^c\).
Note then that we can use a \(\#π\) oracle to find the total length of the set \(π = (π₯ = \{0,1\}^π) Γ π\) such that
\(πΆ'(π(π₯), i) = 1\) where \(π₯\) is every possible input of length \(c\) in the set, \(π(π₯)\) is a result of querying \(x\), and \(i\) is the \(d\)-dimensional input to \(C'\).
Then, a polynomial procedure \(H\) does the following:
Use the method described in the previous paragraph to query an oracle to find the length of the set, |π|.
Calculate \(π = |π| \mod 2^c\).
If \(π β₯ \frac{2}{3} \cdot 2^c\), then return ACCEPT.
If \(π β€ \frac{2}{3} \cdot 2^c\), then return REJECT.
There are atleast \(\frac{2}{3}\) accepting paths that we explicitly search for and atmost \(\frac{1}{3}\) rejecting paths that we explicitly search for by using \(\#\text{P}\) which is then verified through the modulo operation by procedure \(H\). Hence, we now have that any for an arbitrary language \(πΏ β \text{BPP}^{\oplus \text{P}}\), \(πΏ β \text{P}^{\#\text{P}}\). Therefore, we now have that:
$$\text{BPP}^{\oplus \text{P}} β \text{P}^{\#\text{P}}$$
However, recall result 1 from the previous set that:
$$\text{PH} β \text{BPP}^{\oplus \text{P}}$$
Therefore, by the property of transitivity we now have that
$$\text{PH} β \text{P}^{\#\text{P}}$$
QED.