16.4 The Size of Depth-Bounded Circuits 263
the second level can be transformed in such a way that the second and third
levels can be merged without increasing the number of gates but reducing the
number of levels by 1. This results in an alternating circuit of depth i − 1
that computes either the parity function or its negation on m(i)=n(i − 1)
variables. For the equality m(i)=n(i − 1) we are using the fact that for
integers a, b,andj the equation a/b
j
= a/b
j−1
/b holds. The number of
the gates at levels 2,...,i− 1 remains bounded by S, and the gates at level 1
have at most log S inputs. This contradiction to the inductive hypothesis
completes the proof of the theorem.
If we now allow EXOR-gates with arbitrarily many inputs, then we can
compute more functions with polynomial size since parity only requires one
gate. We can then replace OR-gates with AND- and NOT-gates, and since
x = x ⊕ 1, NOT-gates can be replaced by EXOR-gates. If we have r parallel
edges as inputs to an EXOR-gate, these can be replaced with r mod 2 edges.
In this way we obtain an alternating circuit with AND- and EXOR-levels.
If we think of EXOR as a Z
2
-sum, then we can extend this idea to Z
m
-
sums. A MOD
m
-gate outputs the value 1 if and only if the number of 1’s
among the inputs is an integer multiple of m. EXOR-gates are not the same
as MOD
2
-gates, but we can get a MOD
2
from an EXOR-gate by adding a
constant 1 input. For MOD
m
-gates, r inputs that realize the same function
can be replaced by r mod m edges, so again it makes sense to measure the
size of such circuits by counting the number of gates. A MOD
m
-gate counts
modulo m, so the class of all families f =(f
n
) of Boolean functions that can
be computed by alternating circuits with constant depth and polynomial size
with AND- and MOD
m
-gates is denoted ACC
0
[m] (alternating counting class).
First we consider the case m = 2, which amounts to computation in the
field Z
2
. This suggests the application of algebraic methods. Boolean functions
can be interpreted as Z
2
-polynomials, and therefore have a degree, namely
the degree of this polynomial. It is simple to compute functions with high
degree. For example, we can compute the polynomial x
1
x
2
···x
n
, which has
maximal degree n, with a single AND-gate. But this polynomial is similar
to a polynomial of very low degree, namely the constant 0 with degree 0 –
similar in the sense that these polynomials only differ on one input. We can
measure the distance between two functions f and g by counting the number
of inputs a such that f(a) = g(a). Razborov (1987) used this idea to show
that certain explicitly defined functions cannot belong to
ACC
0
[2]. He showed
that
ACC
0
[2] functions must be a small distance from a polynomial of low
degree. To show that a function f =(f
n
)isnotinACC
0
[2], it suffices to show
that the distance between f and any polynomial of low degree is large. Of
course this idea must be quantified and parameterized by the depth of the
circuit. Razborov investigated the majority function – MAJ = (MAJ
n
)which
has the value 1 if and only if the input contains at least as many 1’s as 0’s –
and proved the following result.