Lecture 11
In-class notes: CS 505 Spring 2025 Lecture 11
Certificate Definition of
Just like with , we can define the class using a deterministic Turing machine that takes a certificate as additional input to help verify whether or not a string is in a language . Recall that for both and , the space used by the input tape is not counted towards the overall space complexity, and the input tape is read-only. So it makes sense that a certificate definition of does not count the size of the certificate when restricting the space complexity.
However, we actually need a stronger property to define with respect to certificates. We need one additional special tape, which we call the certificate/witness tape, with the following properties:
- the space used on the certificate tape is not counted against the overall space usage (as the witness could be polynomial in size); and
- The tape is read-once.
Property (2) above turns out to be crucial, as if you allow the machine to read the certificate multiple times (i.e., it is a read-only tape like the input tape), then you actually end up back in the class .
Definition. We say a language is in if there exists a deterministic Turing machine with a special read-once certificate tape and a polynomial such that for all , if and only if there exists such that , where is the input and is on the input (i.e., read-only) tape and is the certificate/witness and is on the special certificate (i.e., read-once) tape, and uses additional space on its read/write work tapes.
Recall that we do not believe that . This is because under the certificate definition of , there needs to exist at least one certificiate such that the deterministic verifier outputs (i.e., for at least one witness ). In contrast, for , the machine has to output for all certificates of polynomial length (i.e., for all ). So, intuitively, says that we can verify exponentially many certificates using a single certificate of polynomial length. Thus, we do not believe this to be the case.
Turning towards , consider the class . Under the certificate definition, again a machine for must output for all polynomial-sized witnesses . So it was not believed to hold that .
However, this was shown to be true! In particular, it was shown that the -complete problem lies in . Recall that is -complete. Under this definition, we have
Theorem. .
Proof. The key insight into the proof is that if we can enumerate all the vertices which are reachable from in the graph , and is not in this set, then we have shown there does not exist a path from to . We’ll build a certificate which verifies the sizes and the contents of the set of vertices which are reachable from . Our certificate will consist of many sub-certificates, which we will use all together to build the final certificate. The main challenges here are (1) the certificate must be read-once, and (2) we must verify the certificate using only logarithmic space.
Let denote the number of vertices in the graph . Moreover, we will uniquely label each vertex using the set . Note that , so our goal is still to construct a certificate of size while using space. First, let . We say that is reachable from in if there exists a path from to . Now, for every , we can define the set to be the set of vertices such that is reachable from in at most steps. Notice by definition we have .
Now, if we can generate a certificate for the set and show that , we are done. This is because the set is the set of all vertices in the graph that are reachable from in at most steps. Since the graph has vertices, if there is a path from to with more than steps, there is another path from to with at most steps.
Building Sub-certificates. We will build a number of sub-certificates that will help us build our final read-once certificate. First, for any and , we give a read-once certificate showing the statement “”. We’ll call this certificate a certificate.
certificate:
- The certificate will consist of vertices .
- Verification of the certificate proceeds as follows.
- Check if . This can be done in logarithmic space since this is just comparing bits.
- For all , check if . Note here that is part of the input and can be read multiple times. This again can be done in logarithmic space since we are just storing a counter for , and comparing two bit strings of length .
- For all , check if . Again, this is easily done in logarithmic space.
- Count up to and check that . This again only needs bits.
Note here that checks (2) and (3) are done at the same time since we are reading the certificate once. The certificate will be used in our final certificate. One main issue is that we need to be able to verify for any that is actually the set of all vertices reachable from in at most steps in the graph . If we do not verify this, then it is trivial to come up with a certificate that when it actually is.
We’ll now build on the ideas of the certificate . In particular, we’ll need two certificates that are more complicated.
- Certificate : this certificate will certify the statement given that . Here, given means that we have already verified this statement to be true.
- Certificate : this certificate will certify that given that . We’ll use the certificate to help us build these two certificates. Note that by definition, we know that , and it does not need to be included. This will serve as our base case for the final certificate, which will be an “inductive” certificate that continuously builds up to showing that and .
certificate: certifying that given .
- Certificate gives us a certificate for verifying for any .
- Let be this certificate.
- We construct a new certificate for the statement . We denote this certificate by . It is defined as Here, we have and for all .
- Given we know that , we can use the certificate to verify that as follows.
- Run the verification procedure on all to certify they are valid (i.e., the verification procedure for ).
- Check that for all .
- Check that for all .
- Check that has exactly certificates.
Again, all of these checks can be arranged so they are executed in a read-once manner, and they all require only bits of space to check.
Before building the certificate , we actually need another helper certificate, which we denote as . This certificate will certify given .
certificate: certifying that given .
- The certificate here will be identical to the certificate for , except for .
- Let such that for all . Also let denote the certificate for for all .
- Let . This is our certificate for .
- To verify , we perform nearly identical checks as with .
- Verify all are valid.
- Check for all .
- Check that and is not a neighbor of for all .
- Exactly certificates are given.
As always, we can rearrange the above checks to execute them in a read-once manner. Now we have the tools we need to construct a certificate for .
certificate: certifying that given .
- Certificate certifies that .
- Certificate certifes that given . We are also given this by our inductive assumption for this certificate.
- We use this assumption plus the above certificates to construct a certificate for .
- We let denote this certificate.
- It will be the concatenation of certificates, one for every vertex: Here,
- We certify as follows.
- Check that the number of certificates is and that these certificates are valid.
- Certify all certificates using the procedure of .
Final Certificate. All together, we have the tools for the final certificate to verify that there is no path from to in the graph . The final certificate will consist of certificates. Here, is a certificate verifying that given . Note that since we are given by definition, the certificate iteratively builds the sets then , up to . Once the final size of the set is certified, the final certificate is a certificate which certifies that given .
The following is a corollary of the proof.
Corollary. For all space constructible functions , we have .
Introduction to the Polynomial Hierarchy
The motivation for studying the Polynomial Hierarchy is quite simple: sometimes, non-determinism is not strong enough to capture a decision problem itself.
First, recall the independent set problem. Consider the following natural modification of the independent set problem, which we call exact independent set.
Another way to rephrase the exact independent set problem is as follows. if and only if an independent set of size in such that other independent sets , .
If we stated this with a Turing machine, it would look like where intuitively is the certificate for the independent set of size and are all other independent sets in (which the machine checks that they have size at most ). Clearly, this is not captured by the certificate definition of , which is equivalent to the NTM definition. So here, non-determinism alone is not enough.
The Class
Before examining the full Polynomial Hierarchy, let’s capture the set of languages that follow the same structure as the exact independent set problem we outlined above. This is the class .
Definition. The class is the set of all languages such that there exists a deterministic Turing machine (the verifier) and a polynomial such that for all , if and only if .
It is helpful to see another example of a language in the class . This is what is known as , and is defined as follows. Here, a DNF formula is a “reverse” CNF: it is a big OR of many ANDs. Stating it again, if DNF of size at most such that , we have (they agree on all possible assignments).
Notice, in fact, that both and are contained in .