4
IEEE TRANSACTIONS ON COMPUTERS, DECEMBER 1971 Transformation of an Arbitrary Switching Func- tion to a Totally Symmetric Function S. S. YAU, SENIOR MEMBER, IEEE, AND Y. S. TANG, STUDENT MEMBER, IEEE Abtract-It is known that any switching function can be written as a totally symmetric function with some of its variables being repetitive. In this note, the least upper bound for the number of variables of the trans- formed totally symmetric functions based on the partition on the set of variables induced by the partial symmetry of the given switching function is found, and a technique for obtaining a transformed totally symmetric function with the number of variables equal to the least upper bound is given. Index Terms-Least upper bound, switching functions, technique, to- tally symmetric functions, transformation. I. INTRODUCTION It has been shown [1] that any switching function of n variables can be transformed to a totally symmetric function of 2n- 1 variables with some of the variables being repetitive. Born and Scidmore [2] have shown that if a switching func- tion is partially symmetric, then its corresponding totally symmetric function can be reduced to a much simpler one, and an upper bound on the number of variables' which is sufficient to form the totally symmetric function has been given. However, in their work the information of partial symmetry has not been completely utilized. In this note we shall investigate the property of partial symmetry in more detail, and find the least upper bound for the number of variables of the transformed totally symmetric function based on the partition on the set of variables induced by the partial symmetry of the given switching function. In doing so, a transformation technique will be presented for obtain- ing the transformed totally symmetric function. II. SOME PROPERTIES OF SYMMETRIc FUNCTIONS Before we present our technique, we shall first define some nlotations and discuss some properties of totally symmetric functions. In addition to the standard set operations of union, inter- section, and complementation, the following operations will be applied to the subsets of integers. Let A and B be two subsets of integers. Then we define A+B=C, whereC= {a+b|a EAandbEBj. (1) A-B=C, whereC= {a-blaCEAandbE6B}. (2) For instance, for A = {1, 3}, B= {0, 41, A+B= g 1, 3, 5, 7}, A-B= {-3, -1, 1, 3 }. Now we would like to show the tollowing theorem which is required for later development of the transformation technique. Manuscript received March 26, 1970; revised January 1, 1971. S. S. Yau is with the Departments of Electrical Engineering and Computer Sciences, Northwestern University, Evanston, 111. 60201. Y. S. Tang is with the Department of Electrical Engineering, North- western University, Evanston, Ill. 60201. 1 The total number of variables considered here is based on the fact that each repetitive variable xi in the totally symmetric function is counted as m variables, where m is the number of repetitions of xi in the argument of that function. Theorem 1: Let SA(B,, B2, - *, B2, B3, * B3, .., Bt, * , Bt) a2 a3 at be a totally symmetric function, where Bi = {Xil, Xi2, . . . X,i,} is a set of ri variables2 for i= 1, 2, , t. Then SA(Bl, B2, * , B2, B3, * , B3, * , Bt, .., Bt) a2 a3 at r2 rt = E.. ** Sj2(B2). j2=0 it==O * Sit(B t)S [A- U212+ . +jtat) ] nA (Bl), (3) whereA={O,l, , rl. Proof: Consider the totally symmetric function (4) where xi appears a times. It has been shown [3] that (4) can be expanded with respect to xi to the form XiSAnA1(X1) * * * y Xi-ly Xi+1j * * * Xn) + XiS(A-a)A'(X1), . . *, xi_1, Xi+ * , x.n) (5) where A' = { 0, 1, I * *, n - 1 }. If there are two variables, say xi and xi+,, both appearing a times in the totally symmetric form SA (X1, * *,Xi-1, Xi) . .*, Xi, Xi+17 . Xi+l) Xi+21 . . ., Xn)j (6) expanding with respect to xi and xi+, yields SA (Xly . ., Xi-1, Xi, . .*, Xiy Xi+12 . . .*, Xi+l1 Xi+2y . . .*, Xn) = Xifi+,SAnA"(X1, . , Xi-1, Xi+2 . * *, Xn) + XiXi+1S(A-a)nArt(X1, . . I Xi-1, Xi+2 . . . X Xn) + XiXi+1S(A-a)nA"1(X1, . . . X Xi-ly Xi+2, * X,) + XiXi+1S(A-2a)nA'(X1, . . . Xi-1, Xi+2, * X*n) = So(xi, Xi+1)S(A-Oa)nAr" (X1 . . . Xi-ly Xi+2) . . . X Xn) + S1(xi, Xi+1)S(A-1,)-A,"(x1, X, X- Xi+22 . ., Xn) + S2(xi, Xi+1)S(A-2a)zA"(X1Y . . . , Xi-i, Xi+2, . . . Xn) 2 = E Si(Xi, Xi+l)S(A-i..)nAll(Xll ( . . Xi-1, Xi+2, . . . Xn) (7) i=O where A"= t0, 1, n-2}. When this expansion is applied to SA(Bl, B2, , B2, , Bt, . . , Bt) a2 at repeatedly, we obtain 2 Without loss of generality, we shall assume that the variables in each Bi are uncomplemented, i.e., f: Xj'Xk if xi and xk belong to the same block. In casef: Xj~'fk, where xj and Xk belong to the same block, we can always rename xtk as another variable, such as yk, so that the above assumption is still valid. 1606 SA (XII . . . I Xi-17 Xii Xii . . . y Xi) Xi+ly . . . ; Xn)

