Powering requires threshold depth 3

Powering requires threshold depth 3

Information Processing Letters 102 (2007) 104–107 www.elsevier.com/locate/ipl Powering requires threshold depth 3 Alexander A. Sherstov The Universit...

117KB Sizes 0 Downloads 33 Views

Information Processing Letters 102 (2007) 104–107 www.elsevier.com/locate/ipl

Powering requires threshold depth 3 Alexander A. Sherstov The University of Texas at Austin, Department of Computer Sciences, Austin, TX 78712, USA Received 7 July 2006; received in revised form 7 November 2006; accepted 7 November 2006 Available online 4 December 2006 Communicated by L.A. Hemaspaandra

Abstract We study the circuit complexity of the powering function, defined as POWm (Z) = Z m for an n-bit integer input Z and an integer  d denote the class of functions computable by a depth-d polynomial-size circuit of majority gates. We exponent m  poly(n). Let LT  2 for any m  2. Specifically, we prove a 2(n/ log n) lower bound on the size of any depth-2 / LT give a simple proof that POWm ∈ majority circuit that computes POWm . This work generalizes Wegener’s earlier result that the squaring function (i.e., POWm for  2 . Our depth lower bound is optimal due to Siu and Roychowdhury’s matching upper bound: the special case m = 2) is not in LT  3. POWm ∈ LT The second part of this research note presents several counterintuitive findings about the membership of arithmetic functions  2 . For example, we construct a function f (Z) such that f ∈  1 but 5f ∈ LT  1 . We obtain similar  1 and LT / LT in the circuit classes LT  1 and LT  2 highlights a difficulty in proving lower bounds for arithmetic functions.  2 . This apparent brittleness of LT findings for LT © 2006 Elsevier B.V. All rights reserved. Keywords: Computational complexity; Threshold circuits; Circuit lower bounds; Complexity of arithmetic operations

1. Introduction An essential problem in complexity theory is understanding the complexity of fundamental arithmetic operations. Among the most studied computational models in this respect is that of a polynomial-size circuit of majority gates [2,4,7–10]. This model is surprisingly powerful; in fact, it is conceivable that every function in P is computable by a depth-3 polynomial-size majority circuit. Thus, a natural complexity measure in this  d denote the class of funcmodel is circuit depth. Let LT tions computable by a depth-d polynomial-size circuit  2, of majority gates. The exact depth requirement (LT

E-mail address: [email protected] (A.A. Sherstov). 0020-0190/$ – see front matter © 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.ipl.2006.11.003

 3 , etc.) is known for most arithmetic operations; see LT Table 1 for an overview, as well as similar surveys by Wegener [11] and Goldmann and Karpinski [3]. This paper addresses one of the remaining questions in the complexity of arithmetic operations. We study the powering function, defined as POWm (Z) = Z m for an n-bit integer input Z and a fixed integer exponent m with 2  m  poly(n). Siu and Roychowdhury [10] gave an explicit depth-3 polynomial-size majority circuit for computing POWm , thus proving that POWm ∈  3 . A natural question to ask is whether depth 3 is LT in fact optimal. A concise proof due to Wegener [11]  2 , meaning that Siu and Royshows that POW2 ∈ / LT chowdhury’s construction has optimal depth for the special case m = 2. Wegener leaves open the question for general m. We settle this issue, proving that POWm ∈ /

A.A. Sherstov / Information Processing Letters 102 (2007) 104–107

Table 1 Best upper and lower bounds on the depth of poly-size majority circuits for basic arithmetic operations Operation

Lower bound

Upper bound

Addition Multiple addition Multiplication Multiple multiplication Division Squaring Powering

2, folklore 2, folklore 3 [4] 3 [4] 3 [11,5] 3 [11] 3, this paper

2 [8] 2 [10] 3 [10] 4 [10] 3 [10] 3 [10] 3 [10]

