Algebraic Normal Form
   HOME

TheInfoList



OR:

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 variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
, the algebraic normal form (ANF), ring sum normal form (RSNF or RNF), '' Zhegalkin normal form'', or '' Reed–Muller expansion'' is a way of writing
propositional logic The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
formulas in one of three subforms: * The entire formula is purely true or false: ** 1 ** 0 * One or more variables are combined into a term by AND (\and), then one or more terms are combined by XOR (\oplus) together into ANF.
Negation In logic, negation, also called the logical not or logical complement, is an operation (mathematics), operation that takes a Proposition (mathematics), proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \over ...
s are not permitted: a \oplus b \oplus \left(a \and b\right) \oplus \left(a \and b \and c\right) * The previous subform with a purely true term: 1 \oplus a \oplus b \oplus \left(a \and b\right) \oplus \left(a \and b \and c\right) Formulas written in ANF are also known as Zhegalkin polynomials and Positive Polarity (or Parity) Reed–Muller expressions (PPRM).


Common uses

ANF is a
canonical form In mathematics and computer science, a canonical, normal, or standard form of a mathematical object is a standard way of presenting that object as a mathematical expression. Often, it is one which provides the simplest representation of an obje ...
, which means that two logically 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 a majo ...
. 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 is unsuitable for determining equivalence, since on negation normal forms, equivalence does not imply equality: a ∨ ¬a is not reduced to the same thing as 1, even though they are logically equivalent. Putting a formula into ANF also makes it easy to identify
linear In mathematics, the term ''linear'' is used in two distinct senses for two different properties: * linearity of a '' function'' (or '' mapping''); * linearity of a '' polynomial''. An example of a linear function is the function defined by f(x) ...
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#Boolean functions, linear function of its previous state. The most commonly used linear function of single bits is exclusive-or (XOR). Thus, ...
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-flop (electronics), 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 syst ...
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
/ref> : : : 1 ⊕ 1 ⊕ x ⊕ y : x ⊕ y AND (logical conjunction) is distributed algebraicallyWolframAlpha AND-equivalence demonstration: (a ⊕ b)(c ⊕ d) = ac ⊕ ad ⊕ bc ⊕ bd
/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 calculus, 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 Validity (logic), valid rule of inference, rules of inference. They are nam ...
(easier when both operands have purely true terms) or a ⊕ b ⊕ abWolframAlpha OR-equivalence demonstration: a + b = a ⊕ b ⊕ ab
/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 one only needs 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 a_0, a_1, \ldots, a_ \in \^* fully describes f.


Recursively deriving multiargument Boolean functions

There are only four functions with one argument: * f(x)=0 * f(x)=1 * f(x)=x * f(x)=1 \oplus x To represent a function with multiple arguments one can use the following equality: : f(x_1,x_2,\ldots,x_n) = g(x_2,\ldots,x_n) \oplus x_1 h(x_2,\ldots,x_n), where :* g(x_2,\ldots,x_n) = f(0,x_2,\ldots,x_n) :* h(x_2,\ldots,x_n) = f(0,x_2,\ldots,x_n) \oplus f(1,x_2,\ldots,x_n) Indeed, * if x_1=0 then x_1 h = 0 and so f(0,\ldots) = f(0,\ldots) * if x_1=1 then x_1 h = h and so f(1,\ldots) = f(0,\ldots) \oplus f(0,\ldots) \oplus f(1,\ldots) Since both g and h have fewer arguments than f it follows that using this process recursively we will finish with functions with one variable. For example, let us construct ANF of f(x,y)= x \lor y (logical or): * f(x,y) = f(0,y) \oplus x(f(0,y) \oplus f(1,y)) * since f(0,y)=0 \lor y = y and f(1,y)=1 \lor y = 1 * it follows that f(x,y) = y \oplus x (y \oplus 1) * by distribution, we get the final ANF: f(x,y) = y \oplus x y \oplus x = x \oplus y \oplus x y


See also

* Reed–Muller expansion * Zhegalkin normal form *
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 functi ...
*
Logical graph An existential graph is a type of diagrammatic or visual notation for logical expressions, created by Charles Sanders Peirce, who wrote on graphical logic as early as 1882, and continued to develop the method until his death in 1914. They include ...
* Zhegalkin polynomial * Negation normal form *
Conjunctive normal form In Boolean algebra, 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. In au ...
*
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 c ...
*
Karnaugh map A Karnaugh map (KM or K-map) is a diagram that can be used to simplify a Boolean algebra expression. Maurice Karnaugh introduced the technique in 1953 as a refinement of Edward W. Veitch's 1952 Veitch chart, which itself was a rediscovery of ...
*
Boolean ring In mathematics, a Boolean ring is a ring for which for all in , that is, a ring that consists of only idempotent elements. An example is the ring of integers modulo 2. Every Boolean ring gives rise to a Boolean algebra, with ring multiplicat ...


References


Further reading

* * * {{Normal forms in logic Boolean algebra Normal forms (logic) ru:Полином Жегалкина