Arc Consistency during Search

Size: px
Start display at page:

Download "Arc Consistency during Search"

Transcription

1 Ar Consisten uring Serh Chvlit Likitvivtnvong Shool of Computing Ntionl Universit of Singpore Yunlin Zhng Sott Shnnon Dept of Computer Siene Tes Teh Universit, USA Jmes Bowen Eugene C Freuer Cork Constrint Computtion Centre Universit College Cork, Ireln Astrt Enforing r onsisten (AC) uring serh hs proven to e ver effetive metho in solving Constrint Stisftion Prolems n it hs een wiel-use in mn Constrint Progrmming sstems Although muh effort hs een me to esign effiient stnlone AC lgorithms, there is no sstemti stu on how to effiientl enfore AC uring serh, s fr s we know The signifine of the ltter is ler given the ft tht AC will e enfore millions of times in solving hr prolems In this pper, we propose frmework for enforing AC uring serh (ACS) n ompleit mesurements of ACS lgorithms Bse on this frmework, severl ACS lgorithms re esigne to tke vntge of the resiul t left in the t strutures the previous invotion(s) of ACS The lgorithms vr in the worst-se time n spe ompleit n other ompleit mesurements Empiril stu shows tht some of the new ACS lgorithms perform etter thn the onventionl implementtion of AC lgorithms in serh proeure 1 Introution n kgroun Enforing r onsisten (AC) on onstrint stisftion prolems (CSP) uring serh hs een proven ver suessful in the lst ee [Sin n Freuer, 1994; Mkworth, 1977] As AC n e enfore millions of times in solving hr instnes, the nee for effiient AC lgorithms is ovious Given the numerous ttempts to optimize stnlone AC lgorithms, further improvement on their performne eomes ver hllenging In this pper, in orer to improve the overll effiien of serh proeure emploing r onsisten, we fous on how to effiientl enfore AC uringserh(acs), rther thn on stnlone AC lgorithms In this pper, we strt ACS into seprte moule tht mintins AC on hnging CSP prolem P with four methos Severl ompleit mesurements re then propose to evlute the theoretil effiien of ACS lgorithms in term of these methos A ke metho is ACStr( = ), where = is n ssignment It heks whether P { = } n e me r onsistent Whenever serh proeure mkes n ssignment, it will ll ACStr() with tht ssignment s the rgument n mke further eision se on the return vlue of tr() With the epliit strtion of ACS, we notie tht fter one invotion of n ACS metho, s ACStr(), there re resiul t left in the strutures of ACS We will eplore how to mke use of these resiul t to esign new ACS lgorithms with the new mesurements in min Empiril stu is lso rrie out to enhmrk the new ACS lgorithms n those esigne using onventionl tehniques One of the new ACS lgorithms is ver simple ut shows ler performne vntge (lok time) over the rest Neessr kgroun is reviewe elow A inr onstrint stisftion prolem (CSP) is triple (V,D,C)whereV is finite set of vriles, D ={D V n D is the finite omin of }, nc is finite set of inr onstrints over the vriles of V As usul, we ssume there is t most one onstrint on pir of vriles We use n, e, n to enote the numer of vriles, the numer of onstrints, n the mimum omin size of CSP prolem Given onstrint,vlue D is support of D if (, ),nonstrint hek involves etermining whether (u, v) for some u D n v D A onstrint is r onsistent if eh vlue of D hs support in D n ever vlue of D hs support in D A CSP prolem is r onsistent (AC) if ll its onstrints re r onsistent To enfore r onsisten on CSP prolem is to remove from the omins the vlues tht hve no support A CSP is r inonsistent if omin eomes empt when AC is enfore on the prolem We use D 0 to enote the initil omin of efore the serh strts while D the urrent omin t moment uring AC or serh A vlue u is present in (or sent from, respetivel) D if u D (u/ D respetivel) For eh omin D D, we introue two umm vlues n We ssume there is totl orering on D {, } where is the first, ie, smllest, vlue, n the lst (lrgest) vlue For n from D 0, su(, D) (pre(, D) respetivel) is the first (lst respetivel) vlue of D {, } tht is greter (smller respetivel) thn 2 Enforing r onsisten uring serh We tke CSP solver s n itertive intertion etween serh proeure n n ACS lgorithm The ACS lgorithm 137

2 n e strte into one t omponent n four methos: CSP prolem P, init(p 1 ), tr( = ), kjump( = ), n Infer( ), where P 1 is nother CSP prolem, PV,n PD Throughout the pper, PV, PD ( PV ), npc enote the set of vriles, the omin of, n the set of onstrints of P ACSP is essile (re onl) to ller When the ontet is ler, we will simpl use P, inste of ACSP ACSinit(P 1 )setsp to e P 1 n retes n initilizes the internl t strutures of ACS It returns flse if P is r inonsistent, n true otherwise ACStr( = ) enfores r onsisten on P 1 = P { = } If the new prolem P 1 is r onsistent, it sets P to e P 1 n returns true Otherwise, = is isre, the prolem P remins unhnge, n tr() returns flse In generl, the metho n ept n tpe of onstrints, eg, ACSInfer( ) enfores r onsisten on P 1 = P { } If the new prolem P 1 is r onsistent, it sets P to e P 1 n returns true Otherwise, Infer() returns flse When MAC infers tht n not tke vlue, it lls ACSInfer( ) In generl, n onstrint n e e s long s it is inferre from the urrent ssignments the serh proeure ACSkjump( = ) isrs from P ll onstrints e, ACStr() or ACSInfer(), to P sine (inluing) the ition of = The onsequenes of those onstrints use r onsisten proessing re lso retrte This metho oes not return vlue We ignore the prefi ACS of metho if it is ler from the ontet A serh proeure usull oes not invoke the ACS methos in n ritrr orer The following onept hrterizes rther tpil w for serh proeure to use ACS methos Given prolem P, nonil invotion sequene (CIS) of ACS methos is sequene of methos m 1, m 2,, m k stisfing the following properties: 1) m 1 is init(p 1 )nforni (2 i k), m i {tr(), Infer(), kjump()}; 2)m 1 returns true if k 2; 3)forn tr( = ) n Infer( ) {m 2,, m k }, ACSPV n D t the moment of invotion; 4) for n m i =kjump( = ) where2 i k, m i 1 must e n invotion of tr() or Infer() tht returns flse, n there eists m j suh tht 2 j<i 1n m j =tr( = ) n there is no kjump( = ) etween m j n m i ;5)for n m i =Infer() where 2 i k, if it returns flse, m i+1 must e kjump() Note tht n ritrr nonil invotion sequene might not e sequene generte n meningful serh proeure Emple Algorithm 1 (line 1 15) illustrtes how MAC [Sin n Freuer, 1994] n e esigne using ACS 21 Templte implementtion of ACS methos To filitte the presenttion of our ACS lgorithms, we list templte implementtion for eh ACS metho in Algorithm 1 Sine tr() oul hnge the internl t strutures n the omins of the prolem P, it simpl kups the urrent stte of t strutures with timestmp(, ) (line 18) efore it enfores r onsisten (line 19 21) An lterntive is to kup the hnges whih is not isusse here euse it oes not ffet n ompleit mesures of ACS lgorithms (eept possil the lok time) ACS-Xpropgte() follows Algorithm 1: MAC n templte ACS methos MAC lgorithm MAC(P ) 1 if (not ACSinit(P )) then return no solution 2 rete n empt stk s; // no ssignments is me et 3 freevriles PV 4 while (freevriles ) o 5 Selet vrile i from freevriles n vlue for i 6 if (ACStr( i = )) then 7 spush(( i,)) 8 freevriles freevriles { i } else while (not ACSInfer( i )) o if (s is not empt) then ( i,) spop() else return no solution ACSkjump( i = ) freevriles freevriles { i }; 15 return the ssignments Templte ACS methos ACS-Xinit(P 1 ) 16 P P 1, initilize the internl t strutures of ACS-X 17 return AC(P ) // AC() n e n stnlone AC lgorithm ACS-Xtr( = ) 18 kup(timestmp (, )) 19 elete ll vlues eept from D 20 Q {(, ) PC } 21 if (propgte(q)) then return true 22 else ACS-Xrestore(timestmp (, )), return flse ACS-XInfer( ) 23 elete from D, Q {(, ) PC}, return propgte(q) ACS-Xkjump( = ) 24 restore(timestmp (, )) ACS-Xkup(timestmp (, )) 25 kup the internl t strutures of ACS-X, following timestmp (, ) 26 kup the urrent omins, following timestmp (, ) ACS-Xrestore(timestmp (, )) 27 restore the internl t strutures of ACS-X, following timestmp (, ) 28 restore the omins of P, following timestmp (, ) ACS-Xpropgte(Q) 29 while Q o 30 selet n elete n r (, ) from Q 31 if revise(, ) then 32 if D = then return flse 33 Q Q {(w, ) C w PC, w } 34 return true ACS-Xrevise(, ) 35 elete flse 36 foreh D X o 37 if not hssupport(,, ) then 38 elete true, elete from D X 39 return elete ACS-XhsSupport(,, ) 40 if ( D suh tht (, ) ) then return true 41 else return flse tht of AC-3 [Mkworth, 1977] ACS-XInfer( ) (line 23) oes not ll kup() euse is n inferene from the urrent ssignments n thus no new kup is neessr 22 Compleit of ACS lgorithms We present severl tpes of the time n spe ompleities for ACS lgorithms The noe-forwr time ompleit of n ACS lgorithm is the worst-se time ompleit of ACStr( = ) where PV n D Aninrementl sequene is onseutive invotions of ACStr() where eh invotion returns true n no two invotions involve the the sme vrile (in the rgument) The pth-forwr time ompleit of n ACS is the worst-se time ompleit of n inrementl sequene with n k n (the size of PV ) invotions Noe-forwr spe ompleit of n ACS lgorithm is the worst se spe ompleit of the internl t strutures (eluing those for the representtion of the prolem P ) for ACStr( = ) Pth-forwr spe ompleit 138

