Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Boolean function

From Wikipedia, the free encyclopedia
Function returning one of only two values
Not to be confused withBinary function.
Abinary decision diagram andtruth table of a ternary Boolean function
Logical connectives
NOT¬A,A,A¯,A{\displaystyle \neg A,-A,{\overline {A}},{\sim }A}
ANDAB,AB,AB,A&B,A&&B{\displaystyle A\land B,A\cdot B,AB,A\mathop {\&} B,A\mathop {\&\&} B}
NANDA¯B,AB,AB,AB¯{\displaystyle A\mathrel {\overline {\land }} B,A\uparrow B,A\mid B,{\overline {A\cdot B}}}
ORAB,A+B,AB,AB{\displaystyle A\lor B,A+B,A\mid B,A\parallel B}
NORA¯B,AB,A+B¯{\displaystyle A\mathrel {\overline {\lor }} B,A\downarrow B,{\overline {A+B}}}
XNORAB,A¯B¯{\displaystyle A\odot B,{\overline {A\mathrel {\overline {\lor }} B}}}
equivalentAB,AB,AB{\displaystyle A\equiv B,A\Leftrightarrow B,A\leftrightharpoons B}
XORA_B,AB{\displaystyle A\mathrel {\underline {\lor }} B,A\oplus B}
└ nonequivalentAB,AB,AB{\displaystyle A\not \equiv B,A\not \Leftrightarrow B,A\nleftrightarrow B}
impliesAB,AB,AB{\displaystyle A\Rightarrow B,A\supset B,A\rightarrow B}
nonimplication (NIMPLY)AB,AB,AB{\displaystyle A\not \Rightarrow B,A\not \supset B,A\nrightarrow B}
converseAB,AB,AB{\displaystyle A\Leftarrow B,A\subset B,A\leftarrow B}
converse nonimplicationAB,AB,AB{\displaystyle A\not \Leftarrow B,A\not \subset B,A\nleftarrow B}
Related concepts
Applications
Category

Inmathematics, aBoolean function is afunction whosearguments and result assume values from a two-element set (usually {true, false}, {0,1} or {−1,1}).[1][2] Alternative names areswitching function, used especially in oldercomputer science literature,[3][4] andtruth function (orlogical function), used inlogic. Boolean functions are the subject ofBoolean algebra andswitching theory.[5]

A Boolean function takes the formf:{0,1}k{0,1}{\displaystyle f:\{0,1\}^{k}\to \{0,1\}}, where{0,1}{\displaystyle \{0,1\}} is known as theBoolean domain andk{\displaystyle k} is a non-negative integer called thearity of the function. In the case wherek=0{\displaystyle k=0}, the function is a constant element of{0,1}{\displaystyle \{0,1\}}. A Boolean function with multiple outputs,f:{0,1}k{0,1}m{\displaystyle f:\{0,1\}^{k}\to \{0,1\}^{m}} withm>1{\displaystyle m>1} is avectorial orvector-valued Boolean function (anS-box in symmetriccryptography).[6]

There are22k{\displaystyle 2^{2^{k}}} different Boolean functions withk{\displaystyle k} arguments; equal to the number of differenttruth tables with2k{\displaystyle 2^{k}} entries.

Everyk{\displaystyle k}-ary Boolean function can be expressed as apropositional formula ink{\displaystyle k} variablesx1,...,xk{\displaystyle x_{1},...,x_{k}}, and two propositional formulas arelogically equivalent if and only if they express the same Boolean function.

Examples

[edit]
Diagram displaying the sixteen binary Boolean functions
The sixteen binary Boolean functions
See also:Truth table andTruth function

The rudimentary symmetric Boolean functions (logical connectives orlogic gates) are:

An example of a more complicated function is themajority function (of an odd number of inputs).

Representation

[edit]
A Boolean function represented as aBoolean circuit

A Boolean function may be specified in a variety of ways:

  • Truth table: explicitly listing its value for all possible values of the arguments
    • Marquand diagram: truth table values arranged in a two-dimensional grid (used in aKarnaugh map)
    • Binary decision diagram, listing the truth table values at the bottom of a binary tree
    • Venn diagram, depicting the truth table values as a colouring of regions of the plane

Algebraically, as apropositional formula using rudimentary Boolean functions:

Boolean formulas can also be displayed as a graph:

In order to optimize electronic circuits, Boolean formulas can beminimized using theQuine–McCluskey algorithm orKarnaugh map.

Analysis

[edit]
See also:Analysis of Boolean functions

Properties

[edit]

