In
Boolean algebra
In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variables are the truth values ''true'' and ''false'', usually denoted 1 and 0, whereas ...
, the algebraic normal form (ANF), ring sum normal form (RSNF or RNF), ''
Zhegalkin normal form
Zhegalkin (also Žegalkin, Gégalkine or Shegalkin) polynomials (russian: полиномы Жегалкина), also known as algebraic normal form, are a representation of functions in Boolean algebra. Introduced by the Russian mathematician Iva ...
'', or ''
Reed–Muller expansion
In Boolean logic, a Reed–Muller expansion (or Davio expansion) is a decomposition of a Boolean function.
For a Boolean function f(x_1,\ldots,x_n) : \mathbb^n \to \mathbb we call
:
\begin
f_(x) & = f(x_1,\ldots,x_,1,x_,\ldots,x_n) \\
f_(x)& = ...
'' is a way of writing logical formulas in one of three subforms:
* The entire formula is purely true or false:
*:
*:
* One or more variables are combined into a term by
AND
or AND may refer to:
Logic, grammar, and computing
* Conjunction (grammar), connecting two words, phrases, or clauses
* Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition
* Bitwise AND, a bool ...
(
), then one or more terms are combined by
XOR
Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , , ...
(
) together into ANF.
Negation
In logic, negation, also called the logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P or \overline. It is interpreted intuitively as being true when P is false, and fals ...
s are not permitted:
:
* The previous subform with a purely true term:
:
Formulas written in ANF are also known as
Zhegalkin polynomial
Zhegalkin (also Žegalkin, Gégalkine or Shegalkin) polynomials (russian: полиномы Жегалкина), also known as algebraic normal form, are a representation of functions in Boolean algebra. Introduced by the Russian mathematician Ivan ...
s and Positive Polarity (or Parity)
Reed–Muller expressions (PPRM).
Common uses
ANF is a
normal form, which means that two equivalent formulas will convert to the same ANF, easily showing whether two formulas are equivalent for
automated theorem proving
Automated theorem proving (also known as ATP or automated deduction) is a subfield of automated reasoning and mathematical logic dealing with proving mathematical theorems by computer programs. Automated reasoning over mathematical proof was ...
. Unlike other normal forms, it can be represented as a simple list of lists of variable names;
conjunctive and
disjunctive normal forms also require recording whether each variable is negated or not.
Negation normal form In mathematical logic, a formula is in negation normal form (NNF) if the negation operator (\lnot, ) is only applied to variables and the only other allowed Boolean operators are conjunction (\land, ) and disjunction (\lor, ).
Negation normal for ...
is unsuitable for that purpose, since it doesn't use equality as its equivalence relation: a ∨ ¬a isn't reduced to the same thing as 1, even though they're equal.
Putting a formula into ANF also makes it easy to identify
linear
Linearity is the property of a mathematical relationship ('' function'') that can be graphically represented as a straight line. Linearity is closely related to '' proportionality''. Examples in physics include rectilinear motion, the linear ...
functions (used, for example, in
linear-feedback shift register
In computing, a linear-feedback shift register (LFSR) is a shift register whose input bit is a linear function of its previous state.
The most commonly used linear function of single bits is exclusive-or (XOR). Thus, an LFSR is most often a ...
s): a linear function is one that is a sum of single literals. Properties of nonlinear-feedback
shift register
A shift register is a type of digital circuit using a cascade of flip-flops where the output of one flip-flop is connected to the input of the next. They share a single clock signal, which causes the data stored in the system to shift from one lo ...
s can also be deduced from certain properties of the feedback function in ANF.
Performing operations within algebraic normal form
There are straightforward ways to perform the standard boolean operations on ANF inputs in order to get ANF results.
XOR (logical exclusive disjunction) is performed directly:
: () ⊕ ()
: ⊕
: 1 ⊕ 1 ⊕ x ⊕ x ⊕ y
: y
NOT (logical negation) is XORing 1:
[WolframAlpha NOT-equivalence demonstration: ¬a = 1 ⊕ a](_blank)
/ref>
:
:
: 1 ⊕ 1 ⊕ x ⊕ y
: x ⊕ y
AND (logical conjunction) is distributed algebraically[WolframAlpha AND-equivalence demonstration: (a ⊕ b)(c ⊕ d) = ac ⊕ ad ⊕ bc ⊕ bd](_blank)
/ref>
: ( ⊕ )
: ⊕
: (1 ⊕ x ⊕ y) ⊕ (x ⊕ x ⊕ xy)
: 1 ⊕ x ⊕ x ⊕ x ⊕ y ⊕ xy
: 1 ⊕ x ⊕ y ⊕ xy
OR (logical disjunction) uses either 1 ⊕ (1 ⊕ a)(1 ⊕ b)[From ]De Morgan's laws
In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathem ...
(easier when both operands have purely true terms) or a ⊕ b ⊕ ab[WolframAlpha OR-equivalence demonstration: a + b = a ⊕ b ⊕ ab](_blank)
/ref> (easier otherwise):
: () + ()
: 1 ⊕ (1 ⊕ )(1 ⊕ )
: 1 ⊕ x(x ⊕ y)
: 1 ⊕ x ⊕ xy
Converting to algebraic normal form
Each variable in a formula is already in pure ANF, so you only need to perform the formula's boolean operations as shown above to get the entire formula into ANF. For example:
: x + (y ⋅ ¬z)
: x + (y(1 ⊕ z))
: x + (y ⊕ yz)
: x ⊕ (y ⊕ yz) ⊕ x(y ⊕ yz)
: x ⊕ y ⊕ xy ⊕ yz ⊕ xyz
Formal representation
ANF is sometimes described in an equivalent way:
:
:where fully describes .
Recursively deriving multiargument Boolean functions
There are only four functions with one argument:
*
*
*
*
To represent a function with multiple arguments one can use the following equality:
: , where
:*
:*
Indeed,
* if then and so
* if then and so
Since both and have fewer arguments than it follows that using this process recursively we will finish with functions with one variable. For example, let us construct ANF of (logical or):
*
* since and
* it follows that
* by distribution, we get the final ANF:
See also
* Reed–Muller expansion
In Boolean logic, a Reed–Muller expansion (or Davio expansion) is a decomposition of a Boolean function.
For a Boolean function f(x_1,\ldots,x_n) : \mathbb^n \to \mathbb we call
:
\begin
f_(x) & = f(x_1,\ldots,x_,1,x_,\ldots,x_n) \\
f_(x)& = ...
* Zhegalkin normal form
Zhegalkin (also Žegalkin, Gégalkine or Shegalkin) polynomials (russian: полиномы Жегалкина), also known as algebraic normal form, are a representation of functions in Boolean algebra. Introduced by the Russian mathematician Iva ...
* Boolean function
In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually , or ). Alternative names are switching function, used especially in older computer science literature, and truth function ...
* Logical graph A logical graph is a special type of diagrammatic structure in any one of several systems of graphical syntax that Charles Sanders Peirce developed for logic.
In his papers on '' qualitative logic'', ''entitative graphs'', and ''existential graphs ...
* Zhegalkin polynomial
Zhegalkin (also Žegalkin, Gégalkine or Shegalkin) polynomials (russian: полиномы Жегалкина), also known as algebraic normal form, are a representation of functions in Boolean algebra. Introduced by the Russian mathematician Ivan ...
* Negation normal form In mathematical logic, a formula is in negation normal form (NNF) if the negation operator (\lnot, ) is only applied to variables and the only other allowed Boolean operators are conjunction (\land, ) and disjunction (\lor, ).
Negation normal for ...
* Conjunctive normal form
In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. As a cano ...
* Disjunctive normal form
In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or (in philosophical logic) a ''cluster co ...
* Karnaugh map
The Karnaugh map (KM or K-map) is a method of simplifying Boolean algebra expressions. Maurice Karnaugh introduced it in 1953 as a refinement of Edward W. Veitch's 1952 Veitch chart, which was a rediscovery of Allan Marquand's 1881 ''logic ...
* Boolean ring In mathematics, a Boolean ring ''R'' is a ring for which ''x''2 = ''x'' for all ''x'' in ''R'', that is, a ring that consists only of idempotent elements. An example is the ring of integers modulo 2.
Every Boolean ring gives rise to a Boolean a ...
References
Further reading
*
*
* {{cite web , title=Reed-Muller Logic , work=Logic 101 , at=Part 3 , author-first=Clive "Max" , author-last=Maxfield , date=2006-11-29 , publisher=EETimes
''EE Times'' (''Electronic Engineering Times'') is an electronics industry magazine published in the United States since 1972. EE Times is currently owned by AspenCore, a division of Arrow Electronics since August 2016.
Since its acquisition ...
, url=http://www.eetimes.com/author.asp?section_id=216&doc_id=1274545 , access-date=2017-04-19 , url-status=live , archive-url=https://web.archive.org/web/20170419235904/http://www.eetimes.com/author.asp?section_id=216&doc_id=1274545 , archive-date=2017-04-19
Boolean algebra
Normal forms (logic)
ru:Полином Жегалкина