3 of n ACS lgorithm is the worst se spe ompleit of the internl t strutures for n inrementl sequene with n invotions In empiril stuies, the numer of onstrint heks is stnr ost mesurement for onstrint proessing We efine for ACS two tpes of reunnt heks Given CIS m 1,m 2,, m k n two present vlues D n D t m t (2 t k), hek (, ) t m t is negtive repet (positive repet respetivel) iff 1) (, ) / ((, ) respetivel), 2) (, ) ws performe t m s (1 s<t), n 3) is present from m s to m t 3 ACS in folklore Tritionll, ACS is simpl tken s n implementtion of stnr AC lgorithms in serh proeure Let us first onsier n lgorithm ACS-3 emploing AC-3 It is shown in Algorithm 2 where onl methos ifferent from those in Algorithm 1 re liste Algorithm 2: ACS-3 n ACS-31reor -ACS-3 ACS-3init(P 1 ) 1 P P 1, initilize the internl t strutures of ACS-X 2 return AC-3(P ) ACS-3kup(timestmp (, )) 3 kup the urrent omins, following timestmp (, ) ACS-3restore(P, timestmp (, )) 4 restore the omins, following timestmp (, ) ACS-3hsSupport(,, ) 5 6 while su(, D ) n o if (, ) C then return true 7 return flse -ACS-31reor ACS-31reorinit(P 1 ) 8 P P 1 9 PC n D, initilize lst (,, ) return AC-31(P ) ACS-31reorkup(timestmp (, )) 11 P, D, kup lst (,, ), following timestmp (, ) 12 kup the urrent omins, following timestmp (, ) ACS-31reorrestore(timestmp (, )) 13 restore the t struture lst (), following timestmp (, ) 14 restore the omins, following timestmp (, ) ACS-31reorhsSupport(,, ) 15 lst(,, ) ; if D then return true 16 while su(, D ) n o 17 if (, ) then { lst(,, ) ; return true } 18 return flse Proposition 1 ACS-3 is orret with respet to n CIS Noe-forwr n pth-forwr ompleit of ACS-3 re oth O(e 3 ) while noe-forwr n pth-forwr spe ompleit re O(e) It n not voi n positive or negtive repets It is well known tht vrile-se AC-3 n e implemente with spe O(n) The sme is lso true for ACS-3 We net introue ACS-31reor, n lgorithm tht emplos AC-31 [Bessiere et l, 2005] It is liste in Algorithm 2 in whih methos tht re sme s the templte ACS methos re omitte AC-31 improves upon AC-3 simpl using t struture lst(,, ) to rememer the first support of of in D in the ltest revision of When nees to e revise gin, for eh vlue of, AC-31 strts the serh of support of from lst(,, ) lst(,, ) () Figure 1: Emple z stisfies the following two invrints: support invrint (, lst(,, )),nsfet invrint there eists no support of in D tht omes efore lst(,, ) The funtion hssupport() (line 15 18) follows the sme w s AC-31 to fin support Note tht in restore(), the remove vlues re restore in the originl orering of the omins, whih is ritil for the orretness of ACS-31reor Theorem 1 ACS-31reor is orret with respet to n CIS Noe-forwr n pth-forwr time ompleit of ACS-31reor re oth O(e 2 ) while noe-forwr n pth-forwr spe ompleit re O(e) n O(ne) respetivel It n neither full voi negtive nor positive repets The noe-forwr spe ompleit of ACS-31reor n e improve to O(e min(n, )) [vn Dongen, 2003] Emple In this emple we fous on how support is foun in CIS of ACS-31reor methos Consier the following CIS: m i =tr(z = ) (returning flse) n m i+1 =tr(z = ) Assume efore m i, P is r onsistent n ontins some onstrints n omins shown in Figure 1() where onl the supports of,, n re epliitl rwn Assume lst(,, )= 1 efore m i During m i, we nee to fin new support for D euse 1 is elete ue to the propgtion of z = Assume lst(,, ) ws upte ACS-31reor to the support 4 efore m i returns flse Sine P {z = } is r inonsistent, lst(,, ) is restore to e 1 m i In m i+1, new support is neee for D sine 1 is elete ue to the propgtion of z = ACS-31reor nees to hek 2 n 3 efore it fins the support 4 Vlue 2 is present from m i to m i+1, n (, 2 ) ws heke in oth m i n m i+1 The onstrint hek (, 2 ) is negtive repet t m i+1 4 Eploiting resiul t A ke feture of ACS-3 n ACS-31reor is tht the re fithful to the respetive AC lgorithms We will fous on ACS n investigte new ws to mke use of the ft tht the methos of n ACS lgorithm re usull invoke mn times (millions of times to solve hr prolem) serh proeure 41 ACS-resiue In this setion, we esign new lgorithm ACS-resiue, liste in Algorithm 3, tht etens the ies ehin AC-3 n AC- 31 Like ACS-31reor, ACS-resiue nees t struture lst(,, ) for ever C n D After ACS-resiueinit(P 1 ), lst(,, ) is initilize to e the () 139

