Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5. Functional Decomposition and Symmetric Functions.

Similar presentations


Presentation on theme: "Chapter 5. Functional Decomposition and Symmetric Functions."— Presentation transcript:

1 Chapter 5. Functional Decomposition and Symmetric Functions

2 f(x 1, x 2,, x n ) = F(G 1 (),G 2 (),,G k ()) A decomposition of form f(x 1, x 2,, x n ) = F(G 1 (y 1,,y s ),Z 1,Z 2,,Z r ),where y i, z i  {x 1, x 2,, x n } and {y 1,,y s }  {Z 1,Z 2,,Z r } = {x 1, x 2,, x n }, is a simple decomposition around {Z 1,Z 2,,Z r }. If {y 1,,y s }  {Z 1,Z 2,,Z r } =  and {y 1,,y s }  {Z 1,Z 2,,Z r } = {x 1, x 2,, x n } then the decomposition is called disjunctive decomposition. The simplest type : Shannon’s expansion theorem. f(x 1, x 2,, x n ) = x 1 f(1, x 2,, x n ) +x 1 ’f(0, x 2,, x n ) =  (x 1 )g(x 2,, x n ) +  ’(x 1 )h(x 2,, x n ) f(x 1, x 2,, x n ) = F(  (y 1,,y s ),Z 1,Z 2,,Z r ) f n var. F  s var. Z1Z1 ZrZr Same result

3 Given the function f(x 1, x 2,, x n ) and some subset of {x 1, x 2,, x n }, say {Z 1,Z 2,,Z r }, is there a simple disjunctive decomp. of f around {Z 1,Z 2,,Z r }? No, not always. To find if there is a decomp. around {Z 1,Z 2,,Z r } make a decomposition chart. decomposition chart 00 0 00 1 11 1 00 100 0 z 1,,, z r {x 1, x 2,, x n } - {Z 1,Z 2,,Z r } There is a simple disjunctive decomp. of f around {Z 1,Z 2,,Z r } iff the decomp. chart has at most 2 distinct columns F(G(y 1,y 2,,y n-m ),Z 1,Z 2,,Z m )= F(G,Z 1,Z 2,,Z m )  F(1,Z 1,Z 2,,Z m ), F(0,Z 1,Z 2,,Z m )  F(G,Z 1,Z 2,,Z m ) Eg) f(x 1, x 2, x 3, x 4 ) =  (1,2,3,4,6,8,9,11,12,14) try to decompose

4 1)F(G(x 1,x 2 ),x 3,x 4 ) 2)Try to decompose F(G(x 1, x 3 ),x 2,x 4 ) x 1,x 2 x 3,x 4 00 01 10 11 00 01 11 10 1 1 1 1 1 1 1 1 1 1 1 3 distinct columns  not decomposable around {x 3,x 4 } x 1,x 3 x 2,x 4 00 01 10 11 00 01 11 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 distinct columns  decomposable around {x 2,x 4 } 1 1 1 1 1 1 1 00 01 11 10 0 1 G x 2,x 4 F(G,x 2,x 4 ) = x 2 ’x 4 +x 2 x 4 ’+Gx 2 ’,where G(x 1,x 3 )  G(0,0), G(1,1) = 0 G(0,1), G(1,0) = 1  G(x 1,x 3 ) = x 1 ’x 3 +x 1 x 3 ’ x 3 x 1 0 1 0101 1 1 G(x 1,x 3 )

5 f x1x1 x2x2 x3x3 x4x4 x1x1 x2x2 x3x3 x4x4 G F The best expression of decomposition problem is F(G(x 1, x 3 ),x 2,x 4 ) = x 2 ’x 4 +x 2 x 4 ’+ G(x 1,x 3 )x 2 ’,where G(x 1,x 3 ) = x 1 ’x 3 +x 1 x 3 ’. Eg) f(x 1, x 2, x 3, x 4, x 5 ) =  (3,4,5,7,9,15,17,21,22,28,29)+   (10,13,14,18,23,27,30,31)  F(G(x 1, x 2, x 4 ),x 3,x 5 )  11  110  1  11  1111  11101  00 111110101100011010001000 x 1 x 2 x 4 x 3,x 5 4 3 2 1 0 8 7 6 5 9 10 11 12 13 14 15 16 22 21 20 19 18 17 31 29 28 27 26 25 24 23 30 1. At most 2 distinct columns F(G(x 1, x 2, x 4 ),x 3,x 5 ) = G ’ x 3 +Gx 5 G(x 1, x 2, x 4 ) = G(0,0,0), G(0,1,1), G(1,0,1), G(1,1,0) = 0 rest of 1. 1 1 1 1 00 01 11 10 0 1 G x 3,x 5

