Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

On the depth complexity of the counting functions

Information Processing Letters, 1990
We use Karchmer and Wigderson's recent characterization of circuit depth in terms of communication complexity to design shallow Boolean circuits for the counting functions. We show that the MOD 3 counting function on n arguments can be computed by Boolean networks which contain ......Read more
Information Processing Letters 35 (1990) 325-328 North-Holland 15 September 1990 zyxwvutsr ON THE DEPTH COMPLEXITY OF THE COUNTING FUNCTIONS zyxwvutsrqponmlkjihgfedcbaZYXW Andrew CHIN * Mathematical Institute and Computing Laboratory, University of Oxford, UK Communicated by F.B. Schneider Received 18 August 1989 Revised 28 November 1989 We use Karchmer and Wigderson’s recent characterization of circuit depth in terms of communication complexity to design shallow Boolean circuits for the counting functions. We show that the MOD, counting function on n arguments can be computed by Boolean networks which contain negations and binary OR- and AND-gates in depth c logrn, where c A 2.881. This is an improvement over the obvious depth upper bound of 3 logan. We can also design circuits for the MOD, and MOD,, functions having depth 3.475 logan and 4.930 logan, respectively. Keywork Boolean function, circuit depth, complexity, communication complexity, parallel algorithms 1. Introduction The counting functions MOD&) : (0, l}” -+ (0, l} defined by MOD!:,?(x) = 1 iff x1 + . . . +x, = r mod k been fundamental in the study of Boolean function complexity [3,4,8]. A variety of methods have proved helpful in the construction of short formulas [2,9] and shallow circuits [6] for these functions. In this paper, we show that a recent characterization of circuit depth in terms of communication complexity [5] can be used to design efficient circuits for many of the counting functions. We will consider circuits over the basis U, = { v , A , -}. The depth of a U,-circuit is the maxi- mal number of v and A gates in a path from an input gate to the output gate. A “naive” upper bound for the &-depth complexity of the count- ing functions is described by the following Proposition 1.1. D,(MOD!:!) G 11 + log,k] zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFED . ll~iwl. * Research supported by a National Science Foundation Graduate Fellowship and a Rhodes Scholarship. Proof. The circuits can be designed recursively by using the identity MODi;; zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQ k-l = y ( MOD![;$‘)(xL) A MODj$/ ;“(x”)). Recent work by Paterson and Zwick has pro- duced the following global upper bound. Theorem 1.2 [7]. Dy(MOD!:>) G c log,n, where c < 5.07. 2. A circuit design tool With every Boolean function f : (0, 1)” + (0, l}, let us associate mismatch bit problem MB(f) involving two players Pl and P2: Pl receives a string xi Efl(l); P2 receives a string x2 E f ‘(0); their task is to find a coordinate i such that x~,~ # x2,;. Let CC(MB(f)) denote the minimum number of bits they have to communi- cate in order for both to agree on such a coordi- 0020-0190/90/$03.50 0 1990 - Elsevier Science Publishers B.V. (North-Holland) 325
Volume 35, Number 6 INFORMATION PROCESSING LETI-ERS 15 September 1990 zyxwvut nate. (Unlike standard problems in communica- tion complexity, the task of the players here is to solve a search, rather than a decision, problem.) Then we have Theorem 2.1 [5]. For every function f : (0, 1)” + (0, l} we have Ds( f) = CC(MB( f )). The elegant proof of this result describes very natural constructions, so that explicit communica- tion protocols yield circuit designs, and vice versa. From a protocol for MB(f), we may build a circuit upward from the output gate, where each internal gate represents one bit of communication (and each path through the circuit represents a communication sequence). The details are found in [5]. 3. The protocol for zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA MOD, We give an economical communication proto- col for MB(MODi’J>). The basic idea is a divide- and-conquer argument. Our schemes uses mes- sages of different lengths, which correspond to subproblems of different sizes. Theorem 3.1. Let 4. denote the ith term in the Fibonacci series 1, 1, 2, 3, 5, 8, 13,. . . and let r E (0, 1, 2). Then MB(MOD,‘,T’) can be solved in communication 2i. Proof. We give an explicit communication proto- col. After Pl receives string xi E (MOD,‘:‘)-‘(l) and P2 receives string x2 E (MOD,‘,?‘)-“(O), the processors take turns communicating the weights (mod 3) of certain substrings of their inputs. (The weight of a binary string is the number of ones occurring in the string.) The goal is to find cor- responding substrings of length 1 for which the weights differ. More formally, we present the explicit protocol, which uses the integer variables MIN, MAX, TESTMIN, TESTMAX, OLDTESTMIN, OLDTESTMAX, LENGTH and SENDER, and the Boolean variable BALANCE. 326 Procedure INITIALIZE; begin MIN+-1; MAX+E;I; TESTMIN + zyxwvutsrqponmlkjihgfedcbaZYXWVU 1 + 6-i; TESTMAX + E;I; LENGTH + i - 1; SENDER + 1; Pl finds the remainder r of 1:; i + F,_1 x~,~ upon division by 3 and transmits the value of r in binary to P2. P2 evaluates 6 BALANCE + c Xl,, zyxwvutsrqponmlkjihg i=l+E;_, E ; x2,, (mod 3). i=l+q_, end; Procedure SEND RESULTS; begin Player SENDER updates the Boolean variable OLDTESTMAX BALANCE + c xl,i i = OLDTESTMIN OLDTESTMAX = c x2,i i = OLDTESTMIN (mod 3) ; computes the remainder r of C~~~~!$&& xSENDER,i upon division by 3; and transmits a message to the other player as indicated in Table 1. (Note that this is a prefix code.) end; Table 1 The MOD, code BALANCE r M essage True 0 00 True 1 01 TN~ 2 10 False 0 1100 False 1 1101 False 2 1110
Information Processing North-Holland Letters ON THE DEPTH Andrew CHIN Mathematical 15 September 35 (1990) 325-328 COMPLEXITY 1990 zyxwvutsr FUNCTIONS zyxwvutsrqponmlkjihgfedcbaZYXW OF THE COUNTING * Institute and Computing Laboratory, University of Oxford, UK Communicated by F.B. Schneider Received 18 August 1989 Revised 28 November 1989 We use Karchmer and Wigderson’s recent characterization of circuit depth in terms of communication complexity to design shallow Boolean circuits for the counting functions. We show that the MOD, counting function on n arguments can be computed by Boolean networks which contain negations and binary OR- and AND-gates in depth c logrn, where c A 2.881. This is an improvement over the obvious depth upper bound of 3 logan. We can also design circuits for the MOD, and MOD,, functions having depth 3.475 logan and 4.930 logan, respectively. Keywork Boolean function, circuit depth, complexity, communication The counting functions MOD&) : (0, l}” -+ (0, l} defined by MOD!:,?(x) = 1 iff x1 in + . . . +x, = r mod k been fundamental the study of Boolean function complexity [3,4,8]. A variety of methods have proved helpful in the construction of short formulas [2,9] and shallow circuits [6] for these functions. In this paper, we show that a recent characterization of circuit depth in terms of communication complexity [5] can be used to design efficient circuits for many of the counting functions. We will consider circuits over the basis U, = { v , A , -}. The depth of a U,-circuit is the maximal number of v and A gates in a path from an input gate to the output gate. A “ naive” upper bound for the &-depth complexity of the counting functions is described by the following 1.1. ll~iwl. * Research Graduate supported Fellowship 0020-0190/90/$03.50 parallel algorithms Proof. The circuits can be designed recursively by using the identity 1. Introduction Proposition complexity, MODi;; zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQ k-l MOD![;$‘)(xL) = y A MODj$/ ;“ (x” )). ( Recent work by Paterson and Zwick has produced the following global upper bound. Theorem c < 5.07. 1.2 [7]. Dy(MOD!:>) G c log,n, where 2. A circuit design tool With every Boolean function f : (0, 1)” + (0, l}, let us associate mismatch bit problem MB(f) involving two players Pl and P2: Pl D,(MOD!:!) G 11 + log,k] zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFED . receives a string xi Efl(l); P2 receives a string x2 E f ‘(0); their task is to find a coordinate i such that x~,~# x2,;. Let CC(MB(f)) denote the minimum number of bits they have to communiby a National Science Foundation and a Rhodes Scholarship. cate in order for both to agree on such a coordi- 0 1990 - Elsevier Science Publishers B.V. (North-Holland) 325 V olume 35, Number 6 INFORM ATION PROCESSING nate. (Unlike standard problems in communication complexity, the task of the players here is to solve a search, rather than a decision, problem.) Then we have Theorem 2.1 [5]. For every function f : (0, 1)” + (0, l} we have Ds( f) = CC(MB( f )). The elegant proof of this result describes very natural constructions, so that explicit communication protocols yield circuit designs, and vice versa. From a protocol for MB(f), we may build a circuit upward from the output gate, where each internal gate represents one bit of communication (and each path through the circuit represents a communication sequence). The details are found in [5]. 15 September 1990 zyxwvut LETI-ERS Procedure INITIALIZE; begin MIN+-1; MAX+E;I; TESTMIN + zyxwvutsrqponmlkjihgfedcbaZYXWVU 1 + 6-i; TESTMAX + E;I; LENGTH + i - 1; SENDER + 1; Pl finds the remainder r of 1:; i + F,_1 x~,~ upon division by 3 and transmits the value of r in binary to P2. P2 evaluates BALANCE 6 c + Xl,, zyxwvutsrqponmlkjihg i=l+E;_, E ; x2,, (mod 3). i=l+q_, end; Procedure SEND RESULTS; begin 3. The protocol for zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA MOD, Player SENDER updates the Boolean variable OLDTESTM AX We give an economical communication protocol for MB(MODi’J>). The basic idea is a divideand-conquer argument. Our schemes uses messages of different lengths, which correspond to subproblems of different sizes. BALANCE + c i= OLDTESTMAX = i= Theorem 3.1. Let 4. denote the ith term in the Fibonacci series 1, 1, 2, 3, 5, 8, 13,. . . and let r E (0, 1, 2). Then MB(MOD,‘,T’) can be solved in communication 2i. Proof. We give an explicit communication protocol. After Pl receives string xi E (MOD,‘:‘)-‘(l) and P2 receives string x2 E (MOD,‘,?‘)-“ (O), the processors take turns communicating the weights (mod 3) of certain substrings of their inputs. (The weight of a binary string is the number of ones occurring in the string.) The goal is to find corresponding substrings of length 1 for which the weights differ. More formally, we present the explicit protocol, which uses the integer variables MIN, MAX, TESTMIN, TESTMAX, OLDTESTMIN, OLDTESTMAX, LENGTH and SENDER, and the Boolean variable BALANCE. 326 xl,i OLDTESTMIN c OLDTESTMIN x2,i (mod 3) ; computes the remainder r of C~~~~!$&& xSENDER,i upon division by 3; and transmits a message to the other player as indicated in Table 1. (Note that this is a prefix code.) end; Table 1 The M OD, code BALANCE r True 0 00 True 1 01 TN~ 2 10 False 0 1100 False 1 1101 False 2 1110 M essage V olume 35, Number 6 INFORM ATION PROCESSING LETTERS 15 September 1990 zyxwvutsr Table 2 Protocol zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA FIND MISMATCH BIT; Upper bounds begin Depth Function INITIALIZE; while LENGTH > 0 do 2.881 log,n M OD, 3.415 log,n M ODs begin 4.930 log,n M OD,, if BALANCE then (*) begin MAX + TESTMIN - 1; Corollary 3.2. The counting functions MOD,‘,:’ may LENGTH +- LENGTH - 1; be computed by U,-circuits in depth c log,n + O(l), end; where c = 2/ (log,((l + 6)/ 2)) = 2.881. else begin MIN + TESTMIN; 4. Conclusion LENGTH +- LENGTH - 2; By designing the cheapest codes and applying end; the analogous protocols, the bounds of Section 1 OLDTESTMIN + TESTMIN; can be improved for the counting functions MOD, OLDTESTMAX + TESTMAX; and MOD,, [l] (see Table 2). TESTMIN + MIN + F,,,,,; These bounds apply to any congruence class TESTMAX +- MAX; with the indicated modulus. SENDER + 3 - SENDER; In the case of MOD,, we are able to use an SEND RESULTS; extremely economical coding scheme (using words end; of length 3 and 4) and we believe the MOD, end (the index of the mismatch is MIN = bound is very close to optimal. MAX). Other bounds seem to contradict our intuition that MOD, is at least as hard as MOD, for Proof of correctness. Use the invariant primes p, q with p > q. Let B, denote the basis consisting of all the two-variable binary functions. I= Y xl,i + Y x2,; . The best upper bound for the formula size of i=M IN i i i=M IN MOD, over the basis B, is apparently 0(n3). Note that each time ( * ) is executed, both Since there exist B,-formulas of size 0(n2.58) for processors know the value of BALANCE, so that the MOD, functions [9], we ask: both processors are able to update MIN, MAX, Open question. Dq(MOD,) < D,(MOD,)? TESTMIN and TESTMAX. Proof of complexity. After each execution of the while-do loop: (1) If BALANCE = True, then LENGTH is reduced by 1, and 2 bits of communication are used. (2) If BALANCE = False, then LENGTH is reduced by 2, and 4 bits of communication are used. Thus the protocol halts within 2i bits of communication. The asymptotic growth rate of the Fibonacci series yields the improved constant. Acknowledgment I am grateful to my supervisor, Bill McCall, for getting me interested in the Karchmer-Wigderson results and for suggesting changes in an earlier draft of this paper; and to the referees for helpful comments. References [l] A. Chin, Shallow circuits for the counting functions, Tech. Rept. PRG-8-90, Computing Laboratory, University of Ox- ford, Oxford. 321 Volume 35, Number 6 INFORMATION PROCESSING LETTERS 15 September 1990 [2] M.J. Fischer, A.R. Meyer and M.S. Paterson, O(n log n) [6] W.F. McCall, Some results on circuit depth, Ph.D. Thesis, University of Warwick, 1976. lower bounds on length of Boolean formulas, SIAM J. Compur. zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA 11 (1982) 416-427. [7] M.S. Paterson and U. Zwick, Improved circuits and formulae for multiple addition, multiplication and symmetric [3] M. Furst, J.B. Saxe and M. Sipser, Parity, circuits and the Boolean functions, University of Warwick, in preparation. polynomial-time hierarchy, in: Proc. 22nd Annual IEEE Symposium on Foundations of Computer Science (1981) 260-270. [4] J. H&tad, Almost optimal lower bounds for small depth circuits, in: Proc. 18th Annual ACM Symposium on Theory [8] R. Smolensky, of Computing (1986) 6-20. [5] M. Karchmer and A. Wigderson, Monotone circuits of connectivity require super-logarithmic depth, in: Proc. 20th Annual ACM Symposium on Theory of Computing (1988) 539-550. [9] D.C. Van Leijenhorst, A note on the formula size of the “ mod k” functions, Inform. Process. Lett. 24 (1987) 223224. 328 Algebraic methods in the theory of lower bounds for Boolean function complexity, in: Proc. 19th Annual ACM Symposium on Theory of Computing (1987) 77-82.