All operations take n-bit integers as arguments. Addition and multiplication take two arguments. Multiple addition and multiple multiplication take poly(n) arguments. Division returns the quotient X/Y  of two integers X, Y. Squaring computes X 2 for an integer X. Powering computes the mth power X m of an integer X, where 2  m  poly(n).

 2 for all m. We actually prove the following more delLT

105

 2 (here  2 but (1 + 2n + · · · + 2(n−1)n )−1 h ∈ LT (c) h ∈ / LT h always outputs a multiple of 1 + 2n + · · · + 2(n−1)n ). In other words, multiplying a hard arithmetic function by a constant can make it easy. This unexpected  2 lack basic closure properties  1 and LT fact shows that LT when it comes to arithmetic functions, which complicates proving good lower bounds. 2. Preliminaries We view Boolean functions as mappings {0, 1}n → {0, 1}, and arithmetic functions as mappings {0, 1}n → {0, 1}poly(n) . A linear threshold gate with Boolean inputs f1 , f2 , . . . , ft ∈ {0, 1} is a Boolean function of the form

icate result:

a1 f 1 + a 2 f 2 + · · · + a t f t  θ

Theorem 1.1 (Complexity of powering). Let POWm (Z) = Z m denote the powering function, where Z is an n-bit integer and m is an arbitrary integer with 2  m  poly(n). Then any majority vote of linear threshold gates that computes POWm has size 2(n/ log n) .

for some reals a1 , a2 , . . . , at , θ. In particular, every a majority gate is a linear threshold gate. The size of a circuit is the number of gates in it. An arithmetic func d if every output bit of f is tion f is computable in LT  d circuit. computable by an LT Our main result exploits a reduction from inner product mod 2, defined as  IP(x1 , y1 , x2 , y2 , . . . , xn/2 , yn/2 ) = xi yi mod 2.