A Boolean function can have a variety of properties:[7]

  • Constant: Is always true or always false regardless of its arguments.
  • Monotone: for every combination of argument values, changing an argument from false to true can only cause the output to switch from false to true and not from true to false. A function is said to beunate in a certain variable if it is monotone with respect to changes in that variable.
  • Linear: for each variable, flipping the value of the variable either always makes a difference in the truth value or never makes a difference (aparity function).
  • Symmetric: the value does not depend on the order of its arguments.
  • Read-once: Can be expressed withconjunction,disjunction, andnegation with a single instance of each variable.
  • Balanced: if itstruth table contains an equal number of zeros and ones. TheHamming weight of the function is the number of ones in the truth table.
  • Bent: its derivatives are all balanced (the autocorrelation spectrum is zero)
  • Correlation immune tomth order: if the output is uncorrelated with all (linear) combinations of at mostm arguments
  • Evasive: if evaluation of the function always requires the value of all arguments
  • A Boolean function is aSheffer function if it can be used to create (by composition) any arbitrary Boolean function (seefunctional completeness)
  • Thealgebraic degree of a function is the order of the highest order monomial in itsalgebraic normal form

Circuit complexity attempts to classify Boolean functions with respect to the size or depth of circuits that can compute them.

Derived functions

[edit]

A Boolean function may be decomposed usingBoole's expansion theorem in positive and negativeShannoncofactors (Shannon expansion), which are the (k−1)-ary functions resulting from fixing one of the arguments (to 0 or 1). The generalk-ary functions obtained by imposing a linear constraint on a set of inputs (a linear subspace) are known assubfunctions.[8]

TheBoolean derivative of the function to one of the arguments is a (k−1)-ary function that is true when the output of the function is sensitive to the chosen input variable; it is the XOR of the two corresponding cofactors. A derivative and a cofactor are used in aReed–Muller expansion. The concept can be generalized as ak-ary derivative in the direction dx, obtained as the difference (XOR) of the function at x and x + dx.[8]

TheMöbius transform (orBoole–Möbius transform) of a Boolean function is the set of coefficients of itspolynomial (algebraic normal form), as a function of the monomial exponent vectors. It is aself-inverse transform. It can be calculated efficiently using abutterfly algorithm ("Fast Möbius Transform"), analogous to thefast Fourier transform.[9]Coincident Boolean functions are equal to their Möbius transform, i.e. their truth table (minterm) values equal their algebraic (monomial) coefficients.[10] There are 2^2^(k−1) coincident functions ofk arguments.[11]

Cryptographic analysis

[edit]

TheWalsh transform of a Boolean function is a k-ary integer-valued function giving the coefficients of a decomposition intolinear functions (Walsh functions), analogous to the decomposition of real-valued functions intoharmonics by theFourier transform. Its square is thepower spectrum orWalsh spectrum. The Walsh coefficient of a single bit vector is a measure for the correlation of that bit with the output of the Boolean function. The maximum (in absolute value) Walsh coefficient is known as thelinearity of the function.[8] The highest number of bits (order) for which all Walsh coefficients are 0 (i.e. the subfunctions are balanced) is known asresiliency, and the function is said to becorrelation immune to that order.[8] The Walsh coefficients play a key role inlinear cryptanalysis.

Theautocorrelation of a Boolean function is a k-ary integer-valued function giving the correlation between a certain set of changes in the inputs and the function output. For a given bit vector it is related to the Hamming weight of the derivative in that direction. The maximal autocorrelation coefficient (in absolute value) is known as theabsolute indicator.[7][8] If all autocorrelation coefficients are 0 (i.e. the derivatives are balanced) for a certain number of bits then the function is said to satisfy thepropagation criterion to that order; if they are all zero then the function is abent function.[12] The autocorrelation coefficients play a key role indifferential cryptanalysis.

The Walsh coefficients of a Boolean function and its autocorrelation coefficients are related by the equivalent of theWiener–Khinchin theorem, which states that the autocorrelation and the power spectrum are a Walsh transform pair.[8]

Linear approximation table

[edit]

These concepts can be extended naturally tovectorial Boolean functions by considering their output bits (coordinates) individually, or more thoroughly, by looking at the set of all linear functions of output bits, known as itscomponents.[6] The set of Walsh transforms of the components is known as alinear approximation table (LAT)[13][14] orcorrelation matrix;[15][16] it describes the correlation between different linear combinations of input and output bits. The set of autocorrelation coefficients of the components is theautocorrelation table,[14] related by a Walsh transform of the components[17] to the more widely useddifference distribution table (DDT)[13][14] which lists the correlations between differences in input and output bits (see also:S-box).

Real polynomial form

[edit]

On the unit hypercube

[edit]