4 first support of with respet to At ever invotion of ACS-resiuetr() or ACS-resiueInfer(), when fining support for vlue of D with respet to,acsresiuehssupport(,, ) first heks (line 3) if lst(,, ) is still present If it is, support is foun Otherwise, it serhes (line 3 5) the omin of from srth s AC- 3 oes If new support is foun, it will e use to upte lst(,, ) (line 5) The metho is lle ACS-resiue euse ACS-resiuetr() or ACS-resiueInfer() simpl reuses the t left in the lst() struture the previous invotions of tr() or Infer() Unlike ACS-31reor, ACSresiue oes not mintin lst() in kup() n restore() Algorithm 3: ACS-resiue -ACS-resiue ACS-resiueinit(P 1 ) {sme s ACS-31reorinit(P 1 )} ACS-resiuekup(timestmp (, )) 1 kup the urrent omins, following timestmp (, ) ACS-resiuerestore(timestmp (, )) 2 restore the omins of P, following timestmp (, ) ACS-resiuehsSupport(,, ) 3 if lst(,, ) D then return true else 4 while su(, D ) n o 5 if (, ) then { lst(,, ) ; return true } 6 return flse -ACS-resOpt ACS-resOptinit(P 1 ) 7 P P 1 8 PC n D, initilize lst (,, )nstop (,, ) 9 return AC-31(P ) ACS-resOptkup(timestmp (, )) kup the urrent omins of P, following timestmp (, ) ACS-resOptrestore(timestmp (, )) 11 restore the omins, following timestmp (, ) ACS-resOpttr( = ) 12 PC n D, stop(,, ) lst(,, ) 13 kup(timestmp (, )) 14 elete ll the vlues eept from D, Q {(, ) PC } 15 if propgte(q) then return true 16 else {restore(timestmp (, )), return flse } ACS-resOptInfer( ) 17 PC n D, stop(,, ) lst(,, ) 18 elete from D, Q {(, ) PC } 19 return propgte(q) ACS-resOpthsSupport(,, ) 20 lst(,, ) ; if D then return true 21 while irsu(,d 0 ) n D n stop (,,) o 22 if (, ) then lst(,, ) ; return true 23 return flse Theorem 2 ACS-resiue is orret with respet to n CIS Noe-forwr n pth-forwr time ompleit of ACSresiue re O(e 3 ) n O(e 3 ) respetivel while noeforwr n pth-forwr spe ompleit re oth O(e) It full vois positive repets ut vois onl some negtive repets Compre with ACS-31reor, ACS-resiue hs etter spe ompleit ut worse time ompleit ACS-resiue oes not nee to kup its internl t strutures Emple Consier the emple in the previous setion Before m i, ie, ACS-resiuetr(z = ), the prolem is r onsistent n lst(,, )= 1 During m i, ssume ACSresiue uptes lst(,, ) toe 4 efore it returns flse After m i, onl the elete vlues re restore to the omins ut nothing is one to lst() struture n thus lst(,, ) is still 4 ( 4 is resiue in lst()) In m i+1, ie, ACSresiuetr(z = ), when hssupport() tries to fin support for of D, it heks first lst(,, ) 4 is present n thus support of In ontrst, ACS-31reortr(z = ) looks for support for from 1 D Through this emple, it is ler tht ACS-resiue n sve some onstrint heks tht ACS-31reor n not sve (the onverse is lso true oviousl) 42 ACS-resOpt ACS-resiue s noe-forwr ompleit is not optiml We propose nother lgorithm, ACS-resOpt (liste in Algorithm 3), tht hs optiml noe-forwr ompleit while using the resiues in lst() The ie is to rememer the resiues in lst(,, ) stop(,, ) (line 12 n line 17) t the eginning of tr() n ACS-resOptInfer() Then when hssupport(,, ) looks for support for D n lst(,, )(=) is not present, it looks for new support fter (line 21), inste of the eginning of the omin The serh oul go through the n k to the n ontinue until enounter stop(,, ) For simpliit, in line 21 of hssupport(), the initil omin of the prolem P is use: irsu(, D) 0 = su(,d) 0 if su(, D) 0 = ; otherwise irsu(, D) 0 = su(, D) 0 In our eperiment however, we implement hssupport() using the urrent omin Theorem 3 ACS-resOpt is orret with respet to n CIS Noe-forwr n pth-forwr time ompleit re O(e 2 ) n O(e 3 ) respetivel while noe-forwr n pthforwr spe ompleit re oth O(e) It full vois positive repets ut vois onl some negtive repets Emple Consier the onstrint in Figure 1() efore ACS-resOpttr() The supports of re rwn epliitl in the grph Assume lst(,, ) = 2 efore tr() ACSresOpttr() will first set stop(,, )= 2 Assume in the following onstrint propgtion 2 is elete ue to other onstrints on ACS-resOpthsSupport(,, ) will serh support for fter 2 n fin the new support 4 Assume 4 is lter elete onstrint propgtion ACSresOpthsSupport(,, ) will strt from 4, go through the n k to the, n finll stop t 2 euse stop(,, )= 2 No support is foun for n it will e elete from the urrent omin 5 ACS with ptive omin orering To eplore the theoretil effiien limits of ACS, wepropose the lgorithm ACS-ADO with optiml noe-forwr n pth-forwr time ompleit ACS-ADO emplos n ptive omin orering: elete vlue is simpl restore to the en of its omin in restore(), while in ACS-31reor, it is restore in regr of the totl orering on the initil omin As result, when fining support using lst(), it is suffiient for hssupport() to serh to the en of the omin (rther thn going k to the of the omin s one ACS-resOpt) ACS-ADO, liste in Algorithm 4, nees the t strutures lstp(,, ), uf(, ) for ever PC n D The ontent of lstp(,, ) n uf(, ) is pointer p to supporting noe tht hs two omponents p g n p for If uf(, )=p, p for is n p g is the set { D lstp(,, ) for=} lstp(,, ) for is vlue of D 140

