Symmetric Boolean function explained

In mathematics, a symmetric Boolean function is a Boolean function whose value does not depend on the order of its input bits, i.e., it depends only on the number of ones (or zeros) in the input.[1] For this reason they are also known as Boolean counting functions.[2]

There are 2n+1 symmetric n-ary Boolean functions. Instead of the truth table, traditionally used to represent Boolean functions, one may use a more compact representation for an n-variable symmetric Boolean function: the (n + 1)-vector, whose i-th entry (i = 0, ..., n) is the value of the function on an input vector with i ones. Mathematically, the symmetric Boolean functions correspond one-to-one with the functions that map n+1 elements to two elements,

f:\{0,1,...,n\}\{0,1\}

.

Symmetric Boolean functions are used to classify Boolean satisfiability problems.

Special cases

A number of special cases are recognized:[1]

their value is 1 on input vectors with more than n/2 ones

their value is 1 if the input vector has odd number of onesThe n-ary versions of AND, OR, XOR, NAND, NOR and XNOR are also symmetric Boolean functions.

Properties

In the following,

fk

denotes the value of the function

f:\{0,1\}n\{0,1\}

when applied to an input vector of weight

k

.

Weight

The weight of the function can be calculated from its value vector:

|f| = \sum_^n \binomf_k

Algebraic normal form

The algebraic normal form either contains all monomials of certain order

m

, or none of them; i.e. the Möbius transform

\hatf

of the function is also a symmetric function. It can thus also be described by a simple (n+1) bit vector, the ANF vector

\hatfm

. The ANF and value vectors are related by a Möbius relation:\hat f_m = \bigoplus_ f_kwhere

k2\subseteqm2

denotes all the weights k whose base-2 representation is covered by the base-2 representation of m (a consequence of Lucas’ theorem).[3] Effectively, an n-variable symmetric Boolean function corresponds to a log(n)-variable ordinary Boolean function acting on the base-2 representation of the input weight.

For example, for three-variable functions:

\begin\hat f_0 & = & f_0 \\ \hat f_1 & = & f_0 \oplus f_1 \\ \hat f_2 & = & f_0 \oplus f_2 \\ \hat f_3 & = & f_0 \oplus f_1 \oplus f_2 \oplus f_3 \end

So the three variable majority function with value vector (0, 0, 1, 1) has ANF vector (0, 0, 1, 0), i.e.:\text(x, y, z) = xy \oplus xz \oplus yz

Unit hypercube polynomial

The coefficients of the real polynomial agreeing with the function on

\{0,1\}n

are given by:f^*_m = \sum_^m (-1)^
m
\binom f_kFor example, the three variable majority function polynomial has coefficients (0, 0, 1, -2):\text(x, y, z) = (xy + xz + yz) -2(xyz)

Examples

Function value! rowspan="2"
Value vectorWeightNameColloquial descriptionANF vector
0123
FFFF(0, 0, 0, 0)0Constant false"never"(0, 0, 0, 0)
FFFT(0, 0, 0, 1)1Three-way AND, Threshold(3), Count(3)"all three"(0, 0, 0, 1)
FFTF(0, 0, 1, 0)3Count(2), One-cold"exactly two"(0, 0, 1, 1)
FFTT(0, 0, 1, 1)4Majority, Threshold(2)"most", "at least two"(0, 0, 1, 0)
FTFF(0, 1, 0, 0)3Count(1), One-hot"exactly one"(0, 1, 0, 1)
FTFT(0, 1, 0, 1)4Three-way XOR, (odd) parity"one or three"(0, 1, 0, 0)
FTTF(0, 1, 1, 0)6Not-all-equal"one or two"(0, 1, 1, 0)
FTTT(0, 1, 1, 1)7Three-way OR, Threshold(1)"any", "at least one"(0, 1, 1, 1)
TFFF(1, 0, 0, 0)1Three-way NOR, Count(0)"none"(1, 1, 1, 1)
TFFT(1, 0, 0, 1)2All-equal"all or none"(1, 1, 1, 0)
TFTF(1, 0, 1, 0)4Three-way XNOR, even parity"none or two"(1, 1, 0, 0)
TFTT(1, 0, 1, 1)5"not exactly one"(1, 1, 0, 1)
TTFF(1, 1, 0, 0)4(Horn clause)"at most one"(1, 0, 1, 0)
TTFT(1, 1, 0, 1)5"not exactly two"(1, 0, 1, 1)
TTTF(1, 1, 1, 0)7Three-way NAND"at most two"(1, 0, 0, 1)
TTTT(1, 1, 1, 1)8Constant true"always"(1, 0, 0, 0)

See also

Notes and References

  1. [Ingo Wegener]
  2. Web site: BooleanCountingFunction—Wolfram Language Documentation. 2021-05-25. reference.wolfram.com.
  3. Canteaut. A.. Videau. M.. 2005. Symmetric Boolean functions. IEEE Transactions on Information Theory. 51. 8. 2791–2811. 10.1109/TIT.2005.851743. 1557-9654.