TC0
In theoretical computer science, and specifically computational complexity theory and circuit complexity, TC0 (Threshold Circuit) is the first class in the hierarchy of TC classes. TC0 contains all languages which are decided by Boolean circuits with constant depth and polynomial size, containing only unbounded fan-in AND gates, OR gates, NOT gates, and MAJ gates, or equivalently, threshold gates.
TC0 contains several important problems, such as sorting n n-bit numbers, multiplying two n-bit numbers, integer division[1] or recognizing the Dyck language with two types of parentheses. It is commonly used to model the computational complexity of bounded-depth neural networks, and indeed, it was originally proposed for this purpose.[2]
Definitions
A Boolean circuit family is a sequence of Boolean circuits consisting of a feedforward network of Boolean functions. A binary language is in the TC0 class if there exists a Boolean circuit family , such that
- There exists a polynomial function , and a constant .
- Each is composed of up to unbounded fan-in AND, OR, NOT, and MAJ gates in up to layers.
- For each , we have iff .

Equivalently, instead of majority gates, we can use threshold gates with integer weights and thresholds, bounded by a polynomial. A threshold gate with inputs is defined by a list of weights and a single threshold . Upon binary inputs , it outputs if , else it outputs . A threshold gate is also called an artificial neuron.
Given a Boolean circuit with AND, OR, NOT, and threshold gates whose weights and thresholds are bounded within , If we also provide the network with negations of binary inputs: , then we can convert the network to one that computes the same input-output function using only AND, OR, and threshold gates, with the same depth, at most double the number of gates in each layer, weights bounded within , and thresholds bounded within . Therefore, TC0 can be defined equivalently as the languages decidable by some Boolean circuit family such that
- There exists a polynomial function , and a constant .
- Each is composed of up to threshold gates in up to layers, whose weights are non-negative integers, thresholds are integers, and both weights and thresholds are bounded within .
- For each , we have iff .
In this article, we by default consider Boolean circuits with a polynomial number of AND, OR, NOT, and threshold gates, with polynomial bound on integer weights and thresholds. The polynomial bound on weights and thresholds can be relaxed without changing the class .
Complexity class relations
We can relate TC0 to other circuit classes, including AC0 and NC1 as follows (Vollmer 1998, p. 126):
Whether is a strict inclusion is "one of the main open problems in circuit complexity" (Vollmer 1998, p. 126). In fact, it is even open whether is a strict inclusion! This is in some sense unsurprising, since there is no natural proof for , assuming that there is a cryptographically secure pseudorandom number generator in .[3]
We also have that uniform . (Allender 1996), as cited in (Burtschick 1999).
Uniform TC0
DLOGTIME-uniform is also known as , because it is equivalent to first-order logic with Majority quantifiers.[4] Specifically, given a logic formula that takes Boolean variables, a Majority quantifier is used as follows: given a formula with exactly one free variable , the quantified is true iff is true for over half of , Integer division, powering, and iterated multiplication are all in DLOGTIME-uniform .[5][1]
The functional version of the uniform TC0 coincides with the closure with respect to composition of the projections and one of the following function sets , .[6] Here , is a bitwise AND of and . By functional version one means the set of all functions over non-negative integers that are bounded by functions of FP and is in the uniform TC0.
Fine structure
TC0 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 hierarchy can be even more finely divided.
MAJ vs threshold
The MAJ gate is sometimes called an unweighted threshold gate. They are equivalent up to a uniform polynomial overhead.
In detail, there is an explicit algorithm, by which, given a single -input threshold gate with arbitrary (unbounded) integer weights and thresholds, it constructs a depth-2 circuit using -many AND, OR, NOT, and MAJ gates. Thus, any polynomial-size, depth- threshold circuit can be simulated uniformly by a polynomial-size majority circuit of depth .[7][8]
As a separation theorem, it is known that the -input Boolean inner product function (IP), defined below, is computable by a majority circuit with 3 layers and gates, but is not computable by a threshold circuit with 2 layers and gates.[9]: Section 11.10.2
Arbitrary threshold gate
For any fixed , because there are only finitely many Boolean functions that can be computed by a threshold logic unit, it is possible to set all to be integers. Let be the smallest number such that every possible real threshold function of variables can be realized using integer weights of absolute value . It is known that[10]See [9]: Section 11.10 for a literature review.
Sometimes the class of polynomial-bounded weights and thresholds with depth is denoted as , and denotes the class where the weight and thresholds are unbounded ("large weight threshold circuit"). This formalizes neural networks with real-valued activation functions.[11]
As previously stated, any polynomial-size, depth- threshold circuit can be simulated uniformly by a polynomial-size majority circuit of depth . Therefore, .
Allowing the sigmoid activation function does not increase the power, that is, for all , assuming the weights are polynomially bounded.[12]
Probabilistic version
Like how the P class has a probabilistic version BPP, the has a probabilistic version , defined in (Hajnal et al. 1993). It is defined as the class of languages that can be polynomial-probabilistically decided.
Let be a Boolean circuit family that takes two kinds of inputs. A given circuit takes the deterministic inputs , and the random inputs , where . The random inputs are sampled uniformly over all possibilities.
A language is decided polynomial-probabilistically by the family if for each , if , then the probability that is at least , and if , then the probability that is at most .
Similarly, (feedforward) Boltzmann machines have been modelled as circuits with boundedly-unreliable threshold units. That is, each threshold unit may, independently at random, with a bounded probability , make the wrong output.[13]
Hierarchy
Analogous to how , can also be divided intoBy definition, . (Hajnal et al. 1993) showed that , thus giving a full hierarchy:Similarly, it is shown that allowing boundedly-unreliable threshold units, a circuit can be converted to a circuit by running several copies of the original circuit in parallel, each with a fixed choice for the random inputs, and then takes a Majority over their outputs.[13]
(Hajnal et al. 1993) also proved two separation theorems. Let be defined as the parity function, or the XOR function.
- : The PARITY function is in , but not in .
- : The Boolean inner product function (IP) is in but not in .
The IP falls outside in a precise sense:[9]: Section 11.10.2
- If the weights of the bottom gates of a threshold circuit of depth 2 computing are polynomial, then for any , for all large enough , requires gates.[14]
- If the weights of the top gate in a threshold circuit of depth 2 computing are at most , then the top gate must have fanin at least .[14]
- If the weights of the bottom gates of a threshold circuit of depth 2 computing do not exceed , then the top gate must have fanin at least .[15]
If the polynomial bound on the number of gates is relaxed, then is quite powerful. Specifically, any language in can be decided by a circuit family in , except that it uses a quasi-polynomial number of gates (instead of polynomial).
It is an open question how many levels the hierarchy has. It is also an open question whether the hierarchy collapses, that is, .[11] In fact, there is still no exponential lower bound for . Therefore, a fortiori, there is still no exponential lower bound for depth-3 polynomial-size majority circuits. There are exponential lower bounds if further restrictions are imposed on layer 1, such as requiring it to only contain AND gates, or only bounded fan-in gates.[9]: Section 11.10.3
References
- 1 2 Hesse, William; Allender, Eric; Mix Barrington, David (2002). "Uniform constant-depth threshold circuits for division and iterated multiplication". Journal of Computer and System Sciences. 65 (4): 695–716. doi:10.1016/S0022-0000(02)00025-9.
- ↑ Parberry, Ian; Schnitger, Georg (1988-06-01). "Parallel computation with threshold functions". Journal of Computer and System Sciences. 36 (3): 278–302. doi:10.1016/0022-0000(88)90030-X. ISSN 0022-0000.
- ↑ Naor, Moni; Reingold, Omer (March 2004). "Number-theoretic constructions of efficient pseudo-random functions". Journal of the ACM. 51 (2): 231–262. doi:10.1145/972639.972643. ISSN 0004-5411.
- ↑ Mix Barrington, David A.; Immerman, Neil; Straubing, Howard (1990-12-01). "On uniformity within NC1". Journal of Computer and System Sciences. 41 (3): 274–306. doi:10.1016/0022-0000(90)90022-D. ISSN 0022-0000.
- ↑ Hesse, William (2001), Orejas, Fernando; Spirakis, Paul G.; van Leeuwen, Jan (eds.), "Division Is In Uniform TC0", Automata, Languages and Programming, Lecture Notes in Computer Science, vol. 2076, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 104–114, doi:10.1007/3-540-48224-5_9, ISBN 978-3-540-42287-7, retrieved 2025-03-19
- ↑ Volkov, Sergey. (2016). "Finite Bases with Respect to the Superposition in Classes of Elementary Recursive Functions, dissertation". arXiv:1611.04843 [cs.CC].
- ↑ Goldmann, Mikael; Karpinski, Marek (February 1998). "Simulating Threshold Circuits by Majority Circuits". SIAM Journal on Computing. 27 (1): 230–246. doi:10.1137/S0097539794274519. ISSN 0097-5397.
- ↑ Goldmann, Mikael; Håstad, Johan; Razborov, Alexander (1992-12-01). "Majority gates vs. general weighted threshold gates". Computational Complexity. 2 (4): 277–300. doi:10.1007/BF01200426. ISSN 1420-8954.
- 1 2 3 4 Jukna, Stasys (2012). Boolean Function Complexity: Advances and Frontiers. Algorithms and Combinatorics. Berlin, Heidelberg: Springer Berlin Heidelberg. ISBN 978-3-642-24507-7.
- ↑ Alon, Noga; Vũ, Văn H (1997-07-01). "Anti-Hadamard Matrices, Coin Weighing, Threshold Gates, and Indecomposable Hypergraphs". Journal of Combinatorial Theory, Series A. 79 (1): 133–160. doi:10.1006/jcta.1997.2780. ISSN 0097-3165.
- 1 2 Šíma, Jiří; Orponen, Pekka (2003-12-01). "General-Purpose Computation with Neural Networks: A Survey of Complexity Theoretic Results". Neural Computation. 15 (12): 2727–2778. doi:10.1162/089976603322518731. ISSN 0899-7667. PMID 14629867.
- ↑ Maass, W.; Schnitger, G.; Sontag, E.D. (1991). "On the computational power of sigmoid versus Boolean threshold circuits". [1991] Proceedings 32nd Annual Symposium of Foundations of Computer Science. IEEE Comput. Soc. Press. pp. 767–776. doi:10.1109/SFCS.1991.185447. ISBN 978-0-8186-2445-2.
- 1 2 Parberry, Ian; Schnitger, Georg (1989-01-01). "Relating Boltzmann machines to conventional models of computation". Neural Networks. 2 (1): 59–67. doi:10.1016/0893-6080(89)90015-4. ISSN 0893-6080.
- 1 2 Hajnal, András; Maass, Wolfgang; Pudlák, Pavel; Szegedy, Márió; Turán, György (April 1993). "Threshold circuits of bounded depth". Journal of Computer and System Sciences. 46 (2): 129–154. doi:10.1016/0022-0000(93)90001-D.
- ↑ Forster, Jürgen; Krause, Matthias; Lokam, Satyanarayana V.; Mubarakzjanov, Rustam; Schmitt, Niels; Simon, Hans Ulrich (2001), Hariharan, Ramesh; Vinay, V.; Mukund, Madhavan (eds.), "Relations Between Communication Complexity, Linear Arrangements, and Computational Complexity", FST TCS 2001: Foundations of Software Technology and Theoretical Computer Science, vol. 2245, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 171–182, doi:10.1007/3-540-45294-x_15, ISBN 978-3-540-43002-5, retrieved 2025-03-19
- Allender, E. (1996). "A note on uniform circuit lower bounds for the counting hierarchy". Proceedings 2nd International Computing and Combinatorics Conference (COCOON). Springer Lecture Notes in Computer Science. Vol. 1090. pp. 127–135.
- Clote, Peter; Kranakis, Evangelos (2002). Boolean functions and computation models. Texts in Theoretical Computer Science. An EATCS Series. Berlin: Springer-Verlag. ISBN 3-540-59436-1. Zbl 1016.94046.
- Vollmer, Heribert (1998). Introduction to circuit complexity. A uniform approach. Texts in Theoretical Computer Science. Berlin: Springer-Verlag. ISBN 3-540-64310-9. Zbl 0931.68055.
- Burtschick, Hans-Jörg; Vollmer, Heribert (1998). "Lindström quantifiers and leaf language definability". International Journal of Foundations of Computer Science. 9 (3): 277–294. doi:10.1142/S0129054198000180. ECCC TR96-005.