L I B HAR.Y OF THE U N IVLR.SITY Of ILLINOIS 510.84 IZ6T no. 265-270 cop. 2 The person charging this material is re- sponsible for its return to the library from which it was withdrawn on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University. UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN MAY 1 1974 M 4Y 2 6 1974 JUNl m 31 1919 ,: MAY 3 REM L161 — O-1096 Digitized by the Internet Archive in 2013 http://archive.org/details/approachtogenera265bree -to.* 1 * ■Jib /J Cof.Z Report No. 265 n 3,00 - AN APPROACH TO THE GENERAL SYNTHESIS OF A THRESHOLD ELEMENT NETWORK by Kenneth James Breeding, Ph.D. 1 if 6 September 30, 1967 l+T DEPARTMENT OF COMPUTER SCIENCE • UNIVERSITY OF ILLINOIS • URBANA, ILLINC 411 1 8 B88 Report No. ^6? AN APPROACH TO THE GENERAI SYM HI OF A 'THRESHOLD ELEMENT NETWORK by Kenneth James Breeding, Ph.D. September 30 ±967 Department of Electrical I Qnivea i hana, Iliinc i 6i~-270 AN APPROACH TO THE GENERAL SYNTHESIS OF A THRESHOLD ELEMENT NETWORK Kenneth James Breeding, Ph.D. Department of Electrical Engineering University of Illinois, 1968 In the past several years threshold logic has received much attention. This interest is generated primarily by the ability of threshold elements to realize more complex logical functions then the "AND" and "OR" and thus more economical logic networks are possible. This dissertation investigates an approach to the general synthesis of a network with threshold elements using approximating functions called minimal threshold approximations. The minimal threshold approximation or M function of a given switching function is a threshold function having the smallest set of true and false vectors which are false and true vectors respectively of the given switching function. A mixed integer linear programming formulation is given for the determination of M functions. Some of the algebraic properties which hold between a given function and an M function are investigated. A class of less restrictive approximations called T/M and f/m functions is investigated. A synthesis procedure is described for both forms of approximations. A subclass of the class of threshold functions, called simple functions, is investigated. Based on simple functions a test for threshold realizability is given. Finally a procedure is given for synthesizing networks of threshold elements each element of which has a restricted number of inputs. ACKNOWLEDGMENT The author wishes to gratefully acknowledge the invaluable guidance and constructive suggestions offered by his advisor, Professor S„ Muroga, during the preparation of this thesis. The support of the Department of Computer Science, University of Illinois and the Radio Corporation of America is also gratefully acknowledged. in IV TABLE OF CONTENTS CHAPTER PAGE 1 INTRODUCTION 1 1.1 Introduction 1 1.2 Basic Definitions 2 1.3 M Function Determination 7 2 PROPERTIES OF MINIMAL THRESHOLD APPROXIMATIONS l6 2.1 Introduction 16 2.2 Properties 17 2.3 T/M and f/m Functions Uo 3 SYNTHESIS BASED ON M FUNCTION FACTORIZATION ^7 3-1 Introduction k"J 3.2 Problem Reformulation ^7 3-3 Synthesis Procedure 50 3>k T/M, F/M Synthesis 62 U SIMPLE FUNCTIONS 68 k.l Introduction 68 h.2 Simple Function Properties 68 5 APPLICATIONS OF SIMPLE FUNCTIONS 8k 5.1 Introduction 8U 5-2 Test for Threshold Realizability Qk 5-3 Synthesis of a Network Under Fan In Restrictions 93 6 SUMMARY 101 References 103 VITA 105 CHAPTER 1 INTRODUCTION 1.1 Introduction Over the past ten years an increasing interest in the concept of threshold logic has "been generated [8]*. This interest stems primarily from the desire of logic designers to have switching elements which are capable of realizing more complex switching functions than the NAND, NOP _, AND, and OP, Threshold logic meets this requirement in part. However, a single threshold element is incapable of realizing all of the switching functions. For example, only 3% of the h variable switching functions are threshold functions and only 0.002$> of the 5 variable functions are thresh- old functions. Thus the problem becomes one of synthesizing a network of threshold elements which realizes an arbitrary switching function. This may be termed the general threshold, synthesis problem, Most of the approaches to the general threshold synthesis problem attempt to determine a threshold function which in some sense approximates the given switching function, This is done as a means of obtaining a realization as, for example, in the approaches of Minnick [9], Gonzolez [5] and others [12,15,17].. In this paper we will investigate an approximation which minimizes the number of true and false vectors which are false and true vectors respectively of the given function. Such an approximation will he termed a minimal threshold approximation or more simply an M function with The numbers which appear in brackets refer to the references. respect to the given switching function"*. We will i" ■ approximation may be found using a mixed integer linear programing for- lation. We will then investigate some of the properties of M functioi and show how they may be used in the general threshold synthesis pi 1.2 Basic Definitions Before presenting the basic definitions a word about notation is in order. A switching function en n variables will be denoted as f(x, ,...,x ) or f(x) and will be considered as a mapping from (0,1} (o,l}. The vector a = (a , „ , . ,s. ) with a. e (0,1}, i = 1* ••> n > will be called a true vector of f(x) if f(a) = 1 and will be called a false vector of f(x) if f('a) = 0. Furthermore for f(x) a switching function n variables we will define the following sets: A(f) = (a|f(a) = 1} B(f) = (b|f(b) = 0} D(f) = (d|f(d) is unspecified} , Definition 1.2.1 : Let f(x) be a switching function on n variables. Then f(x) is a threshold function if and only if there exists a real vector w = (w, ,...,w ), called the weight, vector, and a real number t, called the threshold, such that i=l and 1 i E w.a. v " > t for all a'^ w <= A(f *Gonzolez [5] has termed this type of approximation a best threshold approximation, Ew.b. lKi < t - £ for all b liW e B(f) i=l ^ X where 6 is an arbitrary positive real number. The vector [w-, , ..., w ;t] will be called a separating vector or a structure for f (x) . Figure 1.2.1 shows the model for a threshold element. Figure 1.2.1 : Model for the threshold element which realizes the threshold function f(x) having a structure [w- 1 j..,'W ;t]. Unless otherwise stated, if f(x) is a switching func- tion on n variables we will assume that f(x) is a switching func- tion on exactly n variables, if f(x) is a threshold function, then there exists a hyperplane, H, on the Boolean n-cube which separates the sets A(f) and B(f). The hyperplane, H, may be represented by a separat- ing vector [w;tj. For any given separating hyperplane on the Boo- lean n-cube there exists two sets of points, namely and (1.2.1) H^ = [x/w.x > + ) (1.2.2) . H" = [x/w.x < t - e) Thus if f(x) is a threshold function, there exists a separating hyperplane, H, such that* * In (1,2.3) to (1.2.6) the set inclusion is indicated because the function f(x) may be incompletely specified. (1.2.3) A(f) c H+ and (1.2.10 B(f) 5 H" In general f(x) may or may not be a threshold function. For this general case consider an arbitrary separating hyperplane, H, on the Boolean n-cube. Then two sets of points will be defi as follows and (1.2.5) A n (f) U Bjf) c H+ where and l v ' 2 V ' - t (1.2.6) B (f) U A (f) 5 H" 1 d ij (1.2.7) A(f) = A (f) U A 2 (f) (1.2.8) B(f) = B L (f) U B g (f). Corresponding to the hyperplane, H, on the Boolean n-cube there will be a threshold function, h(x), whose structure is given by the separating vector of H. Thus the sets A (f) and B (f) may be defined as (1.2.9) A (f) = A(f) B (h) and (1.2.10) B (f) = B(f) fl A(h). As was mentioned in section 1.1, we would like to de- termine a threshold function, h(x), such that the order of the set A (f) U B^(f), defined by (1.2.9) and (1.2.10), is minimized. Thus we have the following definition. Definition 1.2.2 : Let f(x) be an arbitrary switching function on n variables and let h(x) be a threshold function on n variables, Then h(x) is a minimal threshold approximation of f(x) or simply an M function of f(x) if no other threshold function, h (x), exists such that* A(f) n B(h 2 ) U B(f) fl A(h )| < |A(f) n B(h) u B(f) n A(h)| . Definition 1,2.3 * Let f(x) be a switching function on n variables and let h(x) be an arbitrary threshold function on n variables. Then the sets (1.2.11) S(h) = A(f) n B(h) and (1.2.12) R(h) = B(f) n A(h) will be called the sets of trug_ and false residual vectors of f(x) with respect to h(x) respectively. Example 1.2.1 : Let f(x , x ) = x.x ^ x n x . Clearly f(x) is not a threshold function. For this function there are four possible M functions of f(x), namely ^(x) = x 1 x g h 2 (x) = x^ h 3 (x) = X X v x 2 * The order of a set S will be denoted as S h k {x) = x x -x 2 „ For this set of M functions we have the following sets of residual vectors : S(h 1 ) -((0,1)1 R (h 1 ) = £ S(h 2 ) - {(1,0)}, R(h 2 ) = h S(h 3 ) = ^ , R(h 3 ) = ((1,1)} S(h^) = /£ , R(h^) = ((0,0)}. Example 1.2.1 illustrates the fact that an M function of a given function is not unique, however if f(x) is a completely specified threshold function then the only M function of f (x) is f(x) itself and thus is unique. If f(x) is incompletely specified then we may have more than one M function cf f (x) . In either case S(h) = R(h) = p 7 where h(x) is an M function of f (x) , Definition 1,2.^- : Let f(x) be an arbitrary switching function on n variables and let h(x) be an M function of f (x) . Then f(x) is said to be of res idual order k if |s(h) U R(h)| - k. We will denote the residual degree of f(x) as P.f). f(x') is said to be of true (false) residua.! degree p with respect to h(x) , denoted :\(f) (pf(f) ), if |s(h)| = p R(H)| = p) Exa m ple 1.2.2 : For the function f(x ,x ) of example 1.2.1 we see that P(f) = 1 and that P* (f) = P* (f) = p" (f) - P~ (f) =1 the h, ^p n -5 k others being zero, Example 1.2.2 illustrates the fact that although the re- sidual degree of a given switching function is unique the true and false residual degrees are directly dependent on the M function chosen, 1,3 M Function Determination Let us next consider the problem of determining an M function of a given function f (x) . Let f (x) be an arbitrary switching function on n variables and let h(x) be an M function of f(x)„ In attempting to find h(z) given f(x) we must try to find a separating vector [w;t] such that n ( " ) ( - ) (1.3.1) £ a. U V > t for all a j; € A(f) . , i 1 - v ' i=l and (1.3.2) E b. l ' k) w. < t - € for all b* (k) e B(f). 1=1 X 1 One method which may be used to determine a solution to the system of inequalities (1.3.--) and (I.3.2) is linear programming* [9,12,15]. The application of linear programming requires that all of the variables be non-negative. Since w., 1=1,2, . ..,n, and t are real numbers we may let (1.3.3) w.= w j - w i , 1=1,2, . ..,n and (1.3A) t = t + - t" + — + - where each of the w., w., t and t are nonnegative real numbers. Thus the set of inequalities (1.3.1) and (1.3=2) may be rewritten * For an introduction to the technics of the general linear program- ming problem see [k], as (1.3.5) S (w| - w7)a. (j) > t + -t~,a (j) e A( . 1=1 and (1.3.6) Z (w?-w7)b. (k) < t + -t~-e, b (k) s-B(f). . n i i i i=l The system (1.3.5) and ( 1.3.6) may be converted to a normalized form by dividing through by 6 and making the transformations w/e ► w and t/e V T» Thus we have the normalized system of inequalities (1.3.7) Z (w+ - v")a ± (j) >T + - T",a (j) 6 A(f) i=l and (1.3.8) Z (v+ - w~)b. (k) <(T + -T"') -1, T) (k) £ 3(f). i=l The set of inequalities (l.3>7) and (1.3-8) may now be converted into a set of equalities as follows: (1.3.9) Z (w%w7 )a. (t5) -(i)d.=(T + -T")-l/2, t'^e A(f) i-1 x 1 X J and (1.3.10) Z (w!-w7)b. (k) + J c v =(T + -T")-l/2, : b (k) eB(f). -Ill K 1=1 If our goal in solving the system of inequalities (1.3-9) and (1.3.10) is to check whether f(x) is a threshold function or not. then the d and c, would necessarily be required to be non- j k negative real numbers, however we are trying to determine an function of f(x) and thus in general not all of the true vectors of f (x) will be true vectors of h(x) . A similar statement holds for the false vectors of f(x). Thus if a r :A(f) but a €B(h) then this fact must be reflected in the inequalities. This may be ac- complished by allowing the d. and c to be real numbers of unre- J k stricted sign. Thus if d.>l, the corresponding vector, a , will J be an element of A(h) and if d. < -1 then a will be an element J of B(h)„ Similarly if c > 1 } the corresponding vector, b , is an element of B(h) and if c < -1 then b is an element of A(h)„ Thus in order to minimize the order of the set A (f) U B (f) of (1.2.9) an( i (1-2,10) the number of c, and d. which are less then k j or equal to -1 must minimized, It may happen that for some j or k either -1 < d. < 1 J or -1 < c n < 1. k In either case the corresponding vectors^ say x , will satisfy the inequalities T - 1 < w . x v J ; which result from (1.3-9) and (l„3°10). This means that the vector x is neither classified as a true vector nor a false vector of h(x) . In order to remove this difficulty we will require that jdj > 1 and Jc j > 1 for all j and k. These further restric- tiers may be met by adding the following constraints to those of (1.3-9) and (1.3. 10): (1.3.11) a, > v[ - u^j (1.3.12) d. < -Q (J) + U.P. (J) j X -La. and (1.3.13) l} J; + Q~, = 1 where P, and Q) are nonnegative integers and U is a sufficiently large positive real number and (1.3.1*0 c k >Q< k) ■ U 2 P^ k) (1.3.15) c k < -P^ k) + U 2 Q^ k) and (1.3.16) p^ k) + <4 k) - 1, (k) (k) where Pp and Q p are nonnegative integers and U~ 13 a suff icier. ~'0 large positive real number,, From (] 1_3), ¥-,''. -U, and d. < -1, Coi r, if Q: ,J = a P^ J ^ = 1 then d. > 1 and d. < U., , Thus Id.j > 1 as • red. 1 J - J " 1 j' Similarly it is seen that (I.3.IU) to (l.3,l6) yield |c \ > 1. If (1.3.11). (1.3.12), (1.3.1^) &r:d (l 3,15) are substituted into (1.3. 9) an d (l... 3»10)«, the I I ing set of inequall ties results : (1.3.17) 2 Z (w! - wT) a?^- 2(T + -T")> Pp^-U 1 o[ J i=l (1.3.18) 2 Z (wT - wT) a.\^ - 2(l + -T") < -d j) - J n P< '' -1 1=1 for all a (j ^ £ A(f) and (1.3.19) -2 E (w%7)t; k) + 2(i + i°)>Q^ k: I .0 9 i=I i i i " — 2 (1.3.20) -2 Z (v + - w7)b( k) + 2(T + -T~) < -P^ + U.,Q^ } 4- 1 . , i 11 — 2 2 £ for all b v ; e B(f). A further simplification may be obtaine g (l,3«13) and (l,3'l6). The inequalities for the final mixed integer linear programming formulation for the determination cf h x), an M func- tion of f(x), becomes : 10 (1.3-21) 2 E (w! - wT) a( j) - 2(T + -T") > -Q (j) (l + U ) v . . i 11 - 1 r i=l (1,3.22) 2 E (v+ - v") ap } -2(T + -T") < U -Qp } (l + U ) 1=1 - 1 (13-23) -2 E (w+ - w-)b[ k) + 2(T + -T") > 2 - P^ k) (l + U ) i=l (1.3-24) -2 E (w + -w7)b; k) + 2(T + -t") < u o ^ k) (i + u ) . , l l l "2 2 2 ^^ + 1 for all a^'e A(f) and b'^ £ E(f) and (1.3.25) QJ' J; < 1, Q., u; nonnegative integer (1.3=26) Pp < 1, Pp nonnegative integer and where U and IL are sufficiently large positive real numbers and where w., w. s T and T are nonnegative real numbers for all 1' i' i = 1,2, . . .,n. In order to illustrate the mechanics of inequalities (1.3.21) to (1.3.26) consider inequalities (l.3.2l) and (1.3.22). From (I.3.25) we bave that Q^'e 1 0,1}. Now if QJ^ ' = for some j, then (1.3.22) is no longer a constraint.. However (1.3.21) becomes (1,3.27) E (wt - wT) a. (j) > T + - T and the corresponding vector,, a , becomes a true vector of h(x ) , Conversely., if q} = 1 then (l.3»2l) is no longer a constraint bui (1.3.22) is. Inequality (I. 3 ^22) becomes (1,3,28) E (wt - w7)a{ j) < (T + - T") - 1 . , 1 11 1=1 / , \ and the corresponding vector, a , becomes a false vector of h(x) « Similarly for the inequalities (1.3.23) and (1,3-24)., From this argument the sizes of "J, and IL mus 1 -L d choose n to he larger then the maximum size of the left hand side of inequalities (l.3»2l) to ( 1.3-24). Furthermore it is clear that we may set U, = U = U. We may obtain a rough bound on the size of U from the following theorem due to Muroga [ 12 ] . Theorem 1.3-1 - Any positive threshold function cf up to n variables may be realized by choosing nonnegative ratio: number weights,, w. 's, bounded by 2Max (E |wT - w7|) + 2 Max|T + - T"| 1=1 X X > 2 Z (w! - w7)a( j) -2(T + = T") . , 1 11 i=l or from theorem 1.3.1 we have that (1.3-30) U > 2 + (6n + 2)[(n + l)A] (n + ~ L) < 2 ° It may be seen that for a hyperplane H which has a separating vector [w;T] satisfying (l„3°2l) to (I.3.26) that 12 (1.3-31) £o£ j) + Z f ] = |A 2 (f) U B 2 (f)|. -.1 k The objective in the solution of inequalities (1.3.21) to (1.3.26) thus becomes the minimization of (l,3°3l)° Thus the objective function for this mixed integer linear programming formulation becomes* (l.3„32) Minimize z = 1 of J ' + E p£ k '. Thus the system of inequalities (1.3° 21) to ( 1.3° 26) and (lo3.32) forms the mixed integer linear programming formu- lation for the problem of determining an M function of f(x"). Further, the function which corresponds to a separating vector [w;T] which satisfies these inequalities is h(x), an M function of f(x). * In order to improve reliability in the realizing element it may be shown [llj that the value of T should be minimized. Thus when we want to have a more reliable realization^ the objective function of ( 1.3-32) must be changed to Minimize 1 = T + + T~ + E(Z oi + £ P-, ) where E is a sufficiently large positive real number. In this case E must be much larger than the maximum of T + T , that is E > > T + + T~. 13 CHAPTER 2 PROPERTIES OF MINIMAL THRESHOLD APPROXIMATE] 2.1 Introduction Let f(x) be an arbitrary switching function on strictly n variables. In general the fui f(x) factored as (2.1.1) f(x) = h(x)r(x) s(x) where h(x) is an arbitrary threshold function. For completely specified functions we will define r(x) and s(x) as (2.1.2) A(r) - A(f) U B(h) (2.1.3) B(r) = B(f) A(h) (2.1A) A(s) = A(f) B(h) (2.1.5) B(s) = B(f) U A(h). The Venn diagram of figure 2.1.1 illustrates the sets (2.1,3) to (2.1 S] (x) where A(s ) - B(r), B(s ) - A(r) and A(r ) = B(s), B(r 1 ) - A(s). Theore m 2.2.2 : Let f(x) be an arbitrary switching function on n variables. If h(x) is an M function of f(x), then ii(x) is an M function of f(x) with an M function factorization of (2,2.1) f(x) = h(x)s(x) V r(x), where r(x) and s(x) are the false and true residual functions of f(x) with respect to h(x) respectively, 15 Proof : Let h(x) be an M function of f(x) v factorization of f(x) = h(x)r(3c) v s (x ) . By lemma 2.2.1,, f(x) ma.y "be factored as (i) f(x) = h(x)s(x) v r(x) From (2.1.3) 8 - r -d (2.1 A) it is clear that the total number of residual vectors is not changed by complimenting h(xj and f(x). Thus h(x) must be an M function of f(x) for otherwise h(x) could not be an M function of f(x), ar, (i) is thus an M function factorization of f(x). Q.E.Do Example 2.2.1 : Let f(x <,x ) = x. x v x x Then one of the possible M functions of f(x) is b(x) = x v Xg as shown in example 1.2.1. Consider the function f(x) = x x x 2 v X-jXg. f(x) has four possible M functions,, namely h^ (x) = x x x 2 hgCx) = x x x 2 h (x) - x y' x 2 h^(x) - x 2 v x g . Among this set of M functions we see that h (x) = h(x) From theorem 2.2.2 and equations (2.1.2) to (2.1.5) it is easily seen that 16 (2.2.2) A(a) = A(f)U B(h) (2.2.3) B(s) = B(f) A(h) (2.2.4) A(r)= A(f) n B(h) (2.2.5) B(r) - B(f) U A(h). By comparing (2.1.2) to (2.1.5) with (2.2.2) to (2.2.5) it should be noted that the roles of the residual functions are reversed. For example if s(x) is a true residual function of f(x)then s(x) becomes a false residual function of f(x). We will next investigate the relationships which exist between a given function and its M function and their duals . Not at ion 2 „ 2 . 1 : Let f(x) be an arbitrary switching function on n variables. The notation f(x|x 1 -s) will mean that the variable x. of f(x) is to be replaced by z. Lemma 2.2.3 ! Let f(x) and g(x) be two arbitrary switching functions on n variables. If* f(x) 5: §(*) then f(x|x.~*x.) 5 g(x|x i " & x i ). Lemma 2.2.4: Let f(x) be an arbitrary switching function on n variables. If the function f'(x) = f(x|x -> x.) then 1 x |A(f)| = |A(f )| and |B(f)| = |B(f')|. Lemma 2.2. 5: If f(x) is a threshold function on n variables then f'(x) = f(x|x. -* x. ) is also a threshold function on * We will use the notation 5r as t ^ ie Boolean implication relation when associated with functions. 17 n variables. Theorem 2.2.6 : Let f(x) be an arbitrary switching function on n variables. Let h(x) be an M function of f(x). T . h'(x) = h(x|x. -> x. ) is an M function of f'(x') = f(x|x.-»x.). Proof : Let h(x) be an M function of f(x) with an M function factorization of (i) f(x) = h(x)r(x) v s(x). By lemma 2.2.3, f'('x) = f(x|x.-»x.) may be factored as (ii) f'(x) = h'(x)r'(xVs'(x) where the primes indicate that x. has been replaced by x . By lemma 2.2.^- and equations (2,1.3) and (2.1 A) the total number of residual vectors in (i) and (ii) is the same. Thus since h/(x) is a threshold function, by lemma 2.2.5;- h x (x) must be an M function of f (x) for otherwise h(x) could not be an M function of f(x), Q.E.D. Corollary 2.2.7 : Let f(x) be an arbitrary switching function on n variables. Let h(x) be an M function of f (x) . Then h(3? x. -> x. »..,x. -*■ x ), k < n,is an M function of l l i — I __ 1 k_ k fix x. -*x. ,..,x. ->x. )„ In In 1, 1, II k k Theorem 2.2.8 : Let f(x) be an arbitrary switching function on n variables. If h(x) is an M function of f(x)j, then h (x) is an M function of f (x) . 18 Proof: It is well known that f (x ', . , } x )= f(x) = f (x) . Let h(x) be an M function of f(x). Then by theorem 2.2.2,, h(x) is an M function of f(x). Finally by corollary 2.2»7> h(x) is an M function of f(x) . Q.E.D. Example 2.2.2 : Let f (x) = x x v x x, . An M function of f(x) 13 Now h(S?) = x x x g v x-jX x^ v x £ x x^ f (x) - X^ V x^ v XgX- V XgX^. One of the possible M functions of f v x ) is h^x) = x x x 2 v x-jX v x^ v x 2 x_ v y^x^ = h (x) . C d To see that h(x) and h (x) are M functions of f (x) and f (x) respectively we observe that neither f(x) nor f (x) are thres- hold functions but that for h(x) and h (x) we have |s(h) U R(h)| = |S(h d ) U R(h d )| - 1. .om (2.2.1) and theorem 2.2.8, f G '(x) has an M function factorization of (2.2.6) f d (x) - h d (x)s d (x)vr d (x). Furthermore from (2.2.2) to (2.2.5) we have t hat (2.2.7) A(s d ) = A(f d ) U B(h d ) (2.2.8) B(s d ) = B(F d ) A(h d ) (2.2.9) A(r d ) = A(f d ) B(h d ) (2.2.10) B(r d ) = B(f d ) U A(h d ) . We will show in what follows that any M function of a given self dual switching function is also self dual. 19 Lemma 2.2.9 [ 1^- ] • Let f(x) be an arbitrary threshold fund d d on n variables. Then either f(x) e f (x) or f I : f(3 Lemma 2.2.10 : Let f(x) be an arbitrary switching function on n variables. Then a e A(f) if and only if a £ B(f ). Proof: Let a e A(f(x)). Since A(f) = B(f) we have thai 6 B(f(x)). Thus a € B(f(x)) = B(f d ). The proof of the converse is similar, Q.E Theorem 2.2.11 : Let f(x) be an arbitrary switching function on n variables and let h(x) be any M function of f (x) . If f(x) <=■ f d (x) then h(x) 5 h (x) . Proof : Let h(x) be an M function of f(x) and assume that f(x) c f (x) . By lemma 2.2.9 since h(x) is a threshold func- tion then either h(x) 5" h' i (x) of h (x) c h(x) . Assume that h (x) e h(x) . This situation is illustrated in figure 2.2.1^ from which we will define the sets R = A(f) A(h) n B(h d ) d 1 r' = B(f") n s(h a ) n A(h) R 2 = A(f) n B(h) R^ - B(f d ) n A (h d ) r^ = B(f) n A(f d ) n B(h) Rf - A(f d ) n B(f) n A(h d ) r c = B(f) n A(f d ) n B(h d ) n A(h). 5 20 Figure 2.2.1: Venn diagram illustrating the proof of theorem 2,2.11. By inspection it may be seen that every pair among the sets R V .,R',R -J- j ; are disjoint. Furthermore from lemma 2.2.10 it is easily seen that |r.| = |r!!|, i = 1,2,3. If f(x) Is a threshold function xhen f(x) = h(x") by definition of an M function and the theorem is trivially true. Therefore assume that f(x) is not a threshold function and thus that f(x) p h(x) . Thus R 4 Let f(x) = h(x)r(x) ^s(x) be an M function factorization of f (x) . Then clearly A(s) = R 2 B(r) = R' U R ' U R» U R^ and therefore the total number of residual vectors is |r 1 ! + 2|r 2 | + |r 3 | + |r_|, Next consider the factorization f(x) = h (x) r 1 (x) ^ s 1 (x) wnere and Then a( Si ) = A(f) n B(h d ; i(r 1 ) - B(f) fl A(h d ) A(s 1 ) = R 1 U R 2 B( ri ) = R^ U R^. Thus the number of residual vectors for this factorization is 21 i^l + 2|r 2 | + |r 3 | < |Rj + 2|r 2 | + |r 3 | + |r_|. But this contradicts the assumption that h(x) Ls an M function of f(x). Therefore h(x) 5 h (x) . Q.E.D. In general if f(x) c f (x) it is possible that h (x) h(x) as the following example shows « Example 2.2.3 : Let f(x) = x x g x v x x x v x x x_ with f (" xx v- x,x "v x x_ v x.x x^. Then f(x) e f (x). An M function of f(x) is h(x) = xx v yx v x x = h (x) . Thus an M function of a given function may be self dual although the given function is not„ Corollary 2.2.12 : Let f(x) be an arbitrary switching function on n variables. Then p(f) = p(f "). Corollary 2.2.13 : Let f(x) be a switching function on r. variables such that f(x) c f (x) . Let h(x) be an M function of f(x) with corresponding residual functions r(x) and s(x). Then s(x) ^ s (x) and r (x)^ r(x). Proof : The proof of s(x) 5 s (x) comes directly from (2.1 A) and (2.2.8). By theorem 2.2.11 if f(x) <= f (x) then h(x) 5 h (x) . Thus from (2.2.9) A(r d ) = A(f d ) fl B(h d ) c A(f d ) n B(h) ^ A(r) from (2.1.2). Thus r d (x) e r(x). Q.E.D. 22 Lemma 2.2.1 ^: Lex f(x) "be a self dual switching function on n variables and let h(x) be an M function of f(x). If h(x) = h (x) then r(x) = s (x) where r(x) and s(x) are the residual functions of f (x) with respect to h(x) . Proof • Let f(x) = f d (x) and h(x) - h d (x) where h(x) is an M function of f (x) . From (2.1.2) A(r) = A(f) U B(h) = A(f d ) U B(h d ) = A(s d ) from (2.2.-7). Thus r(x) ^ 3 d (x) . Q.E.D. We will next investigate the existence of a self dual M function of a given self dual switching function. D efinition 2.2.1 [7] ° Let f(x) be an arbitrary switching function on n variables. Then the function f Sd (y,x) - yf (x,v vf d (x) is a self dual function and will be called the s_elf dualized function of f(x ") . The variable y will be called the dualizing variable . Lemma 2.2 .13 [l^-l : Let f (x) be a non self dual threshold func- tion on n variables. Then the self dualized function of f(x) is also a threshold function. L emma 2.2 .1.6 [17] : Let f(x , ..,x ) be a threshold function on n variables with a structure Lw_..„,w ;T] . Then the 1 n' fu.ncx.ion f(xlx. -* l) is a threshold function with structure [w n ,..,w. n ,0.w. n ,..,w iT - w.] and the function f(x|x.-*0) is 1 ' l-l l+l n i i 2.Z a threshold function with structure I i-± l+l r. Lemma 2.2,17 : Let f(x) be an arbitrary switching function on n variables and let h(x) be an W function of f (x) . Then the sd self dualized function h (y,x) of h(x') is an M function of the self dualized function f S (y,x) of f (x) . sd Proof : Let f (x) be factored as f Sd (x) = x 1 f 1 v^ f * where f, and therefore f., are independent of x, . Let k. be 1 1 X j_ an M function of f and consider the self dualized functic h Sd (x) of h^ h sd (x) = x.h, V x_h?. 11 11 3d, . By lemma 2.2.15, h (xj is a threshold function and thus sd f (x) may be factored as (i) f Sd (x) = x 1 f 1 v x x f d = (x 1 h 1 v i ih d) {x ^ v x^) v (x L s 1 ^rJ) where r, and s, are the residual functions of f with respect to ho If h (x) is an M function of f (x) then the theorem sd /_,\ sd / ^.\ is proved. Thus assume that h (x) is not an ^ function of I (x). _ ' s d Let g(x) - x-.g.. v X- g_ be an M function of fix), Then f (x) 1 i. i. 2 has an M function factorization of the form (ii) f Sd (x) = x^ V^fJ - (x 1 g 1 v x. J g 2 )(x 1 u 1 V x± u 2 ) V (x^ v x ± v 2 ) where 2k (iii) |A(x lVl V x^v 2 ) u BCx^ v x u )| - d. Clearly < |A(x lS;L v Xl r x ) U BU.^ V Xl s^)|. A(x lVl V x x v 2 ) n B(x lUl V x x u 2 ) = A(x lSl V Zf*) n B(x ] _r 1 V x^) = /5 and in general A(x x p) A(x x q) - B(x lP ) D B^q) = j> where p and q are switching functions independent of x . Thus (iii) may "be rewritten as (iv) |a(x iVi )| + |a( X;l v 2 )| + |b(x 1 u 1 )| + |b( Xi u 2 )| <|A(x lSl )J + |A( Xi r^)| + |B(x iri )| + |B(x lS J)| But |A(x p)| = 1/2 |A(p)|. Thus (iv) may be written as (v) 1/2 |A(v 1 )|4- l/2|A(v 2 )| +l/2|B(u 1 )| +l/2|B(u 2 )| a „ Then (vi) implies that b < t . But from (i) and (ii), upon setting x_, = 0, we have f, = h. s n v r n = k^u^ v v„ But b., < b d d 1 "1 S 1 '1 B 2~2 "1 d d implies that tL is not an M functionof f. . A contradiction by theorem 2 .2. 8. sd Thus h (x) must be an M function of f (x) . Q.E.D. Theorem 2.2.18: Let f(x) be an arbitrary self dual switching on n variables. Then any M function, h(x), of f(x) is self dual. Proof: Let f(x) = f (x) be a. self dual switching function on n variables . Let h(x) be an M function of f (x) . If h(x) is self dual then the theorem is true. Assume, therefore, that h(x) f h (x) . Consider the self dualize ctions of f(x) and h(x), and f Sd (v,x) = yf(x) v/(x) = f(x) = f d (x) h (y,x) = yh(x') V y h (x) 26 By lemma 2.2.17> h ^(y,x) is an M function of f (y,5c). sd, N Since f (y^xj is independent of y then clearly any M sd. . sd. . function of f (y,x), h (y,x), must also be independent of y. Thus h(x) = h (3c) . Q.E.D, Example 2.2.4: Let f(x) = X-.x^X-X, V v x,_x_X] v x_,x x., ■ ^ ■ 12 3 4 12 3 4 124 V x^x^ V x^x^ V x 2 x 3 x 4 V x^x^ V x^x^^ = f (5c)'. One of the possible M functions of f (5c) is h(x) = x^(x 2 v x p V x ) V x.x 2 x = h (3c). Furthermore S I X y ~~ X-, X — X— Xi 1234 and r(x) = x v x v x V x = s (5c) Finally we note that p(f) = 2 and that p*(f)=p~(f) = 1. Example 2.2.4 illustrates the following results. It is well known that if g (x) .= gT(5c), where g, (3c) and g (5t) are arbitrary switching functions, then a £ A(g ) if and if a 9 - B(g Q ). Thus we have the following lemma. Lemma 2.2,19 : Let f(3t) be a self dual switching function on n variables. Let h(x) be an M function of f(5c) with corresponding residual functions r(x) and s(3c)„ Then j A ( s ) ] = JB(r)j. Proof : Let h(x) be an M function of f(5c) = f (3c). By theorem 2.2.18 h(x) = h d (3c) and therefore by lemma 2.2.14 r(5c) = s (3c) . 27 Thus there is a one to one relationship be . vectors of A(s) and B(r). Thus | A ( s ) j = |fi(r)|. Q.E.D. Corollary 2.2.20 : The residual degree of a self dual switching function is even. Furthermore the true and false residual degrees are equal. Proof : Both statements following immediately from lemma 2.2.19 and definition 1.2.4. Q.E.D. Theorem 2.2.21 : Let f ' (y,5?) = yf(x) V y f (x) be a self dual sd switching function on n + 1 variables and let h (y,x) = yh(x) v yh (x) be an M function of f (y,x) (this is always possible by theorem 2.2.1.8). Then h(x) is an M function cf f (x) . s cL - — cL s ci Proof : Let h (y,x) = yh(x) V yh (x) be an M function of f (y,x) =yf(x)V yf (x) . Assume that h(x) is not an M function of f(x). Let g(x) be an M function of f(x) where f (x) has an M function factorization of the form f(x) = g(x)r , (x) V s (x) rhere (i) |A( Sl ) U B(r x )| < |A(s) U B(r)| where s(x) and r(x) are the residual functions of f(x) with respect to h(x) . By lemma 2.2.17* g (y^x) is an M function of sd f (y,x). But by (i) and corollary 2.2,1.3 the number of residual sd sd. vectors of f '(y,x) with respect to g (y.?x) is strictly less then the number of residual vectors with respect to h ~(y_,x). A contradiction. Thus h(x) is an M function of f (x) . Q..E D. 28 Definition 2 2.2 ; Let f(x) be an arbitrary switching function on n variables . f(x) is said to be positive (negative) in a variable x. if there exists an expression for f(x) in which x. appears uncomplemented (complemented) only. f(x) is unate if it is positive or negative in all of its variables and positive (negative) if it is positive (negative) in all of its variables . Lemma 2 .2.22 ;. Let f(x) be a self dual switching function on n variables and let h(x) be an M function of f (x) . If f(x) is positive (negative) in some variable x. y then h(x) is positive or independent (negative or independent) in x. . Proof - Let h(x) be an M function of f(x) and assume that f(x) is positive in x.. . (The case for f('x) negative in x, is similar.) Then f (x) may be factored as* f(x) = x.^ V fj d c 1 where f _ c f and where f. and thus f n are independent of x. . 11 i 1 i By theorem 2.2.1.8, h(x) is self dual and thus may be factored as h(x) = x.h VjhJ i l l l where h. and thus h are independent of x. . By theorem 2.2.21- l 1 i h is an M function of f and thus by theorem 2.2.8,, h, is an d * . Since f M function of f n . Since f n c f, we must have by theorem 2.2.11, that h ' 5 h . Thus * Since f(x) = f (x), by definition 2.2.1 it is seen that f(x) may be factored as f(x) - x f V x .f^ o i 1 i i Since f(x) is positive in x. we must have f ' c f, . if 1l ^ h _, and d if L = h , 1 1 h(x) = x.h v h d h(x) = h^ Q.E.D Theorem 2.2.23 : Let f(x) be an arbitrary s I Ion on n variables and let h(x) be an M function of f(x). If f(x) is positive (negative) in a variable, x. p ther h(x) is positive or independent (negative or independent) in the variable x. . Proof : Let h(x) be an M function of f(x) and assume that f(x) is positive in the variable x. . (The case for f (x) negative in x. is similar.) Then f(x) may be factored as* f(x) = x. fl V t 2 where f c f and f and f are independent of x. . Then we may self dualize f(x) to obtain f Sd (y,x) = y(x.f 1 V f 2 ) v - (Xif d V f *)„ Since h(x) is an M function of f(x), we have, by lemma 2.2.17; tha" 1 h Sd (y,x) = yh(x) Vy h d (5?) is an M function of f (y,x). Since f (y,x) is positive in sd I ■ x. we have by lemma 2.2.22 that h (y^x; is positive * Since f(x) is positive in x. it clearly may be factored as f(x) = x.f v f . In general f and f may not be. comparable, however f(x) = x.f, v f~ - x.(f. v f_J v f„ ll 2 l 1 2 2 x.f' V f an d thus f_ <= f ' l 1 2 2 1 30 independent of x. . Since posii - n or independance of h~ (y^x) in x i i means we have where h 13 (y,,x|x. -» l) 3 n (y^^1 x - "* 0) vK v vb c vh v ' j k y 2 - 1 - * 1 h(x) = x, h_ v- v V ' L 1 h_ and h_ are independent of x.. Fhus h_ c h, and therefore 12 l 2 — j_ h(x) = x.h., v h„o l 1 2 Example 2.2o!?: Let f(x) - x^ v x.x^ v x x^ One of the p ssible M ncticz ' (x) I h (x) = x •■ ■ 1 L 2 L 3 ^ 3 + A second possible M function c: fi • h>".- = - A third alternative Ls the M f h 3 ( ' Lemma 0, x. -* l) 1 i j - ' l j 3i QED Proof : Let f(x) be a self dual function on n variah] positive in the variables x. and x.. Then f(x) may f(iT) = x (x f - V v ( where (of. footnotes on pp. 29 and 30 ) f c f c f 1 2 1 and f cz f c f 1 2 1 and where f and f are independent of x. and x.. By theorem 2.2.18, h(x), an M function of f(x) is self dual and by lemma 2.2<,22<, h(x) is posi or independe: of x. and x.. Thus h(x) may be factored as i j h(x) = x (x h ^ h ) v (x h v h ) i j l d j a l where and h* £ h 2 E ^ h^ c hT <= h, 1 — ^ — _l and where h and h are independent of x. and x.. L f(x|x. -» 0, x. - 1). Then f_ c f we will show that this implies that h. '-" h 2 d. 2 — 2 and thus that h(x|x. -* 1, x. -* 0) => h(x|x. -> On x. -» 1). d d By lemma 2.2.9 we must have either h , or lu ^ h. . d a 2 . Assume first that h^ c h^. This situatio i bed in figure 2.2.2., 32 from which we will define the following sets*: R 2 = A(f*) B^) R{ = B(f 1 ) n A (hJ) R 2 = B(f*) A (f*) n B(h 2 J r 2 = A(f x ) n B(f 2 ) n A(h d ) R 3 = B(fg) fl A(: '• B(i- R' = A(f 2 ) fl B(f 2 ) '- A(h£) r u = B(f 2 ) n A(f 2 ) n B(h 1 ) % = A(f 2 ) n B(f d ) n A(hJ) R c - B(f. ) fl A(h n ; r F;n d I 5 ~1 R' = A(f d ) n Bi> d , aj. ) P -L 1 ^ R 6 = E(f, > A( d E : r; = A(i d ; n b(i A'; d ' O 1 R = B(f ) fl A, ! I B(h d ) _L — _L RJ - A(f d ; - B v i d i H A(h x ) Rg = A(f 1 'i (1 B(f. ■ Afr d , Rg = B(f^) fl A v : d ; H B(r^) H A(h d ) * We may define the remaining sets K„ , R* , R.^, and R' in a similar manner. Thus it is seen that 12 (p. u R ! ' " : - I i=l 1 x 3 V A(f 1 ) n B(f 2 ) v- B(fJ) n A(f*) ^0 = A(f 2 ) n B(f*) B io = B(f*) n A(f 2 ) R~ = A(f Q ) n B(f*) n b(^) n a(i n A(h x ) n B(h^) n B(hp n a(j n A(h x ) n B(h 2 ) n A(h^) n B(h 2 ) Figure 2.2.2: Venn diagram illustrating the pro. f oi lemma 2.2.2h It may be seen by inspection that every pair among the sets R_ , R' ,..«, R'^R is disjoint, Further from lemma 2,2„10 |R. | = |r!|, i ■ L, 2, . .., 10, By theorem 2,2.21 the function x.h_ v - h is an M function J 1 2 of x.f. v f and thus ■ ' ' j 1 2 3 ■■ 3'' of x.fp ^ f . By corollary 2.2.12, p(x.f v f ) = j J — c - p(x.f v f ). Thus we need only consider the residual vectors of x.f n ^ f_ with respect to x.L vh.. If x . = G then the number of ji2 * j 1 2 j residual vectors may be found from f„ and h and when x. = 1 the residual vectors may be found from h and f . For example, referring to figure 2.2.2 the set of residual vectors of f with respect to h is seen to be h U R 2 U R 3 'J HJ U R' U R^ U R^ U R£ U R^ UR' UE' ULUE . 1 ' 2 ~ "7 9 Counting each distinct set once and only once we have that p, (x.f_ v fj = 2 1 P., I + 2|r o | + IbJ + I R, I ' 1 j 1 2.' ' 1' '2' '3 *+ + |R J + 2 1 IL- 1 + 2|p_| + I Bo I '5 b 7 o ' + 2|b 9 I + |b 10 | + |b 13 |. Next assume that h c lw Ls equivalent tc replacing h by h and d. — cl d d d h by h in the sets given above. For this r a ; e we may find the residual vectors in exactly the same way as above. Thus P 2 (x /l V V = 2 I R J + 2 I R 2' + ^ + ' R J - |r 5 I + |b 6 | + 2|p 7 | + |r 8 | + 2|bJ + If.. J . Since initially we assumed that h. c h and f c f the set B is 2 d c 2 ij nonempty. T v . p 2 ( Yi v f -J < p i< x /i v f 2 > which -. )ntradicts the assumption that x.h.., v h is an M of x.f. v f J 1 2 J 1 2 for h_ c h_. Thus h, c h r and therefore d d d — c 3", h(x|x. -* 1, x -* 0) = h(x|x -» 0, x -* L). Lemma 2.2,25 : If f(x|x. -* 1, x. -+ 0) => f(x|x. - -* 1) then f d (x1x. -> 1, x. -* 0) 3 f d (x1x -» 0, X. -» 1). 1 1 J J Theorem 2.2.26 : Let f(x) be an arbitrary switching n variables and let h(x) he an M function oi f(x). Let f(x) he pc in the variables x. and x.„ If f(x|x. -> 1, x. -* 0) => f(x|x. -*■ 0, x. -* 1) then h(x|x. -*• 1 , x. -* C) ^ h(x|x -* :, x . -> _l . 1 1 J ~ ' 2 J Proof : Let f(x) be a switching function en n variab] positive in the variables x. and x.. Let h(iT, be an M function Df f(x). Assume that f(x|x. -* 1, x. -* 0) => f(x|x. -* 0. x. -* 1 ). 1 l J l j Then the self dualized function of f(x). f sd (y,x*) - yf (fiO v yf d (x) has f 3d (y,x|x. -* 1, x. -> C ) ^ f sd (y,x|x. -> C, x. -» 1) by lemma 2.2.25. By lemma 2.2. (i) h (y,x) = yh(x) v yh (x) is an M function of f (y,x). Thus by lemma 2.2.2*1 h (y,x"|x. -* 1; x. -> 0) 3 h (y^xjx. -> 0, x. -■ 36 and thus on setting y = 1 in (i) . h(x|x. -» 1, x. -» 0) => h(x|x. -» 0, X. -* l). 1 J - U Q £D It should be noted that if f(x1x. -> 1, x . -*> 0) - f(x1x -* G. x. -» 1) then in general nothing can be said about the ordering of" h(x|x. -* 1, x. -> 0) and h(x|x. -> S x. -+• l) wt- re h(x) is an M function of f(x). Example 2.2. 5 illustrates all three possibilities for this ease. 2o3 T/M and f/m Fond i In general if h(x) is an M function of f (x) a given switching function on n variables, then h(x) and f(x) are not comparable. A natural extensi m or the con :ept of M feu bi r; - w Ld be to define a function, p(x),, such that either p(x) c f(x) 02 f ( c p(x) and such that p(x) has properties which are anologous to t v : -e oi an M function of f(x). Definition 2. 3-1 define; ns. Definition 2. ;L. 1 : Let f(x) be a wii ! Lng I mcti >n -n n '"ar ..ables. Let f(x) be factored as (2.3 f(x) = p(x;u(x\) v v (x) where p(x) is a threshold function and wl i(x) and v(x) are defined by (2.3 A(u) = A(f) U B(p) (2.3.3) B(u) = B(f) fl A(p) (2,3- I A( r) = A(f 1 B(p) (2.3.5) B(v) -- B(f) U A(p). Then p(x) is said to be a true M function - . a • t/m function of f (x) if B(u) = fi and the of the set A(v) is minimized. p(x) is said to be a - - Log v " f (x) or an f/m function of f(x) if A(v) - and the order cf the set B(u) is minimized. Further if P(x) is a T,/ ■:"). then I factorization (2.3-6) f(x) = p(x) v v (x) which results from (2.3«l) because u(x) becomes identic all;/ 1 will be called a t/m factorization and if p(x) is an F/M function of f(x), then the factorization (2.3.7) fffl = P®u(50 which results from (2-3-1) because v(.x) becomes identically C will be called an f/m factorization . The Venn diagram of figure 2.3-1 below il] the definition 2.3=1. Lemma 2.3-1 : Let f(x) be an arbitrary switching function en n variable Then p(x) is a t/m function of f(x) if and only if p(x) is an F/M function of f(x). Proof : Let p(x) be a t/m function of f(x). Then from (2.3.6),, f(x) may- be factored as f(x) = p(x) ^ v(x) where v(x) is defined by (2.3«*+) and (2. 3- 5)" Then f(x) becomes f(5T) = p(5T)v(x0o 38 Since p(x) is a threshold function, p(x s ! is a threshold, function and thus by definition 2, ; .L. if | B( i| is minimized then p(x) is an F/M function of f(x). But |b(v)| = |A(v)| and "by assumption | A ( v ) j is minimum., Thus p(x) is an f/m : ncti n f f(x) for otherwise p(x) could net he a t/m function of ?(x). The argument for the converse is similar. QED _ - Figure 2, 3° ~ : Venn diagram of definition 2 3 ' with p, (x) a function of f(x) and p p (x) an ' M fun :tj f(x). Theorem 2.3-2 ; Let f(x) be an art bing f n on n ariables. "hen p(x) is a r/M ( 'l i i of f(x) if and only if p'(x) = p(x|x. -» x. ) i= a :*<< I ' ' f'(x) = f(x|x. -* x. ): Proof : Let p(x) be a ' in I f(x). (The case of p(x) an F'/M function of f(> Ltnilaj "' (x) may be factored as f(x) - p(x) v v(y Thus f'(x) = f(x|x. -e x . ) may be fa I a < i x) = p'(x-) - v»(x) K where by lemma 2.2.^, |a(v' )| that x. is replaced by x. everywhere. 1 Lnce p'(x) is a I function, p'(x) must be a I'/m fur.. : .on of f ' p(x uld net be a t/m function of f(x). The proof of the converse i Corolla:ry 2.3-3 : Let f(x) be an ables. Let p(x) be a T/M (f/m) : . f(x). Then p(x|x. -* £. ,..., 1 1 x. -> x. ), for k < n, is a 'I'/M (f/m) fuc : f f(x|x. -> x ,..., 1 k x k ± 1 "1 x. -> X. ). x k V Corollary 2. 3» ^ ° Let f (x) be an a : n variables. Then p(x) is a :.•/:■' ion of f(x) If x) is an F/M fur of f (x). Proof : Let p(x) be a t/m function cf f(x), where f(: ' ' an arb" switching function on n variables. It .. that f (x) = f(x). By lemma 2.3.1, p(x) is an f/m func . f(x) and by • . >, p(x) is an f/m function cf f(x). The proof of the ?se is Ira ar. Lemma 2.3-5 ° Let f(x) be an ar : g ■:.. variables and assume thai cf (^) if p ;- , a - f(x), then p(x) c p d (x). Proof : Let p(x) be a t/m functj n llary 2.3.^, p (x) is an F/M function of f(x). From (2.3-6), p(x) 5 f(x) and fr i' d (x) c p d (x0. Thus if • ) c 1+0 uld seem thai _ and p(x) is an F/M functi n f(x) then pi - i . ii , a.: bhe following example tiow, in : mpa i i betwee: p i t) and p(x) may 1 - a £ the three Example 2. 3° I s Let f (x) = ■ x ^ x. x x . _ _ _< y x. x. is an F/M fun ■ _ . • f f\x). and p (x) -- x. x .■ •-■ - ■ e . . e i . and ■ ■ ■ ■ ■ f(aT c f d (5T] and p(x Example 2. 3* 3 - Let f(x) = X^X^Z, - I i v^. Then P(x) - x^ v :^x 3 v xv is an f/m function of f(x)» Tl f (xj = x 2 x v x. x v and \y x y v - v x x X- 13 4 2 3 4 p (x) = X Xj ^ XXXi. - - — J> -s- ,.d,-N , d, Thus f (x) c f^x) and p (x) <= Definition 2.3-2 :: Let f(x) he a switching rariabli Let p(x) he a t/m (F/m) functi . '(x). said T (F) order k if |'A(f) Pi B(p)| - k(|l / ; ' the T (F) order of a fun :ti n, f(x), asr £ m (f] i Lemma 2. 3° 6 - Let f itching :.'..'■ . on n h(x) he an M functi c 3f f(x). If p^x) -..-«:,'■' functions of f(x) respectively, then g„(f) > , Ut), £_(£) > . "(f), i F (f) >P+(f) and § p (f) > ; ;;(v; Proof: By definition of an M functi f f(a I, ?) < | (f) and < i p (f). i 1 ( '■'[ = r + i'i) + pC(f)» . 'r > ' > w resu 42 CHAPTER 3 SYNTHESIS BASED ON M FUNCTION FACTORIZATION 3«1 introduction In this chapter we will define a synthesis procedure based on an M function factorisation. Although the networks generated by this procedure are not guaranteed to be optimal in number of elements it appears that they are generally quite close to optimal. For a synthesis procedure which guarantees optimal structure, see the approaches of Muroga [10] and Breuer [l]. We will first reformulate the mixed integer linear programming formulation of section 1. 3 to determine an M function of a given function. The synthesis procedure based on the M function factorisation will then be presented. The networks generated by this procedure are of the tree type. In the last section we will briefly discuss a synthesis procedure based on T/M (f/m) functions of the given function. 3»2 Problem Reformulation Let f(x) be an arbitrary switching function on n variables*. By definition 2.2.1, it is always possible to form the self dual function on n + 1 variables. r sd (y,i) =yf(x) -y^. As stated in section 1.2, we will assume that f(x) is dependent on all n variables. k3 By theorem 2.2.18 any M function of f (y,x) is self dual. Thus let h (y,x) be an M function of f (y,x). Since h (y,x) is self dual may factor it as h S (y,x) = yh(x) ^ yh (x) . Now by theorem 2-2.21 the function h(x) is an M function of f(x). Thus we may limit our discussion to strictly self dual switching functions. On the basis of the above limitation we may now reformulate the mixed integer linear programming formulation of section 1. 3- Let f(x) be a self dual switching function on n variables and let h(x) be a self dual M function of f(x). It is well known that if a € A(h) then a e B(h) and conversely. Thus if some vector, & , is a true vector of f(x) and a true vector of h(x), then the vector a will be a false vector of both h(x) and f(x). Further if a € A(f) and & e B(h) then a 6 B(f) and a € A(h). This is equivalent to setting Q,. y = P* J. d. ,(J) 2 where b '*" = 1 - a ^', 1 = (1,1,..., 1), in the formulation of (1.3-21) to (1.3-26). Thus we may reformulate the problem as follows*: (3-2.1) Minimize z = ZQ ^ J Under the constraints T , T~, w., w7 > 0, i = 1, ...,n, and Q,^' < 1 for Ql a nonnegative integer and See the footnote on page 13 < kk (3-2.2) 2Z ■>+ - w~)a. (j) - 2(T + - T ") > - Q^^U + U ) i=l n - v7^J) (3.2.3) 2 2 (w. - w.)a^ - 2(T - T ) i=l < u 1 - qJ j) (I + u 1 ) - 1 n , . -, (3.2.1+) -2 Z (wt - w~) (1 - a| JJ ) + 2(T + - T") i=l > 2 - Q.^(l + U_) — J. 1 n / . x (3.2.5) -2 2 (wt - w7)(l - a: J ') + 2(T - T") . , 1 1 i 1=1 < 1 + i^ - q[ j) (i + u x ) for all &}^ e A(f), f(x) a self dual function, and where U, Is a sufficiently large positive real number. It may be possible to make a further simplification as the following theorem, due to McNaughton [8], indicates. Theorem 3.2.1 : Let f (x) be a threshold function on exactly n variables with structure [w ,...,w ;T]. If f(x) is positive (negative) in a J_ n variable, x., then w. > (w. < 0) . Farther, if f(x) is a positive 1 xi. (negative) threshold function then T > (T < C). By lemma 2.2.22, if f(x), a given self dual switching function, is positive in some variable, x., then h(x), the self dual M function cf f (x) will be positive or independent of x. . Similarly for the case cf f(x) negative in x. . Thus from theorem 3.2.1, if f(x) is positive in some variable, x., then the weight w. in the structure for ' 1 1 h(x) will be nonnegative. If x. is a dummy variable of h(x), then w. h5 can "be of any sign but there exists an optimum solution having w. = 0. Therefore in the set of inequalities (3- 2. 2) to (3° 2. 5) we may replace w. - w. by w. if f (x) is positive in x. and w. - ■ . if fix) is ii J i \ / .r -l 11 y i negative in x. . Similarly for the threshold T. 3> 3 Synthesis Procedure Let f (x) be an arbitrary switching function on n variables and let h(x) be any threshold function. Then in general f(x) may be factored as (3-3.1) f(5T) = h(x>(iT) - s(x) where the residual functions r(x) and s(x) are defined by (2.1.2) to (2.1.S). The problem now is to synthesize a network of threshold elements which realizes f(x) as it is factored in (3-3°l). Let [vr..* • • . ,w ;T] be a structure for the threshold function h(x). Then the network realization of fix) is shown in figure 3«3«1 where N and N are the r s Figure 3.3-1: Realization of fix) = h(x)r(x) ^ s(x) where [w, , . . • ,w 1 T] _j_ n is a structure for h(x). 46 network realizations of the residual functions r(x) and s(x) respectively* ^y is the threshold of the first level element and y and 5 are the coupling weights for N and N respectively, o r s We next wish to determine the values of \J , y and 5 such that the output of the network of figure 3o«l is the desired f(x). Let (3.3.2) oc = Min{w.a. |a e A(f)) (3.3.3) P = Max{wtb. |b £ B(f)}. Then we have the following. Lemma 3.3-1 : Let f{x) be an arbitrary switching function on n variables and let h(x) be any threshold function with structure [w , . . . ,w ;T]. Then (a) if A(f ) fl B(h) * then « < T - 1 (b) if B(f) fl A(h) * then p > T. Proof : For (a), let A(f) fl B(h) t and assume that « > T - 1. Then for all a s A(f), w.a > « > T ■- 1. But this contradicts the assumption that A(f ) fl B(h) * 0. Thus « < T - 1. For (b), let B(f) D A(h) * and assume that p < T. Then for all b £ B(f), w.b. < p < T. But this contradicts the assumption that B(f ) fl A(h) * 0. Thus p > T. QED Theorem 3*3.2 : Let f (x") be an arbitrary switching function on n variables and let h(x) be any threshold function with structure \yt , . . . } w ;T]. Let f(x) be factored as in (3.3-1) with r(x) and s(x) defined by (2.1.2) to (2.1.5)« Then the network of figure 3- 3*1 with h 7 J = p + 1 7 = p - T + 1 5 = T - « is a realization of f(x). Proof : Let f(x) be factored as in (3«iT+p-T+i = p+l=(jT and thus the output is 1 as required. Figure 3«3«2 : Venn diagram for the proof of theorem 3-3«2. Case 2: Let z e B(h) il A(r) fB(f). Then since z £ B(s), w. z+ (p-T+l) oc + (p - T + l) + (T - pc) = 3+1 =ilJ. Thus the output is the required 1 and therefore the realization is correct, QFD Before giving the synthesis procedure it might be well to briefly discuss it in plain text. As mentioned in section 3-2 it is always possible to consider only self dual switching functions. Thus let f (x) be a self dual switching function and assume we have determined an M function factorization of the form (3-3«l)- Then, by theorem 2.2.18 and lemma 2..2..lh, r(x) = s (5t). Thus if a network which realizes r(x), N , is determined then the network which realizes s(x), N , is x s also determined as the following two theorems show. Theorem 3-3-3 [12] : Let f(x) be a threshold function on n variables with structure [w n ,...,w ;T]. Then f (x) is also a threshold function In with structure n [w., , . . . ,w : 1 - T + Z w. ]. In . , l i=l Theorem 3-3°^ [13] : Let f(x) be an arbitrary switching function on n variables. If f (x) is realized by a network of threshold elements then h 9 f (x) is realized by the network realize. 1 ! x f x) with the tlu of each element changed as in theorem 3* 3- 3* The procedure will thus become one of determining a network realization for the compliment of the false residual function, i.e . r(x), of a self dual switching function and then dualizing this network to obtain the network realisation for the true residual function. In what follows, let f n (x) be the given switching function on n variables and let h (x) be an M function of f (x). Then f n (x) may be factored as f Q © = h (x> (F) - s Q (x). where r^(x) and s r (x) are the corresponding residual functions. Similarly ^ (x) may be factored in an M function factorization as r Q (x) = h 1 (x)r 1 (x) v ^(x) and in general r i-l^ = h i(^) r i(^ v s i (x). Procedure 3*3-1 : M Function Synthesis Step 1: Self dualize f n (x) using the self dualising variable y to obtain f*(y ,x) = y f (5c) v y_f A (x) and go to step 2. U O (J (J w *J Step 2: Using the mixed integer linear programming formulation of section 3° 2, determine h_(y_,x), an M function of f*(y ,5f). If h (y ,x) = f*(y ,x) then set y = 1 so as to obtain a one element realization for f (x) by lemma 2.2.16. If h (y ,5T) * f o^ y o'*^ then g0 to step ^' 50 Step 3: Set i = 1 and go tc step k. Step h: From (2.1.2) and (2.1-3) determine the false residual function ^i-l( y i-l' y i-2'*" ,y ; ^' Self dualize r i-l( y i-l> y i-2'" ,,y 0'^ using the self dualizing variable y. tc obtain : 'i-l( y i ,y i-l' " -> y o'*^' °° t0 Step 5 ' Step 5: By the mixed integer linear programming formulation of section 3-2 determine h.(y.,y_. , ...,y ,x), an M function of 1 X 1 —J- \J r ?„i(yi^i_i-»-V^- If V y i""' y o'^ = ^-i^i-'-v^ then go to step "J. Otherwise go to step 6. Step 6: Increment i by 1, i.e. i : = i + 1, and go to step h. Step 7: Set y. = 1 and thus form the function r. (y. , . ..,y ,x) which has a realization found from lemma 2.2.16. Go to step 8. Step 8: If i = 0, go to step 11. If i > 1 go to step 9. Step 9^ Using theorem 3°3«^ form a network which realizes s. (y. ,..., i-l i - 1 y .x). Connect the networks which realize r. n (y, n ,...,y^,x) "0 i-r J i-i' ' J o } ' and s. , (y. n ,..o,y ,x") to the element which realizes h, , (y. _, , i-l i-l i-l w i-l' •.•,y jx) using theorem 3-3»2. Go to step 10. Step 10: Decrement i by 1, i.e. i :- i-l, and go to step 7. Step 11: Remove the redundant elements, if any, i.e. remove those elements whose output is constant, using lemma 2.2.16. Stop. The network realizes f (x). In order to help make clear procedures 3«3«lj consider the following example. Example 3 • 3 • 1 : It is required that a network be synthesized which realizes the function 51 f Q (£) = Xl x 2 x 3 x^ - x.x 2 x 3 x k - \^f k - «iV3^ v x l x 2 x 3 x 4 v x l x 2 x 3^ v x l x 2 x 3 X 4 v X 1 X 2 X 3 X 4' By step 1 of procedure 3-3-1 we first self dualize f n (x) to obtain fg(y ^ = (x^x^ - x^x^ - x.x 2 x 3 x u - X^X^ v x^x^ - x^x^ X 1 X 2 X 3 X U v X l X 2 X 3 X 4 )y v X 1 X 2 X 3 X ^ v X 1 X 2 X 3 X U v X 1 X 2 X 3 X U v X 1 X 2 X 3 X U ^ X XXX, s/ X..X..X X, v xx x„x, 1234 1234 1234 x i x 2 x 3 x 4 } yo' One of the possible M functions of f*(y-,x) is VV^ = X 1 X 2 X 3 " X 1 X 2% " Wo " X 1 X 3 X 4 V Wo v Wo v X 2 X 3 X 4 v Wo - x 2 x u y Q - x^y^ with structure [-1, -1, -1, -1, -1; -2], = Pw. ,w , . • . ,w, ; Tl . n o J o - 1 n o From this we have r ( V x) = S o (y o^ = X 1 X 2 V X 1 X 3 V X 1 X 4 V X i y V X 2 X 3 V X 2 X 4 V X 2 y V X 3 X 4 V X 3 y V Vo V X l X 2 X 3 X 4 y 0° By step 4 we next self dualize r (y ,x) to obtain rg(y 1 ,y ,xO = (x ± x 2 - x^ - x^ - x 2 x 3 - * 2 *k v x 2 y o v x 3 x h vac 3 y o " x 4 y o - Xl y - x 1 x 2 5 3 x u y )y ] _ v (x lX2 x 3 x u y o - x 1 x 2 x 3 x u y () V X lV 3 V0 V W3V0 - x 1 x g x 3 x J+ y )y 1 . One of the possible M functions of r*(y.,,y ,x) is _L U V^'V 5 ^ = (x l x 2 v x i x 3 v X A v X l y v X 2 X 3 - x 2 x^ - x 2 y Q - x^ - x 3 y Q - x^y^ - x^x^^ v x lX2 x 3 y o - x^x^ v x l x 3 Vo v V3V0 with structure [w ,w ,w , . . • ,w. ; Tj = [2,1,1,1,1,1;^] . y l y 1 1 Clearly h (y ,y ,x) ^ r*(y ,y ,x), so we must go through step 6 bajk to step h° For h (y ,y ,x) we have that r i^ y i ;y o' x ' ) = ^(y^yQ^x) = x 2 v x 2 ^ x 3 v x^ v y c v y r We now self dualize r (y ,y ,x) to obtain r*(y 2 ,y 1? y ,ir) = (^ - i 2 ^ - x^ - y Q v y^ v x x x x,,y y . 2 3 vcri But an M function of r*(y p ,y 1? y ,x) is hgCy^y^y ,x) = r i^y2 ; ' y i'' y 0' X ^ and haS a stru " tare Lw ,..-^w^_;T] h y 2 "2 = [5,1,-1,-1,-1,-1,-1; l]. Thus we next go to step 7- 2 53 Setting y = 1 we have a realization for r (y ,y ,x) ae Igure 3-3.2. Next, in step 8 we form a network which realizes - , ,y by lemma 2.2.16 and connect this network and the network of figure 3-? -2 to the element which realizes h (y ,y ,x). For this case se that « 1 = 2, p = 5 and ^ri(Yi,Yo,>0 Figure 3«3«2: Network realization for r n (y n ,y_,x). — a =i_=i — 1 J l'-0' therefore */ = 6, 7 =2 and 8 =2. The resulting realization is shown in figure 3* 3« 3* Since i = 2 we must now decrement i by 1 and go back to step 7 In this case the network which realizes r (y n ,xj = r*( l } y } x) is as shown in figure 3>3.^-- Again applying step 8, we obtain the realization for f*(y .x) shown in figure 3«3«5- In this case a = -4, f3 = -1 and thus (J = 0, 7 Q = 2 and 8 Q = 2. ! i »o (YnYoiX) Figure 3- 3° 3 ' Network realisation for r*(y. y.xj (J _L **^q(\>,X) Figure 3«3«k: Network realization for r Q (y ,x) = r*(l,y Q ,x) PP Next we must decrement i by 1 so that i and th< 7 we have the network shown in figure 3-3-6 for f (x). 5&. Xf^ *X 4 Figure 3.3. 5: Network realization of f*(y ,x) *oW Figure 3- 3° 6 : Network realization for f n (x) = f*(l,x). Upon removing the redundant elements, the final realization becomes as shown in figure 3-3«7« fo(X) F-i Figure 3,3, Final realization for f n (xj fg(l,x) 57 Tneorem 3. j. y . procedure 3«3«1 is a finite proce Proof ; By lemma 2.2.17 and theorem 2.2.21 it may be observed that procedure 3* 3*1 is equivalent to determining the sequence of functi f o = h o r o v s o r o = h i r i v s i r. _ = h.r. ^ s. l-l li i where the h., i = 0, 1, . . . . are M functions of f and r., i = 0,1,2,.... 1 7 . > l 7 7 7 > respectively. We claim that |a(s.)| < |A(r, )| and |B(r.)| < |B(r i _ 1 )|, i = 1,2,..., and that |a(s q )| < |A(f Q )| and |B(r Q )| <|B(f Q )|. We will show only the case |a(s.)| < |A(r. .)!• The remaining cases are similar. From (2.1.10, A(s.) c A(r. j and thus |a(s.)| <|A(r. -)|. Assume that A(s.) = A(r. _) for some i and let h. be an M function of ' i i-l l r. . (Note that r. n is taking the role of f in (2.1.2) to (2.1.5).) Thus A(s.) = A(r. _) and therefore from (2.1.4), A(r. n ) <=B(h.). l i-l i-l — l Thus the total number of residual vectors becomes |A(r. _)| + |B(r. _ ) fl A(h. )| . If A(r. ) = then clearly r is the constant threshold function r = and the procedure must terminate. Therefore assume that A(r. ) ^ 0. Let a € A(r. ) and define the function g as i - J. i - J. A(g) = {a}. The function g is clearly a threshold function and produces |A(r. ul )| - 1 residual vectors. But this contradicts the assumption that h. is an M function of r. . . Thus i--l |A(s.)| < \a(t^ ± )\. Therefore for some k < 2~ we must have A(s. ) = B(r. ) = 6 and thus the — k k process terminates and is finite. QEL 3.k t/m. f/m Synthesis In this section we will briefly discuss a synthesis procedure based on t/m and f/m functions of a given function. Let f(x) be an arbitrary switching function on n variables. Let p M (x) be a t/m function of f(x). Then by definition 2.3-1 we have that 3(f) <~ E(p ri ). Thus we may apply the mixed integer linear programming formulation of section 1.3 to the problem of determining p r -,(^J by i; requiring r^' = 0, for all k in (1.3-23), (1.3-2^), (1-3-26) and (1.3. 32) Similarly we may find p-,-,(x"), an F/M function of f(x), by setting ( i ) q2° J = in (1.3-21), (1.3-22), (1.3.2:3) and (1.3-32). This formulation is nearly identical to the test for marginally separable functions of Slivinski [15]- The difference being that in general p„(x) and p (x) J- !b need not be simultaneously realizable. Basically there are four possible synthesis procedures using T/M and f/m functions of a given function, f (x). The first procedure is based strictly on repeated determination of T/M functions. In this procedure;, w 3 g^nerat? 5 tho seauen^e of functions f = h ^ s ■> s = h ^ s . 11/ 59 s = h ^ s , ... where the h., i = 0,1,... are l/ll functions. Similarly a procedure may be described which is based on strictly F/M functions. Finally we may have a procedure based on alternating T/M and F/M or F, and t/m functions. Computational experience has shown that generally either of the last two procedures generate more economical networks tr either of the former two. Thus the latter will be the basis for the synthesis procedure to be described be.iow. Notation 3-^-l : Let f (x) be an arbitrary switching function on n variables and let p n (x) be an F/M function of f(x). Then f n (x) = p (x)r (x). Similarly r (x) = p (x) v s (x) where p (x) is a T/M function of r.(x). In general we will factor r.(x) as 1 r,(x) = p. .(x) v s, (x) l ^l+l ' i+I where p. n (x) is a t/m function of r.(x), and s.(x) as s.(x) = p. + 1 (Dr. + 1 (x) where p. (x) is an F/M function of s.(x'). The synthesis procedure may now be described. Procedure 3.^.1 : T/M, F/M Synthesis Step 1: Determine an F/M function of f (x), a given switching function on n variables. Let p n (x) be the F/M function of f (5c). If p (x) = f r (x) then stop. A one element realisation has been determined. If p,(x) / f p (x) then go to step 2. Step 2: Set i = 1 and go to step 3« Step 3: Find r. . (x), the compliment of the false residual function with respect to p. , (x). Then determine a T/M function, p.(x), of r. ..(x). Couple the element which realizes p. (x) to the element which realizes p. , (x) with coupling weight , y , and threshold, 'U , for the element which realizes p. n where i-l 7 = 8 + 1 - T andig/ =6+1 as given in theorem 3»3«2. If p. (x) = r. (x) then stop, the realization is complete. If p.(x) ^ r. (x) then go to step U. Step U: Increment i by 1, i.e., i := i + 1, and go to step 5« Step 5' Determine the true residual function, s. -.(x), with respect to p_. n (x). Then determine an f/m function, p..(x), of s. (x) Couple the element which realizes p. (x) to the element which realizes p. (x") with coupling weight c = T - « as given in theorem 3-3«2. If p. (x) = s^. , (x), stop, the realization is complete. If p. (x) ^ s. (ST) then go to step 6. Step 6: Increment i by 1 and go to step 3- Example 3-^-»l : Let f n (x") be the parity function on four variables of example 3«3-l» An f/m function of f..(x) may be seen to be P (x) = x£ v x 2 ^ x v x ^ with structure [1,1,1,1; l]. Then f ,(x) may be factored as f n (x) = p_ ( x) r ( x) where r (x) = f (x) v x QX „ 7 ^ _ ™_ — Q , X_X_Xi . 1*2*3 h Next we find a T/M function of r n (x). One such t/m function, p (x), is Pl (x) = x x x 2 x 3 - x^ - x^ - x 2 x 3 x^ with structure [-1, -1, -1, -1; -l]. For this case we see that B n = h 6.1 and thus £/_ = 5 and y = 1+. The network to this ;' : ' is as I in figure 3-^-l- From p (x) and r (x) we have that s^x) = x^x^ v x^ - x^x^ - x 1 x 2 x 3 x 1+ whe re r (x) = p (x) v s (x*). Let p (x) be an f/m function of s.. (x) U J. X c. J. where s (if) = p (x)r (x). It is easily seen that ^ - p^xj = x 1 x 2 x 3 v x i x 2 X l| v x i X 3 X l+ v X 2 X 3 X U with structure [1,1,1,1; 3l- For this case « = -1+ and thus & =3- PoOOPi(x) Figure 3-^-«l : Network realization for p (x)p (x). - 1 - From p p (x) and s, (x) it is easily seen that r 2 (x) = ^ v 3^ v x v x^ and is a threshold function with, structure [-1, -1, -1, -1; -3] . Further 3 = k and thus y = 2 and0 Figure ^.k,2: Final realization for f (x). It is interesting to note that the realization shown in figure 3'^--2 for the parity function on four variables requires the same number of elements as the realization obtained by the synthesis procedure of section 3»3> cf. ; figure 3 • 3-7 of example 3»3-l- This is not a general property of procedures 3* 3*1 a - ri d 3«^-«l> Finally it is easily seen that process 3»^«1 is also a finite process. 63 CHAPTER h SIMPLE FUNCTIONS 4.1 Introduction In this chapter we will investigate a clans of functions called simple functions. The class of simple functions is a subcli the class of threshold functions. We will first investigate some of the properties of simple functions and then investigate the more general class of functions having simple factorizations. Finally we will investigate the relationship between threshold functions and functions having a simple factorization. In the next chapter we shall apply the concepts of simple functions and simple factorizations to the problem of determining whether or not a given function is a threshold function and input restrictions to threshold elements. h.2. Simple Function Properties Definition U.2.1 : Let f(x) be a unate switching function on n variables. Then f(x) is a simple function if and only if f (x) can be factored as "1 2 n e . e . where X . J = x. if e . = 1 and x. J = x. if e . =0, e. € {0,1}, l. i. .j i i j ' 3 x. ) is a threshold 1' ' n ' i i y function with structure [w_,. ..,-•»".,.. .,w ;T - w.]. 1 i n i Lemma 4.2.2 [l6] : Let f (x) be a positive threshold function on n variables with structure [w , . . . ,w jT] satisfying the normalised system of inequalities ( 1.3-7) and (1.3.8). Then (a) the function yf(x) is a threshold function with structure [w ,w_,...,w ;T'] where w is anv number such that T r n y n w > E w. - T + 1 y " i=l X 65 and T' = w + T, y (b) the function y ^ f(x) is a threshold function with structure [w ,w_, , . . . ,w :T'] where w is any number such that w > T y - and m t _ T. Lemma h.2.,2. gives the smallest integer value for w . There y may exist a noninteger value for w which is less then the value given in this lemma. Theorem k.2. 3 ' If f (x) is a simple function en n variables then f(xj is a threshold function. Proof : Let f (if) be a positive simple function. The theorem is obviously true for this case from definition ^-.2.1 and lemma M-.2.2. If f(x) is not a positive simple function, we may convert it to a positive simple function by complimenting the negative variables of f(x). This positive function is thus a threshold function and by lemma h.2..± } f (x) is also a threshold function. QED Example '1.2.3 : Let f(x 1 ,...,xg) = x 1 (x 2 v (x ^ (^(x^ v Xg)))). Consider the function f'(x) = f(x|x 3 ■* X , X^ -» X ) 66 = x x (x 2 v ( X v (x^(x 5 ^ Xg)))). by repeated application of lemma U.2.2 it is easy to see that a structure for f ' (x) is [8,3*3*2,1,; ll]. Thus by lemma 1+.2.1, f(x) has a structure [8,3,-3,2,-1,; 73- Definition ^.2.2 [!*+, 173 : Let f (x*) be a switching function on n variables. f Then we will write x. > x. if and only if i - J f(x|x. -* 1, x. -* 0) => f(x|x. -* 0, x. -> 1). 1 l J - ' 1 J f In particular, x. = x. if and only if f(x|x. -> 1, x. -* 0) = f(x|x. -» 0, x. -* 1). i J i J Theorem U.2.U [7, l^t-] : Let f (x) be a positive threshold function on n variables with structure [w n , . . . ,w :T]. Then 1' n' (a) if x. > x. then w. > w., 1 J 1 J (b) if x. = x then w. > w.. Conversely, (a) if w. > w. then x. > x., 1 J 1 - -3 ■p (b) if w. = w. then x. = x.. Lemma k.2.5 : Let f (x) be a positive simple function on n variables. Then there exists a structure [w n , . . . ,w :T] for f(x") such that In n Z w. + 1 > T > Max {w.} . i=l X ^S-S 1 X Proof: Let f(x) be a positive simple function on n variables. Then by theorem 3?2.1, w. .> 0, i = 1,2, ...,n, and T > 0. Thus for nonconstant 67 functions n Z w. + 1 > T. i=l X Thus we need only show that a structure exists such that T > Max (w.) . Ki Max fw. } i — i u j+l Z w. - T + 1 whichever is larger. Then the new threshold, T', becomes T' = w. + T > Max {w.l, and thus from lemma 4.2.2 all further weights may be chosen to satisfy the required relation. Q£D Theorem h.2.6 : Let f (x) be a positive simple function on n variables. If f(x)=x ,(*... „(. )) 12 n 68 then f ■ f ,f f X. > X. > . . . > X. = X. . 1, — 1 — — 1 -, 1 1 2 n-1 n Conversely, if f f f x. > x . > . . . > x . , i, - i_ - - i 12 n then there exists a simple factorization on f(x) of the form f(x) = x ^(x ^ ... # (x )). 1 x 2 + n Proof : Let f(x) be a simple function factored as f(x) = x (x ... (x )). 1 x 2 n The first statement is trivially true for n = 1. Therefore assume -p that n > 1. The statement that x. = x. is easily seen from n-1 n f_ (x. ,x. ) = x. x. and f~(x. ,x. ) = x. ^ x. , the two 1 l -, l ' 1,1 2 i ., i. i ., i n-1 n n-1 n n-1 n n-1 n positive simple functions on two variables, where the structures are [l.l:2j and [1,1; l] respectively. Thus by theorem k.2.k x_. = x. . To prove the remainder of the first statement we need only note that by lemma k.2.2 it is always possible to choose weights w. and w. such that w. > w. , j = 2,3j- ..>n - 1, by choosing w. sufficiently 3-1 d "j" 1 large in lemma 4.2.2. Thus hj theorem 1+.2.U, the first statement is true. Conversely, assume that for the positive simple function f f f f(x , ...,x ) that x. > x. . .. > x. . For the purpose of proving n i 1 i 2 - - i n the converse statement assume that if x. = x. and i < ,i, then in the simple factorization x. will appear to the left of x.. This will provide a standard factorization. Assume that f (x*) cannot be factored as f(x) = x Jx # ... Jx )). 1 2 n Since f(x) is a simple function it must have a simple factorization of the form f(x) = x #(x # ... #(x )) J l J 2 J 3 f f f where # € { /N ,^} . But this implies that x. > ... > x. =x. where J l J n-1 J n / f f i £ i . But this contradicts the assumption that x. > . . . > x. . p p X l " " 2 n Thus f(x_,...,x ) may be factored as 1 n f(x) = x Jx ^ ... (x )). 1 x 2 "n OjED Definition 4.2.3 : Let h(x , . . . ,x ) and g(x 1 ,...,x ), n > k_, be two simple functions on n and k variables respectively. Then h(x , . . . ,x ) and g(x , . . . } x ) are said to be associated simple functions , denoted by h ~ g, if and only if factorizations of the form h( Xl ,...,x n ) = x. (x ^ ... ^(x. n )) 1 2 n and g(x ,...,x ) = x^ 3 -#(x^ 2 # ... #(x%) 1 k x ± i 2 i k can be found where # e ( v '^} • Further, if h , h , ..., h are simple functions on at most 70 a q n variables such that for each fixed i, i = 1,2, . ..,r, h. ~ h., J - J j = l,2,...,r, then the set of functions is associated simple and will be denoted as ~ (h , . . . ,h ) . Definition k.2.h [1^,3] : Let h(x , ...,x. ) and g(x , ...,x ), n > k, ___^ — — — — ___ __ __ __ _L n _L k be two threshold functioxis on n and k variables respectively. Then h and g are said to be simultaneously realizable , denoted h - g, if and only if there exists structures for both functions having the same set of weights but possibly different thresholds. Further, if h ,...,h are threshold functions such that 1 r there exists structures for each having the same set of weights, then the set of functions is simultaneously realizable and will be denoted as 1 ' r Theorem U.2. 7: Let h(x , ...,x ) and g(x , ...,x ), n > k, be simple — — — — - ___ — _ _— _L II J_ K. functions on n and k variables. Then h - g if and only if h ~ g. Proof : First assume that h ~ g. Without loss of generality assume that h and g are factored as h( Xl ,...,x n ) = x^(x 2 ^..^(x k ^(h'(x k+1 ,...,x n )))) and g(x 1 ,...,x k ) = x #(x 2 #...#(x fc (g , (x ]fi| _ 1 ,...,x n )))) where h'(x, ...... x ) is a simple function other then the identity k+1 ' ' rr * ° function and thus, by theorem k.2.3j is a threshold function with structure [w, ,,..., w :T n n ] and where g'(x, ...... x ) = 1. Thus a kt-i 7 n k+1 k+1 n structure for g ' (x, . , . . . ,x ) is [w, , , . . . ,w : 0] . Next consider the functions x, Ji' and x.g'. For the first we k* k have by lemma 4.2.2 that either or n w. > Z w. - T, . + 1 for „ = * k — . , n 1 k+1 * i=k+l and for the second n w, > Z w. +1. k — . , , , i i=k+l This set of inequalities is consistant and thus a value for w exists which may be used for both x h' and x g'. Using lemma 4.2.2 we see that k* k we may find values for w, n ,w, ^, ...,w n in a similar mannor. Thus h - e. k-1 k-2 1 D Conversely assume that h - g with structures [w , . . . ,w ;T ] and [w , . . o ,w ;T ] respectively. Without loss of generality assume -L n g f f f that w, > w~ > . . . > w . Then by theorem 4.2.4 x n > x_> . . . > x and 1—2— — n ° 1—2— — n by theorem 4.2.6, h and g may be factored as h( X;L ,...,x ) = x 1# (x 2# •.. # (x n )) and Thus h ~ g. Kx^ • .-,x k ) = x 1 #(x 2 # ... #(x 1 QED Theorem 4.2.8: Let h. ,h^,...,h be simple functions on at most n variables. 1 2 r Then ~ S (h , . . . ,h ) if and only if -(h , . . . ,h ). Proof : Without loss of generality assume that h_,...,h are positive simple functions. First assume that -(h_,,...,h ) and let [w n , . . . ,w :T.] 1 r Ini be the structure for each h. , i = 1,2,... ,r. Without loss of generality 72 assume that w., > w_ > . . . > w . Then by theorem k.2.k we have that 1 — 2 - — n f f x n > . . . > x for each h. . Since each h. is a simple function we 1 - - n i i have by theorem h.2.6 that each h. may be factored as h. = x *, . N (x *, M ■•• *f\(* ))■ i 1 (i) v 2 (l) (i) v n' ■ Thus ~ S (h.,...,h ), 1 r Next assume that ~ (h , ...,h ). Then each h. may be factored as h i - V(i) ( V(-D •••*(i) (x k, )) > where k. < n } i = l,2,....r. We need only show that structures may be found for each h. having the same set of weights. In constructing a structure for the h. > begin with the single variable sub function x i n which has a structure [l;T.3 where T. = if h. is independent of x ' l i i * n and T, = 1 if h. is dependent on x , i = l 5 2,o..,r. Next consider the two i i n variable subfunctions x *,.,x . Structures for these two variable n-1 ( i ) n subfuncticns may be found having the same set of weights from lemma ^2.2 by choosing w sufficiently large. Continuing in this manner, it is clear that structures may be found having the same set of weights. s, Thus =(h,,h_,...,h ) 12' r d' QEI Example U.2.U : To illustrate the proof of theorem U.2.8, consider the following three associated simple functions h l = X l ^ x 2 v ' ^ X 3^ h p = x - (x ) h 3 = x x . r 7": h is the only one of the three functions which is dependent on x_. Thus the structures for the single variable subfunctions of h ,h and ti q are respectively [l;l], [l;0] and [l;0]. Next, for the two variable subfunctions of h_, h p and h , x v x,, x and respectively, we have from lemma k.2.2 that w ? > 2 and thus the structures become [2,1; l], [2,1;2] and [2,1; Oj respectively. Finally, by applying lemma U.2.2 to h_ , h„ and h_, in order to add the variable x , we see that w > k and thus the final structures become [^,2,1; 5], [U,2,l;2] and [k,2,l;k] respectively. Definition U.2.S ; Let f(x*) be a unate switching function en n variables. then f (x) is said to be a compound fuactior: if and only if there exists a factorization of the form S l f(x) = x h(x. , ...,x ) v g(x ,...,x ) i, i l i i 1 2 n 2 n where h and g are simple functions. f(x) is said to be a complex function if it is not compound. Lemma k.2. 1 ) [lU] : Let f (x) be a positive threshold function on n variables with structure [w. ,.,.., w. ;T]. If fix) is factored as l ' i 1 n f(x) = x. h(x. , ...,x. ) v g ( x . ,...,x. ) 1 1 x 2 x n X 2 \ where g c - h, then h - g. Further the structures for h and g are respectively [w. , . . . ,w. ;T - w ] and [w. ,...,w. ;T]. X 2 x n h x 2 \ Ik Lemma 4 . 2 . 10 [ 14 "J : Let h(x , ...,x ) 2 g(x , ...,x ) with structures 1 J- n _l n [w , . . . j¥ j T, ] and [w , . . . ,w ;T ] respectively. Assume that h(x)^g(x). Then the function f(y*x) = yh(x) v g(x) is a threshold function with structure [ w % W-, , . . . , w : T J = l T - T, 3 w n ,. . . ,w :T Jo y' 1 ' n g hi n g Theorem 4.2,11 : Let f(x) be a positive compound function on n variables, where f(x) is factored as f (x) = x. h(x. , .. . ,x. )vg(x. , . . . ,x. ) 1 T 1 1 2 n 2 n such that h ^ g. Then f (iT) is a threshold function if and only if , as h ~ g. as , s Proof : First assume that h ~ g. Then., bv theorem 4.2.7> h - g. Thus by lemma 4.2.10 f(x) is a threshold function. Conversely assume that -f(x) is a threshold function. Then by lemma 4.2.9* h - g and since h and g are simple functions, we have by theorem 4.2.7 that h ~ g. QED Example 4.2. *5 : Let f(x) = x..(x p ) ^ x o x ),° Clearly f(x) is a compound function. However, the two simple functions x and x Xi are not associated simple. Thus by theorem 4.2.11, f(x) is not a threshold function. Definition 4„2.6 : Let f(x) be a unate function on n variables. Then f(x) is said to have a simple factorization if f(x) has a factorization of the form 75 f(x x n ) ..x [x ( ... (x ,t ~t z ) 12 k >/ x f v f 4 ) - x (x f - f 6 ) x k J 4 V.-1 x k ' D v X . f_ v f Q ) v . . . } v/ x . f. . v f , i k 7 8' i k 2 k-1_ x 2 k-l] v X. [X. [ ... (X. f . - v f . n ) x 2 x 3 ^2^1 2 k - 1 + 2 A k 2 k " 1 + 3 V'W ^ X f ^ f 1 v . . . v X. f n v f , , X k 2 k -I 2 K where ~ (f\ ,f\ , . . . ,f , ). Some of the f. may be constant. The noncon- 12 k l stant f . will be called simple factors . Example h.2.6 : Consider the function 2 5 f (x 1 , . . . ,x 6 ) = x^x v x^x^ v x x x x^ v/ Xl x„. v x l x 3 X 5 v X 1 X 2 X 6 " x l x U x 5 x 6 v X 2 X 3 X U v X 2 X 3 X 5 X 6 " W<5 X 6 v X 3 X ^ X 5 X 6- A simple factorization for this function, not specifically showing the constant functions, is f (x 1 , • • . ,x 6 ) = x 1 [x 2 (x 3 v/ x^ n/ x^ v x 6 ) - X 3 (X^ - X 5 ) - XjX^Xg] - x 2 [x 3 (x^ - x 5 x 6 ) - x u x ? x 6 ] - x 3 x J+ x 5 x 6 . where the set of simple factors is x, v x r ^ x^-, x, v x , x, x x^, x. 7^ v x,_x,-, x, x x.- and x, xx,- and these are associated simple. 5 6 4 p o 4 5 6 Example 4.2.7 : Consider the function f(x) = x 2 [x 2 (x 3 (x ;+ v x )) v x x^] v x 3 (x 2 ^ x^x ). This is not a simple factorization since the set of simple functions x„(xi ^ x,_), x_x, and x_(x^ ^ x,x,_) is not associated simple. 3 K k y' 3 k 3 2 4 5 ; Lemma 4 . 2 . 12 [ 17 ] : The irredundant disjunctive form for a unate function is unique. Lemma 4.2.13 [14] : Let f(x , ...,x ) be a positive threshold on n f f f variables and assume that the variables are ordered as x_ > x^ > . . .> x « 1 — 2 — — n Let f(x) be factored on its irredundant disjunctive form as f(x) = x h(x , . ..,x ) v g(x ,...,x ). x c. n c n Then h(x. , . . . ,x ) => g(x^ , . . . ,x ) and thus h - g. 2 n 2 J ' r. & Theorem 4.2.14 : Let f (x) be a positive threshold function on n variables. Then f(x) has a simple factorization on its irredundant di s junct ive form . Proof : We will prove this theorem by simple showing how such a factoriza- tion may be obtained. Assume, without loss of generality that the ' -M f f f variables of f (x) are ordered as x n > x_ > . . . > x • Then consider 1 - 2 - — n t he f ac t or i z at ion f(x) =. x 1 h(x g ,...,x n ) v g(xg,...,x n ). By lemma 4. 2 ..13;, h - g and thus if h and g are s.imple functions they must be associated simple by theorem 4.2.7 an( i f(x) has a simple factor- ization. If h or g are not simple functions then each may be grouped 77 on x . All of the resulting functions are simultaneously realizable and if they are simple functions they must be associated simple by theorem k.2.Q. Continuing in this way, it is clear that a simple factorization will result. QED Example U.2.8 : Let f(x x ,...,x 5 ) = x f2 v x^ - x x x u x 5 - Xl x 3 x 5 v x^ v x 2 x 3 x 5 . This function is a threshold function with structure f f f f [ 5, U, 3,2,2; 9] and thus by theorem U.2.U, x > x > x_ > x. = x . Thus grouping f (x) on x we obtain f (x) = x n (x 2 ^ xx. v/ x, x v/ x x ) v x 2 (x 3 (x^ v x )) X l h l v g l' Clearly g is a simple function but h is not. Thus grouping on x we obtain f(x) = x x (x 2 ^ (x x^ ^ x x v/ x^x )) v x 2 (x 3 (x i+ v x^)). Again x_x, v x x ^ x, x is not a simple function. Thus we group on x to obtain f(x) = x 2 (x 2 ^ x (x^ v x 5 ) v/ x^x ) v x 2 (x 3 (x i+ v x 5 )) and this is seen to be a simple factorization. , ,1 1 CHAPTER 5 APPLICATIONS OF SIMPLE FUNCTIONS 5.1 Introduction In this chapter we will investigate two rather interesting applications of simple functions and simple factorizations. In section 5.2 we will show how functions which have simple factorizations may be checked to determine whether or not they are threshold functions. Then in section 5-3 we will show how simple functions may be used to generate networks of threshold elements, each element of which has a restricted number of inputs. This is one possible form for the fan in problem. For a discussion of the fan out problem see Goto's short note [6]. 5-2 Test for Threshold Realizability Before stating the test procedure we will need some preliminary results. Definition 5.2.1 : Let f (x) be a threshold function on n variables with a structure [w.. , ...,w :T]. Then the real numbers A (f) and R„(f) 1 ir m ' M are called the top of the gap and bottom of the gap respectively, where A (f) = Min {w.aja e A(f)) and B (f) = Max [w.BllTe B(f)}. Further the gap of f(x), denoted G(f), will be defined as C-(f) = A (f) - In general if f (x) is a threshold function with structure [w , ...,w ;T] then the structure [w , . . . ,w ;t] is also a structure 79 for f(x) if (5.2.1) R,(f) + 1 < t < A (f), w i M - — m 7 where we have assumed a normalized system of inequalities. From (5.2.1) we may obtain the following. Theorem 5.2.1: Let g(y,5T) = yf 1 (x) - f 2 (x) and h(y,x) = yf 3 (5T) - f^(x) be two threshold functions on n + 1 variables where -(f ,f p; f ,f< ) and where f c f and f, c f Then g(y,x) - h(y,x) if and only if there exists real numbers t , t , t.~, t, such that t_ - t = t, - t where (5-2.2) 1 + R,(f.) < t. < A (f.), i = 1,2,3,^. Proof : Let g(y,x) = yf^x) v fg(x) and h(y,x) = yf^(x) v f^(x) be two threshold functions such that -(f ,f ,f ,f. ) and f„ c f^ and f. c f Let [w , . . . ,w ;T.] be a structure for f., i = 1,2, 3^. J_ n x x First assume that there exists real numbers t , t , t , t. such that t„ - t_ = ti - t_ where (5.2.2) holds. Then [w^,...,w :t.] 2143 l'nx is also a structure for f.(x). Thus from lemma 4.2.10, g(y,x) is a threshold function with structure [w ,w, , . . . ,w :T ] where w = t_ - t_ y J 1' n> g y 2 1 and T = t_ and [w' ,w n , . . . ,w : T, ] is a structure for h(y,x) where 80 w « = t, - t and T, = t. . But t, - t = t - t and thus g(y,x) - h(y,x). Conversely assume that g(y,x) - h(y,x) with structures [w ,w-, , . . • ,w ;T I and [w ,w,,...,w : T, ] respectively. Then from lemma y 1 n g y 1 n h ^ k.2.9 we see that structures for f (x), f (x), f~(x) and fv(x) are respectively [w; T -w ], [w; T 3, [w; T. - w ] and [w;T h ]. Thus (5-2.2) is satisfied for each of the thresholds in these structures and T - (T - w ) = T. - (T. - w ) g g y h h y y qui Theorem j>2.2 [5] : Any positive threshold function of up to n variables may be realized by taking nonnegative integral weights,, w., i = 1,2, ...,n, satisfying < w. < 2((n+ DA) (n+ 1)/2 = W. Based on the results given above and in chapter k we may now define a procedure to check whether or not a given function. f(x), is a threshold function. In this procedure we will assume that f (x) is a positive function on n variables and that the variables are ordered 4* 4" «£ asx. > x > . . . > x. . 1, — 1,, - — 1 12 n Procedure 5. 2.1 : Test for Threshold Functions. Step 1: Determine a simple factorization for f(x) using the procedure given in the proof of theorem 4.2.1^. If a simple factorization is found, then go to step 2. If no simple factorization exists., then stop, the function is not a threshold function by theorem U.2.1^. 81 Step 2: Let w. = 1 and let p = 1. Go to step 3« ~n Step 3'» • Using lemma 4.2.2, construct structures for the simple factors of f(x) beginning with [w. ;T] where T € {l,2,...,w. } n n if the simple factor is dependent on x. and T = otherwise. n For the purposes of this procedure we will assume that if a simple factor is independent of the variables x. , x. , ...,x_. . 3 X j>l X n then the weight for w. is found from the function x. i . ., i . , 3-1 3-1 * 1 (cf. example 4.2.4). Go to step 4. Step 4: Using lemmas 4.2.3? 4-2.4 and 4.2.12 continue building a structure for the function choosing each weight to be the smallest integer possible. Then: (a) if a structure is found, i.e. all of the weights have a value, stop. This structure realizes f(x), (b) if at any point theorem 5-2.1 is violated go to step 5- (c) if theorem 5-2.2 is violated, go to step 7- Step 5: Let w. ,w. ,-•>, w. be the weights which may have multiple J l J 2 J k integer values due to a gap which is greater then 1. If w. is less then its maximum integer value then increase w. P P to its next higher integer value and go to step 4. if -^ P has its maximum integer value go to step 6. The maximum is no greater then W. Step 6: If p < k - 1 then increment p by 1, i.e. p := p+1, and go to 82 step h. If p - k then go to step J. Step 7: If w. < W, then increment w. by 1 and go to step 3- If l i n n w. = W then stop. The function cannot be threshold function i n by theorem 5-2.2. In order to illustrate the test procedure we will give three examples. Example 5*2.1: Let f( Xl ,...,x 5 ) = x^ - x^ - x x x 3 x 5 v x^. A simple factorization is f(.x) = x 1 (x 2 v x^x^ v x 5 )) v XgX x^. In this case f (x) is a compound function with associated simple factors of (x ^ x (x, v x )) and (x x x, ). We may build up structures for these simple factors as follows: x 2 v x 3 (x 4 v x 5 } x 2 x 3 x ii' [l;l] [1;0] w, > 1 w, >l-0+l = 2 [2,1; 1] [2,1; 2] w>3-l+l = 3 w>3-2+l = 2 [3,2,1;**] [3,2,1; 5] w 2 >4 w 2 >6-5+l = 2 (4,3,2,1;*+] [-+,3,2,1; 9] Next going to step 4 and applying lemma 4.2.12 we have a structure for f(x) of [5,4,3,2,1; 9]- Example 5-2.2: Let 83 f(x ± , . ..,x 5 ) p x^Xg ^ x 1 x x^ v x^x, v x 1 x_jc 5 v x 2 x 3 x 4 v x 2 x 3 x 5 . A simple factorization for this function is f(x) = x 1 (x 2 v x (x^ v x ) x^xj v x 2 (x 3 (x 4 v x )) where the simple factors are (x. v x c ), (x.x ) and x> ^ x r ). Let w » 1 and p = I. Then structures for the simple factors are found as follows : x k - x 5 x^ x^ - x 5 [i/i] [i;i] [i;i] W, > 1 Wi >l-l+l = lw, > 1 [i,i;i] [1,1^2] [i,i;H The value of v, may now be determined from the functions x_(xi v x ) ^ x. x q and x~(xi ^ x ). From the first, applying lemma 4.2.12, we have w = 2-l=l and from the second, applying lemma 4.2. 3> we have w_>2 -1+1 = 2. Thus theorem 5.2.1 is violated where the two functions mentioned in this theorem are x„(xi v x c ) v x, x and x^(x ; v xJ 3 ^ 5 4 5 3 4 5 v 0. We now go to step 5. In this case v, and w may have multiple values. Thus let w. = 2. Then the structures for the simple factors become [2,ljl], [2, U3l a n ^ [2,1 jl] respectively. Thus w = 3 - 1 - 2 and w>3-l+l=3« Again theorem 5.2.1 is violated so we must increase w, again. For this case W = 6,76. It is easily seen that theorem 5.2.1 will be violated for all w, such that 6 > w, > 1 and w n = 1. Thus we 4 — 4 — 5 f must increase w by 1. Since x. => x and since w. = 2, w = 1 produced a violation of theorem 5.2.1, so also will w, = 1, w. = 2. Therefore Qk we may begin by setting the structures for the simple factors to [2, 2; 1,2], [2,2; 3,k] and [2,2; 1,2] respectively. Then w _ = 3 - 1, 3-2, ^ - 1, U - 2 = 2,1,3,2 and w > ^ - 1 + 1, 1+ - 2 + 1 = k,3- Thus we may set w = 3- Next w p may be found as follows: x^ ^ w. [x 3 (x k v/ x 5 ) - x^] [3,2,2; U] > h [^,3,2,2; ij-] X 2 tx 3^ x U ^ x 5^ [3-2.2; 5] w 2 > 7 - 5 + 1 = 3 [U,3,2,2;9]. Thus applying lemma k.2.22, we find the structure for f(x) as [5, ^+,3, 2, 2; 9] In order to illustrate how the work may be organized we will give one further example. Example 5-2.3: Let f (x) = x ! x 2 v x i X 3 X l+ v x i x 3 X 5 v ' x l X 3 X 6 v X.X, X X. v X^X.-X, i. 4 5 6 2 3^ where a simple factorisation becomes f(x) - X n (x o >' X (X,, < X, >' Xg) w Xj.X.-X^) r 2 3 v- 4 - 5 v X 2 X 3 X V The test may now be performed as follows x x (x 2 - x 3 (x 4 v, x 5 V x 6 ) >/ x^x 5 x 6 ) [1;1] [1;1] w c > 1 5 - w c > 1 5 - [1,1; 1] [1,1; 2] w^ > 1 Wi+ > 1 [3,1,1; l] [3,1,1; 5] ^56 - x 2 x 3 x v [1;0] w > [1,1; 0] w^ > 3 [3,1,1; 3] 85 w~ = h w_ > 3 [U,3,l*l;5] [U,3,l,l;7] w > 5 w > 3 [5^,3,1,1; 5] [5,*+, 3,1,1; 12] w 1 = 12 - 5 = 7- Thus a structure for f(x) becomes [7,5,**, 3,1,1; 12]. A large class of unate functions which are not threshold functions do not have simple factorizations. For example, the function xx v xx \/- xx, does not have a simple factorization. Thus theorem k.2.l6 will eliminate all such functions from further consideration. Unfortunately if a switching function is not a threshold function but does have a simple factorization the process described above becomes quite tedious. An example of such a function is x x (x 2 - x 3 (x u (x 5 v- x 6 ) v x^x 6 ) - x.x 5 x 6 ) - x 2 (x 3 (x 4 (x_ v x 6 ) - x_x 6 ) - x^) v x 3 x u x 5 x 6 . It is interesting to note that the procedure described here is almost identical to the test procedure described by Coates and Lewis [2]. However the motivation in obtaining the procedure is quite different. The procedure described here makes no claim at being generally efficient. In fact for functions of 12 or more variables there is no guarantee that an optimal integer structure will be found. For functions of up to and including six variables the above procedure is quite easy to apply and generally yields a structure, if one exists, quite rapidly. 86 A relatively large percentage of threshold functions of six or fewer variables have there smallest optimal weight equal to one. For such functions the above procedure is almost trivial to apply. It is this fact which makes the method of interest. Table 5-2.1 shows the estimated percentage of threshold functions of six or fewer variables having w . = 1. This table was derived by counting the number of NPN ° mm (negation of variables, permutation of variables, negation of function ) representative threshold functions having w . =1 and then dividing by ±- o min & j the total number of NPN representative threshold functions [13] • r #(w . = 1) ' mm J 1 100 2 100 3 100 k 100 5 9^ 6 77 Table j?.2.1 : Percent of threshold functions of n variables having w . = 1. mm 5«3 Synthesis of a Network Under Fan in Restrictions The problem of fan in restrictions is of great practical importance in the applications of threshold logic. Essentially the fan in restrictions are of two types. The first is a restriction on the sum of input weights to each threshold element. The second is a restriction on the number of inputs to each element. It is the second of these which we will discuss here. oy Let f (x) be a threshold function on n variables with a structure [w , , • . • ,w ;T] and assume, without loss of generality, that w., > w„ > . . . > w . Then by theorem k.2.k, x_ > x > ... > x . The 1-2— — n 1-2— - function f(x) may be factored as (5.3.1) f(x) = h Q v Xl h r Now by lemmas U.2.10 and U.2.13, both h and h are threshold functions with structures [w„ , . . . ,w : T] and [w n , . . . ,w : T - w n ] respectively. 2 ' n 2 n 1 Furthermore the function (5-3.2) g(x 1 ,h Q ,h 1 ) = h Q s x^ is a simple function on the variables h , h and x if h and h are considered as variables along with x . Thus by theorem k.2.5) the functio g(x ,h ,h ) is a threshold function. In what follows, when the functions h. are to represent i variables of g we will denote them with a prime. In general the threshold function f (it) may be factored as (5.3.3) f(x) = h Q - x 1 (h 1 - x 2 (h 2 - ... - \(\))) where the functions h . ...,h. are threshold functions whose structures k may be found by repeated application of lemmas '-.2.12 and U.2.15. Definition 5 • 3» 1 - Let f (x) be a threshold function on n variables such that X., > X n > . . . > X . 1 — 2 — — n Assume f(x) is factored as in ( 5 • 3- 3) • Then the function on the variab] es h ' . . . ,h' y . . y given as k 1 k 88 (5.3.*0 g K (f) = 11q v x i (h i v x 2 (h 2 ^ •- v ^^^^ is said to be the simple function of f (x) of order k or simply the S function of f(x) of order k. Further we will denote the variables h' , . . . ,hj as the simple variables or S variables! * u k From definition 5- 3*1 we have the following properties for simple functions of order k. _ * k Property 5.3-1 : The simple function of f (x) of order k, g (f), has 2k + 1 variables for k = 0,1,..., n. Property 5-3»2 : The functions h., for a fixed i = 0,1, ...,k - 1, are dependent on at most n - i - 1 variables, h is dependent on at most n - k variables. Example 5- 3-1 : Let f(xj be given as f(x) = x 2 x 3 x 4 x 5 n/ x 1 [(x 3 x 1+ V x^) v X 2^ X 3 v X h v X 5^ = b v x [h ^ x b J ^L^-, *p p 22' Thus h is dependent on k = 5-0-1 variables, h is dependent on 3 = 5-1-1 variables and h is dependent on 3 = 5-2 variables. Property 5«3-3 : Each of the functions h., i = 0,1, ...,k, is a threshold function. Property 5-3-^ : If for g (f), h. is not a constant for any i = 0,1, ...,k, then g (f) has a structure 89 where and h X l n .l X 2 n 2 X k "k T = w + w, , X l h l w = w. , = 1 x. h; k k w = w. , + w x. h. x. , i 1 l+l w. , = w + w, , h. x. _, h.' i i+l i+I Example 5*3.2 : For the function of example 5* 3*1 we have g 2 (f) = h^ >/ Xl (h^ v x 2 hp. A structure for g (f) is easily seen to be [5,3,2,1,1* 5l where w = w. , = 1 x 2 h 2 w. , = w +w, f =l+l = 2 h^ x 2 b_ 2 w =w,, + w =2+1=3 X l h l X 2 w , = w + w. , =3+2 = 5 n o x i n i T = w + w = 3 + 2 = 5. 1 1 Property 5* 3* 5 * Every threshold function, f(x), has a simple function of f(x), g (f), of order k for any k = 0,1,2, ... ,n. Based on these rather obvious properties a procedure will now be described which will convert a given threshold element into a 90 network of threshold elements each satisfying the requirements on the number of inputs. In what follows we will let p be the maximum number of inputs allowable for each element. The procedure is as follows. Procedure 3- 3-1- Synthesis of a Network Under Fan In Restrictions for a Threshold Function Step 1: Find a simple function of f(x) of order k, g (f), such that g (f) has at most p + 1 nontrivial variables or such that II is dependent on p variables, whichever comes first. Step 2: Synthesize a threshold element which realizes g (f). If necessary x h ' may be considered as a single variable. Step 3: Consider each of the functions corresponding to S variables as new threshold functions and proceed to step 1. The procedure terminates when all elements satisfy the fan in restrictions. To illustrate procedure 5. 3«lj consider the following examples, Exampl e 5- 3- 3: Let f (x n , . . . ,x ) be the threshold function whose _l. n structure is [6,2,2,1,1,1', 8] . The easiest way to determine g"(f) is tc let k - n - p. Then if the number of nontrivial variables of g (f) is greater then p + 1, combine some of the variables to produce a g"(f) having j < p + 1. For this example let p = h. Then assume that k = n-p = 6-l+ = 2. Thus g 2 (f) = h' v x (h' v x h'). Now by repeated applications of lemma 4.2.12 we have the structures for h , h 2 and h g of [2,2,1,1,1; 8], [2,1,1,1; 2] [2,1,1,1; 0] respectively. It is clear from these structures that h' = and h' = 1. Thus g (f) = x, (h.! v x„). Further hu is dependend on p = h variables. Thus a 91 realization for f(x) having all elements with h or fewer inputs is shown in figure 5«3«1» H%) Figure 5»3-l : Realization of f(x) with structure [6,2,2,1,1,1; 8] restricted to p = h. Example ^.^.h : Let f(x) be the threshold function of example 5-3«3< Let p = 3« Thus assume k = 6 - 3 = 3« Then .3, f) - h^ - Xl (h^ - x 2 (h^ - x_h')) where the structures for the functions h. are i h Q *+ [2,2,1,1,1:81 implies h^ = h «-» [2,1,1,1; 2] h «-» [1,1,1; 0] implies h' = 1 h <-* [1,1,1; -l] implies h' = 1. .3, Thus g J (f) = x 1 (h ; [ ^ x 2 ). Next we note that h is dependent on h > p = 3 variables and thus we must determine a new network having the required number 92 of inputs. Let k = k - 3 = 1. Then g~(h J = h' v x h ' (h' and h' are different from those above) where h Q «-> [1,1A;2] h «-» [1,1,1; 0] Implies h' = 0. Thus g (h ) = h ' v- x . Since h is dependent on the required number of variables a realization becomes as shown in figure 5- 3*2. Ux) Figure 5.3*2 ; Realization of f(x) with structure [6,2,2,1,1,1-8] restricted to p = 3* There is, of course, no guarantee that the structures found using procedure 5*3*1 are optimal in number of elements. However computational experience indicates that the results seem in general close to the optimal structures. The main advantage of this procedure is its extreme simplicity. The procedure described in this section may be extended to more general threshold networks simply by applying the procedure to each threshold element in the network. 93 CHAPTER 6 SUMMARY This dissertation has attempted to give a new and workable approach to the general threshold synthesis problem. A minimal threshold approximation was defined in chapter 1. It was shown how a mixed integer integer linear programming formulation could be used to determine and M function of the given switching function, Some of the algebraic properties of minimal threshold approxi- mations were investigated in chapter 2. It was shown that any self dual switching function has a self dual minimal threshold approximation. This led to the fact that for a self dual function the true residual function and the compliment of the false residual function with respect to a minimal threshold approximation are duals of each other. A less restrictive threshold approximation was defined and investigated in the last section of chapter 2. In chapter 3j it was shown how the mixed integer linear pro- gramming formulation for the determination of a minimal threshold approximation could be simplified from that of chapter 1. A synthesis procedure was then described based upon self dual minimal threshold approximations. Finally, a synthesis procedure was defined based on the less restrictive threshold approximations called t/m and f/m functions. Simple functions, a subclass of threshold functions, were defined in chapter k. The algebraic properties of simple functions were discussed and then it was shown how simple functions could be expanded into a class of functions having threshold functions as a subclass. This class of functions has simple factorizations. .,;, Finally it was shown in chapter 5 how functions having simple factorizations could be checked for threshold realizability. The problem of restricting the number of inputs to a given threshold element was then discussed. The major part of this work has been devoted to the investi- gation of two types of threshold approximation and their application to the general threshold synthesis problem. An effort has been made to give some insight into the problem of approximating general switching functions by threshold functions. 95 References [I] Breuer, M. A., "implementation of Threshold Nets by Integer Linear Programming/' IEEE TEC , Vol. EC-lU, pp. 950 - 952, De • 65- [2] Coates, C L. and Lewis, P.M., "A Realization Procedure for Threshold Gate Networks, " IEEE TEC , Vol. EC-12, pp. k?h - k6l, Oct. 1963. (3) Elgct, 0. C, "Truth Functions Realizable by Single Threshold Organs, "SCTLD, pp. 225 - 2k$, Sept. 1961. [k] Gass, S. I., Linear Programming , McGraw - Hill, 2nd addition, New York, 196^ [5] Gonzolez, R. , "Synthesis Problems in Linear Threshold Logic," Ph.D. Thesis, SEL Report #7, University of Michigan, June 1966. [6] Goto, E., "A Note on Logical Gain," Short Notes, IEEE TEC , Vol. EC-13, pp. 606 - 608, Oct. I96U. [7] Goto, E. and Takahasi, H. , "Threshold, Majority and Bilateral Switching Devices," Switching Theory in Space Technology , pp. h^ - 67, Stanford University Press, 1963° [8] McNaughton, P., "Unate Truth Functions," IRE TEC , Vol. EC-10, pp. 1-6, March 1961. [9] Minnick, R. C, "Linear Input Logic," IRE TEC , Vol. EC-10, pp. 6 - l6, March 1961. [10] Muroga, S., "Logical Design of an Optimum Network by Integer Linear Programming," Dept. of Computer Science, File #700, University of Illinois, July 1966. [II] Muroga, S., "Majority Logic and Problems of Probabilistic Behavior," Self Organizing Systems , pp. 2^3 - 28l, Spartan Books, 1962. [12] Muroga, S. , "Threshold Logic," Lecture notes, Dept. of Computer Science, University of Illinois, 1967° [13] Muroga, S., Toda, I. and Knodo, Mo, "Majority Decision Functions of up to Six Variables," Math, of Computation , Vol. XVI, #80, Oct. 1962. [ik] Muroga, S., Toda, I. and Takasu, S. , "Theory of Majority Decision Elements," Journal of the Franklin Institute , Vol.. 27 1, pp. 37 6 - *U8, 1961. 96 [15] Slivinski, T. A., "Partially Separable Functions," Ph.D. Thesis, Dept. of Computer Science, University of Illinois, June 1967' [l6] Stram, 0. B. , "Arbitrary Boolean Functions of N Variables Realizable in Terms of Threshold Devices," Proc. IRE, Vol. ks, pp. 210 - 220, Jan. 1961. [17] Winder, R.O., "Threshold Logic," Ph.D. Thesis, Dept. of Mathematics, Princeton University, 1962. [18] Winder, R.O., "The Status of Threshold Logic," First Annual Princeton Conference on Information Science and Systems, Princeton, New Jersey, March 1967. 97 VITA Kenneth James Breeding was born in Shelbyville, Illinois in 19^-1. He received the B.S. degree in Electrical Engineering from the University of Illinois, Urbana, Illinois, in 1963- In September of 1963 he began his graduate study at the University of Illinois and received his M.S. degree in June of 1965- From September 1963 to September 196? he was working as a Research Assistant in the Department of Computer Science, University of Illinois. Since September of 1965 he has been working under an RCA Fellowship in Electrical Engineering. From September of 1965 to February of 1967 he was first a Teaching Assistant and then Instructor in the Department of Electrical Engineering, University of Illinois. 93 Jtor 20