INFORMATION AND CONTR©L 8, 531--551
(1965)
A "Region" Concept and its Application to Threshold Logic PHILIP KASZERMAN #
I T T Fec~sralLaboratories, Nutley, New Jersey The concept of a "region of vertices" is introduced and precisely defined. Boundary, interior, and exterior vertices are defined. It is proved that a necessary and sufficient condition that a Boolean function be a threshold function is that the boundary TRUE vertices be separable from the boundary FALSE vertices. This leads to a simpler characterization of a threshold function than the original defining inequalities. The functions that are generated by a two-threshold device network are examined for their properties in terms of regions of TRUE and FALSE vertices. By making use of these properties, synthesis procedures are developed. I. INTRODUCTION
A Boolean function of n v a r i a b l e s (x~ to x , ) m a y b e defined as a m a p p i n g f r o m t h e v e r t i c e s of a n n - d i m e n s i o n a l h y p e r c u b e whose vertices a r e n - t u p l e s of "1" a n d " - 1 " to (1, 0). T h e vertices w h i c h m a p into " 1 " will b e called t h e " T R U E " v e r t i c e s a n d those w h i c h m a p into " 0 " wilt b e referred to as t h e " F A L S E " vertices. T h e c o r r e s p o n d i n g B o o l e a n a l g e b r a i c expression for a p a r t i c u l a r f u n c t i o n is d e t e r m i n e d f r o m t h e m a p p i n g a n d w r i t t e n in s t a n d a r d s u m form. E a c h T R U E v e r t e x c o r r e s p o n d s to a p r o d u c t t e r m . A "1" c o o r d i n a t e of a v e r t e x c o r r e s p o n d s to a n u n c o m p l e m e n t e d v a r i a b l e a n d a " - 1 " corresponds to a c o m p l e m e n t e d v a r i a b l e . T h u s t h e v e r t e x (1, 1, - 1 ) w o u l d corres p o n d to t h e t e r m x~x22~. As a c o m p l e t e example, consider Fig. 1. T h e v e r t i c e s w h i c h m a p into "1" are shown circled a n d those which m a p int.o "0" are left as solid dots. T h e a l g e b r a i c expression for t h e f u n c t i o n
is f = xlx2xs ~- x122xs ~ 21x2x3 ~, xlx22s F u r t h e r definitions are n e x t p r e s e n t e d . * Formerly with the Department of Electrical Engineering, New York University, New York, New York. 531
532
KASZER~ (-i
(-1, 1, 'l)
(1,
~, - i )
I,-I)
J x2I /
X1
×3
( I, -I, -I)
( - 1 , - 1 , 1)
~
-t,-1)
I (1, -~, ~) FIG. 1
A. R E G I O N A region is any subset of like (i.e., all T R U E or all FALSE) vertices t h a t has the following properties: (a) I t is possible to reach any vertex of the subset from any other vertex of the subset by a sequence of unit-distance 1 transitions over vertices within the subset. (b) A n y like vertex which is not in this subset is more than a unitdistance from every member of the subset. I n Fig. 1 the T R U E vertices form a single region. In this simple case it is possible to determine the region by direct examination of the cube and noting that it is possible to reach any T R U E vertex from any other T R U E vertex b y unit steps. t The "unit-distance" is the distance between vertices which differ in only one coordinate. Since the vertices of the hypercube used in this paper are n-tuples of "1" and " - 1 " the unit-distance is actually a distance of "2."
A REGION CONCEPT AND THRESHOLD LOGIC
533
B . SUBI:~EGION
A subregion is any subset of like vertices which satisfies property (a) above. In Fig. 1 the TRUE vertices (1, 1, 1) and (1, - 1 , 1) form a subregion because they are adjacent, to each other but other TRUE vertices which can also be reached from these vertices by unit steps have not been included. Regions or subregions consisting of TRUE vertices will be referred to as "TRUE regions" or "TRUE subregions." Similarly, regions or subregions containing FALSE vertices will be called "FALSE regions" or "FALSE subregions." C. INTERIOR
VERTEX
An interior vertex of a region (subregion) is a vertex such that (a) It is a member of the region (subregion). (b) All vertices which are a unit distance from it are also members of the region (subregion). In Fig. I, vertex (i, I, i) is an interior vertex since all the vertices which are adjacent to it are also TRUE. D. BOUNDARY
VERTEX
A boundary vertex is a vertex such that (a) It is a member of the region (subregion). (b) There exists at least one vertex which is a unit distance from it which is not a member of the region (subregion). In Fig. i, the TRUE vertices (I, -I, i), (I, I, -i), and (-i, I, I) are boundary vertices since each is adjacent to a FALSE vertex. E. EXTERIOR
VERTEX
An exterior vertex of a region (subregion) is a vertex which is not a member of the region (subregion). In Fig. I, vertex (--i, --i, -i) is an exterior vertex of the TRUE region. F. THRESHOLD
FUNCTION
A threshold function is defined as a Boolean function whose TRUE vertices are separable fronl the FALSE vertices by a hyperplane; i.e. there exists a vector, A, and threshold, a, such that
534
KASZ~aMAN A -- ( a l , . . - , as)
where
a~ = real n u m b e r
a = real n u m b e r A.X > a
for all X = T R U E vertex
A-X < a
for all X = F A L S E vertex
(1)
If there are " D O N ' T C A R E " vertices, these are taken into account b y not writing any equations for them. T h e parameters A and a will be referred to as a threshold device realization, implementation, or synthesis. G. Two-THRESHOLD DEVICE FUNCTION A two-threshold device function is a threshold function for which one of the arguments is itself a threshold function; i.e. x ~ , h(xl, . . . , x,))
f = g(Xl, ..-,
where g is a threshold function of (n + 1 ) variables and h is a threshold function of n variables. For the purposes of this paper, an equivalent formulation (Kaszerman, 1963a) will be used. A two-threshold device function is a Boolean function such t h a t
f = T~ -t- T~T~,
(2)
where T1, T~, and T3 are threshold functions whose realizations are A and a l , A and a s , B and ~ respectively. Thus, A-X A .X A.X A .X al
> al < al > a2 < as >_- as B.X > B B-X < ~
at at at at
a a a a
T R U E vertex of T1 F A L S E vertex of T1 T R U E vertex of T~ F A L S E vertex of T2
at a T R U E vertex of T3 at a F A L S E vertex of T3
(3a) (3b) (3c) (3d) (3e) (3f) (3g)
al was arbitrarily chosen greater or equal to as since a n y two-threshold device network for which as >= al can be converted to an equivalent network (Kaszerman, 1963a) for which a, ->_ a s . II. IDENTIFICATION OF BOUNDARIES AND REGIONS The boundary and interior T R U E ( F A L S E ) vertices m a y be found b y carrying out the first cycle of the Quine-McCluskey reduction
A REGION
CONCEPT
AND
THRESHOLD
LOGIC
535
procedure (Caldwell, 1958). The procedure is such that the first cycle produces a list of all pairs of adjacent vertices. Thus one need only count thenumber of times a vertex appears in the "pair list" to determine whether it is a boundary or interior vertex. An interior vertex must appear exactly n times because its n adjacent vertices are also TRUE (FALSE) vertices. A boundary vertex appears less than n times because ~t least one of its neighbors is FALSE (TRUE). For example, consider the function of three v~riables F = 2~223 -t- ~1~2x3 + 2~x~.2~3-t- ~lx2x3 + x122~.~+ x1~2x3
f = ~ (0, 1, 2, 3, 4, 5)
(4)
Then
-1
0, 1 0, 2 0, 4
2 4 -3
1,3 1,5 2, 3
5 4, 5
The boundary TRUE vertices are 2, 3, 4, 5. The interior TRUE vertices are 0 and 1. The regions can be found by completing the Quine-MeCluskey reduction procedure. Each prime implicant by itself is a subregion since it was formed by combining adjacent vertices or groups of adjacent vertices. If two prime implicants have ~ vertex in common, they form subregion. Further, two prime implicants will form a subregion if a component vertex of one is adjacent to a component vertex of the other. However, in this case, the two adjacent vertices will either form another prime implicant or be component parts of another prime hnplie~nt. Thus, if a set of prime implicants forms a region, they will be "linked together" by vertices in common. The prime implicants which are thus
536
I~ASZERMAN
linked together can be found by arranging all the prime implicants in a prime implicant chart (Caldwell, 1958). First, a horizontal line is drawn across an arbitrarily chosen row. Vertical lines are drawn through the vertex columns which contain an entry for that row. Wherever a vertical line intersects a vertex entry, a horizontal line is drawn through the corresponding row. Vertical lines are then drawn through all the vertex entries in these rows. The process continues until every vertex which is intersected by either a horizontal or vertical line is intersected by both a horizontal and vertical line. The resulting horizontal lines then indicate the prime implieants which form a region. For instance, consider f = 2f2~x3x4 + xlx2x3x4 + °21x2x,.~4 4- ~21x~c~x4+ x122x3xt -~ xf22x3x4 (5)
= ~ (3, 4, 6, 7, 9, 11)
(6)
After finding the prime implicants, the following prime implicant chart is drawn up. 3
4
(i
7
9
")2
11
'i "
(4, (3, (3, (6, (9,
6) 7) 11) 7) 11)
A horizontal line through (4, 6) picks up vertices 4 and 6. A vertical line through vertex 6 intersects the vertex 6 entry corresponding to (6, 7). A horizontal line is drawn through (6, 7). A vertical line through 7 intersects the vertex 7 entry for (3, 7). Continuing the process, it is found that (3, 11 ) and (9, 11 ) are also linked to the previous implicants. Thus, all the T R U E vertices form a single region. III. APPLICATION A unate function is one which may be represented in a form in which each variable appears only either complemented or uncomplemented. One such representation is the minimum sum form which, for a unate function, is just the sum of the prime implicants (McNaughton, 1961). It can be shown (Kaszerman, 1963a; Dertouzos, 1964) that all the prime implieants have at least one vertex in common. Also, the complement of a unate function is unate. Thus:
A
REGION
CONCEPT
AND
THRESHOLD
LOGIC
537
THEOREM 1. The TRUE (FALSE) vertices of a unate function forn~ a region. Since a threshold function is unate, a corollary to Theorem 1 is: COROLLARY: The TRUE (FALSE) vertices of a threshold function form a region. Efforts have been directed towards finding a reduced set of inequalities which are equivalent to the original set (inequalities 1) for any function which is being checked to see if it is a threshold function. 5.fcNaughton's (1961) set of minimal TRUE and maximal FALSE vertices yield inequalities which are equivalent to the original set if the function is a threshold function (Winder, 1962). The following leads to an equivalent reduced set of inequalities for any function. THEOREM 2. A necessary and su~cient condition that a Boolean function be a threshold function is that the TRUE boundary vertices be separable from the FALSE boundary vertices by a hyperplane. Proof: (a) Necessity. Necessity follows directly from the definitions since the boundary vertices were defined as part of the TRUE or FALSE set. (b) Sufficiency. Assume that there exists a hyperplane which separates the TRUE boundary vertices from the FALSE boundary vertices: i.e., there exists an A such that A.X > a
at a TRUE boundary vertex
(7a)
A.X < a
at a FALSE boundary vertex
(Tb)
Now, for convenience, rotate A into the first orthant by changing all its negative coordinates to positive coordinates of the same magnitude. The hypercube is rotated along with A by changing the sign of the corresponding coordinates of each vertex. (This is a linear transformation which preserves the symmetry of the hypercube. Its only effect on the algebraic expression for the function is to complement the variables corresponding to the coordinates whose signs were changed (iKinnick, 1961; Winder, 1962).) Then, ignoring the trivial cases for which the function is identically TRUE or FALSE, (1,1, . . . , 1 )
is a TRUE vertex
(-1, -1, ..., -1)
is a FALSE vertex
(s)
Next, an interior TRUE vertex is examined. Assume k of its coordinates are negative. Renumber the variables so that it is the first/c coordinates which are negative, i.e.,
538
KASZERMAN kth coordinate
X~t,~o~ = ( - - 1 , . . . ,
--1", 1, . . . , 1)
(9)
Then A.Xi.t~io~ = - a l . . . . .
ak q- ak+l if- . . . q- a~
(10)
Now consider a sequence of vertices such t h a t the first is the Xi.~o~ior of (9) and each succeeding vertex has an additional coordinate changed to " - 1 . " At least one of these must be a boundary T R U E vertex because the sequence starts with a T R U E vertex and reaches the F A L S E vertex ( -- 1, -- 1, • • •, -- 1) in unit steps. Assume t h a t the boundary T R U E vertex is one which has " - i " for the first p(p > k) coordinates. Call this vertex "Xbo,~ndary". Then A.Xbo~d~ = --al .....
ap + a~+l + .." + a~
(11)
Comparing (10) to (11), and using the fact t h a t all a~ are positive and p > k, gives A .Xinterior ~_ A "Xboundary
(12)
A "Xbo.,d~ry > a
(13)
A.Xint~rio~ > a
(14)
But b y assumption
so that
Thus, an interior T R U E vertex is on the same side of the hyperplane as the boundary T R U E vertices. B y a similar argument, it can be shown t h a t the interior F A L S E vertices are on the same side of the hyperplane as the boundary F A L S E vertices. Therefore, a hyperplane which separates the boundary vertices will correctly separate atl the vertices. CORObLARY. A reduced set of inequalities which are equivalent to the complete set can be formed by using only the boundary T R U E and F A L S E
vertices of a Boolean function. I t should be noted t h a t it is not necessary to identify regions to find this set of inequalities. The use of the above corollary only involves distinguishing boundary from interior vertices. M c N a u g h t o n ' s (1961) minimal and maximal vertices are boundary T R U E and boundary F A L S E vertices. Since the separability of these maximal and minimal vertices does not guarantee that the function is a
A REGION
CONCEPT
AND THRESHOLD
LOGIC
539
threshold function, they do not include all of the boundary vertices. However, MeNaughton's theorem 4.2 (1961) gives necessary and sufficient conditions for separability by adding the conditions that the function be transformed to one in which the variables are in noncomplemented form and that. the coefficients of the hyperplane be positive. In practice, it is somewhat simpler to use McNaughton's technique in spite of the additional conditions because there are fewer inequalities to consider than if the boundaw vertices are used. Two theorems are now stated. Their proofs are given in the appendix. THEOREM 3. It is possible to reach any vertex of the set of TRUE (FALSE) boundary vertices of a threshold function f~°om any other me~nber of the set by a sequence consisting of unit-transition and~or two-unitiransition steps. THEORE~I 4. The set of vertices consisting of the TRUE boundary vertices plus the FALSE boundary vertices of a threshold function forms a region. The two-threshold device functions wilI be classified into four groups: 1. Single threshold function: f = T~ 2. Sum
(15)
of two threshold functions:
f=
T,+Ta
(16)
3. Product of two threshold functions: f = T=T~
(17)
4. General two-threshold device function: A "general" two-threshold device function is any two-threshold device function which ean not be reduced to one of the previous cases. The first case has already been examined. Since cases two and three represent complementary functions, only ease 2 will be considered. Anything said about case 2 will apply to ease 3 by interchanging the words " T R U E " and "FALSE". Case 4 will be discussed separately. Case 2 ~s now considered. The TRUE vertices of f=
T~+ T3
(18)
consist o~ either one region or two regions. Proof: The TRUE vertices of T~ or Ta alone form a region by property 2. Thus, if (1) T1 and Te have no vertices in common and (2) a boundary
540
:KASZERMAN
vertex of T1 is not adjacent to a boundary vertex of T~, the function consists of two regions. However, if (1) T1 and T3 have at least one vertex in common or (2) a boundary vertex of T1 is adjacent to a boundary vertex of T~, it wi]/be possible to reach any vertex from any other vertex by unit steps via a common vertex or the adjacent boundary vertices. Thus, (18) consists of either one region or two regions. Unfortunately, the FALSE vertices are not restricted in any similar manner. The product of two threshold functions can be any number of regions. For instance, the symmetric function Sk(n) is the product of a k-out-of-n decision gate and the complement of a (/c + 1)-out-of-n decision gate; namely,
Sk(n) = Mk(n)M~+~(n).
(19)
Both the k-out-of-n decision gate and the complement of a (]c ~- 1)out-of-n decision gate are threshold functions. Thus, Sk(n) is the product of two threshold functions. Now
Sk(n) consists of (~ ) vertices.
No two of these vertices are adjacent because they must differ in at least two coordinates. Thus the number of regions i s ( ; ) ;
that is, there
are
\ - - /
as m a n y regions as there are vertices. A synthesis of the sum of two threshold functions is defined as vectors A and B and thresholds a and ~ such that either A .X > a
at the T R U E vertices
(20a)
B.X
at the T R U E vertices
(20b)
or
> ~
or
both (20a) and (20b) are satisfied.
(20c)
A . X < c~ at the F A L S E vertices
(20d)
B.X
(20e)
< ~
at the F A L S E vertices.
A test-synthesis procedure is as follows: 1. Check the number of T R U E regions. If there are three or more, the function can not be the sum of two threshold functions. 2. If there are two distinct regions, each region by itself must be a threshold function. Therefore, if there are two regions, each region is
A REGION CONCEPT AND THRESHOLD LOGIC
5z~1
checked to see if it is a threshold function. If each is a threshold function, these are the T1 and T3 whose sum forms the Boolean function. If either of the regions is not a threshold function, the function can not be the sum of two threshold fmlctions. 3. If the T R U E vertices consist of a single region, the procedure consists of a repetitive series of trials. A choice is made for T1. This choice shall consist of a region or subregion of T R U E points. Choices will be made successively of subregions (or regions) consisting of one T R U E vertex up to the region containing all the T R U E vertices. 7'i is also constrMned by the requirement that at least one of its vertices be a boundary T R U E vertex; otherwise T! would be contained in T1 d- Ts which would imply that the function is a threshold function. An attempt is then made to solve the following equations A.X > a
at the chosetl T R U E vertices of T~
(21a)
A .X < c~ at the F A L S E vertices of T1 d- T~
(21b)
B.X > ~
at the T R U E vertices of T1 + T3not chosen for T1
(21c)
B.X < ~
at. the FALSE vertices of T1 -4- T3
(21d)
It may be noted that (21a) and (21c) allow for " D O N ' T C A R E " vertices. If these inequalities have a solution, then this solution is the synthesis of the given function. If they do not have a solution for all choices of T~, then the Boolean function is not a sum of two threshold functions. Unfortunately, the application of step 3 and inequMities (21) involves a large &mount of work. From a practical standpoint, Cameron's (1964) technique using integer linear programming is to be preferred. The materigl iust given as well as the material in the rest of the paper is presented for its interest as another point of view rather than for its immediate practical usefuh~ess. The general two-threshold device function is f = T~ + T2T3
(22)
The function m a y also be represented b y f = T1 + T~T2Ta
(23)
The two terms ia the sum are now disjoint. The second term will be called the "remainder." It will be designated by the letter "R." T h a t is, R = TIT2T~
(24)
542
KASZER~L~N
Some properties of the generM two-threshold device function are now listed. Proofs are given in the Appendix. Property 1. The general two-threshold device function consists of a set of TRUE vertices such that a subset of the vertices is a region or subregion and the remaining vertices are an intersection of three regions. Property 2. The complement of the remainder consists of either one region or two regions. Property 3. If the complement of the remainder consists of two regions, one of these regions is iP2 and the other is/'1 + iP~. Property 4. 5~3is not contained in T1. Property 5. iP~ is not contained in iP3. Property 6. T3 is not contained in T2. Property 7. T1 and T2 are disjoint. Property 8. The set of weights of T2 is the negative of the set of weights for T~. (The thresholds are, of course, not related in any ways) A test-synthesis procedure which mM~es use of the above properties is now presented. 1. Make a tentative choice for T~. This choice shall consist of a region or subregion of TRUE points. Choices will be made successively of subregions (or regions) consisting of one TRUE vertex up to the region containing the maximum number of vertices. A choice for T1 is constrained by the requirement that at least one of its vertices be a boundary TRUE vertex. (Othel~vise the function is the product of two threshold functions. ) 2. After choosing T~, determine the remainder. 3. Take the complement of the remainder. Check the number of regions which it forms. Then proceed as follows: a. If/~ consists of three or more regions, return to Step 1. b. If /~ consists of two regions, T2 is immediately specified as the region not containing any vertices of T1. T3 is specified from the T~ + Ta region as follows: (1) Vertices of this region which do not belong to T1 must belong to T3 ; (2) vertices outside of this region belong to T~ ; (3) the vertices of T~ are DON'T CARES of T3. After the vertices have been specified, an attempt to synthesize the function is made using the following equations: A .X > al
at the boundary TRUE vertices of T1
(25a)
A - X < al
at the boundary FALSE vertices of T1
(25b)
A - X > as
at the boundary TRUE vertices of T2
(25c)
A REGION CONCEPT AND THRESHOLD LOGIC
5~3
A ' X < a2 at the boundary FALSE vertices of T~
(25d)
B . X > ~ at the TRUE vertices of T.3
(25e)
B . X < ~ at the FALSE vertices of T.3
(25f)
If inequalities (25) have a solution, this solution is the desired realization. If they are inconsistent, return to step 1. c. If/~ consists of one region, the synthesis procedure for the sum of two threshold functions is applied to T2 -4- T3. The vertices of T1 (which were chosen in step 1) are "DON'T CARES" of T~ + T~. However, since it is also necessary to specify T1, Eqs. (21) are replaced by A .X > al
at the chosen TRUE vertices o f / ' i
(26a)
A . X < al
at the FALSE vertices of T1 + T~T~
(26b)
A .X > a2 at the vertices in the remainder
(26e)
A - X < a2 at the chosen vertices of T2
(26d)
B.X > •
at the vertices in the remainder
(26e)
B-X < ~
at the vertices of ~P2+ Ta not chosen for T2 (26f)
If step 3 leads to a solution, this solution is the desired synthesis. If step 3 fails tf0r all choices of T1, the function is not a two-threshold device function. IV. E X A M P L E
As an example, consider function 209 in Minnick's (1961) table: f = ~ ( 0 , 2, 2, 4, 7, 9, 10, 13) The number of regions is first checked. This results in two regions, namely, Region 1 = ~
(0, 1, 2, 4, 9, 10, 13)
Region 2 = ~
(7)
Since there are two regions, the function is not a threshold function from Theorem 2. Further, region 1 is not a threshold function so that the function can not be the sum of two threshold functions. An examination of the complement of the function shows that it is not the sum of two threshold functions; hence the function is not the product of two threshold functions. A check is 1row made to see whether the function is a "general" two-device threshold function.
54:4
KASZEm~AN
Tentative choices are made for 21'1. After eliminating all the single vertex choices as well as some of the two vertex choices, one has T1 = ~
(2,10)
Then the remainder is R=
)-~ (0, 1, 4, 7, 9, 13)
from which /~ = ~
(2, 3, 5, 6, 8, 10, 11, 12, 14, 15)
Checking/~ for regions gives
/~1 = ~ (2, 3, 6, 8, 10, 11, 12, 14, 15) =
(5)
Since/71 contains TI,/~2 nmst be ~½. =
(5)
T1 and T2 are now completely specified, so that at vertices 2 and 10
A.X
>
A.X
< 0/1 at all vertices other than 2 and 10
A.X
> 0/2 at all vertices other than 5
A.X
< a2
0/1
at vertex 5
A solution to these equations is A = (1, - 3 , 3, --3) 0/1 ~
7
0/2 =
--9
Ta must now be specified. T~ is simply/~1 with the T1 vertices (2 and 10) considered as D O N ' T CARES. Thus B.X>f~
at vertices 0,1, 4, 5, 7, 9, 13
B . X ~
at vertices 3, 6, 8, 11, 12, 14, 15
A solution to these equations is B = (--3, 1, --5, 3)
A REGION CONCEPT AND THRESHOLD LOGIC
545
~=1 The function ~as~ now been completely synthesized as a two-device threshold function. V. APPENDIX PROOF OF THEOREMS 3, 4 AND PROPERTIES 1 TO 8 THEORE~I 3. It is possible to reach any vertex of the set of T R U E (FALSE) boundary vertices of a threshold function from any other member of the set by a sequence consisting of ,unit transition and/or two unit transition steps. Proof: For convenience, assume that the function has been "positivized" (Winder, 1962) so that all a~ are positive. Now, assume that the theorem is not true. Then there exists at least two boundary T R U E vertices such that a sequence of boundary T R U E vertices connecting them must contain a It-transition step where k => 3. I t is only necessary to consider the two vertices constituting the /~-transition step. Let these be V0 and Irk. Two cases must be considered. First assume that the coordinates of V0 and Vk which differ are all "1" for V0 and all " - - 1 " for V~. Also, for convenience, relabel coordinates so that it is the first ~ coordinates which differ. Then V0 = (1, - . . , 1, xk+~, . . . , x~)
(A.1)
y~ = ( - 1 ,
(A.2)
...,
- 1 , x~+~, . . . , x~)
Form a sequence of exactly k unit transitions b y successively changing each "1" coordinate to a " - 1 . " Consider V1 = ( - 1 , 1, .." 1, Xk+l, " " , x~) V1 is a T R U E vertex since A . V1 >- A . Vk
(A.3)
A. V1 =< A. V0
(A.4)
However, V0 is a boundary T R U E vertex; i.e., for at least one coordinate change the weighted sum will drop below the threshold. But (A.4) implies that this must also be true for V1. Thus, V1 is a boundary T R U E vertex. Therefore, there exists a sequence containing a transition (VI to Irk) of less than k unit steps between V0 and V~. This contradicts the assumption.
546
KASZERMAN
Now consider the possibility that the coordinates in Vo which differ from V~ have both " 1 " and " - 1 " values. Choose V0 to be the vertex which has two or more coordinates whose value is " 1 . " Relabel the coordinates so that the "1" coordinates of V0 occur first. Then Vo = (1, - . . , 1, - 1 , . . . ,
- 1 , X~+1, . . . , Z , )
Vk = (--1, . . - , --1, 1, . . . , 1, Xk+~, " " , X,~) Next form a sequence of exactly k transitions by successively changing each " 1 " coordinate to a " - - 1 " and then each of the original " - 1 " coordinates to a "1." This gives !70 = (1, 1, . . . 1, 1, --1, - 1 , . . . ,
--1, - 1 , X~+~, . . . ,X~)
V1 = (--1, 1, "'" 1, 1, - 1 , --1, "'" , - 1 , - 1 , X~+I, ".
V== (-1,-1,
"',-1,-1,-1,-1,
...,-1,-1, Xk+l,
Va+l= ( - 1 , - 1 , . - ' , - 1 , - 1 , 1 , - 1 , ' " ,
, X.)
(A.5) ...
, Xn)
".
, X~)
..-
, X~)
--I, --i, I, I, "", i, --I, X~+I,
Vk = ( - - 1 , - - 1 , . . . ,
--.
--1, --1, Xk+l,
Vk-1 = ( - - 1 , - - 1 , . . . ,
, X~)
--i, --I, I, I,'", I, I, X~+l,
Assume that V1 is a T R U E vertex. Then, by the same reasoning as for ]71 in the first case, it would have to be a boundary T R U E vertex. But this would again contradict the assumption. Therefore, assume that 171 is a F A L S E vertex. Consider the vertex, V~._I. Then A . Vk_I >= A . V~
(A.6)
A R E G I O N C O N C E P T AND T H R E S H O L D LOGIC
547
Thus, Vk_l must be a T R U E vertex although it is not necessarily a T R U E boundary vertex. The unit transition sequence V~ to Vk_l now progresses fl'om a F A L S E vertex to a T R U E vertex. I t must therefore include a boundary T R U E vertex. This again results in a contradiction to the assumption. All possibilities have now led to a contradiction of the assumption. I t is further noted that the sequence in (A.5) may always be constructed for k >= 3. Therefore, the theorem is true. It can also be seen by example (for instance, the majority function) that the theorem does not hold for unit transitions only. T~EORE~ 4. The set of vertices consisting of the T R U E boundary vertices plus the F A L S E boundary vertices of a threshold function forms a region. Proof: As in the previous proof, assume that the function has been positivized, i.e., all a~ are positive. Boundary T R U E vertices m a y exist which are separated by no more than a two-unit-transition step. First, assume that the cooMinates which differ are both "1" for one of the vertices. Then (relabelling coordinates if necessary),
:
V0 = (1, 1, xk+a, "'" , x~)
(A.7)
V2 = ( - 1 ,
(A.8)
- - 1 , xk+~, "-" , x~)
Let V~ = (1, - 1 ,
xk+8, "-" , x ~ )
(A.9)
A . V I > A.V2
(A.10)
A.V~ < A.Vo
(A.11)
Inequalities (A.10) and (A.11) imply that V1 is a boundary T R U E vertex. Thus the sequence Vo, V1, V2 connects V0 to V2 in unit steps. Now assume that the coordinates which differ are "1" and " - 1 " for one of the vertices. Relabel coordinates so that Vo -- (1, - 1 , xk+3, --- ,xn)
(A.12)
V2 = ( - 1 , 1, xk+~, . . . , x.)
(A.13)
V1 = ( - 1 , - 1 , xk+3, . . . , x~)
(A.14)
Let
V1 is either a T R U E boundary vertex or a F A L S E vertex. If it is a
548
KASZERMAN
FALSE vertex, then it must be a FALSE boundary vertex because it is adjacent to Vs. The sequence V0, V~, V2 consists of unit transitions. Thus it is possible to form a sequence of unit-transition steps between any TRUE boundary vertices by including FALSE boundary vertices in the sequence. The same is, of course, true for the boundary FALSE vertices. Further each boundary TRUE (FALSE) vertex is adjacent to a boundary FALSE (TRUE) vertex. From this it follows that the set consisting of all TRUE boundary vertices and all FALSE boundary vertices forms a region. PROPERTY 1. The general two-threshold device function consists of a set of TRUE vertices such that a subset of the vertices is a region or subregion and the remaining vertices are an intersection of three regions. Proof: The property follows directly from Eq. (23). PROPERTY 2. The complement of the remainder consists of either one region or two regions. Proof: The complement of the remainder is
A cursory glance at (A.15) would seem to indicate that it could consist of as many as three regions. However, T1 and T~ can not be disjoint. Assume that T1 and T~ are disjoint. Then T1 is contained in Ta. Let T~ = T~ % V
(A.16)
From the definitions, 7'1 is contained in T2. Let
T~= T I + W so that
f = T~ + (T1 + W)(TI + V) = (T1 + W)(T1 + V) =
(A.17)
T~T3
But this contradicts the assumption that the function is not the product of two threshold functions. Therefore, T1 and T3 are not disjoint. From this it follows that the complement of the remainder can only consist of one region or two regions. PROPERTY 3. I f the complement of the remainder consists qf two regions, One of these regions is T~ and the other is T1 ~ T3 . Proof: This follows from the fact that T1 and T3 are not disjoint.
A REGION
CONCEPT
AND THRESHOLD
LOGIC
549
PnOPERTY 4. T3 is not contained in T1. Proof: Assume that it is. Let T, = T3 + W
(A.lS)
then f--
7'1+ T2T3
= T3+ W+
T2T3
= T3 + W + T2
(A.19)
= TI+T2 = T2
But this contradicts the assumption that f is not a single threshold function. Therefore T3 is not contained in T1. Note, however, that T3 can contain T1. PROPERTY 5. T2 is not contained in T3 . Proof: Assume that 2P2is contained in T3 • Let T~ = ~P2 + W
(i.20)
Taking the complement gives T3 = T 2 W
then f=
TI+
T~T3
= T1 + T 2 #
(A.21)
= T2+T3
But this contradicts the assumption that f is not the sum of two threshold functions. Therefore, T2 is not contained in T3 • PaOPEI~TY 6. T~ is not contained in i'2 . Proof: Assume that it is. Let T~ = T~ + W Taldng the complement: T2 = T31~
(A22)
550
KASZERMAN
Then
f = TI~- T~T~ = TlZr T~W =
TI~-
(A.23)
T2
=~ But this contradicts the assumption that f is not a single threshold function. Therefore T3 is not contained in T2. PROPERTY 7. T1 and ~'~ are disjoint. Proof: Since T1 is contained in T~, let T2 = T1 -[- W
Then ~'~ = T1W
(A.24)
Multiply both sides of (A.24) by Tz : TI~P2 = T1T1W" =0
(A.25)
Therefore, T1 and T~ are disjoint. PROeERTY 8. The set of weights of T2 is the negative of the set of weights for T1. ( The thresholds are, of course, not this simply related.) Proof: The weights, A, of T1 and T~ are the same by definition and the realization of T2 is the negative of the A of T2. ACKNOWLEDGMENT
The author wishes to express his gratitude to Professor Herbert Freeman of New York University for his guidance and help. His many valuable suggestions and comments inspired most of the work in this paper. Thanks are also due to R. H. Dunn, C. H. Elbert, and H. Altman of I T T Federal Laboratories for their critique of the paper. The author would also like to thank the reviewer for his helpful suggestions. The work reported here was supported in part by the Air Force Office of Scientific Research, Directorate of Information Sciences, under Grants AF-AFOSR62-152 and AF-AFOSR-24-63. This support is gratefully acknowledged.
RECEIVED: December 16, 1964
A REGION CONCEPT AND THRESHOLD LOGIC
55~
REFERENCES
f~_KERS,S. B.~ _aNDROBBINS, T. C. (1963), Logical design with three-input majority gates. Computer Design 2, Nos. 3, 4, 5, and 6. CaLDW~LL, S. H. (1958), "Switching Circuits and Logical Design," Wiley, New York, i958 CAMEnON, S. H. (1964), The generation of minimal threshold nets by an integer program. IEEE Trans. Electron. Computers EC-13, No. 3, 299-302. COATES,C. L., .kND LEWIS, P. M. (II) (1962), A simplified procedure for the realization of linearly-separable switching functions. IRE Trans. Electron. Computers E C - l l , No. 4, 447-458. DEaTOUZOS~M. L. t1964), "Threshold Element Synthesis." Doctoral Dissertation, Dept. of Elect. Eng., Mass. Inst. of Tech. EhGOT, C. C. (1960), Truth functions realizable with single threshold organs. Syrup. Switching Circuit Theory and Logical Design, 1960, pp. 225-245 (AIEE PubJication S*134). KASZERMAN, PHILIP (1963a), A non-linear summation threshold device. IEEE Trans. Electron Computers EC-12, No. 5, 914-915. KASZE~M.~, P. (1963b), A geometric test-synthesis procedure for a threshold device. Inform. Control 6, No. 4, 381-398. K~SZERMA-~, P. (1963a), "On the Synthesis of Threshold Devices." Doctoral Dissertation, Dept. of Elect. Eng., New York University. McNAuGHTON, R. (1961), Unate truth functions. IRE Trans. Electron. Computers EC-I0, No. 1, 1-6. MINN~CX, R. C. (1961), Linear-input logic. IRE Trans. Electron. Computers, EC-10, No. 1, 6-16. MUROGA, So~ TODA, I., AND T£KASU, S. (1961), Theory of majority decision elements. Franklin Inst. 271, 376-418. P_auLL, M. C., .~ND McCLvsKEY, E. J. (1960), Boolean function realizable with single threshold devices. Proc. IRE 48, No. 7, 1335-1337. iRi~sHiP, N. (1963), m-out-of-n-Decision logic. Paper presented at the National Electronic Conference, Chicago, Illinois. W~NDEa~ R. O. (1962), "Threshold Logic." Doctoral Dissertation, Dept. of Math., Princeto;1 Univ., Princeton, New Jersey.