Sei sulla pagina 1di 13

Classification and Properties of Logical Functions

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 ) ,

Lemma: If a Boolean function is isotonic in x then

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:

F ( x, Y ) = xf1 (Y ) + xf 2 (Y ) f1 (Y ) f 2 (Y ) f1(Y)=f 2 (Y ) + f3 (Y ) F ( x, Y ) = x ( f 2 (Y ) + f3 (Y )) + xf 2 (Y ) = =(x +x)f 2 (Y ) + xf 3 (Y ) = =f 2 (Y ) + xf 3 (Y ).


3

Function is: isotonic in respect of x1 antitonic in respect of x2; non-monotonic in respect of x0.

Monotonic functions on Hasse diagram


(1,1,1,1)

F( x 0 , x1 , x 2 ) = x 0 x1 + x 0 x 2

(1,1,1,0) (1,1,0,1) (1,0,1,1)

(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 )

Monotonic function as a star


Monotonic function is monotonic in respect to star vertex. Isotonic function is isotonic in respect to vertex 2n-1. Antitonic function is antitonic in respect to vertex 0.

Generating Monotone (isotonic) Boolean Functions


To find the isotonic Boolean functions of n variables, we consider each n-1-variable isotonic function X and adjoin to it any other n-1-variable isotonic function Y such that X U Y = Y.
n=1 n=2 0000 0001 0011 0101 0111 1111 n=3 00000000 00000001 00000011 : : 01111111 11111111

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

Dual and Self-Dual Functions


The function F(X) is called self-dual function 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.

Dual and Self-Dual Functions


xyz 000 001 010 011 100 101 110 111

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

Dual and Self-Dual Functions


Theorem 1: There are 2
2 n 1

Dual and Self-Dual Functions

different self-dual functions of n variables.

F1 ( x, y, z , t ) = xyz + t ( x + y + z ); F2 ( x, y, z , t ) = xyz + x yz + xyt + x yt; F3 ( x, y, z , t ) = xyzt + x y z t + ( xy + x z )t ; F4 ( x, y, z , t ) = xyz + xzt + xz t + x zt + x yzt .


4 6 7 0 1 3 13 8 10 11 2 12 14 15 5

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.

Definition : A self-anti-dual function is the function such that

f ( x1 , x 2 ,..., x n ) = f ( x1 , x 2 ,..., x n ).
For example,

f ( x, y ) = x y is a self-anti-dual function, since


f = ( x 1) ( y 1) = x y = f ( x, y ).
13

F4
14

Properties of Dual Functions


Theorem: Let f ( x1 ,...xn ) and g ( x1 ,...xn ) be a pair of monotone Boolean dual functions given by their irredundant disjunctive normal forms Proof:

Properties of Dual Functions (cont)

a)

if i I , j J

such that

SPi SP ' j

f ( X ) = Pi
iI

, g ( X ) = Pj
jJ

then set xi = 1, x j = 0 i I , j J . we have f ( X ) = 1 and g ( X ) = 1 f ( X ) contradiction b) If x SPi Y such that j J : x SP ' j = , f ( x = 0, Y ) = f ( x = 1, Y ),

where SP SP ' j are the sets variables of the corresponding prime i implicants of f and g respectively. Then,

a) b)

i I , j J , SPi SP ' j x SPi j J : x SPi SP ' j


15

such that

but g ( x = 0, Y ) = g ( x = 1, Y ) contradiction

16

Properties of Dual Functions (cont)

Properties of Dual Functions (cont)

Two-terminal switching network implementation

Four-terminal switching network implementation

17

18

Four-terminal switching network implementation using dual-functions


Example

Dual and Self-Dual Functions


Theorem: From each non-self-dual function of n variables f(Y) it is possible to design self-dual function of n+1 variables. Let function
F ( x , Y ) = xf (Y ) + x (Y )

be a self-dual function. Then,

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

if f(Y) is self-dual then F ( x , Y ) = xf (Y ) + x f (Y ) = f (Y )

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

Self-dual equivalence - Example


The following functions are not of the same NPN class

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.

F4 (1, y, z , t ) = yz + zt + z t ; F4 ( x,1, z , t ) = xz + xzt + xz t + x zt + x z t = xz + xt + zt + x z t ; F4 ( x, y,1, t ) = xy + xt + x t ; F4 ( x, y, z ,1) = xyz + xz + x z = xy + xz + x z; F4 ( x, x, z , t ) = xz + xzt + xz t + x zt = xz + xt + zt ;


23

24

Elementary Symmetric Functions


A function is symmetric if any permutations of variables dont change the function. The function depends only on the number of ones in the input vector on which the function is equal to one but not on the configuration of ones and zeros in the vector. The number of ones in the input vector on which the function value is equal to one is called work number of the elementary symmetric function. For functions of n variables there are n+1 different work numbers (0,1,...., n-1, n).
25 26

3 S 0 = x y z ; S13 = xy z + x yz + x yz; 3 3 S 2 = xyz + xyz + x yz; S3 = xyz;

Symmetric Functions (cont)


1 2 0 1 2 3 1 3 1 2 3
27

Arbitrary symmetric function is defined by the set of work numbers:

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)

Symmetric Functions (cont)

Isotonic symmetric function is defined by one work number:


n Mk = Sn j j =k n

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

From the other hand:


n n n Sk = M k & M k +1

Symmetric Functions (cont)


Each elementary symmetric function of n variables can be represented as a composition of elementary symmetric functions of m and n-m variables:

Example: S 2 = M 2 & M 3 = ( xy + xz + yz ) xyz =


3 3 3

= ( xy + xz + yz )( x + y + z ) = = xyz + xyz + x yz
Example:

n n Sk = S m & Sk m j j j =0

