Lecture 12
In-class notes: CS 505 Spring 2025 Lecture 12
The Polynomial Hierarchy
Last time, we defined the class . Today, we’ll generalize this class and define the Polynomial Hierarchy.
Definition. For any , the class is the set of all languages such that there exists a deterministic Turing machine deciding and a polynomial such that for all Here, if is odd and if is even.
Given this generalization of , we can define the Polynomial Hierarchy, which we denote as .
Definition. .
Note that we can also define the co-classes of any . These classes are denoted by .
Definition. For any , . Equivalently, if there exists a deterministic Turing machine deciding and a polynomial such that for all Here, if is even and if is odd.
Actually, we also have that . This is due to the following lemma.
Lemma. For all , we have .
Proof. Let . By definition, there exists DTM and polynomial such that for all , we have if and only if where each . To see that , we can add a “dummy” quantifier in front of . We can define a machine which takes as input , ignores , and outputs . This is clearly in . Note the same strategy works for a language and lifting it to .
Properties of
It is widely believed that , , and for all . This is because otherwise, the Polynomial Hierarchy collapses. That is, there exists such that or (which implies that ). We say this is a collapse of because if this happens, the .
Theorem.
- If there exists such that , then .
- If , then .
Proof. Notice that (2) is actually just a corollary of (1) when . However, we’ll directly prove (2), as the ideas in this proof readily extend to any . We’ll do a proof by induction. Suppose that . Recall this also implies that . Our proof by induction will establish that for all .
For the base case, we have that since . For the inductive step, assume that . We show that .
First, we show the case for . Given , by definition we have a DTM which decides . That is, for polynomial and any , if and only if where all .
Define new language to be all pairs such that Clearly, we have that by our inductive hyptophesis. This implies there exists a DTM such that if and only if , where runs in polynomial time. Now, we can replace the decider for with as follows. Under this , we have that if and only if . Now this implies that . Therefore, .
For the other case, where , we simply do the above strategy for the complement language .
Complete Problems for
We can readily define complete problems for , , and , using the same definition of polynomial-time reducibility we have for . And, in fact, for every , and have complete problems.
However, we do not believe that has a complete problem/language . This is because if one were to exist, then again collapses to some level .
Theorem. If there exists that is -complete, then there exists such that .
Proof. Recall that . So for any , there exists such that or . Assume that is -complete. Then, for all , we have . Suppose that . This implies that if or for , we can in polynomial time decide using a decider for . Since , this implies that as well. The same holds if . Thus, collapses to level .
Recall that is the complete problem for . Recalling the definition of , it is a more general quantified Boolean formula and caputres computations in . So we have . However, as a corollary of the above theorem, unless collapses, then is a strict subset of .
Corollary. Unless collapses, .
This is simply because is a complete problem for , so if , then has the complete problem , so it must collapse to some level .
Complete Problems for an and
In contrast to , for any fixed , the classes and each have complete problems.
-
For , we define the language as follows. where if is odd and if is even. Then, is -complete.
-
For , we define the language as follows. where if is even and if is odd. Then, is -complete.
-
A different complete problem for , due to Umans in 1998. This is called . The problem is defined as follows. The input to the problem is a set of DNF formulas each with variables, and an integer . This input is said to be in if and only if there exists a subset of size at most such that the formula is a tautology. More formally, Clearly, this language is in . It turns out it is also -hard.
Alternating Turing Machines: Generalized Non-Determinism
Let’s think back to the non-deterministic Turing machine definition of . We say that if there exists a NTM which decides . This was defined as follows: for all , if and only if , where we say outputs 1 if and only if there is at least one set of non-deterministic choices makes on input that causes to output . Viewing this as a computation tree, or from the point of view of our configuration graph , it says that there is at least one path from to any accepting configuration in . Moreover, all paths to halting configurations have length .
Now, thinking back to , it is reversed: an NTM decides if for any , if and only if in the graph , all halting configurations are accepting. If this happens, we say that ; otherwise, if there is at least one rejecting configuration, .
How can we model this for, say, ? That is, is there a way to describe a non-deterministic machine which decides ? Looking at the deterministic verifier definition, if there exists deterministic verifier such that for all ,
It is not immediately clear how we would define a non-deterministic Turing machine to decide . For languages in , it was enough that there existed at least one accepting configuration in , and for , we needed all halting configurations to be accepting in . Thinking to the verification definitions of , this makes sense. But how can we generalize it to , and more generally and ?
Alternating Turing Machines
The answer is alternating Turing machines. These machines, in some sense, generalize non-determinism as follows.
Definition. A non-determinstic Turing machine is said to be an alternating Turing machine (ATM) if it additionally labels non-halting states with or such that for any , if and only if the starting configuration is labeled after the following process.
- Let be the directed configuration graph for .
- Label all configurations with and with .
- For all non-halting nodes in the graph , corresponding to some non-halting configuration:
- If the state of is labeled , label with a if and only if at least one child of is labeled .
- If the state of is labeled , label with a if and only if all children of are labeled . We say that an ATM runs in time if all root-to-leaf paths in have length at most for any input . Finally, we say that an ATM is -alternating if on any root-to-leaf path in , it alternates between and state label quantifiers at most times.
Under the above definition, it is clear that is decidable in polynomial time on an ATM which is -alternating. That is, the ATM begins only with states, then at some point switches to states, until the computation halts. We can now define alternating time and space.
Definition. For function , we say that if there exists an ATM which decides in at most time. Similarly, for function , we say that if there exists an ATM which decides in at most space.