5 Algorithm 4: ACS-ADO ACS-ADOinit(P 1 ) 1 PC n D, lst (,, ) 2 PC n D {} lstp (,, ) NULL 3 flg AC-31(P ) // AC-31 will populte lst 4 foreh PC n eh D o 5 lst (,, ) 6 if uf (, )=NULL then uf (, ) retenoe () 7 to uf (, ) g, lstp (,, ) uf (, ) 8 return flg ACS-ADOkup(P, timestmp (, )) 9 kup the urrent omins, following timestmp (, ) ACS-ADOrestore(P, timestmp (, )) foreh vrile PV o 11 restore the elete vlues to the en of D, following timestmp (, ) 12 let v e the first restore vlue 13 foreh PC o 14 swp uf (v, )nuf (, ) swp uf (v, ) for n uf (v,) for ACS-ADOremove(, ) 15 su (, D ) 16 if uf (, ) g > uf (, ) g then swp uf (, )nuf (, ), swp uf (, ) for n uf (, ) for 17 foreh v uf (, ) g o upte (v,,,, ) 18 elete from D ACS-ADOhsSupport(,, ) 19 lstp (,, ) for 20 if (, ) then return true else 1 21 while su(, D ) n o 22 if (, ) then {upte (,,,, 1 ), return true } 23 upte (,,,, 1 ), return flse ACS-ADOreteNoe() 24 rete supporting noe p suh tht p g {}, p for 25 return p ACS-ADOupte(,,,, 1 ) 26 elete from uf ( 1,) g 27 if uf (, )=NULL then uf (, ) retenoe () 28 to uf (, ) g, lstp (,, ) uf (, ) ACS-ADO mintinson lstp(,, ) the sfet invrint, ie, there is no support of efore the vlue lstp(,, ) for in D,nthepresene invrint, ie, lstp(,, ) for is present in D or the of D It lso mintins the orresponene invrint, ie, lstp(,, ) for= if n onl if uf(, ) With the sfet n presene invrints on lstp(), to fin support of D with respet to, ACS- ADOhsSupport(,, ) strts from lstp(,, ) for(line 19) n stops the of D (line 21) When new support is foun, lstp(,, ) is upte (line 22) upte tht gurntees the orresponene invrint (line 26 28) ACS- ADOhsSupport ssures the sfet invrint on lstp When removing vlue, s of D, ACS-ADOremove(, ) fins the first present vlue fter (line 15) n mkes uf(, ) point to the noe with smller g (line 16) It then uptes (line 17) lstp(,, ) forll uf(, ) g In this w, we lws upte the lstp() strutures for smller numer of vlues When restoring elete vlues, for eh vrile, ACS-ADOrestore(timestmp(, )) restores ll the elete vlues fter timestmp(, ) totheenofd (line 11) Note tht is greter thn n vlues in D Sine there might e some vlues whose lstp(,, ) for is of D, we nee to swp the supporting noes in uf(v,) n uf(, ) (line 13 14) Emple Figure 2() shows the t strutures of the vlues of D with respet to The noes with 1 to 4 n to represent vlues of D n D The vlue of noe isonnete from the linke list is not in the urrent omin The noes with re lelle g re supporting noes 1 lstp 2 lstp 3 lstp 4 g g g g g g g g g g p1 g p2 g p3g p4 g p5 g p4 g p2 g p3 g p1 g p5 p1 p2 p3 g g g p4 p5 g g p1 g p2 g p3 g p4 g p5 () () lstp 1 lstp 2 lstp 3 lstp 4 g g g g g g g g g g Figure 2: Emples for remove() n restore() The rrow from supporting noe, s p 1, to the vlue noe 1 mens p 1 for=1, n the rrow from vlue noe, s 1, to the supporting noe p 1 implies uf(1,)=p 1 An rrow from the lstp re of vlue noe, s, to supporting noe p 1 implies lstp(,, ) for=p 1 An rrow from the g re of supporting noe, s p 1, to vlue noe, s, implies tht p 1 g Note tht the es of lstp (uf respetivel) strutures of the vlues of D (D respetivel) re omitte Assume vlue 1 is remove Sine uf(1,) g is lrger thn tht of vlue 2 tht is the first present suessor of 1, the metho remove() swps uf(1,) n uf(2,) n swp uf(1,) for n uf(2,) for Now n re pointing to vlue 2 through p 1 Then of p 2 g is me to point p 1 Figure 2() shows strutures fter the removl of 1 Consier nother t strutures shown in Figure 2() Assume 1 nees to e restore to D Sine1is the first restore vlue, ll vlues pointing to shoul now point to 1 The metho restore() simpl swps uf(1,) n uf(, ) n swps uf(1,) for n uf(,) for (Figure 2()) In onstnt time, ll the vlues previousl pointing to re now pointing to 1 through the supporting noe p 5 Proposition 2 Consier n inrementl sequene with n invotions, The umulte worst-se time ompleit of ACS-ADOremove() in the sequene is O(e lg ) Theorem 4 ACS-ADO is orret with respet to n CIS Noe-forwr n pth-forwr time ompleit re O(e 2 ) while noe-forwr n pth-forwr spe ompleit re O(e) ACS-ADO full vois negtive repets ut oes not voi n positive repets 6 Eperiments The new ACS lgorithms re enhmrke on rnom inr onstrint prolems n Rio Link Frequen Assignment Prolems (RLFAPs) The smple results on prolems (n =50,e = 125) t phse trnsition re re shown in Figure 3 where the onstrint heks re the verge of 50 instnes n the time is totl mount for those instnes The eperiments were rrie out on DELL PowerEge 1850 (two 36GHz Intel Xeon CPUs) with Linu 2421 We use om/eg vrile orering n leiogrphil vlue orering The onstrint hek in our eperiment is ver hep () () lstp g g 141

