Reed–Muller expansion

From HandWiki

In Boolean logic, a Reed–Muller expansion (or Davio expansion) is a decomposition of a Boolean function.

For a Boolean function [math]\displaystyle{ f(x_1,\ldots,x_n) : \mathbb{B}^n \to \mathbb{B} }[/math] we call

[math]\displaystyle{ \begin{align} f_{{x_i}}(x) & = f(x_1,\ldots,x_{i-1},1,x_{i+1},\ldots,x_n) \\ f_{\overline{x}_i}(x)& = f(x_1,\ldots,x_{i-1},0,x_{i+1},\ldots,x_n) \end{align} }[/math]

the positive and negative cofactors of [math]\displaystyle{ f }[/math] with respect to [math]\displaystyle{ x_i }[/math], and

[math]\displaystyle{ \begin{align} \frac{\partial f}{\partial x_i} & = f_{x_i}(x) \oplus f_{\overline{x}_i}(x) \end{align} }[/math]

the boolean derivation of [math]\displaystyle{ f }[/math] with respect to [math]\displaystyle{ x_i }[/math], where [math]\displaystyle{ {\oplus} }[/math] denotes the XOR operator.

Then we have for the Reed–Muller or positive Davio expansion:

[math]\displaystyle{ f = f_{\overline{x}_i} \oplus x_i \frac{\partial f}{\partial x_i}. }[/math]

Description

This equation is written in a way that it resembles a Taylor expansion of [math]\displaystyle{ f }[/math] about [math]\displaystyle{ x_i=0 }[/math]. There is a similar decomposition corresponding to an expansion about [math]\displaystyle{ x_i=1 }[/math] (negative Davio expansion):

[math]\displaystyle{ f = f_{x_i} \oplus \overline{x}_i \frac{\partial f}{\partial x_i}. }[/math]

Repeated application of the Reed–Muller expansion results in an XOR polynomial in [math]\displaystyle{ x_1,\ldots,x_n }[/math]:

[math]\displaystyle{ f = a_1 \oplus a_2 x_1 \oplus a_3 x_2 \oplus a_4 x_1 x_2 \oplus \ldots \oplus a_{2^n} x_1\cdots x_n }[/math]

This representation is unique and sometimes also called Reed–Muller expansion.[1]

E.g. for [math]\displaystyle{ n=2 }[/math] the result would be

[math]\displaystyle{ f(x_1, x_2) = f_{\overline{x}_1 \overline{x}_2} \oplus \frac{\partial f_{\overline{x}_2}}{\partial x_1} x_1 \oplus \frac{\partial f_{\overline{x}_1}}{\partial x_2} x_2 \oplus \frac{\partial^2 f}{\partial x_1 \partial x_2} x_1 x_2 }[/math]

where

[math]\displaystyle{ {\partial^2 f \over \partial x_1 \partial x_2} = f_{\bar x_1 \bar x_2} \oplus f_{\bar x_1 x_2} \oplus f_{x_1 \bar x_2} \oplus f_{x_1 x_2} }[/math].

For [math]\displaystyle{ n = 3 }[/math] the result would be

[math]\displaystyle{ f(x_1, x_2, x_3) = f_{\bar x_1 \bar x_2 \bar x_3} \oplus {\partial f_{\bar x_2 \bar x_3} \over \partial x_1} x_1 \oplus {\partial f_{\bar x_1 \bar x_3} \over \partial x_2} x_2 \oplus {\partial f_{\bar x_1 \bar x_2} \over \partial x_3} x_3 \oplus {\partial^2 f_{\bar x_3} \over \partial x_1 \partial x_2} x_1 x_2 \oplus {\partial^2 f_{\bar x_2} \over \partial x_1 \partial x_3} x_1 x_3 \oplus {\partial^2 f_{\bar x_1} \over \partial x_2 \partial x_3} x_2 x_3 \oplus {\partial^3 f \over \partial x_1 \partial x_2 \partial x_3} x_1 x_2 x_3 }[/math]

where

[math]\displaystyle{ {\partial^3 f \over \partial x_1 \partial x_2 \partial x_3} = f_{\bar x_1 \bar x_2 \bar x_3} \oplus f_{\bar x_1 \bar x_2 x_3} \oplus f_{\bar x_1 x_2 \bar x_3} \oplus f_{\bar x_1 x_2 x_3} \oplus f_{x_1 \bar x_2 \bar x_3} \oplus f_{x_1 \bar x_2 x_3} \oplus f_{x_1 x_2 \bar x_3} \oplus f_{x_1 x_2 x_3} }[/math].

Geometric interpretation

This [math]\displaystyle{ n = 3 }[/math] case can be given a cubical geometric interpretation (or a graph-theoretic interpretation) as follows: when moving along the edge from [math]\displaystyle{ \bar x_1 \bar x_2 \bar x_3 }[/math] to [math]\displaystyle{ x_1 \bar x_2 \bar x_3 }[/math], XOR up the functions of the two end-vertices of the edge in order to obtain the coefficient of [math]\displaystyle{ x_1 }[/math]. To move from [math]\displaystyle{ \bar x_1 \bar x_2 \bar x_3 }[/math] to [math]\displaystyle{ x_1 x_2 \bar x_3 }[/math] there are two shortest paths: one is a two-edge path passing through [math]\displaystyle{ x_1 \bar x_2 \bar x_3 }[/math] and the other one a two-edge path passing through [math]\displaystyle{ \bar x_1 x_2 \bar x_3 }[/math]. These two paths encompass four vertices of a square, and XORing up the functions of these four vertices yields the coefficient of [math]\displaystyle{ x_1 x_2 }[/math]. Finally, to move from [math]\displaystyle{ \bar x_1 \bar x_2 \bar x_3 }[/math] to [math]\displaystyle{ x_1 x_2 x_3 }[/math] there are six shortest paths which are three-edge paths, and these six paths encompass all the vertices of the cube, therefore the coefficient of [math]\displaystyle{ x_1 x_2 x_3 }[/math] can be obtained by XORing up the functions of all eight of the vertices. (The other, unmentioned coefficients can be obtained by symmetry.)

