Algebraic normal form: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Klbrain
Closing; merge
 
imported>Cewbot
m Normalize {{Multiple issues}}: Remove {{Multiple issues}} for only 1 maintenance template: More citations needed
 
Line 1: Line 1:
{{merging from|Zhegalkin polynomial|Reed–Muller expansion|discuss=Talk:Algebraic normal form#Merge proposal|date=April 2025}}
{{Short description|Boolean polynomials as sums of monomials}}
{{Short description|Boolean polynomials as sums of monomials}}
{{refimprove|date=July 2013}}
{{about|Boolean algebra|other uses|Normal form (disambiguation)}}
{{about|Boolean algebra|other uses|Normal form (disambiguation)}}
{{merging from|Zhegalkin polynomial|Reed–Muller expansion|discuss=Talk:Algebraic normal form#Merge proposal|date=April 2025}}
{{more citations needed|date=July 2013}}
In [[Boolean algebra]], the '''algebraic normal form''' ('''ANF'''), '''ring sum normal form''' ('''RSNF''' or '''RNF'''), ''[[Zhegalkin polynomial|Zhegalkin normal form]]'', or ''[[Reed–Muller expansion]]'' is a way of writing [[propositional logic]] formulas in one of three subforms:
In [[Boolean algebra]], the '''algebraic normal form''' ('''ANF'''), '''ring sum normal form''' ('''RSNF''' or '''RNF'''), ''[[Zhegalkin polynomial|Zhegalkin normal form]]'', or ''[[Reed–Muller expansion]]'' is a way of writing [[propositional logic]] formulas in one of three subforms:


Line 98: Line 99:


==See also==
==See also==
{{Commonscat|Algebraic normal form}}
{{Commons category}}
* [[Reed–Muller expansion]]
* [[Reed–Muller expansion]]
* [[Zhegalkin normal form]]
* [[Zhegalkin normal form]]
Line 119: Line 120:
* {{cite web |title=Presentation |publisher=[[University of Duisburg-Essen]] |language=German |url=http://www.is.informatik.uni-duisburg.de/courses/infoa_ss03/slides/02-slides.pdf#page=34 |access-date=2017-04-19 |url-status=live |archive-url=https://web.archive.org/web/20170420000915/http://www.is.informatik.uni-duisburg.de/courses/infoa_ss03/slides/02-slides.pdf#page=34 |archive-date=2017-04-20}}
* {{cite web |title=Presentation |publisher=[[University of Duisburg-Essen]] |language=German |url=http://www.is.informatik.uni-duisburg.de/courses/infoa_ss03/slides/02-slides.pdf#page=34 |access-date=2017-04-19 |url-status=live |archive-url=https://web.archive.org/web/20170420000915/http://www.is.informatik.uni-duisburg.de/courses/infoa_ss03/slides/02-slides.pdf#page=34 |archive-date=2017-04-20}}
* {{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]] |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}}
* {{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]] |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}}
{{Normal forms in logic}}


[[Category:Boolean algebra]]
[[Category:Boolean algebra]]
Line 124: Line 127:


[[ru:Полином Жегалкина]]
[[ru:Полином Жегалкина]]
{{Normal forms in logic}}

Latest revision as of 06:27, 13 June 2025

Template:Short description Script error: No such module "about". Template:Merging from Template:More citations needed

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
    • 0
  • 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: ab(ab)(abc)
  • The previous subform with a purely true term: 1ab(ab)(abc)

Script error: No such module "anchor".Formulas written in ANF are also known as Zhegalkin polynomials and Positive Polarity (or Parity) Reed–Muller expressions (PPRM).[1]

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:

(Template:Fontcolor) ⊕ (Template:Fontcolor)
Template:FontcolorTemplate:Fontcolor
1 ⊕ 1 ⊕ x ⊕ x ⊕ y
y

NOT (logical negation) is XORing 1:[2]

Template:FontcolorTemplate:Fontcolor
Template:FontcolorTemplate:Fontcolor
1 ⊕ 1 ⊕ x ⊕ y
x ⊕ y

AND (logical conjunction) is distributed algebraically[3]

(Template:FontcolorTemplate:Fontcolor)Template:Fontcolor
Template:FontcolorTemplate:FontcolorTemplate:FontcolorTemplate:Fontcolor
(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)[4] (easier when both operands have purely true terms) or a ⊕ b ⊕ ab[5] (easier otherwise):

(Template:Fontcolor) + (Template:Fontcolor)
1 ⊕ (1 ⊕ Template:Fontcolor)(1 ⊕ Template:Fontcolor)
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:

f(x1,x2,,xn)= a0
a1x1a2x2anxn
a1,2x1x2an1,nxn1xn
a1,2,,nx1x2xn
where a0,a1,,a1,2,,n{0,1}* 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)=1x

To represent a function with multiple arguments one can use the following equality:

f(x1,x2,,xn)=g(x2,,xn)x1h(x2,,xn), where
  • g(x2,,xn)=f(0,x2,,xn)
  • h(x2,,xn)=f(0,x2,,xn)f(1,x2,,xn)

Indeed,

  • if x1=0 then x1h=0 and so f(0,)=f(0,)
  • if x1=1 then x1h=h and so f(1,)=f(0,)f(0,)f(1,)

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)=xy (logical or):

  • f(x,y)=f(0,y)x(f(0,y)f(1,y))
  • since f(0,y)=0y=y and f(1,y)=1y=1
  • it follows that f(x,y)=yx(y1)
  • by distribution, we get the final ANF: f(x,y)=yxyx=xyxy

See also

Template:Sister project

References

Template:Reflist

Further reading

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".

Template:Normal forms in logic

ru:Полином Жегалкина