Any Boolean functionf(x):{0,1}n{0,1}{\displaystyle f(x):\{0,1\}^{n}\rightarrow \{0,1\}} can be uniquely extended (interpolated) to thereal domain by amultilinear polynomial inRn{\displaystyle \mathbb {R} ^{n}}, constructed by summing the truth table values multiplied byindicator polynomials:f(x)=a{0,1}nf(a)i:ai=1xii:ai=0(1xi){\displaystyle f^{*}(x)=\sum _{a\in {\{0,1\}}^{n}}f(a)\prod _{i:a_{i}=1}x_{i}\prod _{i:a_{i}=0}(1-x_{i})}For example, the extension of the binary XOR functionxy{\displaystyle x\oplus y} is0(1x)(1y)+1x(1y)+1(1x)y+0xy{\displaystyle 0(1-x)(1-y)+1x(1-y)+1(1-x)y+0xy}which equalsx+y2xy{\displaystyle x+y-2xy}Some other examples are negation (1x{\displaystyle 1-x}), AND (xy{\displaystyle xy}) and OR (x+yxy{\displaystyle x+y-xy}). When all operands are independent (share no variables) a function's polynomial form can be found by repeatedly applying the polynomials of the operators in a Boolean formula. When the coefficients are calculatedmodulo 2 one obtains thealgebraic normal form (Zhegalkin polynomial).

Direct expressions for the coefficients of the polynomial can be derived by taking an appropriate derivative:f(00)=(f)(00)=f(00)f(01)=(1f)(00)=f(00)+f(01)f(10)=(2f)(00)=f(00)+f(10)f(11)=(12f)(00)=f(00)f(01)f(10)+f(11){\displaystyle {\begin{array}{lcl}f^{*}(00)&=&(f^{*})(00)&=&f(00)\\f^{*}(01)&=&(\partial _{1}f^{*})(00)&=&-f(00)+f(01)\\f^{*}(10)&=&(\partial _{2}f^{*})(00)&=&-f(00)+f(10)\\f^{*}(11)&=&(\partial _{1}\partial _{2}f^{*})(00)&=&f(00)-f(01)-f(10)+f(11)\\\end{array}}}this generalizes as theMöbius inversion of thepartially ordered set of bit vectors:f(m)=am(1)|a|+|m|f(a){\displaystyle f^{*}(m)=\sum _{a\subseteq m}(-1)^{|a|+|m|}f(a)}where|a|{\displaystyle |a|} denotes the weight of the bit vectora{\displaystyle a}. Taken modulo 2, this is theBooleanMöbius transform, giving thealgebraic normal form coefficients:f^(m)=amf(a){\displaystyle {\hat {f}}(m)=\bigoplus _{a\subseteq m}f(a)}In both cases, the sum is taken over all bit-vectorsa covered bym, i.e. the "one" bits ofa form a subset of the one bits ofm.

When the domain is restricted to the n-dimensionalhypercube[0,1]n{\displaystyle [0,1]^{n}}, the polynomialf(x):[0,1]n[0,1]{\displaystyle f^{*}(x):[0,1]^{n}\rightarrow [0,1]} gives the probability of a positive outcome when the Boolean functionf is applied ton independent random (Bernoulli) variables, with individual probabilitiesx. A special case of this fact is thepiling-up lemma forparity functions. The polynomial form of a Boolean function can also be used as its natural extension tofuzzy logic.

On the symmetric hypercube

[edit]

Often, the Boolean domain is taken as{1,1}{\displaystyle \{-1,1\}}, with false ("0") mapping to 1 and true ("1") to −1 (seeAnalysis of Boolean functions). The polynomial corresponding tog(x):{1,1}n{1,1}{\displaystyle g(x):\{-1,1\}^{n}\rightarrow \{-1,1\}} is then given by:g(x)=a{1,1}ng(a)i:ai=11xi2i:ai=11+xi2{\displaystyle g^{*}(x)=\sum _{a\in {\{-1,1\}}^{n}}g(a)\prod _{i:a_{i}=-1}{\frac {1-x_{i}}{2}}\prod _{i:a_{i}=1}{\frac {1+x_{i}}{2}}}Using the symmetric Boolean domain simplifies certain aspects of theanalysis, since negation corresponds to multiplying by −1 andlinear functions aremonomials (XOR is multiplication). This polynomial form thus corresponds to theWalsh transform (in this context also known asFourier transform) of the function (see above). The polynomial also has the same statistical interpretation as the one in the standard Boolean domain, except that it now deals with the expected valuesE(X)=P(X=1)P(X=1)[1,1]{\displaystyle E(X)=P(X=1)-P(X=-1)\in [-1,1]} (seepiling-up lemma for an example).

Applications

[edit]

Boolean functions play a basic role in questions ofcomplexity theory as well as the design of processors fordigital computers, where they are implemented in electronic circuits usinglogic gates.

The properties of Boolean functions are critical incryptography, particularly in the design ofsymmetric key algorithms (seesubstitution box).

Incooperative game theory, monotone Boolean functions are calledsimple games (voting games); this notion is applied to solve problems insocial choice theory.

See also

[edit]

References

