CMPSCI 601: Theory of Computation

David Mix Barrington

Spring, 2004

This page is for student questions and my answers related to HW#7. Questions are in black, answers in blue.

Question 7.13, 4 May 2004

A follow-up to QandA7.8:

Am I correct that on number 5 we don't need to explicitly consider the non-uniformity, but rather we just don't need to consider uniformity at all?

Yes, you need only show that the circuit family for A exists given that both the circuit family for B and the circuit with B-gates exist.

Question 7.12, 4 May 2004

So I'm thinking about the header idea, and it's true that you can read it in in log n bits, but it seems like it would have to have a fixed word size, and that the word would have to be as long (but no longer than) log c, because you have to tell the number of tuples, and the lengths of a, b, and c. So do we have an assumption that we know not only the header length, but the size of the words in the header?

You have some way of telling which parts of the header are which, in particular which letters of the header denote the lengths of a, b, and c. _Within the header_, you can afford to use separators, as long as the total length of the header doesn't exceed O(log n).

I'm not sure what you mean by "word" above -- we can have the header coded over some fixed alphabet Sigma, where each letter in Sigma is coded by a constant number of bits. Then Sigma can include separator characters of different kinds, including an "end of header" character that means that the rest of the input string is to be read as pure binary.

Question 7.11, 4 May 2004

I am having some trouble with Q3. Here we have to prove that NL ≤ AL and AL ≤ NL.

No, AL ≤ NL may not be true -- why do you think that I asked you to prove it?

I see, you're mixing up AL with LSH. In AL the number of alternations between White-move and Black-move states might be _unbounded_ as n increases. In LSH there is a constant independent of n that bounds the number of these alternations.

You are asked here to prove that LSH, not AL, is contained in NL.

The first part of the reduction is simple because an NTM is simply an ATM with 1 alternation. Therefore we can in some sense kill the Black player and thus if the NTM accepts w then white will win as in the last step the referee will check to verify correctness. And if NTM does not accept w then the referee will make white lose. The reduction does not require any extra space therefore if the L(NTM) is in NL then corresponding ATM is in log space.

Yes, we can reinterpret an NTM as an ATM where there are no Black-move states.

However, the other direction is not so simple since we cannot simply convert all universals in the in the ATM into exestenials. Viewing the ATM as a circuit we cant convert and gates to or gates by using a not gate.. It seems to me that we cannot convert an arbitrary ATM to an NTM but rather have to take advantage of the space bound... The problem is that I have no idea of how the space bound will be helpful. Any hints would be greatly appreciated. I tried solving the problem by simply looking at the ATM time and space heirarchy but the fact that AL=P is not of much use....

Now that you have the correct definition, you can use Immerman-Szelepcsenyi to convert some universals into existentials.

Question 7.10, 4 May 2004

While I agree that, with a header, you don't need a separator between the numbers in the string, you do seem to need a separator between the numbers in the *header*.

Yes, that's quite true, but not a problem.

> > If I say "there are strings of 3, 4, 2, and 7 bits,
> > and their concatenation is 0111000110010110", you have enough
> > information to separate the 16 bits I've given you into the four strings.

For example, how will we know that the binary representation of 3 is distinct from the binary representation of 4, and 2, etc.?

The header must be coded in some way that makes this clear -- for example it might be over a larger alphabet, with some large-alphabet character to indicate the end of the header and start of the binary part.

> > You _do_ need to separate the header from the body of the string, and
> > if the header is too long relative to the body you don't have time to
> > read it all.  So you have to detect this condition by finding the length
> > of the _entire_ string first using Question 1.

Once you have these separators, you must use linear time to check that the string does not contain more than the correct number of them.

The idea is that the entire string will be (header)$(binary), so that everything past the first $ is to be interpreted as binary. So you don't have to look into this binary part to know that it's binary. (The whole string is binary, it's just that we're interpreting the header and the $ as being over a larger alphabet.)

Question 7.9, 4 May 2004

What does it mean that the "NC hierarchy collapses"? Does it mean NCi = NCj for arbitrary i and j?

No, only for i and k above some minimum number.