6 1 1 1 1 00 01 11 10 0 1 x 1 x 2,x 4 G(x 1, x 2, x 4 ) = x 1 ’x 2 ’x 4 +x 1 ’x 2 x 4 ’+x 1 x 2 ’x 4 ’+x 1 x 2 x 4 General procedure to determine if f(x 1, x 2,, x n ) has a disjunctive decomposition of the form F(G 1 (y 1,y 2,,y k ), G 2 (Z 1,Z 2,,Z l ), w 1,w 2,,w n-k-l ) 1) Construct 2 k decomposition maps of the form: 00 0 00 1 11 1 00 0 z 1,z 2,,z l w 1 w 2 w n-k-l y 1,y 2,,y k = 00 0 00 0 00 1 11 1 00 0 z 1,z 2,,z l w 1 w 2 w n-k-l y 1,y 2,,y k =11 1 2) Now, the function can be decomposed iff a) each map has at most two distinct columns b) there are at most two distinct maps

7 1. There are two distinct maps 2. In each map, there are distinct columns c) If there are two distinct maps (& both have 2 distinct columns) the sets of distinct columns must be the same for these two maps. i.e. if one map has columns 1, 2, & 3 identical, and column4 different from these 3, then the other map must also have column 1, 2, and 3 identical to each other Note that : Column 4 of this map be either different from, or identical to the first 3. Eg) Find a decomposition of f(x 1, x 2, x 3, x 4, x 5 ) =  (2,3,4,5,6,7,8,9,16,17,18,19,22,23,28, 29) into F(G 1 (x 1,x 3 ),G 2 (x 2,x 5 ),x 4 ). 111 110 10110100 x 2 x 5 x 4 x 1,x 3 = 00 111 110 10110100 x 2 x 5 x 4 x 1,x 3 = 10 111 110 10110100 x 2 x 5 x 4 x 1,x 3 = 11 111 110 10110100 x 2 x 5 x 4 x 1,x 3 = 01 111 110 10110100 x 2 x 5 x 4 G 1 = 1 111 110 10110100 x 2 x 5 x 4 G 1 = 0 11 10 10 G 2 x 4 G 1 = 0 11 10 10 G 2 x 4 G 1 = 0

8 01 00 10110100 x 2 x 5 G 1 x 4 11 11 11 11 10 11 G 2 =0G 2 =1 G 1 (x 1,x 3 ); G 1 (0,0)=G 1 (1,1)=0 G 1 (0,1)=G 1 (1,0)=1  G 1 (x 1,x 3 ) = x 1 ’x 3 +x 1 x 3 ’ 1 0 10 x 1 x 3 1 1 G 1 (x 1,x 3 ) G 2 (x 2,x 5 ); G 2 (0,0)=G 2 (0,1)=0 G 2 (1,1)=G 2 (1,0)=1  G 2 (x 2,x 5 ) = x 2 1 0 10 x 2 x 5 1 1 G 2 (x 2,x 5 ) 01 00 G 2 G 1 x 4 10 11 10 1 1 1 1 Final answer; F(G 1,G 2,x 4 ) = G 1 G 2 ’+x 4 G 2 ’+G 1 ’x 4 ’G 2,where G 1 (x 1,x 3 ) = x 1 ’x 3 +x 1 x 3 ’ and G 2 (x 2,x 5 ) = x 2

9 Eg) Find a decomposition of f(x 1, x 2, x 3, x 4, x 5 ) =  (0,1,3,5,6,7,11,13,16,17,19,21,22,23,27,29) into F(G 1 (x 1,x 2 ),G 2 (x 3,x 4 ),x 5 ). 11111 110 10110100 x 3 x 4 x 5 x 1,x 2 = 00 11111 110 10110100 x 3 x 4 x 5 x 1,x 2 = 10 111 0 10110100 x 3 x 4 x 5 x 1,x 2 = 11 111 0 10110100 x 3 x 4 x 5 x 1,x 2 = 01 1. Two distinct maps 2. Two distinct columns in each map 3. The combinations are okay? 111 0 10110100 x 3 x 4 x 5 G 1 = 1 11111 110 10110100 x 3 x 4 x 5 G 1 = 0 01 00 10110100 x 3 x 4 G 1 x 5 1111 11 11 10 11 G 2 =0 G 2 =1

10 01 00 G 2 G 1 x 5 10 11 10 11 1 1 F(G 1,G 2,x 5 ) = G 1 ’G 2 ’+x 5 G 2 1 0 10 x 1 x 2 11 G 1 (x 1,x 2 ) 01 00 10 x 3 x 4 1 1 G 2 (x 3,x 4 ) G 1 (x 1,x 2 ) = x 2 G 2 (x 3,x 4 ) = x 3 x 4 ’+x 3 ’x 4 Final answer; F(G 1,G 2,x 5 ) = G 1 ’G 2 ’+x 5 G 2,where G 1 (x 1,x 2 ) = x 2 and G 2 (x 3,x 4 ) = x 3 x 4 ’+x 3 ’x 4