Paths

The shortest paths all involve monotonic changes to the values of the variables, whereas non-shortest paths all involve non-monotonic changes of such variables; or, to put it another way, the shortest paths all have lengths equal to the Hamming distance between the starting and destination vertices. This means that it should be easy to generalize an algorithm for obtaining coefficients from a truth table by XORing up values of the function from appropriate rows of a truth table, even for hyperdimensional cases ([math]\displaystyle{ n = 4 }[/math] and above). Between the starting and destination rows of a truth table, some variables have their values remaining fixed: find all the rows of the truth table such that those variables likewise remain fixed at those given values, then XOR up their functions and the result should be the coefficient for the monomial corresponding to the destination row. (In such monomial, include any variable whose value is 1 (at that row) and exclude any variable whose value is 0 (at that row), instead of including the negation of the variable whose value is 0, as in the minterm style.)

Similar to binary decision diagrams (BDDs), where nodes represent Shannon expansion with respect to the according variable, we can define a decision diagram based on the Reed–Muller expansion. These decision diagrams are called functional BDDs (FBDDs).

Derivations

The Reed–Muller expansion can be derived from the XOR-form of the Shannon decomposition, using the identity [math]\displaystyle{ \overline{x} = 1 \oplus x }[/math]:

[math]\displaystyle{ \begin{align} f & = x_i f_{x_i} \oplus \overline{x}_i f_{\overline{x}_i} \\ & = x_i f_{x_i} \oplus (1 \oplus x_i) f_{\overline{x}_i} \\ & = x_i f_{x_i} \oplus f_{\overline{x}_i} \oplus x_i f_{\overline{x}_i} \\ & = f_{\overline{x}_i} \oplus x_i \frac{\partial f}{\partial x_i}. \end{align} }[/math]

Derivation of the expansion for [math]\displaystyle{ n = 2 }[/math]:

[math]\displaystyle{ \begin{align} f & = f_{\bar x_1} \oplus x_1 {\partial f \over \partial x_1} \\ & = \Big( f_{\bar x_2} \oplus x_2 {\partial f \over \partial x_2} \Big)_{\bar x_1} \oplus x_1 {\partial \Big(f_{\bar x_2} \oplus x_2 {\partial f \over \partial x_2} \Big) \over \partial x_1} \\ & = f_{\bar x_1 \bar x_2} \oplus x_2 {\partial f_{\bar x_1} \over \partial x_2} \oplus x_1 \Big({\partial f_{\bar x_2} \over \partial x_1} \oplus x_2 {\partial^2 f \over \partial x_1 \partial x_2}\Big) \\ & = f_{\bar x_1 \bar x_2} \oplus x_2 {\partial f_{\bar x_1} \over \partial x_2} \oplus x_1 {\partial f_{\bar x_2} \over \partial x_1} \oplus x_1 x_2 {\partial^2 f \over \partial x_1 \partial x_2}. \end{align} }[/math]

Derivation of the second-order boolean derivative:

[math]\displaystyle{ \begin{align} {\partial^2 f \over \partial x_1 \partial x_2} & = {\partial \over \partial x_1} \Big( {\partial f \over \partial x_2} \Big) = {\partial \over \partial x_1} (f_{\bar x_2} \oplus f_{x_2}) \\ & = (f_{\bar x_2} \oplus f_{x_2})_{\bar x_1} \oplus (f_{\bar x_2} \oplus f_{x_2})_{x_1} \\ & = f_{\bar x_1 \bar x_2} \oplus f_{\bar x_1 x_2} \oplus f_{x_1 \bar x_2} \oplus f_{x_1 x_2}. \end{align} }[/math]

See also

References

  1. "Multilevel logic synthesis based on functional decision diagrams". Proceedings of the 3rd European Conference on Design Automation. 1992. 

Further reading

  • "O Tekhnyke Vychyslenyi Predlozhenyi v Symbolytscheskoi Logykye" (in ru, fr). Matematicheskii Sbornik (Moscow, Russia) 34 (1): 9–28. 1927. Mi msb7433. http://www.mathnet.ru/php/archive.phtml?wshow=paper&jrnid=sm&paperid=7433&option_lang=eng. Retrieved 2017-10-12. 
  • "A Class of Multiple-Error Correcting Codes and the Decoding Scheme". IRE Transactions on Information Theory IT-4: 38–49. September 1954. 
  • "Application of Boolean Algebra to Switching Circuit Design and to Error Detection". IRE Transactions on Electronic Computers EC-3: 6–12. September 1954. 
  • "Efficient graph-based computation and manipulation of functional decision diagrams". Proceedings of the 4th European Conference on Design Automation: 278–282. 1993. 
  • "Reed-Muller Logic". Logic 101. EETimes. 2006-11-29. Part 3. http://www.eetimes.com/author.asp?section_id=216&doc_id=1274545. 
  • "Preface". Logic Functions and Equations - Examples and Exercises (1st ed.). Springer Science + Business Media B. V.. 2009. p. xv. ISBN 978-1-4020-9594-8. 
  • "6. Historical Overview of the Research on Decomposition". A Survey of Literature on Function Decomposition. Functional Decomposition Group, Department of Electrical Engineering, Portland University, Portland, Oregon, USA. 1995-11-20. pp. 21–22.  (188 pages)