You are on page 1of 29

1

Classification and Properties of Logical


Functions (cont)
Shannon expansion theorem
Reed-Muller expressions
Kronecker expressions
Generalized bit level expressions
Walsh transform



2
Functional expressions for switching
functions- Polynomial Representation

SOP is an analytical description of a truth table
The SOP can be viewed as a series-like expression
where the basis functions are minterms
x
1
x
0
f
X
0

00 f(0)
X
1

01 f(1)
X
2

10 f(2)
X
3

11 f(3)
0 1 2 3
1 0 1 0 1 0 1 0
(0) (1) (2) (3)
( , , , )
f X f X f X f X f
x x x x x x x x F
= + + +
=
0 3 2 1
X
1
X
3
X
2
X
0
3
Definition of Kronecker product

1,1 1,2 1,
,1 ,2 ,
m
n n n m
a B a B a B
A B
a B a B a B
| |
|
=
|
|
\ .
1 1 0 0 1 0 1 0 1 0 1 0
[ ] [ ] [ ] x x x x x x x x x x x x =
Example:
4
Shannon Expansion rule
1 1
0 0
(1) (1)
n n
i i
f X B F

= =
| || |
=
| |
\ .\ .
In matrix notation the Shannon expansion rule can be expressed in
terms of basic matrices X(1) and B(1)
0
1
1 0
( ) (1) (1)
0 1
i i
f
f x x X B F
f
| | | |
= =
| |
\ .\ .
By recursive application of Shannon expansion each n-variable
switching function can be represented as
5
Polynomial Representation - Reed Muller Expressions