6 Numer of Constrint Cheks 12e+07 1e+07 8e+06 6e+06 4e+06 2e Performne of ACS Algorithms in the Numer of Constrint Cheks ACS-3 ACS-31reor ACS-resOpt ACS-resiue ACS-ADO Domin Size Seons ACS-3 ACS-31reor ACS-resOpt ACS-resiue ACS-ADO Performne of ACS Algorithms in Seons Domin Size Figure 3: Eperiments on rnom prolems In terms of onstrint heks, ACS-3 n ACS-ADO re signifintl worse thn the rest However, the ifferene mong ACS-31reor, ACS-resOpt, n ACS-resiue is mrginl This shows the onsierle svings le the reuse of resiul t given the ft tht the noe-forwr ompleit of ACS-resiue is not optiml However, ACSresOpt is onl slightl etter thn AC-resiue lthough it improves the noe-forwr ompleit of the ltter to e optiml ACS-ADO hs the est theoretil time ompleit mong the new lgorithms, ut it hs the worst eperimentl performne One eplntion is tht it loses the enefit of resiul support ue to tht ft tht lstp(,, ) for is gurntee to e present ut might not e support of In summr, the use of resiues ring muh more svings thn other ompleit improvements of the new lgorithms Sine onuting roughl the sme mount of onstrint heks, the gret simpliit of ACS-resiue mkes it ler winner over other lgorithm in terms of lok time The performne of ACS3-resOpt is ver lose to tht of AC- 31reor Sine ACS-ADO uses rther hev t struture, its running time eomes the worst The ove oservtions lso hol on RLFAP prolems (see the tle elow) (ACS-resOpt uses less numer of heks thn ACS-31reor ut is the slowest euse it onuts more omin heks thn the others) RLFAP ACS-3 ACS-31reor ACS-resOpt ACS-resiue ACS-ADO sen M 227M 208M 231M 856M 3265s 3394s 4961s 1934s 3456s 7 Relte works n onlusions We re not wre of n other work tht hs me ler ifferene etween stnlone AC n AC uring serh However, there oes eist numer of works tht egn to look t speifi lgorithms to enfore AC in the ontet of serh proeure Leoutre n Hemer (2006) onfirme the effetiveness of ACS-resiue in rnom prolems n severl other rel life prolems n eten it multiiretionlit of onstrints The work Regin (2005) fouses speifill on reuing the spe ost to eme n AC-6 se lgorithm to MAC while keeping its ompleit the sme s tht of stnlone optiml AC lgorithms on n rnh of serh tree However, eperimentl t hs not een pulishe for this lgorithm In this pper we propose to stu ACS s whole rther thn just n emeing of AC lgorithm into serh proeure Some ompleit mesurements re lso propose to istinguish new ACS lgorithms (eg, ACS-resiue n ACSresOpt) lthough n implementtion of ACS using optiml AC lgorithm with kup/restore mehnism, eg, ACS- 31reor, n lws hieve the est noe n pth time ompleit A new perspetive rought ACS is tht we hve more t to (re)use n we o not hve to follow etl AC lgorithms when esigning ACS lgorithms For emple, ACS-resiue uses ies from oth AC-3 n AC-31 ut lso shows ler ifferene from either of them The simpliit n effiien of ACS-resiue vs other theoretill more effiient lgorithms remins of sitution tht ourre roun 1990 when it ws foun AC-3 empirill outperforme AC- 4 [Wlle, 1993] ut finll the ies ehin them le to etter AC lgorithms We epet tht the effort on improving theoretil ompleit of ACS lgorithms will eventull ontriute to empirill more effiient lgorithms The suess of ACS-resiue n our etensive empiril stu suggest few iretions for the stu of ACS lgorithms 1) We nee etensive theoretil n empiril stu on possile omintions of the new ACS lgorithms n tritionl filtering lgorithms inluing AC-6/7 We hve omine for emple resiue n ADO, whih signifintl improve the performne of ADO 2) We notie in our eperiments tht the optiml ompleit of ACS-31reor oes not show signifint gin over ACS-resiue even in terms of the numer of onstrint heks while efforts to improve ACSresiue (eg, ACS-resOpt) gin ver little This phenomenon is worth of stuing to oost the performne of ACS lgorithms 3) The ACS perspetive provies fresh opportunities to reonsier the numerous eisting filtering lgorithms (inluing singleton r onsisten n glol onstrints) in the ontet of serh 8 Aknowlegements This mteril is se in prt upon works supporte the Siene Fountion Ireln uner Grnt 00/PI1/C075 n NASA uner Grnt NASA-NNG05GP48G Referenes [Bessiere et l, 2005] C Bessiere, JC Regin, RHC Yp, n Y Zhng An optiml orse-grine r onsisten lgorithm Artifiil Intelligene, 165(2): , 2005 [Leoutre n Hemer, 2006] Christophe Leoutre n Fre Hemer A stu of resiul supports in r onsisten Mnusript, 2006 [Mkworth, 1977] A K Mkworth Consisten in networks of reltions Artifiil Intelligene, 8(1): , 1977 [Régin, 2005] Jen-Chrles Régin Mintining r onsisten lgorithms uring the serh without itionl spe ost In Proeeings of CP-05, pges , 2005 [Sin n Freuer, 1994] D Sin n E Freuer Contriting onventionl wisom in onstrint stisftion In Proeeings of PPCP-94, pges 20, 1994 [vn Dongen, 2003] M R C vn Dongen To voi repeting heks oes not lws sve time In Proeeings of AICS 2003, Dulin, Ireln, 2003 [Wlle, 1993] Rihr J Wlle Wh AC-3 is lmost lws etter thn AC-4 for estlishing r onsisten in CSPs In Proeeings of IJCAI-93, pges , Chmer, Frne,

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of: 22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)

More information

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt

More information

CS 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

More information

SIMPLE NONLINEAR GRAPHS

SIMPLE NONLINEAR GRAPHS S i m p l e N o n l i n e r G r p h s SIMPLE NONLINEAR GRAPHS www.mthletis.om.u Simple SIMPLE Nonliner NONLINEAR Grphs GRAPHS Liner equtions hve the form = m+ where the power of (n ) is lws. The re lle

More information

I 3 2 = I I 4 = 2A

I 3 2 = I I 4 = 2A ECE 210 Eletril Ciruit Anlysis University of llinois t Chigo 2.13 We re ske to use KCL to fin urrents 1 4. The key point in pplying KCL in this prolem is to strt with noe where only one of the urrents

More information

A Primer on Continuous-time Economic Dynamics

A Primer on Continuous-time Economic Dynamics Eonomis 205A Fll 2008 K Kletzer A Primer on Continuous-time Eonomi Dnmis A Liner Differentil Eqution Sstems (i) Simplest se We egin with the simple liner first-orer ifferentil eqution The generl solution

More information

CSC2542 State-Space Planning

CSC2542 State-Space Planning CSC2542 Stte-Spe Plnning Sheil MIlrith Deprtment of Computer Siene University of Toronto Fll 2010 1 Aknowlegements Some the slies use in this ourse re moifitions of Dn Nu s leture slies for the textook

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

CS 360 Exam 2 Fall 2014 Name

CS 360 Exam 2 Fall 2014 Name CS 360 Exm 2 Fll 2014 Nme 1. The lsses shown elow efine singly-linke list n stk. Write three ifferent O(n)-time versions of the reverse_print metho s speifie elow. Eh version of the metho shoul output

More information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Project 6: Minigoals Towards Simplifying and Rewriting Expressions MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

More information

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4 Am Blnk Leture 13 Winter 2016 CSE 332 CSE 332: Dt Astrtions Sorting Dt Astrtions QuikSort Cutoff 1 Where We Are 2 For smll n, the reursion is wste. The onstnts on quik/merge sort re higher thn the ones

More information

SECTION A STUDENT MATERIAL. Part 1. What and Why.?

SECTION A STUDENT MATERIAL. Part 1. What and Why.? SECTION A STUDENT MATERIAL Prt Wht nd Wh.? Student Mteril Prt Prolem n > 0 n > 0 Is the onverse true? Prolem If n is even then n is even. If n is even then n is even. Wht nd Wh? Eploring Pure Mths Are

More information

Factorising FACTORISING.

Factorising FACTORISING. Ftorising FACTORISING www.mthletis.om.u Ftorising FACTORISING Ftorising is the opposite of expning. It is the proess of putting expressions into rkets rther thn expning them out. In this setion you will

More information

6. Suppose lim = constant> 0. Which of the following does not hold?

6. Suppose lim = constant> 0. Which of the following does not hold? CSE 0-00 Nme Test 00 points UTA Stuent ID # Multiple Choie Write your nswer to the LEFT of eh prolem 5 points eh The k lrgest numers in file of n numers n e foun using Θ(k) memory in Θ(n lg k) time using

More information

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005 RLETON UNIVERSIT eprtment of Eletronis ELE 2607 Swithing iruits erury 28, 05; 0 pm.0 Prolems n Most Solutions, Set, 2005 Jn. 2, #8 n #0; Simplify, Prove Prolem. #8 Simplify + + + Reue to four letters (literls).

More information

Technology Mapping Method for Low Power Consumption and High Performance in General-Synchronous Framework

Technology Mapping Method for Low Power Consumption and High Performance in General-Synchronous Framework R-17 SASIMI 015 Proeeings Tehnology Mpping Metho for Low Power Consumption n High Performne in Generl-Synhronous Frmework Junki Kwguhi Yukihie Kohir Shool of Computer Siene, the University of Aizu Aizu-Wkmtsu

More information

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

More information

2.4 Theoretical Foundations

2.4 Theoretical Foundations 2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 5 Supplement Greedy Algorithms Cont d Minimizing lteness Ching (NOT overed in leture) Adm Smith 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov,

More information

Solutions to Problem Set #1

Solutions to Problem Set #1 CSE 233 Spring, 2016 Solutions to Prolem Set #1 1. The movie tse onsists of the following two reltions movie: title, iretor, tor sheule: theter, title The first reltion provies titles, iretors, n tors

More information

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014 S 224 DIGITAL LOGI & STATE MAHINE DESIGN SPRING 214 DUE : Mrh 27, 214 HOMEWORK III READ : Relte portions of hpters VII n VIII ASSIGNMENT : There re three questions. Solve ll homework n exm prolems s shown