Transformation of an Arbitrary Switching Function to a Totally Symmetric Function

  • Upload
    ys

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Transformation of an Arbitrary Switching Function to a Totally Symmetric Function

IEEE TRANSACTIONS ON COMPUTERS, DECEMBER 1971

Transformation of an Arbitrary Switching Func-tion to a Totally Symmetric Function

S. S. YAU, SENIOR MEMBER, IEEE, AND

Y. S. TANG, STUDENT MEMBER, IEEE

Abtract-It is known that any switching function can be written as a

totally symmetric function with some of its variables being repetitive. Inthis note, the least upper bound for the number of variables of the trans-formed totally symmetric functions based on the partition on the set ofvariables induced by the partial symmetry of the given switching functionis found, and a technique for obtaining a transformed totally symmetricfunction with the number of variables equal to the least upper bound isgiven.

Index Terms-Least upper bound, switching functions, technique, to-tally symmetric functions, transformation.

I. INTRODUCTION

It has been shown [1] that any switching function of n

variables can be transformed to a totally symmetric functionof2n- 1 variables with some of the variables being repetitive.Born and Scidmore [2] have shown that if a switching func-tion is partially symmetric, then its corresponding totallysymmetric function can be reduced to a much simpler one,

and an upper bound on the number of variables' which issufficient to form the totally symmetric function has beengiven. However, in their work the information of partialsymmetry has not been completely utilized. In this note weshall investigate the property of partial symmetry in more

detail, and find the least upper bound for the number ofvariables of the transformed totally symmetric functionbased on the partition on the set of variables induced by thepartial symmetry of the given switching function. In doingso, a transformation technique will be presented for obtain-ing the transformed totally symmetric function.

II. SOME PROPERTIES OF SYMMETRIc FUNCTIONS

Before we present our technique, we shall first define somenlotations and discuss some properties of totally symmetricfunctions.

In addition to the standard set operations of union, inter-section, and complementation, the following operations willbe applied to the subsets of integers. Let A and B be twosubsets of integers. Then we define

A+B=C, whereC= {a+b|a EAandbEBj. (1)

A-B=C, whereC= {a-blaCEAandbE6B}. (2)

For instance, for A= {1, 3}, B= {0, 41, A+B= g1, 3, 5, 7},

A-B= {-3, -1, 1, 3 }. Now we would like to show thetollowing theorem which is required for later developmentof the transformation technique.

Manuscript received March 26, 1970; revised January 1, 1971.S. S. Yau is with the Departments of Electrical Engineering and

Computer Sciences, Northwestern University, Evanston, 111. 60201.Y. S. Tang is with the Department of Electrical Engineering, North-

western University, Evanston, Ill. 60201.1 The total number of variables considered here is based on the fact

that each repetitive variable xi in the totally symmetric function iscounted as m variables, where m is the number of repetitions of xi inthe argument of that function.

Theorem 1: Let

SA(B,, B2, - *, B2, B3, * B3, .., Bt, * , Bt)a2 a3 at

be a totally symmetric function, where

Bi = {Xil, Xi2, . . . X,i,}is a set of ri variables2 for i= 1, 2, , t. Then

SA(Bl, B2, * , B2, B3, * , B3, * , Bt, .., Bt)a2 a3 at

r2 rt

= E..** Sj2(B2).j2=0 it==O

*Sit(Bt)S [A- U212+ . +jtat) ] nA (Bl), (3)whereA={O,l, ,rl.

Proof: Consider the totally symmetric function

(4)

where xi appears a times. It has been shown [3] that (4) canbe expanded with respect to xi to the form

XiSAnA1(X1) * * * y Xi-ly Xi+1j * * * Xn)

