LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510.84 *o. 728-733 }U>'9^f UIUCDCS-R-75-729 //-&- \-V o^ ■%. SYM-1 A Program That Detects Symmetry of Variable-Valued Logic Functions by Gerald M. Jensen May 1975 itf* o* ■?&■ #>\- x \ t ^ Xi& snT*. 0* DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN URBANA, ILLINOIS Digitized by the Internet Archive in 2013 http://archive.org/details/sym1programthatd729jens UIUCDCS-R-75-729 SYM-1 A Program That Detects Symmetry of Variable -Valued Logic Functions Gerald M. Jensen Department of Computer Science University of Illinois at Urbana- Champaign Urbana, Illinois 6l801 February 1975 This work was partially supported by NSF DCR 7^- O351U ACKNOWLEDGMENT The author would like to thank Thomas Tan for his initial development of the current SYM-1 program, and Professor R. S. Michalski for his valuable assistance in writing this report. This work was partially supported by NSF DCR 7^-0351^. SYM-1: User's Guide and Program Description ABSTRACT This paper describes an algorithm, and a PL/l program ( SYM-1 ) implementing it, that detects symmetry of a variable -valued logic function with regard to the variables or their inverses. If symmetry exists, symmetric variables are then used in symmetric selectors which will describe the set of events in a more compact way than corresponding non-symmetric selectors. I . Introduction This paper contains a user's guide and brief description of an algorithm that detects symmetry among variables in a VL, function. The algorithm is implemented as a PL/l program, SYM-1. If symmetry exists, the program creates a symmetric selector using the symmetric variables. A definition of the concept of selectors is given in paper-'-, however, to make this paper self-contained, a brief review of the definition of a VL-, selector is necessary. A selector is defined as the following form [L # R] The left part L or referee is a sequence of literals, i.e., variables, x., or their compliments, x.' . If the sequence has more than one literal, then they are separated by the symbol '+' which denotes normal arithmetic sum. The value of xj is 2] V l[x^0,2] a term This formula takes on values as follows Assigned Value k 3 Condition # » Description of Condition 1 2 J \ x-,=2 and x.,^1 and x tr =0 or 1 or 2 or 3 or 5 3 1 3 if condition (l) doesn't hold (one or more selectors are not satisfied) and if condition (l) and (2) do not hold and x n =1 and x_> 2 1 3 if condition (l) and (2) and (3) do not hold and x, /o or 2. If all h conditions do not hold, the function has value 0. A"c the present time the program can generate only minimal symmetric selectors. A planned extension of this is the generation of VL, formulas containing non-symmetric selectors. This would lead to more efficient coverings of specified events. For example, if no events in a given set have x-.=l, and symmetry exists between x , x , and x , then the formula [x -,^1] • [x +x +x=4, 5] would be a better representation than [x +x +x^,=K,5]. The former is better because it covers less unspecified events. Work is continuing in this direction. II. The Algorithm The algorithm operates on user specified, disjoint, event classes. For each event class: 1. Partition variables into D-groups (groups of variables with the same domain) 2. Check all variables in each D-group for 'total symmetry' (see test below) 3» For each D-group . that step 2 fails, further partition into CS-groups. (A CS-group is defined as groups of variables with the same column sum. The column sum of a variable, Xj_, is the sum of the i^h component of events in one class.) k. Check all variables in each CS-group for 'total symmetry', with respect to this group 5. For each CS-group that step h fails, find 'partial symmetry' of variables in each CS-group, using pairwise symmetry test. The total symmetry condition is satisfied. 1. If all possible ways for the symmetric variables to sum to a particular number are contained in the event class. OR Ratio of number of events in this event class to total number of events satisfying condition #1 is greater than a user specified compact ratio (i.e., the selector is compact). AND Events in other event classes do not satisfy this condition Example of symmetry condition If one event in an event class has x, +x +x =3> then to specify the symmetric selector (x +x +x =3) requires all other possible ways to sum to 3j with these variables, must be present in this event class. OR - event in this event class that sum to 3 user specified # events satisfying above condition compact ratio (typically 1.0 or 0.5) AND Events in all other event classes do not satisfy x^ +x +x =3 • Program statistics The current version of the program consists of about ^50 PL/l statements and the object module produced by the PL/l (F) compiler requires memory capacity of about 7°K bytes, with PL/l library routines. The execution of the following example on an IBM 360/75 required l8.0 sec. compile time and 2.2 sec. execution time. ! : br - users, the program and necessary JCL (job control language) are found in ^113,1376 under files 'SYMl' and 'JCL' respectively. To run on I.B.M. 360 use a I JO I statement with the list 'JCL, SYML, DATA', where data is the input data of the form given in the following section. III. Users Manual The use of the program requires the specification of program parameters. This is best illustrated by an example. Example of input data r in PL/l list format in FL/l data format ( r in PL/l list format Variable Value 4- 11 1 4 MAXPAT=500; 0.5 4 4 5 5 7 4 3 4 2 12 3 1 2 12 3 4 3 13 3 2 2 2 2 1 3 110 3 112 10 2 1 3 3 3Q Variable Name > <^AXD> \ Comments Number of variables Total number of events in all classes Number of last class (i.e., # classes=MAXCL+l) Largest domain of all input variables Maximum number of events satisfying a given selector User specified compact ratio Domain sizes of variables (i.e., # elements of the domain) Number of events per class Event array Class has 7 events Formula is 0((x +x =3, 4) & (x 3 +x i ;=5,6)) Class 1 has 4 events Formula is l( (x +x =0, 1, 6) & (x 5 +x^=3)) 12 end of input The data in the bold-faced box is the actual input to the program. In this example the variables are partitioned into two D-groups, (4, 5) • IV. Output Examples with G.L.D.s The following pages are examples of actual program output with corresponding G.L.D.s. ^AX T MUM OA^-EFN S*ZE CfMPACT_PAT T "l C'TFRIA = Nt'MBErt °F VARIABLES = NUMBER 3T EVEN'S NliMBEP r F CLASSES MAXIMUM LEVEL NI.IMBFR NUMBER CI ASS I CI ASS EVEN" EVE*'~ EVENT EVENT EVEN" EVEN" EVEN- CLASS EVFN T EVEN T EVEN- EVENT TT"E: TOTAL r F LEVELS FOR EACH CF EVENT SPECIFIED •EVENTS 500 0.50 4 11 2 4 VARIABLE FOR EACH : 4 CLASS F( 0) NO. NO, MS. NC. N ). NC. NT. F( 1) NC. NC. NC. N?. 7 4 1 = 2= 3 = 4 = 5 = 6 = 7 = 1 = -> - 3 2 1 3 ? 1 3 = 4 = 15175S78C HHMM5S W S NUMBER n F SY^ME T RIC 3 ? 4 3 2 I I ?. 3 2 1 3 2 L 3 2 I VARIABLES IN CLASS = F rt ?MULA U 0(X3+X4» =5,6) C (X1»X2=3,4) CLASS MTNIMIJM TIME: r TAL CrwoACT f ATin = COMPACT c A X IT = 15175«;81C HFMMSS v r NUMB E& OF ^Y^ME T RIC 0.14 I. 00 VA^IAdLES IN CLASS 1 = FPQMULA TS 1(X3+X4=3) B ( XH- X2= , 1 , 6 ) CLASS C p MPACT P A'TF = MINIMUM C° M PACT RATIO = -tme: 15l7Sq88C HhMMSS MS 0.25 1.00 Output for User's Guide Example 4 3 z I o|c -~m 4UI ^>gjH^^7[us)H^r»^^uV|^ ^3+*/ ^^^^0;::::;: 8 •::;;::: e o ; 1_3 2 5 x,+x, I 2 1 w 3 / 3 1 IIS rj- D. D U -SI £1 D 15" : i Class O ■■::: - — ft *•*./* 3} t |* ; +X,0.'>j \ \ \ wsu7 Y50 7 y| X^-rVy X. y^ CD 7 u U u 1 1 ' 1 ' 1 I a u UJ J ^ — - -i ' 3 - • - 3 ; n n n £_ - ■ - O - 3 H / •2. ^ / Z. 2 w 3; oi z 3 V V: Cl4ss: j:::;::::::: : . Xz GLD's for User's Guide Example Circled areas are events covered by the particular selector. . . , i , 9 MAXIMUM "AT T EF N SIZE n p'JTTE^Ift 500 = P. 25 NUMBFF np V«*T?BLES = NUM«FP PF EVENTS = 2 31 NUMBER ~ c CL^SSf v«e xtmuv i.F v c t. ES ~ 4 MIjmupr -p l PV El S F0° E***H VA D HRLE : 4 4 4 NUMREP <" 3 EVEN" EVEN" NC. NO. 1 = 7 = I 3 2 EVENT EVFNli- NO. MP. 3 = 4- = 1 n 2 3 3 EVEN:* EVENT NQ . 5 = 6 = 1 2 1 CLASS EVEN" F( 2) NC. 1 = 2 2 EVENT EVENT NC. \ip. 2 = •a = 2 1 FVFNT E\' C NT NC. MP. 4= 5 = I 1 2 2 _ Second Example EVEN" EVENT NO. VD. 6 = 7 = 1 1 1 1 EVEN" FVENT NO. MP. 8 = 9 = 2 2 2 i 3 7 FVENT PVEN T NC. "C. 10= 11 = 2 3 1 1 3 EVEN T CLASS F( 2 ) 12 = 3 2 EVENT cyPN" 1 " NC. MP. 1 = 2 = G 3 2 1 EVFN" EVEN^ NO. NO. 3 = 4 = 1 1 3 2 2 1 ^VEN^ EVENT NO. N n . 5 = 6 = i 2 i 3 3 EVEN" pv/PNT • in ' v . NO. 7 = 8 = 2 2 2 i 2 EV?N T EVEN" NC. MP. 9 = 10 = 2 3 2 3 EVENT EVENT MP, . NC. 11 = 12 = 3 3 1 c 2 1 T IME : 162 MM 1 ' 645930 M S S M !? N l'-ip = ~ " P 0< X. . + X : + x ? ' -01 1 : T A«LES IN CLASS = 3 r l a 3 s c r M p * r v ' F = " TO = 1.00 l .: r T IM£: 162 6461 .30 u c rr*~M MIIMPep i~F *Y y vPTr -- VA "TARLF5 IN CLfiSS 1 = 3 F^sv.iil * T c " ( X .♦ < :*x -• = 1 ,'") ! MI NT M U M "<""*? • ir = - TP = 0.6 0.5 7 3 | i IMP 1 6?646' , 6n HHMMS* MS -~T,n m).mppc ^f SY MM FTPTr V * CT tPt_FS T N CLASS 2 = FTRMUL * T r 2( XHX7. + X3' =4) 10 1 ^ p 1,00 C L * S S r r m p ""~ ~ r h T 1 - -TMF: i~6 2646 430 HH" M l fC M* cr 5mi.il 4 ! c 3UH-X2+X3' = 5) Z Lt S S ■ i-tme: pMP '. " " s ^ " jr = r v p i* i'- - " * 7 to = 162647/60 HHMMSS MS 1 ,00 1.00 Note GLD's for Second Example The number in the cells of the GLD's represent the sum x-^x^+x' Events circled by a solid line are the given events for each class. Events circled by a dotted line are the events covered by the particular selector. X tfi 1 5 1 ■2. — jo] 2 / 5 t 2 ( < S 3 2 & s H 3. 7 c 5" V 2 s k |3 2. 6is 1ULA TS 2( Xl+X2+X3+X4=4) CLAS MTNTMU rr ~ r T H MP.ACT RA^ P .<* T Id = IP = .CO .00 62644 HMMSS 710 Third Example 13 ftAS5 O Cb V c the PR3GFAV n ">ECATES ON DISJOINT EVEN T CLASSE C . EVEN' NH. 1 IN CLAfc MO. IS THE SAME AS EVENT W Y~ij9 EVE V T CLA^SE C AF E NC"" DISJOINT, T "IS DATA VllL ^ nT BE PUN. 3 IN CLASS NC 1 Fourth Example Note: This example shows the output message when non-disjoint event-classes are run. 15 V. Concluding Remarks The most important attribute of symmetric selectors is the ability to produce a compact representation of certain groups of events, as compared with non-symmetric selectors. This attribute is most useful in large pattern recognition problems or artificial intelligence generalization problems, where numerous groups of events must be represented by selectors. This would result in an obvious reduction of required storage. Further extensions of this program. 1. The partially symmetric case. A. Generating selectors which include unspecified events (don't cares) in a consistent manner. B. A better routine for determining if a selector variable should be complimented. 2. The case of non-disjoint event classes. 3- Specifying VL formulas containing non-symmetric selectors . Reference Michalski, R. S., "Variable Valued Logic: System VLq_, " Proceedings of the 197*1 International Symposium on Multiple-Valued Logic , West Virginia University, Morgantown, West Virginia, May 29-31, 197^- BIBLIOGRAPHIC DATA SHEET 1. Report No. UIUCDCS-R-75-729 3. Recipient's Accession N< 4. I 1; ie and Subi it le SYM-1 A Program That Detects Symmetry of Variable-Valued Logic Functions 5- Report Date May 1975 7. Author's) Gerald M. Jensen 8. Performing Organ iz.it ion Rept. No. 9. Pi-H inning Organization Name and Address Department of Computer Science University of Illinois at Urbana-Champaign Urbana, Illinois 6l801 10. Project/ Task/Work Unit N. 11. Contract /Grant No. NSF DCR 7if-035lU- I— I ?. "n| iring Organization Name and Address National Science Foundation Washington, D.C. 13. Type of Report & Period Covered 14. 1 pplrmentary Notes 16. ^hstrac t ; This paper describes an algorithm, and a PL/l program (SYM-l) implementing it, that detects symmetry of a variable-valued logic function with regard to the variables or their inverses. If symmetry exists, symmetric variables are then used in symmetric selectors which will describe the set of events in a more compact way than corresponding non-symmetric selectors. 17. Key Words and Document Analysis. 17a. Descriptors 17b. Identifiers Open-Ended Terms 17c. < OsATI Field/Group i IS. ':-. ail it il ity Statement 19. Security Class (This Report) UNCLASSIFIED 21. No. of Pages 20. Security ( lass (This Page UNCLASSIFIED 22. Price ■ " IMTIS-35 (10-70) USCOMM-DC 40321-PJ s i