More information

Section 2.3. Matrix Inverses

Section 2.3. Matrix Inverses Mtri lger Mtri nverses Setion.. Mtri nverses hree si opertions on mtries, ition, multiplition, n sutrtion, re nlogues for mtries of the sme opertions for numers. n this setion we introue the mtri nlogue

More information

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved. Clculus Module C Ares Integrtion Copright This puliction The Northern Alert Institute of Technolog 7. All Rights Reserved. LAST REVISED Mrch, 9 Introduction to Ares Integrtion Sttement of Prerequisite

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 8 Mx. lteness ont d Optiml Ching Adm Smith 9/12/2008 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne Sheduling to Minimizing Lteness Minimizing

More information

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 ) Neessry n suient onitions for some two vrile orthogonl esigns in orer 44 C. Koukouvinos, M. Mitrouli y, n Jennifer Seerry z Deite to Professor Anne Penfol Street Astrt We give new lgorithm whih llows us

More information

Implication Graphs and Logic Testing

Implication Graphs and Logic Testing Implition Grphs n Logi Testing Vishwni D. Agrwl Jmes J. Dnher Professor Dept. of ECE, Auurn University Auurn, AL 36849 vgrwl@eng.uurn.eu www.eng.uurn.eu/~vgrwl Joint reserh with: K. K. Dve, ATI Reserh,

More information

Lecture 2: Cayley Graphs

Lecture 2: Cayley Graphs Mth 137B Professor: Pri Brtlett Leture 2: Cyley Grphs Week 3 UCSB 2014 (Relevnt soure mteril: Setion VIII.1 of Bollos s Moern Grph Theory; 3.7 of Gosil n Royle s Algeri Grph Theory; vrious ppers I ve re

More information

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point GCSE C Emple 7 Work out 9 Give your nswer in its simplest form Numers n inies Reiprote mens invert or turn upsie own The reiprol of is 9 9 Mke sure you only invert the frtion you re iviing y 7 You multiply

More information

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx Applitions of Integrtion Are of Region Between Two Curves Ojetive: Fin the re of region etween two urves using integrtion. Fin the re of region etween interseting urves using integrtion. Desrie integrtion

More information

6.5 Improper integrals

6.5 Improper integrals Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =

More information

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233,

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233, Surs n Inies Surs n Inies Curriulum Rey ACMNA:, 6 www.mthletis.om Surs SURDS & & Inies INDICES Inies n surs re very losely relte. A numer uner (squre root sign) is lle sur if the squre root n t e simplifie.

More information

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals AP Clulus BC Chpter 8: Integrtion Tehniques, L Hopitl s Rule nd Improper Integrls 8. Bsi Integrtion Rules In this setion we will review vrious integrtion strtegies. Strtegies: I. Seprte the integrnd into

More information

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz Welome nge Li Gørt. everse tehing n isussion of exerises: 02110 nge Li Gørt 3 tehing ssistnts 8.00-9.15 Group work 9.15-9.45 isussions of your solutions in lss 10.00-11.15 Leture 11.15-11.45 Work on exerises

More information

Lecture 11 Binary Decision Diagrams (BDDs)

Lecture 11 Binary Decision Diagrams (BDDs) C 474A/57A Computer-Aie Logi Design Leture Binry Deision Digrms (BDDs) C 474/575 Susn Lyseky o 3 Boolen Logi untions Representtions untion n e represente in ierent wys ruth tle, eqution, K-mp, iruit, et

More information

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points: Eidgenössishe Tehnishe Hohshule Zürih Eole polytehnique fédérle de Zurih Politenio federle di Zurigo Federl Institute of Tehnology t Zurih Deprtement of Computer Siene. Novemer 0 Mrkus Püshel, Dvid Steurer

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

More information

50 AMC Lectures Problem Book 2 (36) Substitution Method

50 AMC Lectures Problem Book 2 (36) Substitution Method 0 AMC Letures Prolem Book Sustitution Metho PROBLEMS Prolem : Solve for rel : 9 + 99 + 9 = Prolem : Solve for rel : 0 9 8 8 Prolem : Show tht if 8 Prolem : Show tht + + if rel numers,, n stisf + + = Prolem

More information

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example Connetiit in Grphs CSH: Disrete Mthemtis Grph Theor II Instrtor: Işıl Dillig Tpil qestion: Is it possile to get from some noe to nother noe? Emple: Trin netork if there is pth from to, possile to tke trin

More information

Total score: /100 points

Total score: /100 points Points misse: Stuent's Nme: Totl sore: /100 points Est Tennessee Stte University Deprtment of Computer n Informtion Sienes CSCI 2710 (Trnoff) Disrete Strutures TEST 2 for Fll Semester, 2004 Re this efore

More information

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18 Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re

More information

The DOACROSS statement

The DOACROSS statement The DOACROSS sttement Is prllel loop similr to DOALL, ut it llows prouer-onsumer type of synhroniztion. Synhroniztion is llowe from lower to higher itertions sine it is ssume tht lower itertions re selete

More information

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into

More information

Particle Physics. Michaelmas Term 2011 Prof Mark Thomson. Handout 3 : Interaction by Particle Exchange and QED. Recap

Particle Physics. Michaelmas Term 2011 Prof Mark Thomson. Handout 3 : Interaction by Particle Exchange and QED. Recap Prtile Physis Mihelms Term 2011 Prof Mrk Thomson g X g X g g Hnout 3 : Intertion y Prtile Exhnge n QED Prof. M.A. Thomson Mihelms 2011 101 Rep Working towrs proper lultion of ey n sttering proesses lnitilly

More information

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms Preview Greed Algorithms Greed Algorithms Coin Chnge Huffmn Code Greed lgorithms end to e simple nd strightforwrd. Are often used to solve optimiztion prolems. Alws mke the choice tht looks est t the moment,

More information

Logarithms LOGARITHMS.

Logarithms LOGARITHMS. Logrithms LOGARITHMS www.mthletis.om.u Logrithms LOGARITHMS Logrithms re nother method to lulte nd work with eponents. Answer these questions, efore working through this unit. I used to think: In the

More information

AVL Trees. D Oisín Kidney. August 2, 2018

AVL Trees. D Oisín Kidney. August 2, 2018 AVL Trees D Oisín Kidne August 2, 2018 Astrt This is verified implementtion of AVL trees in Agd, tking ides primril from Conor MBride s pper How to Keep Your Neighours in Order [2] nd the Agd stndrd lirr

More information

Mathematics SKE: STRAND F. F1.1 Using Formulae. F1.2 Construct and Use Simple Formulae. F1.3 Revision of Negative Numbers

Mathematics SKE: STRAND F. F1.1 Using Formulae. F1.2 Construct and Use Simple Formulae. F1.3 Revision of Negative Numbers Mthemtis SKE: STRAND F UNIT F1 Formule: Tet STRAND F: Alger F1 Formule Tet Contents Setion F1.1 Using Formule F1. Construt nd Use Simple Formule F1.3 Revision of Negtive Numers F1.4 Sustitution into Formule

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

M344 - ADVANCED ENGINEERING MATHEMATICS

M344 - ADVANCED ENGINEERING MATHEMATICS M3 - ADVANCED ENGINEERING MATHEMATICS Lecture 18: Lplce s Eqution, Anltic nd Numericl Solution Our emple of n elliptic prtil differentil eqution is Lplce s eqution, lso clled the Diffusion Eqution. If

More information

21.1 Using Formulae Construct and Use Simple Formulae Revision of Negative Numbers Substitution into Formulae

21.1 Using Formulae Construct and Use Simple Formulae Revision of Negative Numbers Substitution into Formulae MEP Jmi: STRAND G UNIT 1 Formule: Student Tet Contents STRAND G: Alger Unit 1 Formule Student Tet Contents Setion 1.1 Using Formule 1. Construt nd Use Simple Formule 1.3 Revision of Negtive Numers 1.4

More information

Trigonometry Revision Sheet Q5 of Paper 2

Trigonometry Revision Sheet Q5 of Paper 2 Trigonometry Revision Sheet Q of Pper The Bsis - The Trigonometry setion is ll out tringles. We will normlly e given some of the sides or ngles of tringle nd we use formule nd rules to find the others.

More information

Exercise sheet 6: Solutions

Exercise sheet 6: Solutions Eerise sheet 6: Solutions Cvet emptor: These re merel etended hints, rther thn omplete solutions. 1. If grph G hs hromti numer k > 1, prove tht its verte set n e prtitioned into two nonempt sets V 1 nd

More information

CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computation 1. Graphs and Digraphs CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

More information

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version A Lower Bound for the Length of Prtil Trnsversl in Ltin Squre, Revised Version Pooy Htmi nd Peter W. Shor Deprtment of Mthemtil Sienes, Shrif University of Tehnology, P.O.Bo 11365-9415, Tehrn, Irn Deprtment

More information

x dx does exist, what does the answer look like? What does the answer to

x dx does exist, what does the answer look like? What does the answer to Review Guie or MAT Finl Em Prt II. Mony Decemer th 8:.m. 9:5.m. (or the 8:3.m. clss) :.m. :5.m. (or the :3.m. clss) Prt is worth 5% o your Finl Em gre. NO CALCULATORS re llowe on this portion o the Finl

More information

Lesson 2.1 Inductive Reasoning

Lesson 2.1 Inductive Reasoning Lesson 2.1 Inutive Resoning Nme Perio Dte For Eerises 1 7, use inutive resoning to fin the net two terms in eh sequene. 1. 4, 8, 12, 16,, 2. 400, 200, 100, 50, 25,, 3. 1 8, 2 7, 1 2, 4, 5, 4. 5, 3, 2,

More information

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching CS261: A Seon Course in Algorithms Leture #5: Minimum-Cost Biprtite Mthing Tim Roughgren Jnury 19, 2016 1 Preliminries Figure 1: Exmple of iprtite grph. The eges {, } n {, } onstitute mthing. Lst leture

More information

] dx (3) = [15x] 2 0

] dx (3) = [15x] 2 0 Leture 6. Double Integrls nd Volume on etngle Welome to Cl IV!!!! These notes re designed to be redble nd desribe the w I will eplin the mteril in lss. Hopefull the re thorough, but it s good ide to hve