[edit]
  1. ^"Boolean function - Encyclopedia of Mathematics".encyclopediaofmath.org. Retrieved2021-05-03.
  2. ^Weisstein, Eric W."Boolean Function".mathworld.wolfram.com. Retrieved2021-05-03.
  3. ^"switching function".TheFreeDictionary.com. Retrieved2021-05-03.
  4. ^Davies, D. W. (December 1957). "Switching Functions of Three Variables".IRE Transactions on Electronic Computers.EC-6 (4):265–275.doi:10.1109/TEC.1957.5222038.ISSN 0367-9950.
  5. ^McCluskey, Edward J. (2003-01-01),"Switching theory",Encyclopedia of Computer Science, GBR: John Wiley and Sons Ltd., pp. 1727–1731,ISBN 978-0-470-86412-8, retrieved2021-05-03
  6. ^abCarlet, Claude."Vectorial Boolean Functions for Cryptography"(PDF).University of Paris.Archived(PDF) from the original on 2016-01-17.
  7. ^ab"Boolean functions — Sage 9.2 Reference Manual: Cryptography".doc.sagemath.org. Retrieved2021-05-01.
  8. ^abcdefTarannikov, Yuriy; Korolev, Peter; Botev, Anton (2001). "Autocorrelation Coefficients and Correlation Immunity of Boolean Functions". In Boyd, Colin (ed.).Advances in Cryptology — ASIACRYPT 2001. Lecture Notes in Computer Science. Vol. 2248. Berlin, Heidelberg: Springer. pp. 460–479.doi:10.1007/3-540-45682-1_27.ISBN 978-3-540-45682-7.
  9. ^Carlet, Claude (2010),"Boolean Functions for Cryptography and Error-Correcting Codes"(PDF),Boolean Models and Methods in Mathematics, Computer Science, and Engineering, Encyclopedia of Mathematics and its Applications, Cambridge: Cambridge University Press, pp. 257–397,ISBN 978-0-521-84752-0, retrieved2021-05-17
  10. ^Pieprzyk, Josef; Wang, Huaxiong; Zhang, Xian-Mo (2011-05-01)."Mobius transforms, coincident Boolean functions and non-coincidence property of Boolean functions".International Journal of Computer Mathematics.88 (7):1398–1416.doi:10.1080/00207160.2010.509428.ISSN 0020-7160.S2CID 9580510.
  11. ^Nitaj, Abderrahmane; Susilo, Willy; Tonien, Joseph (2017-10-01)."Dirichlet product for boolean functions".Journal of Applied Mathematics and Computing.55 (1):293–312.doi:10.1007/s12190-016-1037-4.ISSN 1865-2085.S2CID 16760125.
  12. ^Canteaut, Anne; Carlet, Claude; Charpin, Pascale; Fontaine, Caroline (2000-05-14)."Propagation characteristics and correlation-immunity of highly nonlinear boolean functions".Proceedings of the 19th International Conference on Theory and Application of Cryptographic Techniques. EUROCRYPT'00. Bruges, Belgium: Springer-Verlag:507–522.ISBN 978-3-540-67517-4.
  13. ^abHeys, Howard M."A Tutorial on Linear and Differential Cryptanalysis"(PDF).Archived(PDF) from the original on 2017-05-17.
  14. ^abc"S-Boxes and Their Algebraic Representations — Sage 9.2 Reference Manual: Cryptography".doc.sagemath.org. Retrieved2021-05-04.
  15. ^Daemen, Joan; Govaerts, René; Vandewalle, Joos (1994). "Correlation matrices". In Preneel, Bart (ed.).Fast Software Encryption: Second International Workshop. Leuven, Belgium, 14-16 December 1994, Proceedings. Lecture Notes in Computer Science. Vol. 1008. Springer. pp. 275–285.doi:10.1007/3-540-60590-8_21.
  16. ^Daemen, Joan (10 June 1998)."Chapter 5: Propagation and Correlation - Annex to AES Proposal Rijndael"(PDF).NIST.Archived(PDF) from the original on 2018-07-23.
  17. ^Nyberg, Kaisa (December 1, 2019)."The Extended Autocorrelation and Boomerang Tables and Links Between Nonlinearity Properties of Vectorial Boolean Functions"(PDF).Archived(PDF) from the original on 2020-11-02.

Further reading

[edit]
General
Theorems (list)
 and paradoxes
Logics
Traditional
Propositional
Predicate
Set theory
Types ofsets
Maps and cardinality
Set theories
Formal systems (list),
language and syntax
Example axiomatic
systems
 (list)
Proof theory
Model theory
Computability theory
Related
Types by domain and codomain
Classes/properties
Constructions
Generalizations
Retrieved from "https://en.wikipedia.org/w/index.php?title=Boolean_function&oldid=1307727363"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp