CMPSCI 601: Theory of Computation

David Mix Barrington

Spring, 2004

This page is for student questions and my answers related to the final, particularly on questions from prior final exams. Questions are in black, answers in blue.

Question F.7, 15 May 2004

You probably mentioned this in class, but what do the N, A and T stand for in NC, AC and ThC respectively?

NC originally is for "Nick's Class" because Nick Pippenger invented it.

AC is "alternating class" because of the alternations bound in the Alternation/Circuit Theorem.

TC or ThC is "threshold class"

Question F.6, 15 May 2004

Two more questions on the alternation/circuit theorem:

(1) NC^1 equals the ATMs that takes O(log n) space, and O(log n) time, but the beginning of lec 25 (p.2) says, AC^0 equals to the ATM's with O(log n) time and O(1) alternations... Is that saying AC^0=NC^1? which is probably not true......

No, an ATM with O(log n) time does NC^1. Only if it is restricted to O(1) alternations does it do only AC^0. In general an ATM with O(log n) time might take as many as O(log n) alternations.

Initally I thought maybe O(1) alternation doesn't imply O(log n) space, but then I saw the ATM that equals to AC^0 has to take O(log n) time, which means you only have time to write log n space, right? So they are the same??

You're mixed up:

NC^1 = ATM with log space, log time

AC^0 = ATM with log space, log time, O(1) alternations

(2) The alternation/circuit theorem says, NC^i equals ATMs with O(log n) space, O(log^i n) time. Also we know that ASPACE(log n)=P. So is the unions of all the ATMs with O(log n) space, O(log^i n) time NOT the entire ASPACE(log n) ATMs? Otherwise, NC=P, right? So what's missing?

An arbitrary log-space ATM could take as many as n^{O(1)} alternations. Only if it is restricted to (log n)^{O(1)} alternations is it guaranteed to be within NC.

Ok. I see. I guess my next question is why can there not be nothing higher than n^{O(1)} alternations for an arbitrary log-space ATM?