+ XiS(A-a)A'(X1), . . *, xi_1, Xi+ * ,x.n) (5)

where A' = { 0, 1,I * *, n-1 }. If there are two variables, sayxi and xi+,, both appearing a times in the totally symmetricform

SA(X1, * *,Xi-1, Xi) . .*, Xi, Xi+17 .

Xi+l) Xi+21 . . ., Xn)j (6)expanding with respect to xi and xi+, yields

SA (Xly . ., Xi-1, Xi, . .*, Xiy Xi+12 . . .*, Xi+l1 Xi+2y . . .*, Xn)= Xifi+,SAnA"(X1, . , Xi-1, Xi+2 .* *, Xn)

+ XiXi+1S(A-a)nArt(X1, . .I Xi-1, Xi+2 . . . X Xn)

+ XiXi+1S(A-a)nA"1(X1, . . . XXi-ly Xi+2, * X,)

+ XiXi+1S(A-2a)nA'(X1, . . . Xi-1, Xi+2, * X*n)

= So(xi, Xi+1)S(A-Oa)nAr" (X1 . . . Xi-ly Xi+2) . . . X Xn)

+ S1(xi, Xi+1)S(A-1,)-A,"(x1, X,X- Xi+22 . ., Xn)+ S2(xi, Xi+1)S(A-2a)zA"(X1Y . . . , Xi-i, Xi+2, . . . Xn)

2

= E Si(Xi, Xi+l)S(A-i..)nAll(Xll( . . Xi-1, Xi+2, . . . Xn) (7)i=O

where A"= t0, 1, n-2}.When this expansion is applied to

SA(Bl, B2, , B2, , Bt, . . , Bt)a2 at

repeatedly, we obtain

2 Without loss of generality, we shall assume that the variables ineach Bi are uncomplemented, i.e., f: Xj'Xk if xi and xk belong to thesame block. In casef: Xj~'fk, where xj and Xk belong to the same block,we can always rename xtk as another variable, such as yk, so that theabove assumption is still valid.

1606

SA (XII . . .

I Xi-17 Xii Xii . . .

y Xi) Xi+ly . . .

; Xn)

Page 2: Transformation of an Arbitrary Switching Function to a Totally Symmetric Function

r2

SA(Bl, B2, . , B2, B3, . , B3, * , Bt, . , Bt) = Sj2(B2)S(A-j2a2)nA2(Bil B3, ..., B3, * , Bt, . , Bt)j2=0

a2 a3 at a3 at

r2 rt

