Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Monotonic functions Self-dual functions Symmetric functions Linear functions Functional completeness Shannon expansion theorem Reed-Muller expressions Kronecker expressions Walsh transform
1
Monotonic Functions
Boolean function F ( x , Y ) is isotonic in respect to variable x if from or
F (1,Y ) F (0,Y ) ;
x1 > x 2
, it follows
F ( x1 ,Y ) F ( x2 ,Y ) ,
F ( x, Y ) = a (Y ) + xb(Y )
Proof:
F ( x , Y ) = x f1 (Y ) + x f 2 (Y ) f 2 (Y ) f 1 (Y ) f 2 (Y ) = f 1 ( Y ) + f 3 ( Y ) F ( x , Y ) = x f 1 ( Y ) + x ( f 1 ( Y ) + f 3 ( Y )) = = (x + x )f 1 ( Y ) + x f 3 ( Y ) = = f 1 ( Y ) + x f 3 ( Y ).
2
Monotonic Functions
Boolean function
Monotonic Functions Boolean function F( x , Y ) is monotonic in respect to variable x if this function is isotonic or antitonic in respect to this variable. Boolean function is isotonic if this function is isotonic in respect to all variables. Boolean function is antitonic if this function is antitonic in respect to all variables. Boolean function is monotonic if this function is monotonic in respect of all variables (is isotonic in respect to some part of variables and antitonic in respect to another part).
F( x , Y ) is antitonic in respect to variable x, if from x 1 > x 2 it follows that: F ( x1, Y ) F ( x2 , Y ) , or F (1, Y ) F (0, Y )
Lemma: If a Boolean function is antitonic in x then
F ( x, Y ) = a (Y ) + xb(Y )
Proof:
Function is: isotonic in respect of x1 antitonic in respect of x2; non-monotonic in respect of x0.
F( x 0 , x1 , x 2 ) = x 0 x1 + x 0 x 2
(0,1,1,1)
(1,1,0,0)
(1,0,1,0)
(1,0,0,1)
(0,1,1,0)
(0,1,0,1)
(0,0,1,1)
(0,1,0,0)
(0,0,1,0) (0,0,0,1)
Function is isotonic
(1,0,0,0)
(0,0,0,0)
f ( x3 , x2 , x1 , x0 )
F ( x0 , x1, x2 ) = x0 x2 + x1
Function is monotonic in respect to vertex 5.
00 01 11
Dual and Self-Dual Functions The function F (X ) is called dual to function (X )if
F(X ) = F(X )
There are no self-dual functions of 2 variables. There are two NPN classes of self-dual functions of 3 variables:
F ( X ) = ( X )
F1 ( x0 , x1 , x2 ) = x0 x1 + x0 x2 + x1 x2 ; F2 ( x0 , x1 , x2 ) = x0 x1 x2 .
(X )
(X )
F ( X ) = ( X )
9 10
Dual and Self-Dual Functions Self-dual function has opposite value on any two vertexes belonged opposite ends of each biggest diagonal of the n-cube.
So, self-dual function has the value 1 (or 0) on half of vertexes of the n-cube. If some function is self-dual, all representatives of its NPN class are self-dual.
f ( x, y , z )
f0
f ( x, y , z )
f7 f6 f5 f4 f3 f2
f ( x, y , z )
f7
f1
f2 f3
f4 f5
f6
f5 f4
f3
f6 f7
f1 f0
f2 f1 f0
11
12
Theorem 2: Let f be a self-dual function of n variables, and let f be the number of inputs a for which f (a) = 1 then f = 2 n 1.
f ( x1 , x 2 ,..., x n ) = f ( x1 , x 2 ,..., x n ).
For example,
F4
14
a)
if i I , j J
such that
SPi SP ' j
f ( X ) = Pi
iI
, g ( X ) = Pj
jJ
where SP SP ' j are the sets variables of the corresponding prime i implicants of f and g respectively. Then,
a) b)
such that
but g ( x = 0, Y ) = g ( x = 1, Y ) contradiction
16
17
18
F(x,Y) = F(x,Y) = xf(Y) + x (Y) = (x + f(Y) )(x + (Y) ) = = (x + f d (Y))(x + d (Y)) = x d (Y)+ xf d (Y) + f d (Y) d (Y) = = x d (Y)+ xf d (Y) + f d (Y) d (Y)(x + x ) = = x d (Y) + x f d (Y).
xf (Y ) + x (Y ) = x d (Y ) + xf d (Y ) and f(Y)= d (Y )
So, if f(Y) is not SD, then F ( x, Y ) = xf (Y ) + x f d (Y ) is self-dual.
19
20
Self-Dual Classification Consider the self-dual function F(x,Y)=x f1(Y)+x f0(Y). The nonself-dual functions f1(Y), f0(Y) are called nonself-dualized functions of F(x) Switching functions that become identical by self-dualization, nonself-dualization, negation of variables or the function, or a permutation of the variables are called SD-equivalent.
21
f1 ( x1 , x2 , x3 ) = x1 + x2 + x3 f 2 ( x1 , x2 , x3 ) = x1 ( x2 + x3 ) f1sd ( x1 , x2 , x3 , x4 ) = x4 ( x1 + x2 + x3 ) + x4 ( x1 + x2 + x3 ) = x4 ( x1 + x2 + x3 ) + x1 x2 x3 f 2sd ( x1 , x2 , x3 , x4 ) = x1 ( x4 + x2 + x3 ) + x4 x2 x3 after permutations x1 x4 and x4 x4 it follows that the functions are SD equivalent
22
Self-dual equivalence
The self-dual function F4 ( x, y, z, t ) is a SD-representative for functions of 3 variables. For example,
Symmetric functions
Function F(X) is symmetric if for any two variables xi and xj
F( xi , xj ,Y) = F( xj ,xi ,Y) Example: xy+xz+yz = yx+yz+xz - symmetric; xz + y yz + x - non-symmetric.
24
2 4
n S k1 ,k 2 ,..., k m
Example: S 3 1,3
n = Sk j =1
3 = S13 + S3 = xy z + x yz + x yz + xyz
=
28
B4
(1,1,1,1) (1,1,1,0) (1,1,0,1) (1,0,1,1) (0,1,1,1)
Example:
(1,1,0,0) (1,0,1,0) (1,0,0,1) (0,1,1,0) (0,1,0,1) (0,0,1,1)
3 M2
3 S2
3 + S3 = xy + xz + yz
(0,1,0,0) (1,0,0,0)
(0,0,1,0) (0,0,0,1)
(0,0,0,0)
29
=
30
= ( xy + xz + yz )( x + y + z ) = = xyz + xyz + x yz
Example:
n n Sk = S m & Sk m j j j =0
&
=
31
= xyzt + ( xy + x y )( zt + z t ) + x yzt
32
))
= M
4 1
4 2
4 3
4 4
= M
4 1
4 2
4 3
4 1
4 2
4 3
n n M k = M m & M k m j j j =0
1 1 0 1 1 1 0 1 1 0 11 10 1 1 1 0 0 0
1 1
0 1 1 1
4 M2
2 M2
2 & M0
M 12
& M 12
2 M0
2 & M2
=
33
= xy + ( x + y )( z + t ) + zt
LINEAR functions
Definition : If a logic function f is represented as
f = a 0 a1 x1 a 2 x 2 ... a n x n ,
where a i = 0 or 1, then f is a linear function. Let x and y be Boolean vectors, and a be a constant (a {0,1}). Then , the linear function in ordinary mathematics, satisfies the following:
Theorem : There are 2n+1 linear functions of n variables. There are 8 linear functions f(x,y) on two variables.
If a1 = a2 = ... = an = 1 and a0 = 0 , then f is a parity function of n variables. A parity function decides whether the number of 1s in the inputs is an even number or an odd number.
f ( x y ) = f ( x) f ( y ),
f ( ax) = af ( x).
Let a 0 = 0 . Then, the linear functions satisfy the above conditions.
35
36
Linear functions (cont) Theorem: The function that is obtained by assigning a linear function to an arbitrary variable of a linear function is also a linear function.
(Proof) Let f and g be linear functions as follows:
f = a0 a1x1 a2 x2 an xn ,
Then, we have
g = b0 b1 y1 b2 y2 bm ym.
f ( x1 , x 2 , , x n ) = a0 a1 ( x1 1) a 2 ( x 2 1) a n ( x n 1) = a0 a1 x1 a 2 x 2 a n x n (a1 a 2 a n ).
Thus, if a1 a2 so f is self-dual.
f1 = f 0 ( x1 , x 2 , , xi 1 , g , xi +1 , , x n ) = a 0 a1 x1 a 2 x 2 ai (b0 b1 y1 b2 y bm y m ) a n x n .
Note that this expression does not contain the products whose degrees are greater than one. Thus, f1is also a linear function.
an = 1, then f ( x1 , x 2 , , x n ) = f ( x1 , x2 , , xn ) 1 = f ( x1 , x2 , , xn ),
an = 0 then
f ( x1 , x 2 , , x n ) = f ( x1 , x 2 , , x n )
37
38
{ }
Definition: A function such that f (0,0,...,0) = 0 is a 0-preserving function. A function such that f (1,1,...,1) = 1 is a 1-preserving function.
M 0 be the set of 0-preserving functions, M 1 be the set of 1-preserving functions, M 2 be the set of self-dual functions, M 3 be the set of isotonic functions, and M 4 be the set of linear functions.
10
First we prove that if we are given five (2-valued) truth functions which do not fall into the defined categories, we can generate all truth functions. Let f1 (x1,... ,xi) which is not 1-preserving f2 ( x1, . . . ,xj) which is not 0-preserving f3(X1,... ,xk) which is not monotonic f4(X1,... ,xm) which is not linear f5(x1,... xn) which is not self-dual. These functions may be of the same or different number of variables, and may even be the same functions. Define f*i(p)=fi(p,p,..p)
41
if f1*(0)=1 then we have negation, and if f1*(0)=0 we have the constant 0 f2*(0)=1 if f2*(1)=0 then we have negation, and if f2*(1)=1 we have the constant 1 f3 is not isotonic there is a Y such that f3(0,Y)=1 and f3(1,Y)=0 and we have a negation
42
Proof: Given f1, f2 , f3 and f5 we have negation and constants f4 is not linear there exists a Y s.t. f5(x,Y)=f5(~x,Y) there exists a Z s.t. f5(x,Z)=~f5(~x,Z) Define pk as follows: If zk=yk set pk=zk If zk =0, yk=1 set pk=p, If zk =1, yk=0 set pk=~p The function f4*(q,p)=f4(q,p1,p2,pn-1) has odd number of 1s.
43 44
11
45
46
f(Z)
48
12
f M i (i = 1, 2,3, 4,5)
49
13