advertisement

The University of Warwick THEORY OF COMPUTATION REPORT ll 0,8 CIRCIIIT SIZE IS NONLINEAR III I}EPT|.| BY M. S, PATERSCN SCIENCE LNIVERSITY oF WARI{ICK ENGt-Al.lD DEPARTIV1ENT - L, G, VALIAIIr OF COMPTTTER gpp61,gpp'1975 CENTRF FOR CIMPI.JIER STIDIES |JNI\ERSITY 0F EtlGLAI,lD LEEDS C'ircuit Size is Nonlinear in Depth by M.5. Paterson of Computer Science unjversity of t^lanvjck Department Ab s L.G. Valiant Centre for Computer Studjes university of Leeds tract. Two fundamental complexity measures for a f are its c'ircuit depth d(f) and its circu"it size c(f). It is shown that c '. * d"1o9rd for all f. Boolean function I" lntroduction. \^le Boolean circuits for consider acyclic {o,lin * {Or1}} over the basis Br, Two complc>:ity : {f I f : Bn measures, can be defjned for f € B as follows : c(f) = minimum number of gates of a circuj-t to compute f, cl(f) = minimum depth of a circuit to compute f' where the-: depth of a circuit is the maxirnum number of gates in a path 01' the circuit. 'l'hese measures satisfy the obvious relations d 2 >c >: d: and the example of n-argument conjunction demonstrates the optimality of the first the second to c ,. !, d. Iog.d as d I{ccoff ancl Paterson [l] for:.rll f € Bn In this paper we improve inequality" -+ - have shown that d(f) -< n+I If f depenrls on all its n arguments then cl-early c(f)>n_landthereforeourresultcanbeusefulforon1yasma]l r;rn1,,e ol complexitieL;. However, we hope that ihe novel construction inl r<r,lttccrl in thc llro<:I wi-l-l- tre oi' interes;1 ' ?-. Preliminaries. hlith any circuit Z, a <lirected acyclic graph can be associated in the usltal way. Itrocles of the graptr correspond either to inputs or. to log,ica1. gates. Let e(z) be the nrrmber of arcs;oining pairs of g.ate nodes in the graptr of Z . We define l:(.2) -- max {cl(f ) | f ls computed by a circuit witlr e Q) s z,\ , Z 2 and A( d) : n.rx 1..:r | ::{z ) .' d} i- z.'; , L'olr c.Lr i,r,rr,i, i'r.r' .11r.,, l,enm.l O3 l-r {z:) '< I + D(z-1). . rr:,uij: Z with e(Z) = z > Or consider one of its gates th;rL tras orrlr; ii.rp'i.i: i.arj.ables; as inputs, and replace this gate by a new iic resulting new function is computed by a circuit Za inprrt var.iai;lr:. with e(Z-j ) s 'l z-'-'; aricl so iras depth at most D(z-l). It follows that D(z) -< I + ]li.z. , i :,.:,frce tlle original function requires a depth of at i rnost one rlot'i: 3. i Main rc,:;,.it" Theorem" I'or ,r.1 I i-,,,liean functions, ,'-,log^d - o(d) . ,:,'_.: i)r-oof , i;-itl)it.,i.,.r ', .:, ci c;rcrrit of minimum Size computing a function f iii r :tr-,t.rt,ose e(Z) = z > C. We consider partitions of the '.1^, gates'Jf ii r.rir., ,,';rr;; )' ai:il Y such that no gate of Y precedes a gate of X" .rt gate lf Y is non- cnp.tI,) ;i.er, i:., f Y, Let M C X be the set of gates of X adjacent .rili .lr:'i in . lMl" We denote by X the circuit with X as the :;et r-r1' !!,i1-r?ij. .ii;,i t,rritrj i1lt11 inputs as in Z . We denote by -I the circuit to gates oi 'r' with Y as r,iL,,'1,;l 'f gates, with the inputs of Z together with new inputs cor\rle:jp,rr],iil; t ) ,t.,-.i: rir:cle of M as its set of inputs and arcs as in Z. If e(,{) = x .rriii r,ii'i . y then we have Xi-'.{+m\<Z :;ince each nor]e of'14,iccr)unts for at least one arc frOm X to Y. (r) 3 We 1'he wish to select a partition so that x and y are nearly eqrral. tr.rnslerence of one gate from X to Y reduces x by at most Lwo and m by at most one, therefore we may choose a partition such that izx + m - zl s z Q) If we define v = max {*, y}, then fnom (I) and (z) we deduce that Since X is a circuit (3) 2 2v+m<z+ for each of the functions computed at nodes of M, each of these may be computed in depth D(x), by the definition of D. By composing these ci::cuits with a minimal depth ninnrrit acrliva'lent to -I we can construct a circuit for f which L vaur r\^Jv estabL-ishes (4) d(f) -< D(x) + D(y).< 2D(v) An alternative circuit for f is designed as follows. Fon each vector c€ {Or]}m, r'eplace each noCe of M (under some fixed ordering) in -Y by the corresponding constant in c and simplify Y by absorbing these constants into the gates. Let Y.J be the r^-.,r .-.'-^,,i .- -g f ! c- ur F;-^ L rl1t5 u r! ,-*' 1 * and --- the function it computes at g^. Thus 's' d(t ) < D(y). For each c, fet 6 be the function which is I if s arrd onlv if the nodes of M inX have the values corresponding to 'fher;r: are just cor:junctions of 1he (possibly negated) functions compute(j by x at the m nodes of M and so require depth at most D(x) + [iog rn1. Using the identitY f = V6 -cc rf we may prrcduce a circuit d(f) for: f establishing .< max{D(x) + lrog ml, n(y)] + r t sincc the djsjunction requires just m parallel steps. m co ll llt)'l \:-rz +3+flogml Irr i.,', c)r. 1.ii irr 7," f and Z were chosen for "/' : !\\ r so that .' , i'. I or, equivalently, ' Rv f i,,. .. ',: . iii-i' : and ii'v: some " i ti 'I'lti'i, (5) .:,gualities for d(f ) each defined in terms i-,r" r ' ,,,f " from(3) ;-i A(LT /2 )) (6) ,le of (S) is a decreasing function of v, -r(:i'efore it r. v) may be bounded above by taking AlI i' '. i,t'i2J) + 1) + z-F 3 r ltog z1 OI' z i-i.:..' ri rri I i..: 1\( i'i i'/zl - z .,.i (7) i.eclirrence inequality for the frrnction : + 2fog.r kr - Jr. Iog,,r I -t i.i,i:,. Ji;t,.'' '2> ior. ,rli ri '-'1r t rr, r. H(r) + l + [Iog(H(r) + ])l ..,:,:irtiY large rr we can pnove by induction r = *r.Logrr - 0(r) L'oi', ,.rn\., i so we have pfoved , : ,'c1 -0(d) n Corollary l" For all functions f d Corollary 2. -< O(s/Iog c) l'or any sequence of functions fr, f3r"' where f nn€ B with linear circuit complexity, that is c(f-) = 0(n)' there is a constant A such that for afl no f- can be represented n bv a formula of size on/log . Reference Ir] w,F. McColl and M.s" Paterson, "Depth of atl Boolean functions", TheoryofComputationReportT'UniversityofWarwickI9T5.