Optimization of Polynomial Expressions by using the Extended Dual Polarity

 Penelope Hall
 5 days ago
 Views:
Transcription
1 Optzato of Polyoal Epressos by usg the Eteded Dual Polarty Draga Jakovć (a) Rador. takovć (a) Claudo Moraga (b) (a) Faculty of Electrocs Uversty of Nš erba ad Moteegro (b) Europea Cetre for oft Coputg Meres pa Faculty of Coputer cece Uversty of Dortud eray Abstract A ethod for optzato of polyoal epressos ters of fed polartes for dscrete fuctos s preseted. The ethod s based o the prcple of eteded dual polarty whch provdes a sple way of orderg polartes to obta a effectve way of fdg the optal polarty. The ethod stll ples ehaustve search but t s a optzed search whch ay be epressed very sple rules. Eperetal results llustrate the effectvty of the proposed ethod. Keywords wtchg fuctos Multplevalued fuctos ReedMuller epressos Polyoal epressos Fedpolarty epressos. INTRODUCTION Polyoal epressos are a for of represetatos of dscrete fuctos that provdes for copact represetatos of large fuctos. Ther defto ad eplotato s derved fro the classcal egeerg approach cosstg of decoposto of cople systes to cobatos of subsystes that are spler or whose behavor s well docueted. I the case of polyoal epressos a gve fucto s decoposed to a lear cobato of soe sutably selected coplete sets of bass fuctos. I ths case dealg wth fucto values of a gve fucto f s replaced by dealg wth coeffcets for f assged to the bass fuctos. Reducg the uber of ozero coeffcets usually deoted as optzato of the represetato for f reduces coplety of dealg wth f ad therefore t s aog the a goals theory ad practce of dscrete fuctos. I atteptg to derve polyoal epressos wth u uber of coeffcets a varety of dfferet polyoal epressos have bee defed the lterature ost of the for swtchg fuctos.e. bary valued fuctos of bary varables see for eaple [7] ad refereces gve there. However ay of these epressos are eteded or geeralzed to ultplevalued put baryvalued output (MVB) fuctos [956] ad ultplevalued put ultplevalued output (MV) fuctos [4686]. A bref revew of these etesos s dscussed [9] where related refereces are provded. Polyoal epressos for bary fuctos ad ther geeralzatos to MVB ad MV fuctos are defed ters of dfferet epaso rules wth respect to ther varables [8] whch ca be alteratvely terpreted as choosg dfferet sets of bass fuctos [9]. Wth soe of these classes of epressos a further optzato ca be perfored by usg lterals of dfferet polarty for varables whch leads to a
2 varety of fed ad edpolarty epressos [678]. Ths way of optzato of polyoal epressos ca be terpreted as reorderg ad sftg of bass fuctos ters of whch the represetatos are defed. It ca be appled uder a approprate defto of egato to both btlevel epressos wth whatever bary or MV dgts used ecodg values for varables ad wordlevel epressos whch case varables take teger values. The chef proble ths approach s that gve a fucto f we do ot kow how to select a pror the polarty of varables to get the optal polyoal epresso the uber of ozero coeffcets cout. olutos are offered through heurstc algorths [5] or brute force search ethods yeldg to the socalled polarty atrces [8]. Recall that a polarty atr s a atr whose rows are coeffcets all possble fed polarty epressos for a gve fucto f. I the frst case the effcecy of the ethod s assured by reducg the search space at the prce of a creased uber of coeffcets. I the secod case advatage s take of the recursve structure of polarty atrces whch structure orgates the defto of the polarty for varables. Ths observato apples geerally whatever ay be the way of represetg ether bary MVB or MV fuctos ad sets of coeffcets ther polyoal epressos as tables or vectors arrays of cubes or relatg the to paths decso dagras etc. I ths paper we preset a ethod to detere the optal polyoal epressos of dscrete fuctos for dfferet polartes of varables. I the ethod dscussed t s assued that a fucto s represeted by a set of cubes whch are processed depedetly of each other. Therefore the coplety of the ethod s detered by the uber of cubes rather tha the uber of varables. Ths feature was the a otvato for selectg cubes as data structure to represet fuctos. However the preseted ethod ca be easly adapted a perfored over other data structures as vectors or decso dagras for stace. The presetato the paper s gve for MV fuctos as the ost geeral class of cosdered fuctos wth ost of eaples for quaterary fuctos. However all the algorths proposed ca be equally appled to MVB ad bary fuctos after specfyg the correspodg paraeters as wll be llustrated by the eaples provded below.. Backgroud work ad Motvato Besdes seekg for geeralty (up to soe etet) ad the fact that there are pheoea aturally descrbed by MVB ad MV fuctos aother reaso to study the optzato of polyoal epressos for MV fuctos s that these fuctos ca be effcetly eploted solvg optzato probles for bary swtchg fuctos that are prevalet owadays practce. oe of these applcatos are brefly dscussed [9]. For eaple a wellkow approach to represet a ultpleoutput Boolea fucto s to treat ts output part as a sgle ultplevalued varable ad covert t to a sgleoutput characterstc fucto. uch a approach s used EPREOMV [] ad MVI []. Other applcatos of ultplevalued logc clude desg of PLAs wth put decoders [4] optzato of fte state aches [] [8] testg [] ad verfcato [5]. Dfferet represetatos for ultplevalued put twovalued output fuctos are defed cludg a geeralzato of dsjuctve oral for or uofproduct (OP) epressos ad Kroecker ad PseudoKroecker epressos for bary put bary output swtchg fuctos [67]. These epressos ca be uforly cosdered as lear cobatos of bass fuctos over F(). The bass fuctos used these epressos are epressble as products of ultplevalued (MV) lterals. Mzato of these epressos s crucal practcal applcatos [5].
3 It s docueted the recet lterature that ANDEXOR realzatos ay have soe advatages over AND OR epressos such as easy testablty [] low cost for arthetc ad syetrc fuctos the uber of product ters sple algorths for detecto of syetrc varables [] Boolea atchg [] etc. Fed Polarty ReedMuller epressos (FPRMs) are a portat class of ANDEXOR epressos. For a varable Boolea fucto there are FPRMs. The FPRM wth the al uber of products s take as the optal FPRM. For soe classes of fuctos used practce the optal FPRMs requre fewer products tha suofproduct epressos [8]. Copared to bary swtchg fuctos ultplevalued fuctos (MV) offer ore copact represetato of the sae aout of forato at the prce of ore cople apulatos wth such epressos ad the coplety of ther hardware realzatos. alos feld (F) epressos ay be cosdered as a geeralzato of ReedMuller (RM) epressos to the MV case [9]. Optzato of Fepressos ca be studed ad solved a way slar to that used for RMepressos. As FPRM dfferet polarty Fepressos of MV fuctos ca be dstgushed due to possblty to select dfferet polartes for MV varables. We deote these epressos as Fed polarty Fepressos (FPF). As the bary case the selecto of polarty of varables correspods to partcular perutatos of the values of the varables (see dscussos below ad Table 4). The relatoshp betwee two FPRMs for the polartes that are dual (see Defto 5 below) the sese of bary logc copleets s used [] for costructo of a ethod for FPRM optzato. I [] the oto of eteded dual polarty has bee troduced ad a ethod for optzato of Kroecker epressos was costructed based o that. I ths paper the oto of dual polarty s eteded to dscrete fuctos defed as appgs f : L where ad L are oepty sets. I ths case uary fuctos o wll play the role of geeralzed copleets. The choce L { } ad L {... q } bary ad MV logc fuctos dscussed detal ad used as eaples ths paper. cover the case of the We derve relatoshps betwee two fed polarty polyoal epressos for eteded dual polartes. Based o these relatoshps a ew ethod for optzato of polyoal epressos s proposed. The algorth starts fro a gve ot ecessarly zero polarty polyoal epresso of the gve fucto ad calculates all FPPEs usg a route whch each two eghbors polartes are eteded dual polartes. Ths route s called the eteded dual polarty route. It should be recalled that the proble of fdg the optal polarty for a polyoal epresso s NPcoplete.e. all algorths that solve the proble have a epoetal coplety wth respect to the uber of varables. The algorth proposed ths paper s a ehaustvesearch algorth but coverso fro oe FPPE to aother oe s carred out by usg oe dgt checkg. Due to that ad the splcty of the related processg of cubes ths algorth s rather effectve as cofred by eperetal results. It s portat to otce that the algorth proposed epresses hgh possbltes for parallelzato sce cubes defg a fucto are processed separately fro each other. I ths case t s sutable for hardware realzatos. The proposed ethod s geeral the sese that all estg algorths eplotg dualty property optzato (of ay kd) of polyoal epressos lke fed polarty ReedMuller epressos of Boolea fuctos [] Kroecker epressos [] polyoal epressos defed o F(4) [4] arthetc epressos [5 7] ca be derved fro the geeral ethod preseted here.
4 . BAIC DEFINITION As dcated above the presetato wll be gve for ultplevalued fuctos. Ths secto gves soe basc deftos ad otos fro the theory of fed polarty represetato of MV fuctos used as eaples the paper.. Polyoal epressos Defto : (Polyoal epressos (PE)) f :... q... q Each varable qvalued fucto { } { } gve by the truthvector T F [ f K f q ] ca be represeted by a polyoal epresso defed atr otato as where ad f ( K ) X ( ) T( ) F () q [ L ] X ( ) T( ) T() T () ( X() ) where deotes the Kroecker product ad the basc trasfor atr T() s defed as the verse of X() assug that the sybolc otato for colus of X() s replaced by the correspodg truthvectors. Addto ad ultplcato (ad hece epoetato) are defed the used algebrac structure. Mostly ths s the structure of vector spaces over F() or F(q) however t s possble to use also other algebrac structures as for stace these cosdered [4] [4] perttg defto of polarty of varables. As eaples of polyoal epressos ReedMuller epressos Kroecker epressos alos feld epressos over F(4) ad arthetc epressos are defed the Apped. Here we gve a uerc eaple for fuctos F(4). Eaple : The F(4) epresso of a twovarable fourvalued fucto f (gve) defed by the truthvector F [ ] T s gve by f ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) The coeffcets are eleets of the correspodg FPF spectru whch s therefore gve by []. The zero eleets the spectru correspod to the ssg ters the epaso. Notce that there are ozero eleets the truthvector ad 9 the above polyoal epaso for f. Recall that the operatos (addto () ad ultplcato ( )) are F(4) defed as follows:
5 Addto F(4) Multplcato F(4) The polarty of varables F(4) s defed as.. Optzato of polyoal epressos Optzato of polyoal epresso vewed as the deterato of a epresso wth the u uber of ozero coeffcets (.e. the uber of ters) ca be doe by troducg dfferet polartes for the varables. The represetatos thus produced are socalled fed polarty polyoal epressos (FPPE) where each varable appears as ether the postve or the egatve lteral..e. as ucopleeted or copleeted but ot both at the sae te. Defto : (Copleet) For a qvalued varable there are q copleets c gve as c c c... q. c s usually deoted as a varable wth a polarty c. (Wth ths otato the copleet used Eaple correspods to c ad ca be wrtte as ) Polarty vector P s troduced to deote the polarty of varables ad correspodgly the polarty of a represetato [5]. Defto : (Polarty vector) For a varable qvalued fucto f the polarty vector P ( p... p ) p { L q } s a vector of legth whose eleets specfy the polarty of varables FPPE for a varable fucto f.e. p j shows that to the th varable the jth copleet s assged ad wrtte as j. Fed polarty polyoal epressos (FPPEs) are uquely characterzed by specfyg decoposto rules assged to varables.e. by specfyg the polarty vectors. Defto 4: (Fed polarty epressos) Each varable qvalued fucto f gve by the truthvector followg FPPE f the polarty s p p L p ) ( T F [ f K f q ] ca be represeted by the
6 where p p f ( K ) X ( ) T ( ) F p q p p [ ( ) L ( ) ] p X ( ) p p T ( ) T (). Therefore FPPEs ca be gve by the vector of coeffcets usually deoted as spectru p p T () F. p defed as Eaple : The fed polarty F(4) (FPF) epresso of a twovarable fourvalued fucto f dscussed Eaple for a polarty p () s gve by f ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) The correspodg FPF spectru s gve by [ ]. Notce that has 8 zerocoeffcets eawhle has oly 6.. EXTENDED DUAL POLARITY I zato of FPPE wth respect to the uber of ozero coeffcets cout t appears coveet to eplot the oto of the dual polarty [] the eteded dual polarty ad the related dual polarty ad the eteded dual polarty vectors. The ter dual polarty s used the Boolea doa to deote two polarty vectors whch dffer oly oe bt. Defto 5: (Dual polarty) I the case of bary fuctos for a gve polarty p ( p K p p p K p ) ( p { }) the polarty p ( p p p p K p ) s the dual polarty. ' K Eaple : Dual polartes for the polarty p ( ) are the polartes () ad (). I the ultplevalued doa the ter dual polarty wll be called the eteded dual polarty []. Defto 6: (Eteded dual polarty) For a gve polarty p ( p K p p p K p ) ( p {... q }) the polarty p ( p' p' p' p' K p' ) s the eteded dual polarty ff p' p j ad p' p. ' K j j
7 Eaple 4: For fourvalued fuctos the eteded dual polartes for the polarty p ( ) are the polartes () () () () () ad ().. Dual polarty route The uber of polarty vectors characterzg all possble FPPEs for a varable qvalued fucto s q. It s possble to order these q polartes such that each two successve polartes are the eteded dual polartes. We deote ths order as the eteded dual polarty route. Traversg of a qvalued desoal hypercube ca geerate oe of ay possble eteded dual polarty routes. Table gves the uber of dual polarty routes for dfferet values of q ad. Table : Nuber of dual polarty routes q No polartes No routes Eaple 5: Two dfferet dual polarty routes for q4 ad are gve by the sequeces of polarty vectors ()()()()()()()()()()()()()()()() ad ()()()()()()()()()()()()()()()(). These routes are show Fgure. Eaple 6: A eteded dual polarty route geerated by usg traversal of a fourvalued threedesoal hypercube s gve by () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () (). A eteded dual polarty route ca be costructed by usg the recursve procedure route(level drecto) gve Fgure for the partcular case q 4. Eteso to a arbtrary q s straghtforward. Eteded dual polarty route wll be produced f the procedure s called wth arguets equal.e. as route(). 4. RELATIONHIP BETWEEN DUAL POLARITY EXPREION g h Deote by ad the vectors of coeffcets FPPEs for the polartes zero g ad h respectvely assug that g ad h are two dstct eteded dual polartes.
8 Therefore the spectru for zero polarty s T() F ad spectra for two dfferet polartes g ad h are g g T () F h h T () F where g ad h dffer the th coordate g p p L p p p L p ce F ( T ) ) Further h h ( the relatoshp betwee ( ) ( p p L p p' p L p ) h. g ad h s gve by h h ( T ( ) ) ( ) g g g T ( ) F( ) T ( ). T g ( ) T j p j p j T j A T p () () T () B p where j p A T () ad B T j (). j j larly h p j T ( ) T () j p j T () T j p' A T () B p p' () () j j T T p j p j () () Fgure : Dual polarty routes.
9 Due to the Kroecker structure of the trasfor atr T h () ad the features of the Kroecker product h (assug cosstet desos) the verse trasfor atr ( ) Fally T g ( ) where I k s the detty atr of order q k. h p' ( T ( )) A ( T () ) B. T ( ) s gve as ( B ) h p p' ( T ( ) ) ( A ( T () ) B) A ( T () ) p p' AA ( T () )( T () ) BB p p' I ( T () )( T () ) I vod route(t level t drecto) { f( drecto ) { f(level o_varable) {  out ew polarty vector h } else { h[level] ; route(level ); h[level] ; route(level ); h[level] ; route(level ); h[level] ; route(level ); } } else { f(level o_varable) {  out ew polarty vector h } else { h[level] ; route(level ); h[level] ; route(level ); h[level] ; route(level ); h[level] ; route(level ); } } } Fgure : Procedure route().
10 The atr g s a cely structured sparse atr whch epresses a property that we wll eplot for the geerato of a processg rule for trasforg the coeffcets of oe polarty polyoal epresso to the coeffcets of aother eteded dual polarty polyoal epresso for the gve fucto.e. ( )( ) ( ) h p p g I T T I ' ) ( ) (. () The followg eaple llustrates coverso of coeffcets the polyoal epaso for a gve polarty to a requred dual polarty for the ost falar bary case. I the case of MV fuctos that would be the eteded dual polarty coeffcets as t wll be see further eaples below. For splcty of atr otato the eaple s gve for bary valued fuctos. Eaple 7: Let a Boolea fucto f be gve by the truthvector [ ] T F. The fed polarty ReedMuller (FPRM) epresso of f for the polarty p() s gve by the spectru [ ] T whle the FPRM epreso of f for the polarty p'() s gve by the spectru [ ] T. Polartes p ad p' are dual polartes sce they dffer oly the secod bt ad therefore I I where I ad I are the detty atrces of order ad 4 respectvely. Therefore [ ] [ ]. T
11 5. PROCEIN RULE A relatoshp betwee two eteded dual FPPEs gve by () wll be the startg pot for the dervato of a processg rule whch should be appled to all the ters FPPE for a gve polarty to detere the FPPE for aother eteded dual polarty. Let be a ter the FPPE of a fucto f for the polarty h h p p p p L p ). The value of the coeffcet the FPPE for f for the ter s (). ( L The process assues that ozero ters of f are processed separately deterg FPPEs. ce processg eas ultplcato wth the rows of the trasfor atrces ad a row ay have several ozero etres a gve ter for a specfed polarty p ay produce few ew ters the FPPE of the fucto f for the eteded dual polarty g ( p L p p' p L p ) depedg o the values of p g ad p'. Thus geerates ew ters represetg coeffcets FPPE for f for the polarty g. h The value of the eteded dual FPPE o a ewly geerated ter s gve by v () where ν strogly depeds o the cosdered eteded dual polartes g ad h whch depedecy ca be coveetly p ' epressed atr otato by a atr ( )( ) p L T () T (). The rules to process ters FPPE for the polarty h to detere ew ters the FPPE for the polarty g ca be derved fro the atr L as stated the followg theore forulated for the geeral case of qvalued fuctos. Theore : Let a atr L relatg product ters FPPEs for the polartes h ad g be gve as l l L l q l q l l L l q l q L M M O M M. lq lq L lq q lq q lq lq L lq q lq q The processg rules to geerate ew ters FPPE for the polarty g fro ters FPPE for the polarty h are detered as follows: Recall that ; f k the geerate t t L q k L q ad use v l t k h as the scalg factor v () Proof: Rewrte the equato () the for p p' h h h ( I ( T ) )( T () ) I ) ( I L I ) R g L [ l j ] I ad ra q [ r j r j lu for The orders of the atrces Fro () R ] where w (. () αqr j αqr B B ur wr I are q ad r B q respectvely. B B β β α... r β... r A B
12 .e. ) ( ) ( q z z z z w z z z j z z z u z z z L L L L L (4) u w { q} Cosder cotrbuto of a ter ) ( k L L h to g. The ozero coeffcets the th colu of the atr R are the eleets wth the decal de ) ( q t t d L L L. Ths eas that the ter fro h cotrbutes to ters g wth the decal de d. The value of cotrbuto to these ters h v accordg to (4) s gve as h k t h d h l r v. Ed of the Proof. Eaple 8: The cotrbuto of the ter () for the () polarty FPRM of fucto f gve Eaple (the truth vector s F[]) to for the () polarty FPRM s gve by () (see Fgure ). F cotrbuto of to Fgure : Ter cotrbuto Above cotrbutos of the ter are calculated by the followg:
13 L ; Therefore the ter ( ) wth value cotrbute to the ters ( ) ( ) ad ( ) wth values gve as tes the correspodg value fro the fourth colu atr L.e. * * ad * respectvely. Usg the above theore t s possble to derve all the estg ethods for optzato of polyoal epressos whch eplot the dual polarty property as well as to produce ew ethods for deterato of soe ew polyoal epressos. tartg polarty s ; Calculated polarty s ; Matr ( ) 6. DUAL POLARITY BAED OPTIMIZATION ALORITHM ce for a varable qvalued fucto f there are q possble FPPEs a ehaustvesearch optzato algorths all of q fed polarty polyoal epressos should be calculated. Usually the startg pot deterato of each of q FPPEs s the truthvector for f. I a class of algorths whch eplot dual polarty feature [] [] [4] aga these q FPPEs are calculated but the truthvector s the startg pot oly for the frst FPPE. Ay other FPPE s calculated startg fro a arbtrary FPPE. Fgure 4 llustrates the way of traversg fro oe to aother polarty the classcal approach ad by eplotg the eteded dual polarty. I classcal approach all of q FPPEs are calculated fro the truth vector (Fgure 4a). I dualpolarty based approach oly frst FPPE s calculated fro the truth vector whle other FPPEs are calculated fro the prevously calculated dualpolarty FPPE (Fgure 4b) whch reduce the coputatoal coplety due to the features of the dual poarty route. f... p(...) p(...) p(...) p( q q... q) a) f... p(...) p(...) p(...) p( q q... q) b) Fgure 4: Optzato algorths: a) classc b) dualpolarty based
14 I ecto s eplaed how to costruct a eteded dual polarty route. The a dea of the proposed algorth s that all q FPPE are costructed alog the eteded dual polarty route.e. each FPPE s calculated startg fro a tal eteded dual polarty FPPE. A ope questo s the deterato of a processg rule for processg of ters fro oe FPPE to produce ters aother eteded dual polarty FPPE. Theore gves the processg rule for arbtrary FPPEs. Fro ths theore t follows that t s possble to calculate all FPPEs by usg the ethod for trasforg a gve FPPE to the eteded dual polarty FPPE alog the route wthout repettve calculatos. Therefore we ca perfor the optzato of FPPE.e. costructo of all FPPEs ad subsequet selecto of the FPPE wth the u uber of ozero coeffcets by usg a effectve ehaustvesearch algorth cosstg of the followg steps.. Italzato:  et the polarty vector p to p ( L) p  Calculate the spectru p  et C the uber of ozero coeffcets. Detere the et eteded dual polarty p accordg to the recursve route. p. Lst all the ters for. p' 4. For each ter calculate the cotrbuto to the spectru by usg the processg rule derved fro Theore. 5. Delete ters whose value s equal to zero after suato of cotrbutos of the processed ters. 6. Calculate the total uber of ozero coeffcets C '. If C ' C the C C'. 7. top f all polartes have bee treated. Otherwse go to tep. The algorth as forulated above starts fro the zero polarty FPPE but t ca start fro ay other polarty. The tal FPPE represetg the put the algorth should be calculated fro ay specfcato of the gve fucto (for stace truthvector cubes decso dagras) by usg ay of the estg ethods. The the ters ths tal FPPE should be specfed by cubes whch are the put the algorth. For stace we ay wat to start fro the FPPE for the zero polarty for a gve fucto f whch ay be calculated fro the truth vector for f. For ths task we ca also use soe kow ethods for eaple the tabular techque [5]. It s terestg to otce that the algorth proposed has hgh possbltes for parallelzato. Each processor perfors the ethod alog a pece of the eteded dual polarty route. The eteded dual polarty route ca be dvded to z subroutes f the uber of parallel processors s z. I what follows the theory preseted ths secto wll be llustrated by eaples of alos feld F(4) epressos.
15 7. FIXED POLARITY F(4) EXPREION I ths secto we cosder optzato of fed polarty polyoal epressos of fuctos defed o F(4) by usg the eteded dual polarty ethod. The optzato of a F(4) epresso s possble by usg dfferet copleets. There are three copleets for a varable F(4) deoted by ad defed as. I FPFs the use of copleets for a varable requres perutato of colus the basc F(4) trasfor atr correspodg to that varable. Table shows copleets ad the correspodg basc trasfor atrces as well as ther verses that are used to defe the operators for calculatg coeffcets Fepressos. Table : Copleets F(4) ad basc trasfor atrces. Varable Trasfor Iverse trasfor ( ) ( ) ( ) ( ) The followg eaple llustrates F(4) fed polarty polyoal epressos. Eaple 9: The fed polarty F (FPF) epresso of a twovarable fourvalued fucto f Eaple for the polarty ) ( p s gve by ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ) ( f The coeffcets are eleets of the correspodg FPF spectru whch s therefore s gve by []. The FPF of a fourvalued fucto f ca be represeted by a set of fourvalued ()tuples cosstg of ters ad the correspodg fucto values o these ters. For splcty lterals for varables ters are replaced by ther dces. A varable that s preset a product ter the th copleeted for s replaced by ad replaces a abset varable. Therefore the FPF for the fucto f ad the assued
16 polarty ) ( p s represeted by the followg set of tuples where " " separates the fucto value fro the lterals of varables { }  ;  ; ; ; ; ; ; ; ;. Now by the eaple we wll show how ethod for optzato of F(4) epressos [4] ca be derved fro our geeral ethod descrbed ecto 6. Table gves all possble atrces L for F(4) epressos as show [] whle Table 4 shows the correspodg processg rules derved fro these atrces. It s obvous that these processg rules are sple ad due to that effcet ters of te ad space. Table : Matr L for F(4). ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) Eaple : Cosder a twovarable fourvalued fucto f gve Eaple. Let the F(4) fed polarty epresso of f for the polarty ) ( p be represeted by the spectru [ ] T. The eteded dual polartes ad the correspodg FPFs are gve Table 5. Calculato procedures for deterato of these eteded dual polarty FPF epressos are show Tables 6 ad 7.
17 Table 4: Processg rule for F(4) epressos. p p' ew ters f the geerate f the geerate f the geerate f f f f f f the geerate the geerate the geerate the geerate the geerate the geerate v v v v v v v v v v v v v v v Table 5: Eteded dual polarty F(4) epressos. polarty spectru () () () () () () Table 6: Polarty () to (). polarty () ters New ters polarty () ters ; ; ; ;
18 Table 7: Polarty () to (). polarty () ters ew ters polarty () ters ; ; ; ; 7. Effcecy of the ethod Features of the proposed ethod ad ts effcecy have bee eaed by a seres of eperets the saple of whch s preseted the ecto 9. Eperetal results cofred the effcecy of the ethod copared to the related ethods. For calculato of all FPRMs based o the truth vector the verse trasfor atr ad ts copleeted fors are used. The uber of zero coeffcets these atrces for F(4) s (see Table ). O the other sde for the ethod proposed ths paper all FPRM are calculated but calculatos are perfored by usg L atrces (for F(4) see Table ). The uber of zero coeffcets these atrces s 7. Icreasg of uber of zero coeffcets processg atrces leads to the reducto the uber of operatos requred for calculato of FPRMs. 8. PARTICULAR CAE I ths secto the aer used the prevous secto we wll show that ethods for geerato fedpolarty Kroecker epressos [] fed polarty ReedMuller epressos [] as well as fed polarty arthetc epressos [5] ca be derved as partcular cases of the eteded dual polarty based optzato algorth descrbed ecto Kroecker epressos for bary valued fuctos I [] s proposed a ethod for optzato of Kroecker epressos. Ths ethod ca be cosdered as a partcular case of the preset ethod as ca be see fro Table 8 shows processg rules for all possble cases for Kroecker epressos of Boolea fuctos [] derved by the specfcato of paraeters the geeral ethod dscussed above. Note that polarty deotes hao epaso whle polarty ad deote postve Davo ad egatve Davo epasos respectvely. Also for all cases v. 8. Fed polarty ReedMuller epressos Fed polarty ReedMuller (FPRM) epressos ca be optzed by usg the dual polarty property as gve [] whch ca be vewed as a partcular case of the geeral ethod dscussed above.
19 Table 9 shows processg rules for the FPRM of Boolea fuctos. As for the Kroecker epressos ths case t s also v. Table 8: Processg rule for Kroecker epressos. p p' ew ters f the geerate f the geerate f the set f the geerate f the set f the geerate Table 9: Processg rule for FPRM epressos of Boolea fuctos. p p' ew ters f the geerate 8. Fed polarty arthetc epressos Dual polarty s used [5] for optzato of fed polarty arthetc epressos (FPAE). Ths ethod ca be also derved as a partcular case of the geeral ethod. Table shows processg rules for fed polarty arthetc epressos FPAE [4]. Table : Processg rule for arthetc epressos. p p' ew ters f the a) geerate ad set v. b) geerate ad set v. 9. EXPERIMENTAL REULT I ths secto we preset soe eperetal results estatg features ad effcecy of the proposed algorth for zato of FPPEs. As eaple we gve results for FPF epressos for fuctos defed o F(4) FPAE of Boolea fuctos ad Kroecker epressos.
20 9. FPFs We developed a progra C for deterato of optal FPF epresso for a arbtrary fourvalued fucto represeted by ters. The eperets were carred out o a Hz PC Celero wth 8Mb of a eory ad all rutes are gve CPU secods. Table copares the rutes for optzato of FPF epressos by the CTT ethod troduced [5] (colus CTT) wth the eteded dual polarty based algorth proposed [] that as show above ca be derved fro the ethod gve ths paper (colus Dual). We cosder radoly geerated fourvalued fuctos wth 5% ad 75% of ozero ters (colus 5% ad 75% respectvely) where the uber of fourvalued varables rages fro 4 to 7. Colus %d show the rato (CTT Dual)/ Dual where CTT ad Dual refer to the ethods [5] ad [] respectvely. CPU te reducto gve colus %d are show Fgure 5. The eteded dual polarty based algorth s faster tha CTT due to the splfed processg by usg the eteded dual polarty property. Ths rato creases wth creasg uber of varables. Furtherore the uber of ozero ters has saller fluece upo the rute of the proposed algorth as copared to CTT. Table : CPU tes for calculato of FPF by Dual polarty ad CTT. 5% 75% N Dual CTT %d Dual CTT %d d5% d75% Fgure 5: Reducto of CPU tes for calculato of FPF by Dual polarty ethod copared wth CTT ethod
21 9. Kroecker epressos I ths subsecto we preset soe eperetal results estatg features ad effcecy of the eteded dual polarty based ethod for optzato of Kroecker epressos. Table ad Fgure 6 gve the rutes ( llsecods) for the Kroecker epresso optzato for the sae fuctos as for the FPAEs optzato. The ew colu deoted as () represets the fuctos takg the value at the frst three ters ad the value at other ters. The cocluso s the sae as the case of FPAEs.e. the uber of ters strogly flueces the rute of ths algorth. Table : CPU tes for calculato of Kroecker epressos q. () 5% 75% ( ) 5% 75% Fgure 6: CPU tes ( llsecods) for calculato of Kroecker epressos q We epect that dual polarty based ethods for optzato of other classes of polyoal epressos whch ca be derved fro the proposed ethod wll epress the sae or slar features.
22 9. FPAEs I ths subsecto we preset the sae eperetal results as prevous subsectos however ths te estatg features ad effcecy of the eteded dual polarty based ethod for the zato of fed polarty arthetc epressos. Table copares the rutes for optzato of arthetc epressos by the Tabular techque [] (colus ATT) wth the algorth that s derved fro the ethod proposed ths paper (colus Dual). We cosder the sple fuctos takg the value at the frst three ters () radoly geerated fuctos wth 5% of all possble ters ad radoly geerated fuctos wth 75% of all possble ters where the uber of varables rages fro 7 to. Colus %d show the rato (Dual ATT)/ATT where ATT ad Dual refer to the ethod [] ad the proposed algorth respectvely. These colus are show Fgure 7 too. It ca be cocluded that the uber of ters strogly flueces the rute of the eteded dual polarty based algorth but t s faster tha ATT Table : CPU tes for calculato of arthetc epressos q. () 5% 75% ATT Dual %d ATT Dual %d ATT Dual %d ( ) 5% 75% Fgure 7: Reducto of CPU tes for calculato of arthetc epressos q by Dual polarty ethod copared wth ATT ethod
23 . CONCLUDIN REMARK I ths paper we have proposed a geeral ethod for optzato of polyoal epressos by usg the eteded dual polarty property. We have troduced the oto of eteded dual polartes as a eteso of the very well kow ter dual polarty Boolea algebra. Based o the eteded dual polarty we have show depedeces betwee two eteded dual polarty polyoal epressos. Ths depedecy s used as a base for dervg the ethod. All estg ethods whch eplot the dual polarty property optzato [] [4] [5] [] ca be derved fro our ethod as a partcular cases. By usg the proposed ethod t s possble to derve slar ethods for optzato of other polyoal epressos. For all gve cases the processg rules are sple ad effcet. Due to that although beg a ehaustvesearch ethod the proposed ethod s effectve. Eperetal results are gve to show the perforace of the eteded dual polarty ethods. The proposed optzato ethod works wth ters. A eteso to work wth dsjot cubes ca be a prosg drecto sce a cube based tabular techque whch starts fro dsjot cubes [8] s ore effcet tha slar techques startg fro ters []. REFERENCE [] De Mchel. D. Brayto R. agovavcetell A. Optal state assget for fte state aches IEEE Tras. o CAD/ICA Vol. CAD4 No. July [] Drechsler R. Hegster H. chaefer H. Harta J. Becker B. Testablty of Level AND/EXOR Crcuts Joural of Electroc Testg Theory ad Applcato Vol. 4 No. Jue [] Dubrova E.; Far P.; A cojuctve caocal epaso of ultplevalued fuctos Proc. d IEEE Iteratoal yposu o MultpleValued Logc May [4] Dubrova E.V. Muzo J.C. eeralzed ReedMuller caocal for for a ultplevalued algebra MultpleValued Logc A Iteratoal Joural Vol [5] Dubrova E. ack H. Probablstc verfcato of ultplevalued fuctos Proc. th It. yp. o MultpleValued Logc May [6] Falkowsk B.J.; Cheg Fu; Faly of fast trasfors over F() logc Proc. rd It. yp. o MultpleValued Logc. May [7] Falkowsk B.J.; ChpHog Chag; Optzato of partallyedpolarty ReedMuller epasos Proc. It. yp. o Crcuts ad ystes ICA '99 Vol. May  Jue 999 Vol [8] Falkowsk B.J.; Rahardja.; Effcet coputato of quaterary fed polarty ReedMuller epasos IEE Proc. Coputers ad Dgtal Techques Volue: 4 No. 5 ept [9] Far P. Dubrova E. takovc R.. Astola J. "Cojuctve decoposto for ultplevalued put baryvalued output fuctos" Proc. TICP Workshop o pectral Methods ad Multrate gal Processg MMP' Toulouse Frace epteber
24 [] ao M. Jag J.H. Jag Y. L Y. ha. Brayto R. MVI Proc. It. Workshop o Logc ythess Jue [] E. Dubrova. Multplevalued logc sythess ad optzato. I Logc ythess ad Verfcato Eds.:. Hassou ad T. asao pages 894 Kluwer Acadec Publshers. [] Jakovć D. Tabular techque for the fed polarty arthetc trasfor calculato XLVII Coferece ETRAN HercegNov erba ad Moteegro ( erba). [] Jakovć D. takovć R.. Moraga C. Optzato of Kroecker epressos usg the eteded dual polarty property Proc. XXXVII Iteratoal cetfc Cof o Iforato Coucato ad Eergy ystes ad Techologes ICET Ns Yugoslava [4] Jakovć D. takovć R.. Moraga C. Optzato of F(4) epressos usg the eteded dual polarty property Proc. th It. yp. o MultpleValued Logc Tokyo Japa May [5] Jakovć D. takovć R.. Moraga C. Optzato of arthetc epressos usg the dual polarty property st Balka Coferece Iforatcs BCI Thessalok reece pp [6] Jakovć D. takovć R.. Drechsler R. Effcet calculato of fed polarty polyoal epressos for ultvalued logc fucto Proc. d It. yp. o MultpleValued Logc Bosto UA May [7] Jakovć D. takovć R.. Moraga C."Arthetc Epressos Optzato Usg Dual Polarty Property" erba Joural of Electrcal Egeerg Vol. No. Noveber pp [8] Jakovć D. takovć R.. Drechsler R. "Cube tabular techque for calculato of fed polarty ReedMuller epressos ad applcatos'' Proc. of a Workshop o Coputatoal Itellgece ad Iforatoal Techologes Jue  Nš [9] Karpovsky M..; takovc R..; Moraga C. "pectral techques bary ad ultplevalued swtchg theory. A revew of results the decade 99 Proc. st It. yp. o Multple Valued Logc May [] Muzo J.C. Wesselkaper T.C. Multplevalued wtchg Theory Ada Hlger Brstol 986. [] Rahardja.; Falkowsk B.J.; Effcet algorth to calculate ReedMuller epasos over F(4) IEE Proc. Crcuts Devces ad ystes Vol. 48 No. 6 Dec [] Rudel R. agovavcetell A. "Multplevalued zato for PLA optzato" IEEE Tras. o CAD/ICA Vol. CAD5 No. 9 ept [] arab A. Perkowsk M.A. Fast eact ad quasal zato of hghly testable fed polarty AND/XOR caocal etworks Proc. Desg Autoato Coferece Jue 995.
25 [4] asao T. "Multplevalued logc ad optzato of prograable logc arrays" IEEE Coputer Vol [5] asao T. EXMIN  A splfcato algorth for eclusveorsuofproduct epressos for ultplevalued put twovalued output fuctos th It. yp. o MultpleValued Logc Charlotte North Carola May [6] asao T. A trasforato of ultplevalued put twovalued output fuctos ad ts applcato to splfcato of eclusveorsuofproducts epressos IMVL [7] asao T. Butler J.T "A desg ethod for lookup table type FPA by pseudokroecker epasos'' Proc. 4th It. yp. o Multplevalued Logc Bosto Massachusetts May [8] asao T. wtchg Theory for Logc ythess Kluwer Acadec Publshers 999. [9] takovc R.. pectral Trasfor Decso Dagras ple Questos ad ple Aswers Nauka Belgrade 998. [] Ta E.C. Yag H. "Fast tabular techque for fedpolarty ReedMuller logc wth heret parallel processes'' It.J. Electrocs Vol.85 No [] Ta E.C. Yag H. Optzato of Fedpolarty ReedMuller crcuts usg dualpolarty property Crcuts ystes gal Process Vol. 9 No [] Tsa C. Marekadowska M. eeralzed ReedMuller fors as a tool to detect syetres IEE Proc. Coputers ad Dgtal Techques Vol. 4 No. 6 Noveber [] Tsa C. Marekadowska M. Boolea fuctos classfcato va fed polarty ReedMuller fors IEEE Tras.Coput. Vol. C46 No. February [4] takovc R.. Jakovc D. Moraga C. reedmullerfourer versus alos feld represetatos of fourvalued logc fuctos Proc. 8 th It. yp.o MultpleValued Logc May pp [5] ree D.H. Dual fors of Reed_Muller epasos IEE Proc. Coputers ad Dgtal Techques Vol 4 No. 994 pp
26 Apped Eaples of polyoal epressos for bary ad ultplevalue fuctos. A. ReedMuller epressos Polyoal epresso () defed over alos feld F() s very well kow as ReedMuller epresso of Boolea fuctos. All calculatos are doe F().e. operatos addto ad ultplcato are addto odulo ad ultplcato odulo respectvely. ReedMuller epressos have the for [ ] R F [ ] f ( ) () F K where F s the truth vector of Boolea fucto f. Eaple : ReedMuller epresso of a varable Boolea fucto f gve by the truthvector F s gve by [ ] T f ( ) ([ ] [ ]) F A. Kroecker epressos Kroecker epresso of Boolea fucto f gve by the truth vector F s gve as where ad f ( K T The vector [ p K p ] p { } X T p p ) X T p p [ ] [ ] [ ] p p p p p p P deteres the kd of epasos used for each varable where p deotes postve Davo epaso p deotes egatve Davo epaso ad p deotes hao epaso. Used operatos are odulo operatos. F
27 Eaple : Kroecker epresso of a varable Boolea fucto f gve by the truthvector F for a vector P [ ] T s gve by [ ] T f ( ) ([ ] [ ]) F A. F(4) epressos If q4 ad addto ad ultplcato are carred out F(4) (as specfed Eaple ) the () represets Fepressos for a 4varable fucto. Epoetato F(4) s defed Table 4. Notce that f the Table 6 s vewed as a atr whose rows correspod to the rows the table the ths atr s the verse atr for the basc F(4) trasfor atr. Table 4: Epoetato F(4). (.) (.) (.) (.) Eaple : The basc F(4) trasfor atr s gve as T ( ). The F(4) spectru ad the correspodg polyoal epresso for a twovarable fourvalued fucto f gve by the truthvector F [ ] T are gve as ad respectvely. ( () () ) [ ] T T( ) F F f ( ) A.4 Arthetc epressos Arthetc epressos are closely related to ReedMuller epressos sce they are defed ters of the sae bass however wth varables ad fucto values terpreted as tegers ad stead of logc values. I ths way arthetc epressos ca be cosdered as teger couterparts of ReedMuller epressos. f ( K ) X ( ) A( ) F where X ( ) [ ] A ( ) ad addto ad ultplcato are arthetc operatos. A () represets the arthetc trasfor atr of order.