,
) (
) ( ) , , , (
2 1 ,..., 2 , 1
1 , 1 3 1 3 , 1 2 1 2 , 1
2 2 1 1 0 2 1
n n
n n n n
n n n
x x x a
x x a x x a x x a
x a x a x a a x x x f


=


where

a
i
e 0, 1 { }.
Representation algorithm
1. Present function in canonical SOP(SOM) and replace all by
:



2. Replace all by .
3. Make a logical multiplication
v
= =
= =
=
1
1 0
1
1
1 1
0 0
1 1 1
, ,
, ) ( ) , , (
1
1
1
i i
i
i
n n n n
x x x x
x x x x f x x f
n
k
n
o o
o o
o o
o o


Sum operation with such enumeration
on which equals 1.
n
o o
1
) (
1 n
f o o
i
x 1
i
x
Theorem: An arbitrary n-variable function is uniquely represented as
6
Example of Polynomial Representation
1 0
) 1 ( ) 1 (
123 23 12 13 2 1 0
3 2 1 3 2 2 1
3 2 1 3 2 3 2 1 3 2 1 2 1
3 2 1 3 2 1 3 2 1
3 2
1
3 2 1
3
2 1
3 2
1
3 2 1
3
2 1 3 2 2 1
= = = = = = =
=
= =
= =
= =
= v v = v =
a a a a a a a
x x x x x x x
x x x x x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x x x x x f
7
Reed-Muller Expansion rule
1 1
(1) (1)
n n
rm
i i
f X R F
= =
| || |
=
| |
\ .\ .
0
1
1 0
(1 ) (1) (1)
1 1
i rm
f
f x X R F
f
| | | |
= =
| |
\ .\ .
In GF(2), the logic complement of x
i
can be represented as
From Shannon expansion we derive the positive Davio (pD) expansion
(decomposition) rule, where f is represented as a polynomial
In matrix notation the pD expansion rule can be expressed in terms of
basic matrices X
rm
(1) and R(1)
By recursive application of pD expansion each n-variable switching
function can be represented as Positive Polarity Reed-Muller (PPRM)
expansion
1
i i
x x =
0 1 0 0 1 0 1
( )
i i i i
f x f x f f x f f c c x = = =
8
PPRM - Example for n=2
( )
1 2 1 2
2 1 1 2
0 1 2 2 1 3 1 2
(0, 0)
1 0 1 0 (0,1)
( ) [1 ] [1 ]
1 1 1 1 (1, 0)
(1,1)
1 0 0 0 (0, 0)
1 1 0 0 (0,1)
[1 ]
1 0 1 0 (1, 0)
1 1 1 1 (1,1)
f
f
f x x x x
f
f
f
f
x x x x
f
f
c c x c x c x x XS
(
(
| |
( (
(
=
|
( (
(

\ .
(

| | (
| (
| (
=
| (
| (
\ .
= =
9
Reed-Muller spectrum
The matrix


is called the RM matrix, the matrix is
non-singular.
The columns of the matrix are RM
functions rm(i,x)

The RM spectrum is defined as

thus
1
( ) (1)
n
i
R n R
=
=
0 3 2 1
Rm(0,x)
7 6 5 4
Rm(7,x)
Rm(6,x)
Rm(5,x)
Rm(4,x)
Rm(3,x)
Rm(2,x)
Rm(1,x)
,
( )
f rm
S R n F =
,
( )
f rm
f X n S =
10
Fast algorithm for calculation of RM
expansion
( 1) 0
( )
( 1) ( 1)
R n
R n
R n R n

(
=
(

F(0)
F(7)
F(6)
F(5)
F(4)
F(3)
F(2)
F(1)
S(0)
S(7)
S(6)
S(5)
S(4)
S(3)
S(2)
S(1)
Based on the recurrence relation
it is possible to compute the
spectrum with complexity O(n2
n
)
XOR operations
11
Polar Codes - Erdal Arikan, ISIT 2007
very general phenomenon
information theoretic view why codes work
first low complexity scheme which provably achieves the capacity for a fairly
wide array of channels
codes not only good for channel coding; work equally well for source coding
and more complicated scenarios
many possible variations on the theme

F(0)
F(7)
F(6)
F(5)
F(4)
F(3)
F(2)
F(1)
S(0)
S(7)
S(6)
S(5)
S(4)
S(3)
S(2)
S(1)
1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 1 1 1 0 0 0 0
(3)
1 0 0 0 1 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
1 1 1 1 1 1 1 1
R
(
(
(
(
(
(
=
(
(
(
(
(
(

12
Polar Codes - Erdal Arikan, ISIT 2007
very general phenomenon
information theoretic view why codes work
first low complexity scheme which provably achieves the capacity for a fairly
wide array of channels
codes not only good for channel coding; work equally well for source coding
and more complicated scenarios
many possible variations on the theme

F(0)
F(7)
F(6)
F(5)
F(4)
F(3)
F(2)
F(1)
S(0)
S(7)
S(6)
S(5)
S(4)
S(3)
S(2)
S(1)
1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 1 1 1 0 0 0 0
(3)
1 0 0 0 1 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
1 1 1 1 1 1 1 1
R
(
(
(
(
(
(
=
(
(
(
(
(
(

Reed-Muller codes
13
RM expansion calculation using Transeunt
Triangle

Dueck W., Maslov D., Butler T., Shmerko V., Yanushkevich S., A
Method to Find the Best Mixed Polarity Reed-Muller Expression Using Transeunt Triangle,RM 2001
Definition:
The transeunt triangle for f(x
1
; x
2
;; x
n
) is a triangle of 0's and 1's where the
bottom row is the truth vector of f. The j-th element in the i-th row of the
triangle is denoted by where the indices run from left-to-right and top-
to-bottom starting with i = 0 and j = 0, respectively. The truth vector
corresponds to the elements
The element corresponds to f(k), where k is the binary representation
of integer k.
Other elements are related by
2 1,0 2 1,1 2 1,2 1
, ,...,
n n n n
e e e

, i j
e
, 1, 1, 1 i j i j i j
e e e
+ + +
=
2 1,
n
k
e

* Transeunt -Of a mental act; causing effects outside the mind (transient)
14
RM expansion calculation using Transeunt
Triangle (cont)
15
RM expansion calculation using Transeunt
Triangle (cont)
Theorem 1:

The proof is by induction on k.




Theorem 2:

Let T be transeunt triangle for a switching function f(x
1
; x
2
; ; x
n
). If we divide
T onto 3 triangles T
0
; T
1
and T
2
as shown in the figure, then
T
0
is the transeunt triangle for the function f(0; x
2
; ; x
n
),
T
1
is the transeunt triangle for the function f(1; x
2
; ; x
n
) and
T
2
is the transeunt triangle for the function f(0; x
2
; ; x
n
) f(1; x
2
; ; x
n
)
,
2 , 2 , 2
k k k
i j
i j i j
e e e
+ + +
=

16
The Fixed Polarity Reed-Muller (FPRM) expansion of a function f with a
given polarity vector is defined as




Where




The number of terms in a FPRM expansion for a given polarity vector H is the
number of non-zero terms in the binary vector

Fixed Polarity Reed-Muller
expressions
1 1 0
( ,... , )
n
H h h h

=
1 1 0
1 1
( ,... , ) [1, ] (1)
i i
n n
h h
n i
i i
f x x x x R F

= =
| || |
=
| |
\ .\ .
1 0
0
1 1
0
(1)
1
0 1
1
1 1
i i
i
i i h h
i
i i
i
i
h
x h
x and R
x h
h

(
=

(
=


= =

=
(


=
(

1
(1) mod(2)
i
n
h
i
S R F
=
| |
=
|
\ .
17
Fixed Polarity RM -example
0 1 2
( , , ) (0, 4, 5, 6, 7) f z z z =

18
Kronecker expressions
Kronecker expressions are generalization of the FPRM
expressions
each variable can have different expansion rule :
Shannon (S), positive Davio (pD) or negative Davio (nD).
1
1 2 3
0 1 1 1 3 2 1 2 3 1 2 3 4 1 5 1 3
6 1 2 7 1 2 3
( ) (1)
1 0 1 0 0 1
(1) (1) , (1) , (1)
0 1 1 1 1 1
: , ,
n
i i
i
K n K
K B R R
Example x B x pD x nD
f a x a x x a x x a x x x a x a x x
a x x a x x x
=
=

( ( (
e = = =
`
( ( (

)

=

19
Generalized bit level expressions
Generalized Reed-Muller (GRM) :
In each product a variable can have a different polarity.
No two products having the same set of variables can appear.






EXOR Sum-of-Products (ESOP)
In each product a variable can have a different polarity.

0 1 3 2 2 3 2 3 4 1 5 1 3
6 1 2 7 1 2 3
:
i i i
Example x denotes either x or x
f a a x a x a x x a x a x x
a x x a x x x
=

20
Minimization of Exclusive-Sums-of-Products
(ESOP)
Why ESOP has been underestimated ?
EXOR gate in standard cell libraries, is almost two times larger and slower
compared to NAND and NOR gates.
Relatively few algorithms use ESOPs for internal representation of functions.
Exact minimization of ESOPs is practical only for arbitrary functions of five
input variables and special classes of functions up to ten variables
Heuristic minimization is based on search algorithms and is computationally
more expansive than SOP minimization.

Why to use ESOP ?
For many Boolean functions, the number of cubes in minimal ESOPs is less
then the number of cubes in minimal SOPs.
The EXOR gate has excellent testability properties leading to efficient
methods for automatic test pattern generation and design for test.
For many types of practical circuits, the selective use of EXOR gates in logic
synthesis yields better implementations in terms of both area and delay.
21
Minimization of Exclusive-Sums-of-Products
(ESOP)
Approaches to heuristic ESOP minimization :

Iterative cube transformation:
Iteratively apply a set of selected cube transformations to single cubes, cube groups.
If the replacement leads to simplification or some other desirable improvement, the cover
is modified without changing the function represented by it.

Minimization of families of ESOP expansions

Simplification based on term rewriting
D. Brand, T. Sasao. Minimization of AND-EXOR expressions using rewriting rules.
IEEE Trans. Comp. Vol. C42. No. 5, pp. 568-576, May 1993.

Zakrevskij stair-case method
A. Zakrevskij. Minimum Polynomial Implementation of Systems of Incompletely
Specified Functions. Proc. of IFIP WG 10.5 Workshop on Applications of the Reed-
Muller Expansion in Circuit Design 1995. Japan, pp. 250-256.
22
Minimization of ESOP
Two level ESOP Simplification based on term rewriting

Before the rewriting the function has to be represented as (non-minimal) two
level AND-XOR expression.
Rewrite rules S1-S6:





Brad-Sasao[93] consider the following problems:

Given a set of rule, is there always a chain leading to minimal expression?

If no, what rules need to be added?
If yes, but not every chain leads to a minimum, how to find a chain that does
result in a minimal expression?

To what extent are these issues relevant in practice?



1, 1 1 0
1 ,
1 ,
x x
x x xy x y x y
xy y xy xy x y x y



23
Minimization of ESOP
Two level ESOP Simplification based on term rewriting

Example: minimize the expression



Conclusion: the set S1-S6 is not sufficient for minimizing the expression.

Theorem: The following set is a minimal convergence (to the minimal
number of product terms set of rules



Example


xyz w xz xw xyzw zw
1 1 0, 1 , 1 x x x x
xz y xyz xyz xyz
24
3 2 1 3 2 1 3 2 3 1
1 2 1 2 3 1 3 2 3 1 2 3
3 2 1 1 2 1 2 3
:
( ) (0, 5, 6, 7)
[1, 0, 0, 0, 0,1,1,1]
(3) [1,1,1,1,1, 0, 0, 0]
(3) [1, , , , , , , ]
( ) (3) 1
example
f x x x x x x x x x x
F
S R F
X x x x x x x x x x x x x
f x x x X S x x x x x
= = + +
=
= =
=
= =

25
Fourier transform
1
2 /
0
( ) ( )
1
( ) ( )
2
( ) ( )
j t
t
j t
t
M
j nk M
n
F f t e dt
f t F e d
F k f n e
e
e
t
e
e e
t

=
=
=
=
}
}

26
Walsh transform
0 3 2 1
Wall(0,x)
7 6 5 4
Wall(7,x)
Wall(6,x)
Wall(5,x)
Wall(4,x)
Wall(3,x)
Wall2,x)
Wall(1,x)
1
( ) (1),
1 1
(1)
1 1
n
i
W n W
W
=
=
| |
=
|

\ .
( )
f
S W n F =
The Walsh matrix is defined as







The Walsh spectrum is defined as

thus



2 ( )
n
f
F W n S

=
1
0
, ,
,
( 1) ( 1)
n
s s
s
i k
i k j i k
i k
W e
t

=
< > < >

= = =
27
Walsh matrix - example
1
2
2 1
3
3 1
3 2
3 2 1
3
( (0), (1),..., (7)) (0,1,1, 0,1, 0, 0, 0)
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
(3)
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
(
f
n
F F F F
x
x
x x
W
x
x x
x x
x x x
S W
=
= =
| |
|

|
|

|

|
=
|

|

|
|

|
|

\ .
= 3) (3,1,1, 1,1, 1, 1, 3) F =
28
Walsh Transform (cont)
2 1
0
2 1
0
( ) 2 ( ) ( )
( ) ( ) ( )
n
n
n
f x
w
f w
x
f x S w W w
S w f x W x

=
=
=

Any function can be represented as a Walsh series with Walsh coefficients S


f
(w)





Example: f(x
n-1
,..x
0
)=x
i
,
1 1 1 0
1
2 1
1
0 ( ,.. , ,.. )
2 0
( ) ( ) ( ) ( 1) ( 1) 2 2
0 0, 2
n
j j
j j i
i
n i i
n
w x
w n i
f w
x x x x x x
i
w
S w f x W x w
w
=
+

= =


= = = =


29
Fast Walsh transform
( 1) ( 1)
( )
( 1) ( 1)
W n W n
W n
W n W n

(
=
(


F(0)
F(7)
F(6)
F(5)
F(4)
F(3)
F(2)
F(1)
S(0)
S(7)
S(6)
S(5)
S(4)
S(3)
S(2)
S(1)

You might also like