= E * * * E Sj2(B2) ... Sjt(Bt)S[A-(j2-2+. .+jtat]nA(Bl)j2=O jt=O

(8)

where

A2- {0,1,...rl+ Eri}

and Ai= {O, 1, , r1}. This completes the proof of thetheorem.

Let us consider an arbitrary switching functionf(xl, * *, x) whose unique partition p on the set of vari-ables induced by its partial symmetry3 is given by

p = {B2, B2, * , Bt} (9)

where 1<t<n, and each Bi has ri variables. It has beenshown [1] thatf(x3, , x,n) can be expressed uniquely inthe form

ri r2

f(xl, Xn*@2 Xn)-.E.jl=O j2=O

ft

*E fjl,j2,.- -,jtS5l(Bl)Sj2(B2) . . . Sjt(Bt) (10)jt=O

where

provided that for all the values ofj2, j3, * * *, jt

rl

E fil .j2. * * * .itSjl(Bl) = S (A- (j2a2+ * * *+itat) InA (Bi) . (14)il=-O

Since the sum of a set of totally symmetric functionsof the same set of variables is again totally symmetric,and since each Sj,(B1) is a totally symmetric function,Si=Ofjl,2 -j,Sjl(B1) is a totally symmetric function.

Let SAj , . .t(B1) be the totally symmetric form ofL =ofjlj2. .-jSj,(B2),where Aj2j3...il is the set of a num-bers. It is obvious that

(15)

Hence (14) becomes

ASAj,j,. jt(Bi) = S[A-(j2a2+±-.-.+j1ta)]InA(Bl) (16)

for all values of j2, j3, * * *, jt. Consequently, (13) holds iffor allj2,]3, - *, jt,

A 2j . . *.it == [A - (j2a2 + * * * + itat)] n A. (17)

(11)fjlj2-',i.:= f( I. ..I 1, 1. . O, 1 ,2 1 -O, . O, . . ., 1, . . .t 1 -O t. . . O).

ii rl-jl j2 r2-i2 i.t rt-it

It is seen that (10) can be written in the formr2 rt

f(xlx * * * xn) = . E S&2(B2) ... Sj,(Bt)i2=0 jt=0

rl

*E AJ 2, ...JtSil(Bi) .(12)71=°

Our objective is to transform the partially symmetric func-tionf(x1, - - - , x,,) to a totally symmetric function

SA(Bij B2, ..* B2, B3, * * B3, . . .*, Bt, . .*, Bt)a2 a3 at

such that the value of ri+ Ei=22airi is as small as possible.For this purpose, we first proceed to find a set of sufficientconditions for the existence of such a transformation, andthen find additional conditions to be satisfied for minimizingrl+ EZti=2 airi. Now, comparing (3) and (12), we have

Thus,f(x1, * , x.) can be transformed to

SA(Bij B2, . . ., B2, B3, . *,.B3, ..* * Bty ..* * Bt)a2 a3 at

if (17) is satisfied, and our problem can now be restated asfollows. Given all A1j2j3. .j and ri, i= 1, 2, . . . , t, find a setof values for a2, - - - At and A such that (17) is satisfiedand r= a:rti=2airi is minimized. To solve this problem weshall follow the approach suggested in [2] by letting

r2, * * * rt

A = U [A2 .. it + (j2a2 + * * * +±itat)] (18)i2, *- - jt=O

and selecting the ai's such that for any two distinct(23 . . ,t)S

Ai2 . . .it + (j2a2 + - * * + itat) (19)

f(Xl, . * * X,) = SA(Bl, B2, * * * , B2, B3, . .. , B3, . . , Bt, .. , Bt)a2 a3 at

(13)

3The partition p on the set of variables of a switching function in- are in two nonoverlapping intervals of integers The desiredduced by its partial symmetry is an equivalence relation and hence it isunique for the given function. values of the ai's can be obtained as follows. Consider

1607SHORT NOTES

I...Aj2h . . .it C 1011 , ril-

Page 3: Transformation of an Arbitrary Switching Function to a Totally Symmetric Function

IEEE TRANSACTIONS ON COMPUTERS, DECEMBER 1971

G(j2, j3, * , jt) = j2a2 + j3a3 + + jtat (20)

as a mapping which maps distinct (j2, 3, * j*,jt)'S to distinctintegers. Thus it is necessary for G(j2,]3, ,jt) to be a one-to-one mapping. Let

9(j2,j3, . . *, jt) = (rt-, + 1)(rt-2 + 1) . . . (r2 + 1)jt+ + (r2 + 1)j3 +j2. (21)

Note that (21) is a one-to-one mapping from the integerdomain .<ji.ri, i=2, 3, ..*, t, onto the integer domainof the interval between 0 and (rt+ l)(rt_i+ 1) * (r2+ 1)-i.Also note that there is no other one-to-one mapping fromthe same domain onto the integer domain of the interval be-tween 0 and 1, where l<(rt+ lXrti,+ 1) * (r2+ 1)- 1. Inorder to avoid overlap in the ranges of (19) for distinct(2, . . ., j)'s, it is necessary to separate the images of dis-tinct (j2, * - *, jt)'s under the mapping (20) by at least rl+ 1.Hence we let

G(j2, j3, . .,jt)= (ri + 1)g(j2, j3, . , jt). (22)It follows from (20)-(22) that

i-1

i = IJ (rk + 1),k=l

i = 2,3, ...*,t.

Now we would like to show the following theorem.Theorem 2: Any switching functionf(x1, * * *, x,,) whose

unique partition on the set of variables induced by its partialsymmetry is given by p= {B1, B2, * * *, Bt}, where l<t<n,and each Bi has ri variables, can be written in the totallysymmetric form with q variables, and the least upper boundfor vq is

r1 + E airi (24)i=2

wherei-1

a= T(rk + 1), i = 2,3, * * ,t. (25)k=1

Proof: It follows from the preceding discussion that weonly need to show that the least upper bound for 7 is givenby (24). This is equivalent to saying that it is not always pos-sible to solve (17) with the value of ai smaller than (25). Toshow this, let ai' be an integer not greater than ai- 1. It isnoted that (25) can be written in the form

i-1

ai=1 + rl + akrk. (26)k=2

Hence,i-1

ai' < r1 + E akrk (27)k=2

which can be written asi-1

ai = C1 + E akCk (28)k=2

where

0 < Ck < rk, (29)Let

G(j2 . . *. ji, ,jt)

-j2a2+ +jil1ai_l+jiai'+ji+1ai+1+ +jtat. (30)

It follows from (28) and (30) that

G'(C2,***, ci_1, 0, , 0) + cl = ai

=G'(0,** *,0,1, 0, *, 0). (31)

Since the condition that A2... .. lo0.. o and Ao...0olo.. o bemapped by (19) to two nonoverlapping intervals must besatisfied, and because of (15) and (31), cl must be greaterthan ri. This contradicts (29) and hence the theorem.

III. TRANSFORMATION PROCEDUREFollowing directly from Theorem 2, we obtain the follow-

ing procedure for transforming a partially symmetric func-tion to a totally symmetric function with the number of vari-ables equal to the least upper bound given in Theorem 2.

Step 1: Find p= I B1, B2, * * *, Bt }, which is the partitionon the set of variables induced by the partial symmetry ofthe given function.4

