Parity function

In Boolean algebra, a parity function is a Boolean function whose value is one if and only if the input vector has an odd number of ones. The parity function of two inputs is also known as the XOR function.

The parity function is notable for its role in theoretical investigation of circuit complexity of Boolean functions.

The output of the parity function is the parity bit.

Definition

The n {\displaystyle n} -variable parity function is the Boolean function f : { 0 , 1 } n { 0 , 1 } {\displaystyle f:\{0,1\}^{n}\to \{0,1\}} with the property that f ( x ) = 1 {\displaystyle f(x)=1} if and only if the number of ones in the vector x { 0 , 1 } n {\displaystyle x\in \{0,1\}^{n}} is odd. In other words, f {\displaystyle f} is defined as follows:

f ( x ) = x 1 x 2 x n {\displaystyle f(x)=x_{1}\oplus x_{2}\oplus \dots \oplus x_{n}}

where {\displaystyle \oplus } denotes exclusive or.

Properties

Parity only depends on the number of ones and is therefore a symmetric Boolean function.

The n-variable parity function and its negation are the only Boolean functions for which all disjunctive normal forms have the maximal number of 2 n − 1 monomials of length n and all conjunctive normal forms have the maximal number of 2 n − 1 clauses of length n.[1]

Computational complexity

Some of the earliest work in computational complexity was 1961 bound of Bella Subbotovskaya showing the size of a Boolean formula computing parity must be at least O ( n 3 / 2 ) {\displaystyle O(n^{3/2})} . This work uses the method of random restrictions. This exponent of 3 / 2 {\displaystyle 3/2} has been increased through careful analysis to 1.63 {\displaystyle 1.63} by Paterson and Zwick (1993) and then to 2 {\displaystyle 2} by Håstad (1998). [2]

In the early 1980s, Merrick Furst, James Saxe and Michael Sipser[3] and independently Miklós Ajtai[4] established super-polynomial lower bounds on the size of constant-depth Boolean circuits for the parity function, i.e., they showed that polynomial-size constant-depth circuits cannot compute the parity function. Similar results were also established for the majority, multiplication and transitive closure functions, by reduction from the parity function.[3]

Håstad (1987) established tight exponential lower bounds on the size of constant-depth Boolean circuits for the parity function. Håstad's Switching Lemma is the key technical tool used for these lower bounds and Johan Håstad was awarded the Gödel Prize for this work in 1994. The precise result is that depth-k circuits with AND, OR, and NOT gates require size exp ( Ω ( n 1 k 1 ) ) {\displaystyle \exp(\Omega (n^{\frac {1}{k-1}}))} to compute the parity function. This is asymptotically almost optimal as there are depth-k circuits computing parity which have size exp ( O ( n 1 k 1 ) t ) {\displaystyle \exp(O(n^{\frac {1}{k-1}})t)} .

Infinite version

An infinite parity function is a function f : { 0 , 1 } ω { 0 , 1 } {\displaystyle f\colon \{0,1\}^{\omega }\to \{0,1\}} mapping every infinite binary string to 0 or 1, having the following property: if w {\displaystyle w} and v {\displaystyle v} are infinite binary strings differing only on finite number of coordinates then f ( w ) = f ( v ) {\displaystyle f(w)=f(v)} if and only if w {\displaystyle w} and v {\displaystyle v} differ on even number of coordinates.

Assuming axiom of choice it can be proved that parity functions exist and there are 2 2 0 {\displaystyle 2^{2^{\aleph _{0}}}} many of them; as many as the number of all functions from { 0 , 1 } ω {\displaystyle \{0,1\}^{\omega }} to { 0 , 1 } {\displaystyle \{0,1\}} . It is enough to take one representative per equivalence class of relation {\displaystyle \approx } defined as follows: w v {\displaystyle w\approx v} if w {\displaystyle w} and v {\displaystyle v} differ at finite number of coordinates. Having such representatives, we can map all of them to 0 {\displaystyle 0} ; the rest of f {\displaystyle f} values are deducted unambiguously.

Another construction of an infinite parity function can be done using a non-principal ultrafilter U {\displaystyle U} on ω {\displaystyle \omega } . The existence of non-principal ultrafilters on ω {\displaystyle \omega } follows from – and is strictly weaker than – the axiom of choice. For any w : ω { 0 , 1 } {\displaystyle w:\omega \to \{0,1\}} we consider the set A w = { n ω { k n w ( k ) = 0 }  is even } {\displaystyle A_{w}=\{n\in \omega \mid \{k\leq n\mid w(k)=0\}{\text{ is even}}\}} . The infinite parity function f {\displaystyle f} is defined by mapping w {\displaystyle w} to 0 {\displaystyle 0} if and only if A w {\displaystyle A_{w}} is an element of the ultrafilter.

It is necessary to assume at least some amount of choice to prove that infinite parity functions exist. If f {\displaystyle f} is an infinite parity function and we consider the inverse image f 1 [ 0 ] {\displaystyle f^{-1}[0]} as a subset of the Cantor space { 0 , 1 } ω {\displaystyle \{0,1\}^{\omega }} , then f 1 [ 0 ] {\displaystyle f^{-1}[0]} is a non-measurable set and does not have the property of Baire. Without the axiom of choice, it is consistent (relative to ZF) that all subsets of the Cantor space are measurable and have the property of Baire and thus that no infinite parity function exists; this holds in the Solovay model, for instance.

See also

Related topics:

References

  1. ^ Ingo Wegener, Randall J. Pruim, Complexity Theory, 2005, ISBN 3-540-21045-8, p. 260
  2. ^ Jukna, Stasys (Jan 6, 2012). Boolean Function Complexity: Advances and Frontiers. Springer Science & Business Media. pp. 167–173. ISBN 978-3642245084.
  3. ^ a b Merrick Furst, James Saxe and Michael Sipser, "Parity, Circuits, and the Polynomial-Time Hierarchy", Annu. Intl. Symp. Found.Computer Sci., 1981, Theory of Computing Systems, vol. 17, no. 1, 1984, pp. 13–27, doi:10.1007/BF01744431
  4. ^ Miklós Ajtai, " Σ 1 1 {\displaystyle \Sigma _{1}^{1}} -Formulae on Finite Structures", Annals of Pure and Applied Logic, 24 (1983) 1–48.
  • Håstad, Johan (1987), Computational limitations of small depth circuits (PDF), Ph.D. thesis, Massachusetts Institute of Technology.