If that's the case then I still haven't solved the problem. What I have so far is for some i and forall j > i, NCi = NCj, however, I have not yet shown this is true for k < and at the moment it does not seem to me it is true given the conditions and asumptions we have.

What you have so far is correct, if the hierarchy "collapses to level i" then the classes for k < i could still be different.

Question 7.8, 4 May 2004

I don't understand question 5. I don't understand the definition of circuit-reduction--what does it mean for a circuit to have membership in a language?

The circuit tests w for membership in A. But certain individual gates of the circuit test other strings for membership in B. For example, a B-gate with three inputs x1, x2, and x3 outputs 1 iff the string x1x2x3 is in the language B.

Also, where does the parenthesis in the last sentence close?

Whoops! After "NC0" -- this has now been fixed. Thanks!

Question 7.7, 4 May 2004

The circ reduction definition (Question 6) seems a little weird for me. Is it difficult from our normal definition of reduction?

Yes, very much.

The normal: there exists a reduction function f such that w\in A iff f(w)\in B.

Right.

The circ reduction definiton seems to be saying: there exists a circuit of poly size, constant depth such that w\in A iff C_|w|(w)=1 and C_|w| is in B.

No, the circuit does decide whether w is in A (so w is in A iff C_|w|(w) = 1) but the relationship to B is different. The circuit may contain many B-gates. Each B-gate gets a string as input, in the form of some booleans on wires, and each gate's output tells whether _its input string_ is in B.

So is the circuit the reduction function here? If so, why does the reduction function decides A?

The circuit is _not_ computing a reduction in the sense of "w in A iff f(w) in B". That's a "many-one" reduction, and the circuit is doing what is sometimes called a "Turing reduction".

Question 7.6, 4 May 2004

On Question 2, I still don't see how we can check the validity of the input string format (i.e., that it is a 4-tuple) in log time, even given some of the assumptions that you have allowed us to make.

If we assume that numbers in a header report various useful things about the tuple, we still need some separator to indicate when the binary representation of each number ends.

No, you don't. If I say "there are strings of 3, 4, 2, and 7 bits, and their concatenation is 0111000110010110", you have enough information to separate the 16 bits I've given you into the four strings.

And once you allow a separator, you allow the possibility of there being more than the correct number of separators, and must scan the entire input string to check that this is not the case, which requires O(n) time.

I would agree if a separator were needed.

If you don't allow a separator, then you must fix the width of the header as well as the numbers in it, and in doing so restrict the size that the numbers in the tuple can be.

You _do_ need to separate the header from the body of the string, and if the header is too long relative to the body you don't have time to read it all. So you have to detect this condition by finding the length of the _entire_ string first using Question 1.

Question 7.5, 4 May 2004

Following up on Q&A 7.2: How do I know that the input is a valid tuple? We have gotten to a point where we have found out that in order to be in the language, the sizes of a, b and c must be log n, so we can actually read them in log n time. But in order to check the input for validity, we have to find out what y is first before we can even check the header -- without knowing |y|, I don't know if the first value (the size of a) is already more than log n. In other words, I can't break reading size(a) and reject the string before knowing y, and I can't know y without reading size(a) first.

Using the solution to Question 1 you can find the entire length of the string.

I agree that if you use the separator encoding method then you cannot tell that there are exactly four strings in the tuple without looking at y, which you don't have time to do. But if the lengths of a, b, and c are given in binary at the start of the string, you can figure out the length of y from that.

On the other hand, having y at the beginning of the input tape wouldn't work either, because in order to feed it into the machine of Q1 and compute |y|, I need to find a separator, which requires me to read the O(n) bits y might have. And while I am at it, how would I run M_Q1 on y without copying y first to its input tape? The algorithm we developed for Q1 relies on y being the only thing on the input tape and an index starting with 0... can we simply assume that if we have a machine that computes |y| given only a string y on its input tape, we can run this as a subroutine and feed it only part of the input tape of the larger machine?

