Diagram of an AC0 circuit: The n input bits are on the bottom and the top gate produces the output; the circuit consists of AND- and OR-gates of polynomial fan-in each, and the alternation depth is bounded by a constant.
AC0 (alternating circuit) is acomplexity class used incircuit complexity. It is the smallest class in theAC hierarchy, and consists of all families of circuits of depth O(1) and polynomial size, with unlimited-faninAND gates andOR gates (we allowNOT gates only at the inputs).[1] It thus containsNC0, which has only bounded-fanin AND and OR gates.[1] Such circuits are called "alternating circuits", since it is only necessary for the layers to alternate between all-AND and all-OR, since one AND after another AND is equivalent to a single AND, and the same for OR.
Integer addition and subtraction are computable in AC0,[2] but multiplication is not (specifically, when the inputs are two integers under the usual binary[3] or base-10 representations of integers).
In 1984 Furst, Saxe, andSipser showed that calculating thePARITY of the input bits (unlike the aforementioned addition/subtraction problems above which had two inputs) cannot be decided by any AC0 circuits, even with non-uniformity. Similarly, computing the majority is also not in.[5][1]It follows that AC0 is strictly smaller thanTC0. Note that "PARITY" is also called "XOR" in the literature.
However, PARITY is only barely out of AC0, in the sense that for any, there exists a family of alternating circuits using depth and size.[6]: 135 In particular, setting to be a large constant, then there exists a family of alternating circuits using depth, and size only slightly superlinear.
can be divided further, into a hierarchy of languages requiring up to 1 layer, 2 layers, etc. Let be the class of languages decidable by a threshold circuit family of up to depth:The following problem is-complete under a uniformity condition. Given a grid graph of polynomial length and width, decide whether a given pair of vertices are connected.[7]
The addition of two-bit integers is in but not in.[6]: 148