Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lecture 13

In-class notes: CS 505 Spring 2025 Lecture 13

In this lecture, we wrap up our discussion of Alternating Turing machines and the Polynomial Hierarchy.

Alternating Time and Space

Given ATMs from last lecture, we can alternatively define , , and in terms of ATMs.

Definition. The class (resp., ) is the set of all languages that are decidable in time on an -alternating ATM with initial state labeled (resp., ).

It is not difficult to see how we can define and with respect to the above complexity classes.

Lemma. For all ,

Corollary. .

Unlimited Number of Alternations

The definitions above of and limit the number of alternations a given ATM can have (they are -alternating). However, we do not need to restrict the number of alternations. This was exactly the class defined in the last lecture: the set of all languages decidable in time by an ATM . In particular, there is no restriction on the number of alternations. With this, we can define alternating polynomial time.

Definition. .

As one might expect, an unlimited number of alternations yields something we believe to be more powerful than .

Theorem. .

Proof. First, we show that . We do this by showing . Recall that a QBF is in if and only if (i.e., it is a true quantified Boolean formula), where for all . This is trivially sovlable by an ATM which guesses everything and labels states according to , and checks if the result is true in polynomial time.

Now, we show . Let with ATM deciding in polynomial time. Construct a deterministic machine as follows. On input , performs a depth-first search of the configuration graph and attempts to compute the label of the starting node (which would be the output of the machine . The algorithm is recursive. Recalling the facts about the configuration graph, since runs in polynomial time, the amount of bits needed to represent every configuration is polynomial in . Moreover, doing a depth-first search only requires storing configurations in the recursion stack, since runs in time. So uses at most polynomial space.

We can also define alternating polynomial space, where we consider space-bounded ATMs with an unlimited number of alternations (the class .

Definition. .

Theorem. .

Finally, we can define alternating logspace as .

Theorem. .

Time-Space Tradeoffs for SAT

What are alternations used for? Here, we’ll see how we can use ATMs to give time-space tradeoffs for .

Complexity theorists generally believe that any algorithm deciding/solving must have the following properties.

  1. Solving requires exponential time (or, at least super polynomal time).
  2. Solving requires linear space.

In general, both of the above are conjectures, there may be an algorithm for solving which only uses logarithmic space, or uses polynomial time! However, we can rule out an algorithm that achieves both of these properties.

Theorem. Let be functions. Define the class to be all languages decidable by a DTM using at most time and (additional) space. Then, . More generally, for any such that , we have .

Proof. To prove the theorem, we first need the following claim which relates to .

Claim 1. .

The proof of this claim is similar to the proofs of Savitch’s Theorem and is complete. Let with decider running in time and space for any input . We construct an ATM for deciding as follows. will construct the configuration graph . By the previous properties we have discussed for configuration graphs, we know that all configurations need at most bits to describe. Moreover, if and only if there exists a path in the graph from to some accepting configuration , and any such path has length at most .

Now, this path from to exists if and only if there exist configurations such that:

  • If , then is accepting; and
  • , follows from in at most valid executions of ’s transition function. Essentially, we have divided the path from to into chunks, each of size . Now, each configuration requires bits to describe, so the full description of the path requires bits. So the ATM guesses this path using the appropriate alternations. Intuitively, this is is a start state, is an accepting state, and follows from in at most steps. Clearly, this implies .

Now, we need a second claim to proceed with the proof.

Claim 2. Suppose that . Then .

To see this claim, let . Then there exists a DTM such that in time, where . Here, we are using the fact that .

By the assumption in the claim, we have . By a padding argument, this implies that . Thus, we can construct a DTM such that on input for and , runs in time and outputs if and only if such that . This implies that

Why have we bothered with Claims 1 and 2? Well, using these claims, we will show that . This establishes the result since . Suppose this is not the case; that is, . Then, Claims 1 and 2 gives us the following inequalities. where follows by Claim 2 and the fact that . This violates the non-deterministic time hierarchy theorem, so we can conclude that .

The Polynomial Hierarchy via Oracle Machines

Our final discussion on the polynomial hierarchy will again show that we can give yet another equivalent definition, this time using oracle Turing machines/complexity classes. We begin with .

Theorem. For all , we have , where is a -complete problem.

Proof. We show the proof for , other cases are analogous. For , we show that . First, we show . Let . By definition, there exists a DTM such that for all , we have if and only if , where . Fix such that . Now, the language of all pairs satisfying this is a language. To check if , we can equivalently check the statement . That is, we can check if . Since this is a statement, we can check this statement in polynomial time by converting it to a formula and querying the oracle to see if it has a satisfying assignment. Thus and .

Now, we show the other direction: . Let with corresponding NTM . Here, we assume that the NTM outputs at most choices per execution of its transition function. At first glance, it does not seem like we can capture the power of the oracle in . After all, for any , makes at most queries, say (note: each is a formula), each with corresponding answers . Moreover, each query can arbitrarily depend on the previous queires and answers, along with any other non-deterministic decisions made by !

Let denote the non-deterministic choices made by . Intuitively, in order to construct a DTM to decide in , we will guess the non-deterministic choices and query answers that will cause to accept. That is, we can see that if and only if choices and query answers such that

  • If makes choices and recieves oracle query answers ,
  • Then
    1. reaches an accepting state and
    2. The following hold.
      • If then there exists an assignment such that .
      • If then for all assignments we have . Here, is the th query made by .

Thus, we construct a DTM such that if and only if simulates and

  • using non-deterministic choices ;
  • :
    • If then ; and
    • If then .

Clearly, decides and thus .