More information

MCH T 111 Handout Triangle Review Page 1 of 3

MCH T 111 Handout Triangle Review Page 1 of 3 Hnout Tringle Review Pge of 3 In the stuy of sttis, it is importnt tht you e le to solve lgeri equtions n tringle prolems using trigonometry. The following is review of trigonometry sis. Right Tringle:

More information

Introduction to Algebra - Part 2

Introduction to Algebra - Part 2 Alger Module A Introduction to Alger - Prt Copright This puliction The Northern Alert Institute of Technolog 00. All Rights Reserved. LAST REVISED Oct., 008 Introduction to Alger - Prt Sttement of Prerequisite

More information

Eigenvectors and Eigenvalues

Eigenvectors and Eigenvalues MTB 050 1 ORIGIN 1 Eigenvets n Eigenvlues This wksheet esries the lger use to lulte "prinipl" "hrteristi" iretions lle Eigenvets n the "prinipl" "hrteristi" vlues lle Eigenvlues ssoite with these iretions.

More information

Core 2 Logarithms and exponentials. Section 1: Introduction to logarithms

Core 2 Logarithms and exponentials. Section 1: Introduction to logarithms Core Logrithms nd eponentils Setion : Introdution to logrithms Notes nd Emples These notes ontin subsetions on Indies nd logrithms The lws of logrithms Eponentil funtions This is n emple resoure from MEI

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

EXTENSION OF THE GCD STAR OF DAVID THEOREM TO MORE THAN TWO GCDS CALVIN LONG AND EDWARD KORNTVED

EXTENSION OF THE GCD STAR OF DAVID THEOREM TO MORE THAN TWO GCDS CALVIN LONG AND EDWARD KORNTVED EXTENSION OF THE GCD STAR OF DAVID THEOREM TO MORE THAN TWO GCDS CALVIN LONG AND EDWARD KORNTVED Astrt. The GCD Str of Dvi Theorem n the numerous ppers relte to it hve lrgel een evote to shoing the equlit

More information

Lesson 2.1 Inductive Reasoning

Lesson 2.1 Inductive Reasoning Lesson 2.1 Inutive Resoning Nme Perio Dte For Eerises 1 7, use inutive resoning to fin the net two terms in eh sequene. 1. 4, 8, 12, 16,, 2. 400, 200, 100, 50, 25,, 3. 1 8, 2 7, 1 2, 4, 5, 4. 5, 3, 2,

More information

Now we must transform the original model so we can use the new parameters. = S max. Recruits

Now we must transform the original model so we can use the new parameters. = S max. Recruits MODEL FOR VARIABLE RECRUITMENT (ontinue) Alterntive Prmeteriztions of the pwner-reruit Moels We n write ny moel in numerous ifferent ut equivlent forms. Uner ertin irumstnes it is onvenient to work with

More information

Let s divide up the interval [ ab, ] into n subintervals with the same length, so we have

Let s divide up the interval [ ab, ] into n subintervals with the same length, so we have III. INTEGRATION Eonomists seem muh more intereste in mrginl effets n ifferentition thn in integrtion. Integrtion is importnt for fining the epete vlue n vrine of rnom vriles, whih is use in eonometris

More information

Finite State Automata and Determinisation

Finite State Automata and Determinisation Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions

More information

Spacetime and the Quantum World Questions Fall 2010