11 Symmetric Function A switching fn f(x 1, x 2,, x n ) is symmetric in variables {x i1, x i2,, x ik }, where {x i1, x i2,, x ik } is a subset of {x 1, x 2,, x n } iff it is invariant to any permutation of these variables. Eg) f(x 1, x 2, x 3, x 4 ) =  (0,3,5,6) 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 x 1 x 2 x 3 x 4 Symmetric function in var x 2, x 3, x 4. i,e. f(x 1, x 2, x 3, x 4 ) = f(x 1, x 2, x 4, x 3 ) = f(x 1, x 4, x 3, x 2 ) = A function which is symmetric in all of its variables is called totally symmetric. The necessary and sufficient condition for a function f(x 1, x 2,, x n ) to be symmetric is that it may be specified by a set of numbers {a 1, a 2,, a k }, where 0  a i  n such that the function gives the value 1 when and only when a i of the variables are equal to 1. Example) full adder c out Z c in yx

12 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Z c out x y c in Z(x, y, c in ) = S 1,3 (x, y, c in ) =  (1,2,4,7) c out (x,y,c in ) = S 2,3 (x,y,c in ) =  (3,5,6,7) Properties of a symmetric function Eg) Z(x,y,c in ) + c out (x,y,c in ) = S 1,2,3 (x,y,c in ), where Z={0,1,2,,n}

13 full adder x3x3 x2x2 x1x1 2 to 4 decoder A realization for any 13 variable symmetric function using 10 full adders and 1 decoders F. A.’s x3x3 x2x2 x1x1 F A x5x5 x4x4 x7x7 x6x6 x9x9 x8x8 x 11 x 10 F A x 13 x 12 F A 0 c out S S 4 to 16 decoder Z1Z1 Z0Z0 Z 15 u1u1 u2u2 u3u3 u4u4

14 Identification of symmetric functions f(x 1, x 2, x 3 ) =  (1,2,4,7) = S 1,3 (x 1, x 2, x 3 ) 11131113 0 0 1 0 1 0 1 0 0 1 1 1 a#a# x 1 x 2 x 3 2 2 2Column sum 1. Column sum should have to same. 2. for n variable, if a # = k, it should have to appear times f(x 1, x 2, x 3, x 4 ) =  (0,1,3,5,8,10,11,12,13,15) 4 4 6 6 6 4 4 6 21221212122122121212 1 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 23223232322322323232 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 a#a# x’ 1 x 2 x 3 x’ 4 a#a# x 1 x’ 2 x’ 3 x 4 a#a# x 1 x 2 x 3 x 4 S 2,3 (x 1,x’ 2,x’ 3,x 4 )S 1,2 (x’ 1,x 2,x 3,x’ 4 )

15 f(x 1, x 2, x 3, x 4 ) =  (0,3,5,10,12,15) 3 3 022221022221 0 0 0 0 0 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 1 1 a#a# x 1 x 2 x 3 x 4  not symmetric but we can find symmetric function 1 1 2 1 111111 0 0 0 1 0 1 1 0 1 0 1 0 a#a# x 2 x 3 x 4 x’ 4 x 1 =0 2 2 1 2 222222 0 1 0 1 1 0 0 1 1 1 1 0 a#a# x 2 x 3 x 4 x’ 4 x 1 =1 S 1 (x 2,x 3,x’ 4 ) S 2 (x 2,x 3,x’ 4 ) f(x 1, x 2, x 3, x 4 ) = x 1 ’ S 1 (x 2,x 3,x’ 4 ) +x 1 S 2 (x 2,x 3,x’ 4 ) = S 2 (x 1 ’, x 2, x 3, x 4 ’)

16 Following the above arguments, the procedure for identifying symmetric functions can be summarized as follows: 1.Obtain column sums. (a) If more than two different sums occur, the function is not symmetric. (b) If two different sums occur, compare the total of these two sums with the number of rows in the table: if they are not equal, the function is not symmetric; if they are equal, complement the columns corresponding to either one of the column sums (preferably the one of fewer occurrences) and continue to step 2. (c) If all column sums are identical, compare their sum with one-half the number of rows in the table. If they are not equal, continue to step 2; if they are equal, continue to step 3. 2. Obtain row sums and check each for sufficient occurrence; that is, if a is a row sum and n is the number of variables, then that row sum must occur n!/(n – a)!a! times. (a) If any row sum does not occur the required number of ties, the function is not symmetric. (b) If all row sums occur the required number of times, the function is symmetric, it’s a-numbers are given by the different row sums in column a#, and its variables of symmetry are given at the top of the table.

17 3. Obtain row sums and check each for sufficient occurrence. (a) If all row sums occur the required number of times, the function is symmetric. (b) If any row sum does not occur the required number of times, expand the function about any of its variables; that is, find functions g and h such that f = x’g + xh. Write g and h in tabular form and find their column sums. Determine all variable complementations required for the identifications of symmetries in g and h. Test f under the same variable complementations. If all row sums occur the required number of times, f is symmetric; if any row sum does not occur the required number of times, f is not symmetric.


Download ppt "Chapter 5. Functional Decomposition and Symmetric Functions."

Similar presentations


Ads by Google