Circuit depth relative to a random oracle Peter Bro Miltersen Aarhus University, Computer Science Department Ny Munkegade, DK 8000 Aarhus C, Denmark. pbmiltersen@daimi.aau.dk Keywords: Computational complexity, random oracles, circuit depth. Introduction The study of separation of complexity classes with respect to random oracles was initiated by Bennett and Gill [1] and continued by many researchers. Computation relative to an oracle A, where A f0; 1g is a computation which is allowed to ask queries of the form y A? and get answers. A random oracle A is simply a random (with respect to Lebesgue measure) subset of f0; 1g, i.e. for each x f0; 1g, x A with probability 1 and all these events are mutually independent. Wilson [6, 7] dened relativized circuit depth and constructed various oracles A for which P A 6= NC A, NC A k 6= NC A k+ ; ACA k 6= AC A k+ ; ACA k 6 NC A k+1? and NC A k 6 AC A k? for all positive rational k and, thus separating those classes for which no trivial argument shows inclusion (the denition of NC A k and AC A k is restricted to rational k for constructibility reasons). In this note we show that as a consequence of a single lemma, these separations (or improvements of them) hold with respect to a random oracle A with probability 1. This research was partially supported by the ESPRIT II Basic Research Actions Program of the EC under contract No. 3075 (project ALCOM). 1
The results Let = f0; 1g and let log n denote log n. Recall the following denitions by Wilson [5, 6, 7]. Denition 1 A bounded fan-in oracle circuit C is a circuit containing negation gates of indegree 1, AND and OR gates of indegree as well as unspecied oracle gates of various indegrees, giving a single Boolean output. Given an oracle A, i.e. a subset of, C A denotes the circuit, where each oracle gate of indegree m in C has been replaced by a gate computing A : m!, where A (x) is 1 if x A and 0 otherwise. The depth of an oracle gate with m inputs is dlog me. The size of an oracle gate with m inputs is m? 1. Boolean gates have size and depth 1. The size of an oracle circuit is the sum of the sizes of its gates. The depth of a path in a circuit is the sum of the depths of the gates along the path. The depth of a circuit is the depth of its deepest path. Denition An unbounded fan-in oracle circuit C is dened as in the bounded fan-in case, except that and and or gates of arbitrary indegree are allowed, and each oracle gate is only charged depth 1. The depth of an unbounded fan-in circuit is thus simply the length of its longest path. Denition 3 DEPTH A i.o. (d) is the class of functions f so that for innitely many integers n a bounded fan-in oracle circuit C n with n inputs of depth at most d exists so that C A(x) = f(x) for all n x n, where C A n (x) denotes the output of Cn A when x is given as input. Let k be a positive rational number. NC A k is the class of functions f for which a logspace-uniform family of polynomial size, O(log k n)-depth bounded fan-in circuits C n with n inputs exists so that Cn A (x) = f(x). AC A k is the class of functions f for which a logspace-uniform family of polynomial size, O(log k n)-depth unbounded fan-in circuits C n with n inputs exists so that Cn A (x) = f(x). Let A be an oracle. Let t n 1 ; : : : ; tn n be the n lexicographically rst strings of length dlog ne. Let f A n : f0; 1gn! f0; 1g n be the function f A n (x) = A (xt n 1 ) A(xt n ) : : : A(xt n n ). Lemma 4 Let n and d be positive integers. Let C be a xed oracle circuit with n Boolean inputs and n Boolean outputs containing at most s =
n? log d?5 oracle gates of indegree exactly n + dlog ne so that no path in C contains more than d oracle gates of indegree exactly n + dlog ne (no restriction is made on gates of other indegrees). Then, for a random oracle A, the probability that C A computes (fn A ) d+1, i.e. the composition of fn A with itself d + 1 times, is at most? n. Proof Let us call the oracle gates of indegree n + dlog ne interesting. We partition the gates of C into d levels 0; 1; : : : ; d? 1, such that no path exists from the output of any interesting gate at level i to the input of any interesting gate at level j if j i. The idea of the proof is to show that with high probability, (fn A ) i+1 (x) is not computed before level i. Given an oracle A and a vector x n, let Ix A (i) denote the set of strings y for which some string t of length dlog ne exists, so that yt is given as input to some interesting gate at level i, when C A is given x as an input. For convenience, let I A(d) = x fc A (x)g. Consider the following procedure for nding a string x such that C A (x) 6= (fn A ) d+1 (x). 1. L := ;.. if n L then report failure and stop, we were not successful. 3. select any x n n L. 4. x 0 := x. 5. for i := 0 to d do 6. compute I A x (i) by simulating the necessary parts of the circuit. 7. L := L [ I A x (i) [ fx i g. 8. x i+1 := f A n (x i). 9. if x i+1 L then goto. 10. od. 11. return x. 3
Let us rst observe that the protocol indeed returns a string with the desired property in case it does not fail. This is so, because x d+1 = (fn A ) d+1 (x), and the algorithm makes sure that x d+1 6 L at a time when Ix A (d) L and by denition C A (x) Ix A (d). Let us then estimate the probability of failure. We will rst give an upper bound on the probability of leaving the for-loop at line 9. For convenience, let us assume that the membership of a string in A is not determined until the algorithm asks for it. It is easy to see that the protocol makes sure that no bit of the value of fn A (x i ) has been determined previous to line 8. Hence, all n values are equally likely. Of these values, jlj of them cause the algorithm to leave the for-loop in the next line. Hence, each time line 9 is encountered, the probability of leaving the loop is exactly jlj. If we assume that n m values of x have been tried so far (including the current value), an upper bound of this is m(s+d+1) 3dms. n n Thus, each time the for-loop is executed, an upper bound of the probability of leaving it prematurely is (d + 1) 3dms n 6d ms. Since the algorithm will n try dierent values of x at least until this upper bound is 1 and the above argument applies to all of them, we have Pr(failure) b n 6d Y s c m=1 6d ms n : The factors in this product are increasing, so we get for any positive integer k b n 6d s c: Pr(failure) ( 6d ks n ) k : Putting k = d n e, we get: Pr(failure)? n : Theorem 5 For < 1, PA 6 DEPTH A i.o. (n) for a random oracle A with probability 1. Proof Let d n = bnc. The family of functions g A n = (f A n ) dn+1 is clearly in P A. Fix n and let C be a xed bounded fan-in oracle circuit of depth d n. It is easy to see that the size of C is at most dn, so by Lemma 4, the 4
probability that C A computes gn A is at most? n. An oracle circuit of size s n can be described as a straight line program in a nite alphabet using O(s log s) letters. There are thus at most O(s log s) oracle circuits of size s and therefore at most dn+o(dn ) bounded fan-in oracle circuits of depth d n, so the probability that some such circuit computes gn A with A as oracle is at most n+o(n)? n which is less than?n for suciently large n. If a function is computed by a circuit of depth at most n, it is also computed by a circuit of depth bnc, since depths are integers. Thus, for suciently large N, the probability that for some P n greater than N, gn A has A-circuits of depth at 1 most n, is at most n=n?n =?N +1. The probability that for all N, an integer n greater than N exists such that gn A has circuits of depth at most n, is thus at most inf N?N +1 = 0. The theorem is an improvement of Wilson's result [6] that oracles A exists such that P A 6= NC A. Since every function has unrelativized depth at most n + o(n), the result is optimal, up to a multiplicative constant of +. Similar results about circuit size were obtained by Lutz and Schmidt [4] who showed that for small and a random oracle A, NP A 6 SIZE A i.o. (n ) and by Kurtz, Mahaney and Royer [3], who proved NP A 6 co-nsize A i.o. (n ), where co-nsize A i.o. (n ) is the class of functions whose negations are computed by nondeterministic A-circuits of size n. Theorem 6 For rational k 0 and > 0, AC A k 6 NC A k+1? for random A with probability 1. Proof Let d n = blog k nc and gn A = (fn A ) dn+1. gn A is in AC A k. It is sucient to prove that with probability 1, g A n is not computed by a family of bounded fan-in circuits C n of depth O(log k+1? n). Fix n and a circuit C n within this bound. Since C n can not contain a path with more than O(log k? n) oracle gates of indegree n + dlog ne and since it has size at most logo(1) n, it satises the conditions of Lemma 4. Thus, the probability that Cn A computes gn A is at most? n. Now proceed as in the previous proof. From the proof we see that we actually get the stronger result that there are functions in AC A k which can not be computed in depth o(log k+1 n) by bounded fan-in A-circuits for random A with probability 1. 5
Theorem 7 For rational k > 0 and > 0, NC A 6 k ACA k? for random A with probability 1. Proof The proof is based upon the idea behind the corresponding oracle construction by Wilson [7]. Let d n = b logk n c, log log n m n = dlog ne and let gn A (x 1 x : : : x n ) = (fm A n ) dn+1 (x 1 x : : : x mn ). gn A is in NC A k, since we are only charged depth O(log log n) for computing fm A n. The probability that gn A is computed by a specic circuit of size O(n l ), depth O(log k? n), even with mn log n unbounded fan-in, is, by Lemma 4, at most??n. Now proceed as in the previous proofs. The proof actually gives us functions in NC A k which require superpolynomial size to be computed in depth o(log k n= log log n) with unbounded fan-in A-circuits for random A with probability 1. This is optimal, since standard techniques provide a simulation of NC A k by polynomial size, depth O(log k n= log log n), unbounded fan-in A-circuits for any oracle A []. From the fact that NC A 6 k+ ACA k for random A with probability 1, we get the following corollary. Corollary 8 For rational k 0 and > 0, NC A k 6= NC A k+ and AC A k 6= AC A k+ for random A with probability 1. References [1] C.H. Bennett and J. Gill: Relative to a random oracle A, P A 6= NP A 6= co-np A with probability 1, SIAM J. Comput. 10 (1981) 96-113. [] A.K. Chandra, L. Stockmeyer and U. Vishkin, Constant depth reducibility, SIAM J. Comput. 13 (1984) 43-439. [3] S. Kurtz, S. Mahaney and J. Royer, Average dependence and random oracles, Tech. Rept. SU-CIS-91-03, School of Computer and Information Science, Syracuse University, January 1991. [4] J.H. Lutz and W.J. Schmidt, Circuit size relative to pseudorandom oracles, in: Proc. 5th Structure in Complexity Theory Conference (IEEE 6
Press, 1990) 68-86. Errata in: Proc. 6th Structure in Complexity Theory Conference (IEEE Press, 1991) 39. [5] C.B. Wilson, Relativized circuit complexity, J. Comput. System Sci. 31 (1985) 169-181. [6] C.B. Wilson, Relativized NC, Math. Systems Theory 0 (1987) 13-9. [7] C.B. Wilson, On the decomposability of NC and AC, SIAM J. Comput. 19 (1990) 384-396. 7