AC0 2026-11-05
AC0 is the class of decision problems computable by Boolean circuit families with polynomial circuit size, constant circuit depth and unbounded-fan-in AND gates and OR gates, together with NOT gates. The depth bound is independent of input length. Uniform and nonuniform versions must be distinguished; without a qualifier the Circuit family need not be generated by one efficient algorithm.
Conjunction and disjunction of inputs each take one gate. Testing equality of two -bit strings also has constant depth: test equality at every bit using a fixed small circuit, then AND those results. In contrast, the parity function cannot be computed by constant-depth polynomial-size circuits of this gate basis. Adding an unbounded parity gate changes the model and defeats that conclusion. Counting only depth while ignoring size would also be misleading: a truth-table Disjunctive normal form represents any Boolean function at constant depth but may require exponentially many gates.
Circuit lower bound 2026-11-05
A circuit lower bound proves that every Boolean circuit computing a specified Boolean function requires a certain circuit size, circuit depth or other resource. The gate basis, allowed fan-in and uniformity conditions must be stated. Showing that one construction is large only bounds that construction, not every possible circuit.
For a simple depth bound, consider AND gates, OR gates and NOT gates of fan-in at most two. By induction, a gate at depth depends on at most input positions. The conjunction of inputs depends on all , hence requires depth at least . A balanced tree of AND gates attains the bound. Allowing an unbounded-fan-in AND gate collapses the depth to one, so this proof cannot establish the same bound in that model. General unrestricted polynomial-size lower bounds for explicit hard problems are much more difficult.
Hazard (logic) Created 2026-10-31 Updated 2026-11-05
A logic hazard is a transient output error caused by unequal propagation delays along paths in a Boolean circuit. A static hazard temporarily changes an output that should remain constant; a dynamic hazard introduces extra transitions when the output should change once. A steady-state truth table records final values and therefore does not describe these timing effects.
For example, implement with AND gates, an OR gate and a NOT gate. With , changing should leave . But if the first product falls before the second rises, both OR inputs can momentarily be zero. Adding the redundant term gives : it does not change the Boolean function, by the consensus theorem, and remains one throughout that single-input transition. This argument assumes the other inputs remain fixed and the circuit begins settled. Simultaneous input changes and more general implementations require their own timing analysis.
Linial-Mansour-Nisan theorem Created 2026-10-13 Updated 2026-11-05
The Linial-Mansour-Nisan theorem says that small constant-depth Boolean circuits have little high-degree weight in their Fourier expansion. Consider unbounded-fan-in AND gates and OR gates with negated inputs allowed. For fixed depth , size , and , there is a cutoffsuch thatHere , and under the uniform distribution on a finite set. The implicit constant is independent of for the fixed circuit model.[ref]
Constant Depth Circuits, Fourier Transform, and Learnability by Nathan Linial and others. section 1, Main Lemma; section 2, Fourier and circuit conventions
Truncate the Fourier expansion to . Parseval's identity gives , so the Boolean function has a low-degree real polynomial approximation in mean square. This is an average-error statement for uniform inputs, not a pointwise approximation guarantee.
The full parity Boolean function is one character , with all its weight at degree . For fixed and polynomial , the cutoff above is eventually smaller than , contradicting the claimed small tail. Thus parity is outside polynomial-size constant-depth AC0 circuits. Concentration also makes low-degree coefficient estimation useful in computational learning theory.[ref]
Constant Depth Circuits, Fourier Transform, and Learnability by Nathan Linial and others. sections 1, 4–5; truncation and parity consequences spelled out here
A particularly transparent design uses six D flip-flops in a one-hot encoding. Let mean that face is displayed. Initialize and , and wire the next-state inputs as a ring:All six D flip-flops share the same active clock edge. Each pulse moves the single stored to the next position, giving the state-transition diagram cycle . The representation invariant “exactly one is high” holds after initialization and is preserved by rotation. Six D flip-flops are more than the three-bit theoretical minimum, but their simple wiring gives a complete implementation without requiring that minimum.
One-hot ring state register and the six lamp patterns, including the original opposite diagonals on faces 2 and 3
. Details. Decode the seven lamps by their positions, with denoting top, middle and bottom, and denoting left and right. Let be the center lamp. In the original figure, face 2 uses top-left and bottom-right, while face 3 uses top-right and bottom-left plus center; the two diagonals must therefore have different controls.[ref]
Functional programming, data structures and algorithms, procedural programming, and digital hardware examination paper by the University of Oxford (2005). Printed p. 6, Figure 1(b), faces 2 and 3
The required OR gate decoder isFor example, only the center is high in state , the first diagonal is high in state , and in state both outer columns are high while the center is low. This verifies all six layouts directly.To implement the switch behavior, use a rapid common clock signal and a sampled enable , high while the switch is pressed. Each next-state input is then selected between its advancing value and its own stored value:One multiplexer per D flip-flop implements that selection. While enabled the electronic dice advances; otherwise every D flip-flop reloads its own value and the display holds. The enable supplied to this synchronous design must be stable at sampling edges. A reset or preset facility must establish the specified one-hot initial state: an all-zero ring does not start itself.
With a rapid clock signal, uncertainty in human release timing makes the final face practically unpredictable. The sequential circuit itself is deterministic; this observation alone is not a proof that its six outcomes have equal probabilities.
The printed word “even” conflicts with the displayed numbers: all ten listed prime numbers are odd, and is the only even prime number. The scan confirms that wording.[ref]
Functional programming, data structures and algorithms, procedural programming, and digital hardware examination paper by the University of Oxford (2005). Printed p. 5, Question 9(b), both occurrences of “even” and the final “including 2”
We first construct the detector for the explicitly listed numbers, then add as requested. The literal even-prime detector is also given below.Let the five input bits be with value . Every listed number has . For that plane, the four-variable Karnaugh map is
The entire plane is zero. Five valid groups in the displayed Karnaugh map give the product termsIncluding , their accepted numbers are respectively , , , , and . Their union is exactly the ten listed numbers. Hence an explicit Boolean circuit is: invert where needed, feed the five products into five AND gates, combine those outputs with an OR gate, and AND with . Its output isAny gate with more than two inputs can be replaced by a tree of two-input gates. To include the exceptional prime number , detect its exact binary representation and add one OR branch:If “even prime” is read literally instead of following the listed numbers, the complete first detector is simplyAll three formulas classify all possible inputs, including and as nonprime.
A disjunctive normal form, also called a sum of products, is an OR of AND terms, each made from Boolean literals such as or . For example,Here juxtaposition means logical conjunction, means logical disjunction, and a bar means negation. The expression need not be canonical: a term can omit variables, and need not name a single row of the truth table.
Implement each product by an AND gate and combine the products with an OR gate. Supply complemented inputs with NOT gates. ThusThis is the usual two-level combinational logic realization, counting complemented inputs as available. If NOT gates are counted, a complemented input can traverse three gates. The two-level depth statement also assumes sufficiently large gate fan-in: using only two-input logic gates requires trees for long products or sums. Constant, single-product and single-literal Boolean functions may need fewer levels, so the two-level construction is a general bound, not a claim that every expression requires exactly two layers.
Use two history D flip-flops. Write , and for the signals just before the active clock edge; update the history by and . Two or more of the three samples are one exactly when some pair are both one, so the majority function isThree two-input AND gates and one three-input OR gate implement this disjunctive normal form. If a registered output is wanted, feed the expression to the D input of another D flip-flop and capture it at the same edge as the history update. All right-hand sides use the pre-edge values, so no extra sample of delay is introduced.
The three terms are necessary in a minimal sum of products: the input triples , and must each be covered, and a single product covering two of them would also cover a triple having only one one. Thus the minimum is three products, each with two Boolean literals.
Sample history and registered output for the three digital smoother designs
. Details. The unconstrained cases can be treated as don't-care conditions during Boolean function minimization. One particularly small, deliberately asymmetric choice isUse the same two history D flip-flops and one output D flip-flop, with this expression at the output D input. It requires two two-input AND gates and one OR gate.
To verify every required case, first set . If zero occurs at least twice among , then , so as required. If all three samples are one, then , so . The remaining triples have exactly two ones and hence exactly one sample agreeing with the old zero; either output is allowed.
Now set . If at least two samples are one, either or , giving . If all three samples are zero, both terms vanish, giving . The remaining triples have exactly one one and are the allowed don't-care conditions. Thus the expression meets both requirements, including every constant-input triple.
For minimality, consider these required one-entries in order: , , and have no common literal. Therefore a product covering all four would be the constant one, which violates required zero-entries. Also no single-literal product is safe: each of is one at some required zero-entry, and each complemented literal is one at . Hence at least two products with at least two Boolean literals each are needed. The displayed expression attains two products and four literals.
For an estimate, use the usual equal-device CMOS series-stack model: a -input NAND gate or NOR gate has a worst-case propagation delay approximately times that of an inverter, because a conducting path contains series transistors. An AND gate or OR gate adds an output inverter. With a 1 ns inverter this gives, for ,For it reproduces the stated 3 ns. This is a technology estimate under equal sizing and comparable loading, not a unique physical law inferable from a single measured delay. Actual propagation delay also depends on capacitance, fan-out and transistor sizing. If instead only the supplied two-input gates were allowed, a balanced tree would have worst-case depth and delay ns; that is a different construction from a single -input gate.
For the explicit circuit in part (a), the longest combinational logic path starts at , passes through the shared inverter, either direction-match exclusive or, the AND gate, and the final exclusive or feeding :The path takes 5 ns, the paths from or to take at most 7 ns, and takes 1 ns. Both direction-match exclusive or gates act in parallel; their delays are not added together. The 8 ns excludes clock-to-Q delay, setup time, hold time and clock-distribution effects, because the question asks only for the combinational logic delay.
For data inputs and selection bits , use a three-to-eight binary decoder. Its output is the minterm that is one exactly when the selection equals the three-bit binary representation of . For example,Gate each data input with its decoded selection using an AND gate, then combine all eight results with an OR gate:Exactly one is asserted, so for the selected , regardless of the other data inputs. A direct implementation uses three shared NOT gates, eight three-input AND gates for the binary decoder, eight two-input AND gates for the data, and one eight-input OR gate. Equivalently, combine each decoder term with its data input in one four-input AND gate. Larger logic gates may be built from two-input ones.
Encode by , , , , with reset to . Two positive-edge-triggered D flip-flops store the state. Minimizing the Boolean functions from the complete table givesEquivalently, the minimal sum of products form of is . The displayed factorization saves duplicated logic. The equations use only AND gates, OR gates and NOT gates; connect to the corresponding flip-flop data input and use one common clock.
Use five cascaded banks of 32 two-input multiplexers, for optional shifts of bits. The original circuit schematic below shows one bank per shift-amount bit; this is a left bit shift with zero fill, not a bit rotation.
If , stage selects either its unchanged input or that input shifted left by . For bit position , the shifted candidate comes from position when it exists, and otherwise from zero. Composing the chosen stages shifts by the sum of their distances, so each amount from to is represented exactly by its five binary control bits. There are one-bit multiplexers, with five multiplexer delays along a bit path.
Compute the two complements with the two NOT gates, then form and with the two AND gates. Feed those outputs to the OR gate:Exactly one product is one when the inputs differ; both products are zero when the inputs agree. This uses precisely the allowed two inverters, two two-input AND gates and one two-input OR gate.
Every AND gate and OR gate is a monotone Boolean function: changing an input from zero to one while leaving all other inputs unchanged cannot change the output from one to zero. By structural induction over a Boolean circuit, a composition of these gates is also a monotone Boolean function. Constant inputs do not alter that conclusion.
Logical negation cannot be implemented, since it sends to and to , violating the defining order property. Hence these two gate types alone cannot implement every Boolean function.
Razborov approximation method Created 2026-09-28 Updated 2026-11-05
The Razborov approximation method compares a monotone circuit with a simpler computation in an approximating family. Replace AND gates and OR gates by chosen approximate operations while preserving the Boolean circuit's dependency graph. The resulting output stays inside the simpler family.
The proof controls two things: the sets of inputs where each approximate operation disagrees with its Boolean counterpart, and the ability of the approximating family to separate positive from negative inputs. The Razborov gate-by-gate approximation lemma charges every output disagreement to a local defect. A union bound then limits how much error a small circuit size can accumulate.
For the clique construction, Razborov closure supplies tractable set families; positive inputs contain a large clique and negative inputs are suitably coloured complete multipartite graphs. A small approximation cannot classify both collections correctly, forcing a large original monotone circuit.[ref]