I think QA 7.2 aimed at that problem, but your answer is that we have to reject the input unless the first three strings are "very short", and I have no idea how to do this without knowing what "very short" means, which I don't know without jumping over them first, or otherwise separating y from the input somehow, which can't be done in O(log n)...

You are forgetting, I think, that the size of the entire string gives you a bound on the length of y.

Could you shed some light into that, and tell me what assumptions we can make for this question? I think the main point of this question is that |y| is at most O(log n), so a, b and c are each at most O(log n), so we can perform the addition to check that. But there are so many details to actually implement that on a TM which we can't seem to ignore... on the other hand, it's only a 15 point question...

I don't think it's that complicated once you have a sound upper estimate on |y|, which you get from Question 1.

Question 7.4, 3 May 2004

(Not actually related to HW#7 but a good question.)

I'm looking at the definition of a verifier on slide 3 of lec. 21. It says that if x is in D, then there is a proof such that for any random string, A will accept. It says that if x is not in D, then the probability of rejecting is less than half.

You may be mixing up two of the variables. Given input x, the prover gives proof P, then the verifier chooses a random string r. If x is in D, then there exists P such that for all r, the verifier accepts (x,P,r). If x is not in D, then for any P, the verifier accepts (x,P,r) for at most half of the possible r.

That seems backwards: It seems like we would want a proof that was always false on false input, and had a (high) probability of accepting true input.

You want to think of the proof as something that the verifier lacks the time or energy to check completely. The verifier is going to run some random consistency checks and accept the input if the proof passes these checks. A valid proof will pass all the checks but an invalid one has a substantial risk of being caught.

And actually, the way it's described, it seems useless, because if you have a proof and A accepts some random string, you still don't know whether x is in D or not. And if A rejects, you don't know whether you have the right proof, or x is not in D.

If you know that the prover wants to convince you that x is in D, and is infinitely powerful, then

  1. if the proof fails any of your checks you know that x is not in D, because otherwise the prover would have given you a valid proof
  2. if the proof passes all your checks, then either x is in D or you were unlucky in picking checks that the proof passed -- if you can make the probability of the latter very low (say 2^{-100} rather than 1/2, doing 100 times as many independent checks then you can be reasonably confident that x is actually in D

Question 7.3, 1 May 2004

On question 1, how do we write the index H? Does it cost to write the index?

You're going to write it either on the worktape or on the output tape (worktape is better). Yes, it costs one time step to write on the index tape, and it costs to move the index tape head, one time step per cell moved, because the index tape is a worktape.

You may assume that the index tape starts with all zeros instead of all blanks if you like, and that the tape starts at the low-order end.

On question 2, you say that we can represent the input tuple as saying it first tells us how many strings are in the tuple. Are we to assume that all strings are the same size then? I was thinking we'd need to represent the input with some sort of non-binary character separating the 4 strings. Then again, perhaps being overly concerned about the input structure isn't the approach to take on this problem (otherwise you would have stressed it).

As you suggest, there are different ways to code the tuple. You could expand the input alphabet to include a separator as well as 0 and 1. But then you can't be sure without looking at all the input that there are exactly three separators, so you need the assumption I gave you in that case.

We could also have a header that says "this is a 4-tuple, and the lengths of the strings are x, y, z, and n-x-y-z-h where h is the header length. Clearly all these numbers are O(log n) bits so you have time to look at them.

You may use either encoding system, or any other one that I think is reasonable.

Question 7.2, 1 May 2004

In problem #2, can we assume that the input to the Turing machine is, in fact, a tuple of 4 binary strings? I can't see a way to determine that the input is actually a tuple in log time.

The string is to be rejected unless the first three strings are very short, and you can look at thte first three strings in O(log n) time. But you need some assumption about how the tuple is given, true. Let's say that the number of strings in the tuple is given at the beginning, that's the simplest.

Question 7.1, 1 May 2004

Problem 3 defines LSH as,

"The class LSH is the union for all constants i of \Sigma_i"

Should this be

"The class LSH is the union for all constants i of \Sigma_i and \Pi_i"

The definition as given is correct, but yours is equivalent because for any i, \Pi_i is contained in \Sigma_{i+1}.

Last modified 1 May 2004