
It has been suggested that Zhegalkin polynomial and Reed–Muller expansion be merged into this article. (Discuss) Proposed since July 2024. |
This article needs additional citations for verification.(July 2013) |
In Boolean algebra, 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 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 (), then one or more terms are combined by XOR () together into ANF. Negations are not permitted:
- The previous subform with a purely true term:
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, which means that two logically equivalent formulas will convert to the same ANF, easily showing whether two formulas are equivalent for automated theorem proving. 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 functions (used, for example, in linear-feedback shift registers): a linear function is one that is a sum of single literals. Properties of nonlinear-feedback shift registers 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 ⊕ x) ⊕ (1 ⊕ x ⊕ y)
- 1 ⊕ x ⊕ 1 ⊕ x ⊕ y
- 1 ⊕ 1 ⊕ x ⊕ x ⊕ y
- y
NOT (logical negation) is XORing 1:
- ¬(1 ⊕ x ⊕ y)
- 1 ⊕(1 ⊕ x ⊕ y)
- 1 ⊕ 1 ⊕ x ⊕ y
- x ⊕ y
AND (logical conjunction) is distributed algebraically
- (1 ⊕ x)(1 ⊕ x ⊕ y)
- 1(1 ⊕ x ⊕ y) ⊕ x(1 ⊕ x ⊕ y)
- (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) (easier when both operands have purely true terms) or a ⊕ b ⊕ ab (easier otherwise):
- (1 ⊕ x) + (1 ⊕ x ⊕ y)
- 1 ⊕ (1 ⊕ 1 ⊕ x)(1 ⊕ 1 ⊕ x ⊕ y)
- 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
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
- Zhegalkin normal form
- Boolean function
- Logical graph
- Zhegalkin polynomial
- Negation normal form
- Conjunctive normal form
- Disjunctive normal form
- Karnaugh map
- Boolean ring
References
- Steinbach, Bernd [in German]; Posthoff, Christian (2009). "Preface". Logic Functions and Equations - Examples and Exercises (1st ed.). Springer Science + Business Media B. V. p. xv. ISBN 978-1-4020-9594-8. LCCN 2008941076.
- WolframAlpha NOT-equivalence demonstration: ¬a = 1 ⊕ a
- WolframAlpha AND-equivalence demonstration: (a ⊕ b)(c ⊕ d) = ac ⊕ ad ⊕ bc ⊕ bd
- From De Morgan's laws
- WolframAlpha OR-equivalence demonstration: a + b = a ⊕ b ⊕ ab
Further reading
- Wegener, Ingo (1987). The complexity of Boolean functions. Wiley-Teubner. p. 6. ISBN 3-519-02107-2.
- "Presentation" (PDF) (in German). University of Duisburg-Essen. Archived (PDF) from the original on 2017-04-20. Retrieved 2017-04-19.
- Maxfield, Clive "Max" (2006-11-29). "Reed-Muller Logic". Logic 101. EETimes. Part 3. Archived from the original on 2017-04-19. Retrieved 2017-04-19.
It has been suggested that Zhegalkin polynomial and Reed Muller expansion be merged into this article Discuss Proposed since July 2024 This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Algebraic normal form news newspapers books scholar JSTOR July 2013 Learn how and when to remove this message In Boolean algebra 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 formulas in one of three subforms The entire formula is purely true or false 1 displaystyle 1 0 displaystyle 0 One or more variables are combined into a term by AND displaystyle land then one or more terms are combined by XOR displaystyle oplus together into ANF Negations are not permitted a b a b a b c displaystyle a oplus b oplus left a land b right oplus left a land b land c right The previous subform with a purely true term 1 a b a b a b c displaystyle 1 oplus a oplus b oplus left a land b right oplus left a land b land c right Formulas written in ANF are also known as Zhegalkin polynomials and Positive Polarity or Parity Reed Muller expressions PPRM Common usesANF is a canonical form which means that two logically equivalent formulas will convert to the same ANF easily showing whether two formulas are equivalent for automated theorem proving 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 functions used for example in linear feedback shift registers a linear function is one that is a sum of single literals Properties of nonlinear feedback shift registers can also be deduced from certain properties of the feedback function in ANF Performing operations within algebraic normal formThere 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 x 1 x y 1 x 1 x y 1 1 x x y y NOT logical negation is XORing 1 1 x y 1 1 x y 1 1 x y x y AND logical conjunction is distributed algebraically 1 x 1 x y 1 1 x y x 1 x y 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 easier when both operands have purely true terms or a b ab easier otherwise 1 x 1 x y 1 1 1 x 1 1 x y 1 x x y 1 x xyConverting to algebraic normal formEach 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 xyzFormal representationANF is sometimes described in an equivalent way f x1 x2 xn displaystyle f x 1 x 2 ldots x n a0 displaystyle a 0 oplus a1x1 a2x2 anxn displaystyle a 1 x 1 oplus a 2 x 2 oplus cdots oplus a n x n oplus a1 2x1x2 an 1 nxn 1xn displaystyle a 1 2 x 1 x 2 oplus cdots oplus a n 1 n x n 1 x n oplus displaystyle cdots oplus a1 2 nx1x2 xn displaystyle a 1 2 ldots n x 1 x 2 ldots x n where a0 a1 a1 2 n 0 1 displaystyle a 0 a 1 ldots a 1 2 ldots n in 0 1 fully describes f displaystyle f Recursively deriving multiargument Boolean functions There are only four functions with one argument f x 0 displaystyle f x 0 f x 1 displaystyle f x 1 f x x displaystyle f x x f x 1 x displaystyle f x 1 oplus x To represent a function with multiple arguments one can use the following equality f x1 x2 xn g x2 xn x1h x2 xn displaystyle 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 x2 xn f 0 x2 xn displaystyle g x 2 ldots x n f 0 x 2 ldots x n h x2 xn f 0 x2 xn f 1 x2 xn displaystyle h x 2 ldots x n f 0 x 2 ldots x n oplus f 1 x 2 ldots x n Indeed if x1 0 displaystyle x 1 0 then x1h 0 displaystyle x 1 h 0 and so f 0 f 0 displaystyle f 0 ldots f 0 ldots if x1 1 displaystyle x 1 1 then x1h h displaystyle x 1 h h and so f 1 f 0 f 0 f 1 displaystyle f 1 ldots f 0 ldots oplus f 0 ldots oplus f 1 ldots Since both g displaystyle g and h displaystyle h have fewer arguments than f displaystyle 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 y displaystyle f x y x lor y logical or f x y f 0 y x f 0 y f 1 y displaystyle f x y f 0 y oplus x f 0 y oplus f 1 y since f 0 y 0 y y displaystyle f 0 y 0 lor y y and f 1 y 1 y 1 displaystyle f 1 y 1 lor y 1 it follows that f x y y x y 1 displaystyle f x y y oplus x y oplus 1 by distribution we get the final ANF f x y y xy x x y xy displaystyle f x y y oplus xy oplus x x oplus y oplus xy See alsoWikimedia Commons has media related to Algebraic normal form Reed Muller expansion Zhegalkin normal form Boolean function Logical graph Zhegalkin polynomial Negation normal form Conjunctive normal form Disjunctive normal form Karnaugh map Boolean ringReferencesSteinbach Bernd in German Posthoff Christian 2009 Preface Logic Functions and Equations Examples and Exercises 1st ed Springer Science Business Media B V p xv ISBN 978 1 4020 9594 8 LCCN 2008941076 WolframAlpha NOT equivalence demonstration a 1 a WolframAlpha AND equivalence demonstration a b c d ac ad bc bd From De Morgan s laws WolframAlpha OR equivalence demonstration a b a b abFurther readingWegener Ingo 1987 The complexity of Boolean functions Wiley Teubner p 6 ISBN 3 519 02107 2 Presentation PDF in German University of Duisburg Essen Archived PDF from the original on 2017 04 20 Retrieved 2017 04 19 Maxfield Clive Max 2006 11 29 Reed Muller Logic Logic 101 EETimes Part 3 Archived from the original on 2017 04 19 Retrieved 2017 04 19