Step 2: For each i, i= 1, 2, * , t, obtain ri by count-ing the number of variables in Bi and then calculateai, -i=2,2 *, t, according to (25).

Step 3: Express the function in the form of (12). For eachri ,,Sjl(B1), find its totally symmetric form

SA..3... j(B1) and obtain its a numbers Aj2j,...j,.Step 4: Form A according to (18). The transformed totally

symmetric function is

SA(Bij B2i .. , B2, ..., Bt, ..* I* Bt).C2 at

To illustrate this transformation procedure, consider thefollowing switching function which is taken from [2].

f(xl, X2, X3, X4, X5, X6)

= E (1-6, 9-14, 17-22, 24-26, 28, 33-38,40-42, 44,48-50, 52, 56-58, 60). (32)

According to Step 1 the partition p on the set of variablesinduced by its partial symmetry is found to -be p= I B1, B2 },where B1 = { xl, x2, X3 } and B2= I X4, X6, X6 }. It follows fromStep 2 that a2=4. According to Step 3, expandingf withrespect to X4, x5 and x6 yields

f = So(B2)S2,3(B1) + S1(B2)S0,1,2,3(B1)+ S2(B2)So,1(B1). (33)

Hence A0= {2, 3}, Al= {0, 1, 2, 3}, A2= {0, I}, and A3 isempty. It follows from Step 4 that

4The partition p can be found by the method presented in [4].

1608

k = 1 2 - - .2 i - 1.y y

Page 4: Transformation of an Arbitrary Switching Function to a Totally Symmetric Function

SHORT NOTES

A = AoU {A1 + a2} U {A2 + 2a2}= {2, 3,4,5,6,7,8, 9}. (34)

Consequently, (32) becomes

f = SA(X1, X2, X3, X4, X4, X4, X4, X5, X5, X5, X5,X6,X6,X6, X6) (35)

where A is given by (34).

IV. DiscussioN

It is noted that the ai given by (25) is the least upperbound on the number of repetitions of variables in Bi,i-2,* **, t, in the argument of SA. This upper bound isbased only on the unique partition induced by partial sym-metry. Since (25) is an upper bound, most functions havetotally symmetric representations for which the numbers ofrepetitions of variables in the Bi's are smaller than that givenin (25). So far there is no systematic method other than theexhaustive search for finding the totally symmetric repre-sentation with a minimum number of repetitions of variablesin each Bi's for a given switching function. This fact was alsopointed out in [2].