Because the machine can run for only n^{(O(1)} time, having only that many configurations.

If the machine switched from existential to universal or vice versa on _every_ move, then the number of alternations would be equal to the number of moves. It could not possibly be greater than the number of moves.

Are you clear on what it means for an ATM to have a limited number of alternations?

I think so. This means the ATM can switch between "existential moves" and "universal moves" limited number of times. However, there maybe a number of existential moves (**is there a bound on this number?) before the machine switches to the next universal move, and this only counts as 1 alternation. Right?

Yes, exactly. There is no limit on how many moves there can be in a phase of existential moves, except of course that there is a limit on the total number of moves in a logspace machine.

Question F.5, 15 May 2004

Could you maybe write me up a quick and simple example of how you would prove that some A circuit-reduces to some B?

Ok, here's a proof that PARITY circuit-reduces to MAJORITY. My "B-gates" are majority gates that output 1 iff they have more 0 inputs than 1 inputs.

First I'll show how to make an exactly-k circuit out of MAJORITY gates, where k is between 0 and n. If I take a MAJORITY gate with 2n inputs, and feed it k-1 1's, n-k+1 0's, and the n inputs, it will output 1 iff at least k of the n inputs are 1. Similarly I can make an at-least-(k+1) circuit. The AND of the at-least-k circuit and the negation of the at-least-(k+1) circuit is an exactly-k circuit.

Now to build a PARITY circuit I take the OR of an exactly-1, exactly-3, exactly-5, ... circuit for all odd numbers up to n.

To show that I have a circuit reduction I have to analyze the size and depth of this circuit. The at-least-k's have size O(n) and depth 1. The exactly-k's have size O(n) and depth 3 (there is an AND of a NOT of a MAJORITY gate). The entire PARITY circuit has size O(n^2) and depth 4. Since this is constant depth and poly size I'm done.

Question F.4, 15 May 2004

I have two more questions regarding the proof that ThC0 is in NC1 (lec 24).

(1) why is the conversion from redundant notation to binary an addition problem and thus in FO?

Suppose I want to turn redundant-notation 32222303 into normal binary. I write each digit in two bits, a high-order bit and a low-order bit. I make a number L out of the low-order bits, in this case 10000101, and a number H out of the high-order bits, in this case 11111101. The original number is 2H+L. I can form 2H and L in NC^0, then I need to do one addition of ordinary binary numbers to get 2H+L.

(2) It seems to me we only showed MAJ is ThC0 and also in NC1, where did the "inclusion" conclusion come from?

ThC^0 are exactly those languages that circuit-reduce to MAJORITY, as on HW#7. (Because I can make any threshold gate by taking a MAJORITY gate and biasing it with constants.) Since NC^1 is closed downward under circuit-reduction, and MAJORITY is in NC^1, all of TC^0 is in NC^1.

Isn't adding 2H+L still adding two n-bit numbers?

Yes.

I am still confused. Isn't it the reason for us to use redundant notation is because we cannot add two n-bit numbers in NC^0?

Yes. We still can't do it in NC^0, but we can do it in AC^0.

If I can add the two numbers using AC^0 in normal notation, why couldn't we immediately do the MAJ\in NC1 problem using the normal notation? (each of the ADD gate on the tree on p.9 lec. 24 can be done using AC^0 gate using the normal notation, which is O(1) depth. so the overall depth of that tree circuit is logn depth, thus NC1).....

No! You do have O(log n) depth, but you are only in AC^1 because you have used unbounded fan-in every time you did an AC^0 addition.

We can add _two_ n-bit numbers in NC^1 because AC^0 is contained in NC^1. The importance of redundant notation is that we can take our original n n-bit numbers and create two n-bit (actually n + log n bit) numbers that have the same sum. It takes us an NC^1 circuit to do this. It takes us another NC^1 circuit to add the last two numbers. The composition of two NC^1 operations is in NC^1.

Question F.3, 14 May 2004

Regarding Question 8 of the Spring 2003 final,

If the R(x,y) defined in the solution example is recursive because in 4 it is proved that ValComp is in L. Then, R(x,y) is in L, and thus is in P, right? But, in the final exam of summer 2003, question 3, it is also shown that if R(x,y) is in P, then the 2nd predicate is in NP because we can nondeterministically guess a string y and verify whether it is valid or not in P time. So it is recursive?

Is there a conflict here?

Yes, I'm afraid so.

The question is whether there is any bound on the length of y. If x is the input, your NP procedure above is only polynomial-time in the length of x if the length of y is bounded by a polynomial in the length of x.

So there is a mistake in the solution of Summer 2003 final exam question 3. Actually the mistake is in the problem, which should have an extra condition in Definition 2: that the length of y is polynomial in the length of x.

If there is no length bound on y, and we simply ask whether some string y exists, then we only know that "∃y: R(x,y)" defines an r.e. language, even if R is in the class L.

A good question, I'm glad you caught this.

Question F.2, 14 May 2004

Could you please restate the "sample exam problem" you mentioned in Lecture 27? I couldn't read it on the whiteboard, but it involved a logspace alternating TM.

I'm not remembering, I'm afraid, even after going through the slides again. I did say something about EMPTY-DFA being complete for NL.

Ah, I remember now how the logspace ATM came in. I argued that the EMPTY-DFA problem is in co-NL, which would be the languages of logspace ATM's that have only Black moves (or only universal states). This is because to show that a DFA D is _not_ in the language EMPTY-DFA, it suffices to guess a string w that is in L(D). But in a logspace ATM we can't write down this string w. Instead we use a nondetermistic procedure ("the blundering algorithm") to follow a path in the graph of D until we reach a final state. Since it is possible for this procedure to succeed iff D is not in EMPTY-DFA, we have shown that EMPTY-DFA-bar is in NL and thus that EMPTY-DFA is in NL.

But by Immerman-Szelepcsenyi, we know that NL = co-NL so EMPTY-DFA is in NL as well.

Question F.1, 14 May 2004

In Question 3 of the Spring 2003 final, are we showing that we can build a log space machine that can decide whether w is is A, given the input is (w, Cn)?

The input is w, but since A is in uniform NC^1 we can construct C_n, where n is the length of w, using a logspace machine.

But isnt the CIRC-VALUE problem also given decide whether C(w)=1? Isn't CIRC-VALUE P-complete?

CIRC-VALUE or CVP is to input an arbitrary circuit C and string w of the right length and evaluate C(w). It is P-complete and thus probably not in L.

Is there a conflict?

No. In question 3 we don't have an arbitrary circuit, we have a circuit that is guaranteed to have O(log n) depth. Those circuits can be evaluated in logspace as described in the solution.

I see. So why do we have to evaluate the circuit from the root node and thus require recursion, why not evaluate it bottom up?

Because to evaluate it bottom up would require us to store lots of intermediate results, which we cannot do in logspace.

For Q2, why is that "the games with d=0 can be resolved deterministically in O(log n)? Isn't it just checking the adjacency matrix to see if the input nodes u and v are the same or whether there is an edge from u to v? Isn't that O(1) time?

But testing with a TM whether u and v are the same involves reading all of u and v, which are O(log n) bits in all.

Another thing about Q2, why is the game such that "is there a path from u to v of length at most 2^d"? why not just ".....at most d"?

I want to reduce the lengths of the paths I am talking about by half each time. Initially I care about paths of length up to n-1, and I want to get to paths of length 1, so I need ceiling(log(n-1)) rounds. It's easier to write if I use d rather than 2^d to describe the situation where I am looking at paths of length 2^d, especially as the algorithm simplifies when the path length is always a power of 2.

Last modified 16 May 2004