&

=
31

4 2 2 2 2 S 2 = S 2 & S 0 + S12 & S12 + S 0 & S 2 =

= xyzt + ( xy + x y )( zt + z t ) + x yzt
32

Symmetric Functions (cont)


Each isotonic symmetric function of n variables can be represented as a composition of elementary isotonic symmetrical functions of m and n-m variables: Example:

Symmetric Functions (cont)


y = (a + b + c + d ) (ab + ac + ad + bc + bd + cd ) (abc + abd + acd + bcd )abcd
1 0 0 = M 0 0 0 1 1 1 1

))

= 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

1 4 4 4 4 4 4 4 = M 1 M 2 0 & 1 = M1 M 2 0 = M1 M 2 1 = M 1 1 1 = 1 & 1 = 1 & 0 = 0 = a b c d 0 0 0 0 1 1 01 01 1 0 1 0 1 0


34

= xy + ( x + y )( z + t ) + zt

LINEAR functions
Definition : If a logic function f is represented as

Linear functions (cont)

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:

Linear functions (cont)

Theorem: A linear function is either a self-dual function or a self-anti-dual function.


(Proof) Since, x i = 1 xi , we have

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

On the other hand, if a1 a2 so, f is self-anti-dual.

f ( x1 , x 2 , , x n ) = f ( x1 , x 2 , , x n )

37

38

UNIVERSAL SET OF LOGIC FUNCTIONS


Definition: Let F = { f1 , f 2 ,..., f m } be a set of logic functions. If an arbitrary logic function is realized by a loop-free combinational network using the logic elements that realize function fi (i = 1,2,..., m),then F is universal. Example: Both xy and x y, xy, x are universal.

CLASSES OF LOGIC FUNCTIONS Table showing functional properties.

{ }

{x y, xy} is not universal.

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.

Post Theorem : Let

/ Then, the set of functions F is universal iff F M i (i = 0,1, 2,3,4).


39 40

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

Post Theorem -Proof of the sufficiency


FRANCIS JEFFRY PELLETIER and NORMAN M. MARTIN, Post's Functional Completeness Theorem, Notre Dame Journal of Formal Logic Volume 31, Number 2, Spring 1990

Post Theorem -Proof of the sufficiency (cont)


Lemma 1: Given f1, f2 , and f3 we can define negation. Proof: f1*(1)=0

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

Post Theorem -Proof of the sufficiency (cont)


Lemma 2: Given f1, f2 , f3 and f5 we can define the constants Proof: Given f1, f2 , and f3 we have negation f5 is not self-dual there exists a Y s.t. f5(Y)=f5(Y) Define f5(p)=f5(p1,..,pn ) where pi=p if yi=1 and pi=p if yi=0. Since f5(p)= f5(p) we have a constant.

Post Theorem -Proof of the sufficiency (cont)


Lemma 3: Given f1, f2 , f3 , f4 and f5 we can define two-place function with an odd number of 1s in its truth table

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

Post Theorem - Proof of the sufficiency (cont)


Theorem : Given f1, f2 , f3 , f4 and f5 all (2-valued) truth functions can be generated Proof: There are four NPN classes Class 1: constants (Lemma 2) Class 2: Single variable Class 3: functions of odd number of 0s (Lemma3) Class 4: linear functions that can be constructed by using functions from the first three classes

Post Theorem -Proof of the necessity


Each of the five properties "inherits upwards" in the sense that if all available connectives have that property then any compound made up from them must have it also. Definition: depth of embedding of the number of truth functions within a given truth function: A simple sentence letter has depth of embedding 0; The function f(g1(x1,..xi),, gn(x1,..xk) ) has depth of embedding (1 + max(depth of embedding of gj)).

45

46

Post Theorem -Proof of the necessity (cont)


Lemma 4 Being closed under T (1-preserving ) is upwards inherited. Proof by induction: Let { fi } a class of functions all of whose members are closed under T. For induction, assume that every function made from this class with depth of embedding <n will yield a 1-preserving function. We prove that any function from this class with depth of embedding n will also yield a 1-preserving function. Any function f with depth of embedding n will look like f(g1(x1,..xi),, gn(x1,..xk) ) where the greatest depth of embedding of any of the g 's is (n-1). Therefore, by the inductive hypothesis, each gi yields T if all the sentence parameters are T. But since/ itself is closed under T, then it too must yield T in this circumstance. Lemma 5 Being closed under F (0-preserving ) is upwards inherited.
47

Post Theorem -Proof of the necessity (cont)


Lemma 6: Being monotonic is upwards inherited. Proof by induction: Suppose we are given a class of truth functions all of whose members are monotonic. For induction assume that every function gi with depth of embedding <n made from this class has the property: if Y<Z then gi(Y) gi(Z) We prove that this holds of all functions from this class with depth of embedding n. Any function f with depth of embedding n looks like f(g1(x1,..xi),, gn(x1,..xk) ) where the greatest depth of embedding of any gi, is n-1 Suppose there are q distinct variables in this function, and that we have two rows of a truth table Y=(y1,y2,,yq) and Z=(z1,z2,,zq) such that Y<Z. Then, f(Y) = f(g1(Y),, gn(Y) ) f(g1(Z),, gn(Z) )

f(Z)
48

12

Post Theorem -Proof of the necessity (cont)


Lemma 7: Being self dual is upwards inherited. Lemma 8: Being linear is upwards inherited.

F M i (i Lemma 9: Let functions, then the function

= 1, 2,3, 4,5) be a set of f = ( xy ) ' cannot be realized by F.

Proof is by upwards inherited properties. Notice that

f M i (i = 1, 2,3, 4,5)

49

13

Potrebbero piacerti anche