REFERENCES[1] R. F. Arnold and M. A. Harrison, "Algebraic properties of sym-

metric and partially symmetric Boolean functions," IEEE Trans.Electron. Comput., vol. EC-12, pp. 244-251, June 1963.

[2] R. C. Born and A. K. Scidmore, "Transformation of switchingfunctions to completely symmetric switching functions," IEEETrans. Comput., vol. C-17, pp. 596-599, June 1968.

[3] S. H. Caldwell, Switching Circuits andLogical Design. New York:Wiley, 1958.

[4] S. S. Yau and Y. S. Tang, "On identification of redundancy andsymmetry of switching functions," this issue, pp. 1609-1613.

On Identification of Redundancy andSymmetry of Switching Functions

S. S. YAU, SENIOR MEMBER, IEEE, AND Y. S. TANG,STUDENT MEMBER, IEEE

Abstract-An algorithm for identifying all redundant variables ofswitching functions and an algorithm for identifying their symmetries (totalor partial) are presented. Both algorithms are straightforward and veryefficient. These algorithms are based on manipulating the binary anddecimal number representations of the minterms of the switching functionunder testing.

Index Terms-Algorithms, binary and decimal number representationsof minterms, identification, partial or total symmetry, redundant variables,switching functions.

I. INTRODUCTIONIn order to have economical realizations of switching

functions, the first step is to eliminate all the redundantvariables. When the switching functions become totally

Manuscript received March 26, 1970; revised January 1, 1971.S. S. Yau is with the Departments of Electrical Engineering and

Computer Sciences, Northwestern University, Evanston, Ill. 60201.Y. S. Tang is with the Department of Electrical Engineering,

Northwestern University, Evanston, Ill. 60201.

symmetric or partially symmetric, simple and economicalrealization techniques are available for various types of im-plementation [1]-[6]. Thus, it is important to have efficientmethods for identifying the redundant variables and sym-metries of switching functions. In this note, we shall presenta simple algorithm for identifying all the redundant variablesof an arbitrary switching function and then introduce analgorithm for identifying its symmetry (total or partial).Both algorithms are straightforward and very efficient com-pared to existing methods [5]-[8]. These algorithms arebased on manipulating the binary and decimal numberrepresentations of the minterms of the switching functionunder testing. Results on machine implementation of thesealgorithms will be discussed.

II. IDENTIFICATION OF REDUNDANT VARIABLES

A variable xi of a switching functionf(x1, * * *, x,n) is saidto be redundant if

f(Xl, X Xi_1, O, Xi+17 . . .* XX)

= f(Xl, ..* Xt-1i 1; Xi+l) ...* Xn) (1

That is, the value off(xi, * * *, xn) is not affected by any ofits redundant variables. It follows from (1) that we caneliminate a redundant variable xi from f(xi, * * *, xn) bysimply writing

f(xXi * Xn,,) = f(x1, . . , xi-1, O, Xi+ , x,) (2)or

f(Xl, **Xn, = f(xi, * *, Xi1, 1, X+1 .**, xn). (3)

If there are several redundant variables in f(x1, * * *, xn),these variables can obviously be eliminated by substitutingeither 0 or 1 to each of these variables inf(x1, X* ,n)A variable of a switching function can easily be tested for

redundancy according to the definition given in (1). How-ever, this standard method of identifying all redundant vari-ables of a switching function by applying the test to eachvariable separately is tedious. In this section, we shall presenta simple algorithm for identifying all the redundant variablesof a switching function that will be much simpler than thestandard method.Letf(xi, * *, xn) be a switching function under testing

(which is given in the form of a standard sum) and let m bethe number of minterms inf(xi, * * *, xn). A simple algo-rithm for identifying all the redundant variables inf(xi, *--, xn) may be summarized as follows.

Step R-J: If m is odd, there exist no redundant variablesin f(xl, . - - , xn). If m is even, go to Step R-2.

Step R-2: Form a table T with m rows and n columns,whose columns correspond to the variables and whose rowsare the binary representation of the minterms. Let c- be thenumber of l's in the ith column (corresponding to the vari-able xi) of T. If there exists a c, such that c = m/2, go to StepR-3; otherwise, f(xl, * - , xn) has no redundant variables.

Step R-3: When a ci= m/2, let Dio be the set ofm/2 decimal

1609