CS/EE 4/4: Comuer Aded Desgn of Dgl Crcus Chrs J. yers Lecure 8: rme Selecon nd UC Redng: Cher 4.-9 Essenl rme Imlcns Cube s n essenl rme mlcn of f conns mnerm no conned by ny oher rme mlcn of. f f All essenl rme mlcns re resen n every oml SO.
Essenl rme Imlcns y yz z z, y z w y z wy z Only re essenl ( eclusvely conns mnerms nd of. f Une SOs Revsed An SO n whch ech vrble ers only s osve lerls or only s negve lerls s clled Une. Une: + + + = + z + y 4 4 Non-Une: F AS( F) (Noe ossble consensus) If s une SO, s he comlee sum of he funcon reresened by F, nd ll he rmes re essenl.
F = yz + y + y z + yz + z CF( F) = y z + yz + yz + yz + y z ckng Subse of he rmes CS( F) = y + z + y z + yz 4 rme s 4 4 y z m n e r m s yz yz y z yz The mled consrn s F = ( + ) = n 4 ckng Subse of he rmes We regrd he s oolen vrbles. = ens h s ncluded n he seleced subse. So here re jus ossble subses: or 4 4 m n e r m s y z yz yz y z yz s rme 4
F = yz + y + y z + y z + z CF( F) = y z + yz + yz + y z + y z + yz CS( F) = y + z + y z + yz + y + z Cyclc! 4 No essenls, ll rmes redundn yz yz y z y z y z yz ckng Subse of he rmes 4 Generlzon Logc nmzon s jus one of mny morn roblems h cn be formuled s mr coverng roblem Ohers nclude Technology ng, FS Se nmzon wh DCs, nd mny ohers from vrous felds So we sudy hs roblem nensvely
! " ) ' # -, #! #, *, # % ) "!. -! # ) %!! % ) # )! # #! +!, - * ) $ $ + ), ) " *! The Asronu nd he Cookes Oml Nuron: A good de should conn d eque mouns of ro ens (), vmns (V $ ), % f s (F & ), nd cookes (C ' ). ( An sronu, + who mus rve l lgh, c n choose from fve dfferen rerons: re r on (logc v r. ble ) conns: V nd ; re r on (logc v r. ble ) conns: V nd F; re r on (logc v r. ble ) conns: nd F; / ) r e ) r! on 4 (l - ogc v ) r!. b - l e ) conns: $ V; re r on (logc v r. 4 ble ) conns: ' C. Cn he s ) ronu hve blnced de wh only wo rerons? ro e 4 ns:( + ), V 4 mns:( + + ), 8 4 The Asronu nd he Cookes rue Force Enumeron Aroch: Encode cnddes wh bnry vrbles 9 (lke rmes) Eress consrns n OS form (lke mnerm coverge) Conver OS o SO (enumere ll ossbles) ck smlles cube (fewes lerls) = (ro ens )( V mns)(f s)(cookes) = ( + )( + + )( + )( ) 4 = ( + ( + ))( + )( ) 4 = ( )( + )( ) + ( + )( ) 4 = + + + 4 All ossble soluons!
: The Trouble wh Enumeron OS o SO converson, lke mny enumeron lgorhms, s n clss N (u o mnerms) Thus eher hs no effcen (sub-eonenl) mlemenon, or hos of oher ehusvely suded roblems, lke he rvelng slesmn roblem, lso hve effcen soluons So f you fnd lner or qudrc lgorhm for ny of hese roblems, you ll be rch nd fmous n Effecve Enumeron: rnch nd ound Acce he nevbly of eonenl wors cse erformnce-- Imlcly Enumere he serch sce Reduce he roblem no smles equvlen roblem-- les one omum soluon remns rune he serch sce by comung lower bounds
?? Reducons: Essenl Columns Vrbles wh sngleon consrns, lke he cookes coverng roblem, re essenl nd re resen n every omum soluon. If Row of conns sngle nonzero n Col j, hen dd j o he rl soluon nd delee ll rows of wh nonzero n Col j. Col j, lus he omum soluon o he reduced mr, s n omum soluon of he orgnl roblem ; n Essenl Columns: Emle = ( + )( + + )( + )( ) < = > 4 = < @ 4 R R = R, = R R R R 4 S = { } S 4, lus n omum soluon (sy ) o he reduced mr, s n omum soluon of he orgnl roblem
H A I J H I J K E Reducons: Row Domnnce Row of domnes Row k f every nonzero of Row k s mched by nonzero of Row n he sme column, h s, kj = j =, j Any se of columns h covers Row k wll lso cover Row Hence domnng rows my be deleed whou ffecng he sze of he omum soluon Such deleon my led o column domnnce (ler ody) Row Domnnce: Emle C D 4 E C 4 =, = 4 D Noe: Row 4 domnes Row O F G Sol( K ) = O F G Sol( )
A L Reducons: Column Domnnce Col jof domnes Col k f every nonzero of Col k s mched by nonzero of Col j n he sme row, h s k = j =, Any se of columns h conns Col j wll lso cover ll rows covered by Col k. Hence domned columns my be deleed whou ffecng he sze of he omum soluon Such deleon my led o row domnnce or even revel new essenl columns Column Domnnce: Emle 4 =, = 4 Cos( OSol( )) = Cos( OSol( )) Col domnes Cols 4 nd Row 4 co-domnes Row Noe cyclc core Noe Soluons ncludng or F 4 re gnored
R S N O Q S R O U V S U S W T r Reducon rocedure REDUCE COLS T _ OF_ T ( ) EC = SINGLETON_ ROWS( ) " delee cols n EC nd rows wh cols n EC" " Add cols n EC o omum soluon" 4 " delee rows whch domne oher rows" " delee cols whch re domned by oher cols" f(, nd hs chnged) ree - Essenl Column reducon Row Domnnce reducon Column Domnnce reducon Iere: Resul s unque Cyclc Core Solved roblem 4-4: Reducon 4 X 4 Cols, Domne,4 Resecvely 4 4 Row 4 (Co-) domnes Row Noe: No essenl columns 4 Cyclc Core
e f d Z Z Z Z Z d d ^ _ Z Z Z \ [ \ ] 4 = = 4 Noe: Row domnnce klls consrns [ :( + + )( + + _ 4 )( + )( + + _ 4 + ) = ( + ( + )( + 4 ))( + ) = ( + ) + ( + )( + 4 ) = + + + + _ 4 :( + )( + )( + ) = ( + )( + ) = + + Noe: Col domnnce klls lernve soluons ` b c 4 d = 4 Lower ounds Noe rows,, re column dsjon, h s, he nonzero column ses {,},{,4},{,} re r-wse dsjon Thus les columns re requred o cover he g rows of Thus f we somehow fnd soluon of sze, we cn ke nd qu --- s n omum soluon
n l o l o o j r k k r l u m l m h Lower ounds Row of s dsjon from Row k f no nonzero of Row s mched by nonzero of Row k n he sme column, nd conversely. Th s, j = A kj =, A kj = j =, j m dsnc columns re requred o cover m rwse dsjon rows Hence he cos of coverng mr h conns m r-wse dsjon rows s les m Lower bounds cn rune vs regons of he serch Quck Lower ound Algorhm rocedure IS h _ QUICK( ) IS = do { k = CHOO h SE_ h SHORTES h T_ ROW( ) 4 IS = IS {} DELETE_ q = IN s T o E R h S o E C s T q I N G_ ROWS(, ) } whle( > ) connue reurn row se IS Ths s che heursc: Fndng bes lower bound cn be hrder hn solvng he orgnl coverng roblem
X Œ Š X Œ y v { ˆ z ˆ } ~ ; Ž ˆ w v ˆ } z ; IS_QUICK Emle v w c e y du ro z re IS_ QUICK( ) IS = do { = CHOOSE_ SHORTEST_ ROW( ) 4 IS = IS {} = DELETE_ INTERSECTING_ ROWS(, ) } whle( connue reurn ro ƒ > w se ) IS 4 IS = { } 4 IS = {, } IS = {,, } Emle Showng Lower oundng Inl uer bound: U = + = Š 4 X Œ 4 Cyclc Core: no essenl columns, Row domnnce, or Column domnnce Row Inersecs rows -4 IS = { }, L = + = Sl on Column
Š Š Emle Showng Lower oundng 4 X Œ 4 Recursve Cll for = = 4 X Œ 4 currensol = { }, EC = { }, U = + = s bes soluon whch ncludes. {, } Emle Showng Lower oundng Š 4 X Œ 4 Recursve Cll for = EC = {}, IS = {,}, L = + = U = Š 4 X Œ 4 Cyclc core
Ä ¼ ¼ à ü ã ä Ì µ ; Ø Ý µ» ¹ µ ü «Î Þ á ß œ á Ú ù µ µ º Û ¼ å à ß ¾ ¾ µ š µ Å Å à ß Æ Æ õ å æ à µ ç  î õ ç µ ª ¾ Â Ï Ú Ú Ù Í ³ ¾ ¾ µ ¼ ¼ ¾ ¾ ¾ ¼ ³ ê Ñ Ì Ø ç Ä ê ç ¾ î Ô î ê ò ¾ ñ ë Ð ë Ø Ò í í Â Ó roc edu re C( ², U², curre ¹ º n» ¼ S ½ ol){ (, curre ¹ º n» ¼ S ½ ol) REDUCE(, curre ¹ º n» ¼ S ½ ol) f ( erm n f COST ª lc À Á s ¹ = e( )) { \ \ ( ( curre ¹ º n» ¼ S ½ = ol) U) { U re u C OST( curre ¹ º n» < ¼ Ç = S ½ ol) rn ( curre ¹ º n» ¼ S ½ ol) È } els e reu rn(" no ( bee ž r) Ÿ soluon ( n hs subs Ÿ ce) ") É } 4 L = LOW E R_ f re OUND( urn no ², curre ¹ º n» ( beer) Ÿ ¼ S ½ ol) ( ) soluon ( n Ê L U hs subs Ÿ ce) CHOOSE_ ± (" ") VAR( ) = \ \ longes colu mn Ë S = C( ², U, curre ¹ º n» ¼ S ½ ol ³ { }) f ( COS ¼ T µ ( S ) L) reu = rn( S ) S = C( ², U, curre ¹ º n» ¼ S ½ ol ) 8 reu rn EST ª _ SOL «UTION ( S, S ) } ro Ü cedure C(, U, curren ö S ø ol){ (, curren ö S ø ol) REDUCE(, curren ö S ø ol) f ( ermn ö ú lc ú û = ( )){ ô \ ô \ ý se f( COST( curren ö S ø = ol) U){ U re à ß COST( curren ö < = S ø ol) urn ( curren ö S ø ol) } els â e reurn(" no (b è é e ê ê é er) so ç lu ë on (n ê hs subs ì ce) ") } þ 4 L = ó LOWER_ OUND(, f reurn no (b è curren é e ê ê ö é e ï S ø r) so ç o ð l ë l) ( L U) (" uon ( ñ n hs subs ì ce) ") Ö Ø 4 Ú = Ú 4 Ú U = + = Ö U L For cyclc roblems = =, = # ES Ô S+ IS = + = ( Õ or )
F " * = ' * + / * / * A / + = * % & + & ), 8 F! ( # : ÿ * 4 8 (, c urren So l ) (, c urre n So l) ( erm n lc s = ) * REDUCE f e( )) { ( ( curre ) f COST nsol U) { U ( c < = urren COST So ) ( l reu ; rn curre nsol) } els (" ") } L = + < e - reu ; rn + no (b eer) (, curre soluon LOWER_ OUND nsol) f > ( L U) (" ") #? reu ; =.? rn no (b e er) sol 9 uon CHOOSE_ VAR( ) S = (, U, curre nsol { }) ( CO $ C % f ST( S ) = L) ( S S = (, U, reu ; c rn urren C So ), l) + ), + 4 re @ ur? n EST_ SOLUTION ( S, S ) = 4 Ess 4 Recurson Tree ÿ ( re Lne re Lne ) = = L C runed = U = 4 4 (cyclc, re Lne 4) s s Solved roblem 4-4: Slng 4 D Row couns E E E Column couns IS = { }, U = L = + IS = + = ( L U ) (So recur) Slng Vrble Heursc: ck long columns whch cover mny shor rows
F I K G T V V Q U Q E R N E S L L ` Q ` Q R J N O H O H N G I K E ^ ckng he Slng Vrble 4 8 (, currensol) = REDUCE(, currensol) f ( ermnlcse( )) { f ( COST( currensol) < U) { U = COST( currensol) reurn ( currensol) } else reurn(" ") } L = LOWE R_ V OU W no (b [ eer \ ) solu ] on ND(, currensol) f ( L U) (" ") = CHOO Q reurn R SE_ X no (b [ eer) solu ] on VAR( ) S = C(, U, currensol { }) f ( COST( S ) = L) reurn( S ) S (, U, currensol) = C ES R T_ R S Q OLU Z TIO Q W N reurn ( S, S ) ck os ne Slng vrble S : bes ncludng : bes ecludng S ^ Solved roblem 4: nry Recurson F _ 4 D E E = 4 D currensol = {}, EC = { 4}, U = + = F _ 4 D E E = E _ 4 D E currensol = {}, EC = { 4, }, U = + =
n e f b b c c d c c c c g k h m C 4 8 9 l 4 8 9 Klled by ro c j w Emle IS={,,,}, L=+4=4 Ignore Heursc of ckng longes column! ck Col m C Dro Col Dro Col, nd Rows,4, Emle 4 8 9 E 8 9 d d cyclc Cols,4 re domned, so Col becomes essenl IS={,9}, L=+ = 4 ck longes column, Col C Dro Col C Dro Col, nd Rows,9-
o s s r r q q q r s I K G I K G V U Q R S U Q V R L L S Q Q H L N R S R L S J Q N O H Q R S H H N O H H H N N G I K G I K U= L=4 L=4 8 9 ddd 8 Cyclc (kes Cols), Cos = +==U U=,,, 4 8 (, currensol) = REDUCE(, currensol) f ( ermnlcse( )) { f ( COST( currensol) < U) { U = COST( currensol) reurn ( currensol) } J else (" ") } L = LO Q reurn WER_ OU W no (b [ eer) solu ] on ND(, currensol) f ( L U) (" ") = CHOO Q reurn R ( ) S = ( H SE_ X no (b [ eer) solu ] on VAR C, U, currensol { }) f ( COST( S ) = L) reurn( S ) S (, U, currensol) = C ES R T_ R S Q OLU Z TIO Q W N reurn 4 ( S, S ) no L=4 v U= L=4 U= o 8 9 8 9 4 8 IS={,,}, L=+ = (, currensol) = REDUCE(, currensol) f ( ermnlcse( )) { f ( COST( currensol) < U) { U = COST( currensol) reurn ( currensol) } J else (" ") } L = LO Q reurn WER_ OU W no (b [ eer) solu ] on ND(, currensol) f ( L U ) (" ") = CHOO Q reurn R ( ) S = ( H SE_ X no (b [ eer) solu ] on VAR C, U, currensol { }) f ( COST( S ) = L) reurn( S ) S (,, ) = C U currensol EST_ R S Q O T L Z U S T u I Q O W N reurn ( S, S )
s r q s r w w q C C d 4 8 9 EdE E 4 8 9 L=4 U= c 8 9 d L=4 c 8 9 IS={,}, L=+ =, L=U= U= L=U=,, 4 Emle Summry L=4 U= L=4 L=U= U= L=U= Recursve Clls Reducons Lower ounds Slng Choces
nmzng Weghed Cos To mke cos sensve o rnssor coun, se he he wegh of rme mlcn o s lerl coun COST( ' y) =, COST( uvw' yz' ) = Thus domned column s only remove f he he domnng column hs lower (or he sme) cos The res of C s unffeced Theorem 8.., ge 9