Our proof uses a reduction from IP (inner product mod 2), a function whose hardness for threshold circuits has been extensively studied. Given a circuit C that computes powering, we show how to compute IP by padding the input to C with zeroes in a suitable way. This general approach is a natural one to pursue since reductions from IP underlie all other lower bounds in Table 1, except those for addition and multiple addition. The second part of this paper (Section 4) documents a counterintuitive fact we discovered while studying the complexity of powering. Suppose we have an arithmetic  2 , i.e., not every output function f : N → N with f ∈ / LT  2 circuit. Can we bit of f can be computed by an LT  2 for every rational constant claim that likewise kf ∈ / LT k > 0? (Here kf stands for the usual product k · f (x).) One is tempted to answer “yes”, but we show sev 1. eral counterexamples. We obtain similar results for LT Specifically, we prove the following:  1 and LT  2 not closed under scaling). Theorem 1.2 (LT There are (explicitly given) functions f, g, h : {0, 1}2n → {0, 1}poly(n) such that  1 but 5f ∈ LT  1; (a) f ∈ / LT 1   (b) g ∈ / LT1 but 5 g ∈ LT1 (here g always outputs a multiple of 5);

The complexity of IP for depth-2 threshold circuits is well understood: Theorem 2.1. (Nisan [6]) Any majority vote of linear threshold gates that computes IP on n variables has size 2(n) . We follow the typographical convention of denoting poly(n)-bit integers by capital letters (such as Z), and

O(log n)-bit integers by small letters (such as m). 3. Complexity of powering As outlined in the Introduction, our strategy will be to reduce the task of computing IP to that of computing POWm . We accomplish this by first reducing IP to an intermediate problem, that of “generalized” squaring, and then reducing from squaring to POWm . This first reduction, Lemma 3.1 below, is a slight generalization of Wegener’s IP-to-squaring reduction [11]. Lemma 3.1. (From IP to squaring; cf. Wegener [11].) Consider the function f (Z) = kZ 2 , where k  1 is an

106

A.A. Sherstov / Information Processing Letters 102 (2007) 104–107

integer and Z is an n-bit input. Any circuit that computes f (Z) can also compute IP on (n/(log k + log n)) bits. Proof. We are given a circuit that computes f (Z) = kZ 2 . To compute IP(x1 , y1 , . . . , xt , yt ), we construct the input Z as follows: . . . 0 y2 00 . . . 0 y3 00 . . . 0 . . . Z = y1 00       





. . . 00 . . . 0 yt 00 . . . 0 xt 00 . . . 0 . . .       





. . . 00 . . . 0 x3 00 . . . 0 x2 00 . . . 0 x1 .       





Each pair of consecutive bits above is separated by  = 2 + log k + log t zeroes. It is easy to check that the binary representation of kZ 2 will contain the integer 2k(x1 y1 + x2 y2 + · · · + xt yt ) as a block starting in the (2t − 1)( + 1)th bit position. In particular, the binary representation of kZ 2 features IP(x1 , y1 , . . . , xt , yt ) in some fixed bit position. To finish the proof, we set t as large as possible while keeping the bit length of Z at most n. This yields t = (n/(log k + log n)). 2 We now proceed to the crux of our proof, the squaring-to-powering reduction. Lemma 3.2. (From squaring to powering.) Consider the function POWm (Z) = Z m , where m  2 is an integer and Z is an n-bit input. Any circuit  that computes POWm (Z) can also compute f (W ) = m2 W 2 , where W is up to 13 n − 23 log m bits long. Proof. We are given a circuitthat computes POWm (Z) = Z m . To compute f (W ) = m2 W 2 on t bits, we construct its input as follows: Z = W 000 .  . . 0001 . 

Then Z m = (2 W + 1)m =

m  m i=0



= 1 + 2 mW +22 A

+ 23

m

 i=3



i

2i W i

m W2 2   



f (W )

m (i−3) i W . 2 i   B

It is easy to verify that for  = 2t + 2log m, the integers A, f (W ), and B above occur as disjoint blocks in the binary representation of Z m in positions 0, 2, and 3, respectively. In particular, the circuit computes f (W ) as desired. To finish the proof, we set t as large as possible while keeping the bit length of Z at most n. This yields t = 13 n − 23 log m. 2 Combining Lemmas 3.1 and 3.2 immediately yields the following IP-to-powering reduction: Theorem 3.3. Any circuit that computes POWm (Z) = Z m , where m  2 is an integer and Z is an n-bit input, can also compute IP on (n/(log m + log n)) bits. Recalling the hardness result for IP from Section 2, we readily deduce our main theorem: Theorem 1.1. (Restated from p. 2.) Let POWm (Z) = Z m denote the powering function, where Z is an nbit integer and m is an arbitrary integer with 2  m  poly(n). Then any majority vote of linear threshold gates that computes POWm has size 2(n/ log n) . Proof. Immediate from Theorems 2.1 and 3.3.

2

 2 not closed under scaling  1 and LT 4. LT In Section 3, we used a reduction from IP to prove that the generalized squaring function kZ 2 is hard for  2 . It may seem that we could have achieved the LT same result simply by invoking Wegener’s proof [11]  2 . Unfortuthat the squaring function Z 2 is hard for LT nately, this approach does not work: there are functions  2 but kf ∈ LT 2 / LT f : {0, 1}n → {0, 1}poly(n) such that f ∈ for some rational k > 0. Demonstrating this phenomenon is the subject of this section. We adopt vector notation for specifying a concrete function f : {0, 1}n → {0, 1}poly(n) . For example, we write f (x) = (x1 ∧ x2 , 0, x1 ⊕ x2 ) to define a function f : {0, 1}n → {0, 1}3 whose output bits are, from most to least significant, x1 ∧ x2 , 0, x1 ⊕ x2 . Theorem 1.2. (Restated from p. 3.) There are (explicitly given) functions f, g, h : {0, 1}2n → {0, 1}poly(n) such that  1 but 5f ∈ LT  1; (a) f ∈ / LT 1   (b) g ∈ / LT1 but 5 g ∈ LT1 (here g always outputs a multiple of 5);  2 but (1 + 2n + · · · + 2(n−1)n )−1 h ∈ LT  2 (here (c) h ∈ / LT n h always outputs a multiple of 1 + 2 + · · · + 2(n−1)n ).

A.A. Sherstov / Information Processing Letters 102 (2007) 104–107

Proof. To prove (a), consider the function f (x) = (x1 ,  1 because the parity x1 ⊕ 0, x1 ⊕ x2 , 0, x2 ). Then f ∈ / LT x2 cannot be computed by a linear threshold gate [1]. However, 5f (x) = 4f (x) + f (x) = (x1 , x1 ∧ x2 , x2 ,  1. x1 ∧ x2 , x1 , 0, x2 ), and thus 5f ∈ LT To prove (b), consider the function g(x) = (x1 , x1 ∧  1 because x1 ⊕ x2 ∈ x2 , x1 ⊕ x2 , 0, x2 ). Clearly g ∈ / LT /  1 . However, g(x) = (0, 0, x1 , 0, x2 ) + (x1 , 0, x2 , 0, 0) LT = 5(0, 0, x1 , 0, x2 ), and thus 15 g(x) = (0, 0, x1 , 0, x2 ),  1. which is in LT To prove (c), consider the function h (x, y) = (xn ∧ yn , 0, 0, . . . , 0, xn−1 ∧ yn−1 ,    n−1

0, 0, . . . , 0, . . . , 0, 0, . . . , 0, x1 ∧ y1 ),       n−1

n−1

 2 . Note that the number k  1 + 2n + which is in LT (n−1)n ··· + 2 has the binary representation n ones

   k = 1 00 . . . 0 · · · 1 00 . . . 0 1 . . . . 0 1 00     n−1

n−1

n−1

Now define h(x, y) = kh (x, y). It is easy to verify that 2 the (n−1)nth bit of h(x, y) is IP(x, y), and thus h ∈ / LT  2 but 1 h = h ∈ by Theorem 2.1. To summarize, h ∈ / LT k  2 , as desired. 2 LT

107

References

[1] J. Aspnes, R. Beigel, M. Furst, S. Rudich, The expressive power of voting polynomials, in: STOC’91: Proceedings of the TwentyThird Annual ACM Symposium on Theory of Computing, ACM Press, New York, NY, 1991, pp. 402–409. [2] M. Goldmann, J. Håstad, A.A. Razborov, Majority gates vs. general weighted threshold gates, Computational Complexity 2 (1992) 277–300. [3] M. Goldmann, M. Karpinski, Simulating threshold circuits by majority circuits, SIAM J. Comput. 27 (1) (1998) 230–246. [4] A. Hajnal, W. Maass, P. Pudlák, G. Turán, M. Szegedy, Threshold circuits of bounded depth, J. Comput. System Sci. 46 (2) (1993) 129–154. [5] T. Hofmeister, P. Pudlák, A proof that division is not in TC02 , Research Report 447, University of Dortmund, Dept. of Computer Science, 1992. [6] N. Nisan, The communication complexity of threshold gates, in: Proceedings of “Combinatorics, Paul Erdos is Eighty”, 1993, pp. 301–315. [7] A.A. Razborov, On small depth threshold circuits, in: SWAT’92: Proceedings of the Third Scandinavian Workshop on Algorithm Theory, Springer-Verlag, London, UK, 1992, pp. 42–52. [8] K.-Y. Siu, J. Bruck, On the power of threshold circuits with small weights, SIAM J. Discrete Math. 4 (3) (1991) 423–435. [9] K.-Y. Siu, J. Bruck, T. Kailath, T. Hofmeister, Depth efficient neural networks for division and related problems, IEEE Trans. Inform. Theory 39 (3) (1993) 946–956.

Acknowledgements

[10] K.-Y. Siu, V.P. Roychowdhury, On optimal depth threshold circuits for multiplication and related problems, SIAM J. Discrete Math. 7 (2) (1994) 284–292.

I would like to thank Adam Klivans and Ingo Wegener for helpful feedback on earlier versions of this manuscript.

[11] I. Wegener, Optimal lower bounds on the depth of polynomialsize threshold circuits for some arithmetic functions, Inform. Process. Lett. 46 (2) (1993) 85–87.