Spacetime and the Quantum World Questions Fall 2010 Spetime nd the Quntum World Questions Fll 2010 1. Cliker Questions from Clss: (1) In toss of two die, wht is the proility tht the sum of the outomes is 6? () P (x 1 + x 2 = 6) = 1 36 - out 3% () P (x 1

More information

Laboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza

Laboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza An Unfoling Approh to Moel Cheking Jvier Esprz Lbortory for Fountions of Computer Siene University of Einburgh Conurrent progrms Progrm: tuple P T 1 T n of finite lbelle trnsition systems T i A i S i i

More information

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106 8. Problem Set Due Wenesy, Ot., t : p.m. in - Problem Mony / Consier the eight vetors 5, 5, 5,..., () List ll of the one-element, linerly epenent sets forme from these. (b) Wht re the two-element, linerly

More information

Lecture Notes No. 10

Lecture Notes No. 10 2.6 System Identifition, Estimtion, nd Lerning Leture otes o. Mrh 3, 26 6 Model Struture of Liner ime Invrint Systems 6. Model Struture In representing dynmil system, the first step is to find n pproprite

More information

Instructions. An 8.5 x 11 Cheat Sheet may also be used as an aid for this test. MUST be original handwriting.

Instructions. An 8.5 x 11 Cheat Sheet may also be used as an aid for this test. MUST be original handwriting. ID: B CSE 2021 Computer Orgniztion Midterm Test (Fll 2009) Instrutions This is losed ook, 80 minutes exm. The MIPS referene sheet my e used s n id for this test. An 8.5 x 11 Chet Sheet my lso e used s

More information

PAIR OF LINEAR EQUATIONS IN TWO VARIABLES

PAIR OF LINEAR EQUATIONS IN TWO VARIABLES PAIR OF LINEAR EQUATIONS IN TWO VARIABLES. Two liner equtions in the sme two vriles re lled pir of liner equtions in two vriles. The most generl form of pir of liner equtions is x + y + 0 x + y + 0 where,,,,,,

More information

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh Computtionl Biology Leture 8: Genome rerrngements, finding miml mthes Sd Mneimneh We hve seen how to rerrnge genome to otin nother one sed on reversls nd the knowledge of the preserved loks or genes. Now

More information

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths Intermedite Mth Cirles Wednesdy 17 Otoer 01 Geometry II: Side Lengths Lst week we disussed vrious ngle properties. As we progressed through the evening, we proved mny results. This week, we will look t

More information

8 THREE PHASE A.C. CIRCUITS

8 THREE PHASE A.C. CIRCUITS 8 THREE PHSE.. IRUITS The signls in hpter 7 were sinusoidl lternting voltges nd urrents of the so-lled single se type. n emf of suh type n e esily generted y rotting single loop of ondutor (or single winding),

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

Compression of Palindromes and Regularity.

Compression of Palindromes and Regularity. Compression of Plinromes n Regulrity. Kyoko Shikishim-Tsuji Center for Lierl Arts Eution n Reserh Tenri University 1 Introution In [1], property of likstrem t t view of tse is isusse n it is shown tht

More information

Section 1.3 Triangles

Section 1.3 Triangles Se 1.3 Tringles 21 Setion 1.3 Tringles LELING TRINGLE The line segments tht form tringle re lled the sides of the tringle. Eh pir of sides forms n ngle, lled n interior ngle, nd eh tringle hs three interior

More information

Symmetrical Components 1

Symmetrical Components 1 Symmetril Components. Introdution These notes should e red together with Setion. of your text. When performing stedy-stte nlysis of high voltge trnsmission systems, we mke use of the per-phse equivlent

More information

TIME AND STATE IN DISTRIBUTED SYSTEMS

TIME AND STATE IN DISTRIBUTED SYSTEMS Distriuted Systems Fö 5-1 Distriuted Systems Fö 5-2 TIME ND STTE IN DISTRIUTED SYSTEMS 1. Time in Distriuted Systems Time in Distriuted Systems euse eh mhine in distriuted system hs its own lok there is

More information

Electromagnetism Notes, NYU Spring 2018

Electromagnetism Notes, NYU Spring 2018 Eletromgnetism Notes, NYU Spring 208 April 2, 208 Ation formultion of EM. Free field desription Let us first onsider the free EM field, i.e. in the bsene of ny hrges or urrents. To tret this s mehnil system

More information

Reflection Property of a Hyperbola

Reflection Property of a Hyperbola Refletion Propert of Hperol Prefe The purpose of this pper is to prove nltill nd to illustrte geometrill the propert of hperol wherein r whih emntes outside the onvit of the hperol, tht is, etween the

More information

Logic, Set Theory and Computability [M. Coppenbarger]

Logic, Set Theory and Computability [M. Coppenbarger] 14 Orer (Hnout) Definition 7-11: A reltion is qusi-orering (or preorer) if it is reflexive n trnsitive. A quisi-orering tht is symmetri is n equivlene reltion. A qusi-orering tht is nti-symmetri is n orer

More information

Section 2.1 Special Right Triangles

Section 2.1 Special Right Triangles Se..1 Speil Rigt Tringles 49 Te --90 Tringle Setion.1 Speil Rigt Tringles Te --90 tringle (or just 0-60-90) is so nme euse of its ngle mesures. Te lengts of te sies, toug, ve very speifi pttern to tem

More information

Lecture 8: Abstract Algebra

Lecture 8: Abstract Algebra Mth 94 Professor: Pri Brtlett Leture 8: Astrt Alger Week 8 UCSB 2015 This is the eighth week of the Mthemtis Sujet Test GRE prep ourse; here, we run very rough-n-tumle review of strt lger! As lwys, this

More information

Towards Efficient Consistency Enforcement for Global Constraints in Weighted Constraint Satisfaction

Towards Efficient Consistency Enforcement for Global Constraints in Weighted Constraint Satisfaction Towrs Effiient Consisteny Enforement for Glol Constrints in Weighte Constrint Stisftion J. H. M. Lee n K. L. Leung Deprtment of Computer Siene n Engineering The Chinese University of Hong Kong, Shtin,

More information

Chapter 9 Definite Integrals

Chapter 9 Definite Integrals Chpter 9 Definite Integrls In the previous chpter we found how to tke n ntiderivtive nd investigted the indefinite integrl. In this chpter the connection etween ntiderivtives nd definite integrls is estlished

More information

GNFA GNFA GNFA GNFA GNFA

GNFA GNFA GNFA GNFA GNFA DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with

More information

Metaheuristics for the Asymmetric Hamiltonian Path Problem

Metaheuristics for the Asymmetric Hamiltonian Path Problem Metheuristis for the Asymmetri Hmiltonin Pth Prolem João Pero PEDROSO INESC - Porto n DCC - Fule e Ciênis, Universie o Porto, Portugl jpp@f.up.pt Astrt. One of the most importnt pplitions of the Asymmetri

More information

A Study on the Properties of Rational Triangles

A Study on the Properties of Rational Triangles Interntionl Journl of Mthemtis Reserh. ISSN 0976-5840 Volume 6, Numer (04), pp. 8-9 Interntionl Reserh Pulition House http://www.irphouse.om Study on the Properties of Rtionl Tringles M. Q. lm, M.R. Hssn

More information

Equivalent fractions have the same value but they have different denominators. This means they have been divided into a different number of parts.

Equivalent fractions have the same value but they have different denominators. This means they have been divided into a different number of parts. Frtions equivlent frtions Equivlent frtions hve the sme vlue ut they hve ifferent enomintors. This mens they hve een ivie into ifferent numer of prts. Use the wll to fin the equivlent frtions: Wht frtions

More information

Arrow s Impossibility Theorem

Arrow s Impossibility Theorem Rep Voting Prdoxes Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Voting Prdoxes Properties Arrow s Theorem Leture Overview 1 Rep

More information

Dynamic Minimization of Sentential Decision Diagrams

Dynamic Minimization of Sentential Decision Diagrams Dnmi Minimiztion of Sententil Deision Digrms Arthur Choi n Ann Drwihe Computer Siene Deprtment Universit of Cliforni, Los Angeles {hoi,rwihe}@s.ul.eu Astrt The Sententil Deision Digrm (SDD) is reentl propose

More information

12.4 Similarity in Right Triangles

12.4 Similarity in Right Triangles Nme lss Dte 12.4 Similrit in Right Tringles Essentil Question: How does the ltitude to the hpotenuse of right tringle help ou use similr right tringles to solve prolems? Eplore Identifing Similrit in Right

More information