On Contract-and-Refine Transformations Between Phylogenetic Trees

Size: px
Start display at page:

Download "On Contract-and-Refine Transformations Between Phylogenetic Trees"

Transcription

1 On Contrt-n-Rfin Trnsformtions Btwn Phylognti Trs Gnshkumr Gnpthy Vijy Rmhnrn Tny Wrnow Astrt Th infrn of volutionry trs using pprohs whih ttmpt to solv th mximum prsimony (MP) n mximum liklihoo (ML) optimiztion prolms is stnr prt of muh of iologil t nlysis. Howvr, oth prolms r hr to solv: MP provly NP-hr, n ML vn hrr in prti. Consquntly, hill-liming huristis r us to nlyz tsts for phylogny ronstrution. Two primry topologil trnsformtions hv n us in th most populr huristis: TBR (tristion-n-ronntion) n ECR (g-ontrtionsn-rfinmnts). Whil most of th populr huristis xlusivly us TBR movs to xplor tr sp, som rnt mthos hv us ECR in onjuntion with TBR n foun signifint improvmnts in th sp n ury with whih thy n nlyz tsts. In this ppr w nlyz ECR movs in til, n provi rsults on th imtr of th tr sp, th nigorhoo intrstion with TBR, struturl nlysis of th ECR oprtion, n n ffiint mtho for smpling uniformly from th 2-ECR nighorhoo of tr. Our rsults shoul l to ttr unrstning of th impt of ECR movs on th prformn of huristi srhs. 1 Introution Most, if not ll, of th fvor pprohs in iology for infrring phylognti (i.., volutionry) trs r s upon ttmpts to solv rtin NP-hr optimiztion prolms; of ths, prhps Mximum Prsimony [7] is th most populr. Mximum Liklihoo [6] is lso fvor, ut onsirly hrr in prti to solv thn Mximum Prsimony (though not stlish to NP-hr). Approximtion lgorithms for Mximum Prsimony xist, ut th pproximtion rtios r not goo nough for us in molulr systmtis whr rrors s smll s 1% r unptl. Consquntly, huristis, lrgly s upon hill-liming (lso ll lol-srh), r us to srh for optiml trs. Two topologil trnsformtions on trs, TBR (for Tr-Bistion-n-Ronntion) n p-ecr, short for p-eg Contrt n Rfin [8], r th sis for th most Arss: Dpt. of Computr Sins, Th Univ. of Txs t Austin, Austin, TX Emil: fgsgk,vlr,tnyg@s.utxs.u Support in prt y NSF grnt CCR populr huristis in us for phylognti nlysis unr Mximum Prsimony. Of ths two, th TBR trnsformtion hs n tritionlly mor populr, n is ttr unrstoo in trms of th proprtis of th lnsp of trs it inus [23, 18, 14, 16, 1]. In p-ecr mov p of th gs in th givn tr r ontrt n th rsulting tr is rfin to giv k nw tr. Snkoff t.l [22] fin vrsion of th ECR mov whr th ontrt gs r rstrit to form sutr (hnforth, w will ll this mov th p-secr or p- sutrecr mov). In [22] n xprimntl omprison of lol srhs s on p-secr movs for iffrnt vlus of p is prsnt, n vlut with rgr to th qulity of lol optim gnrt. Susquntly th p-ecr mov hs ppr impliitly rthr thn xpliitly in th lol-srh huristi storil-srh [9]. In storil-srh, tr is trnsform through ontrtions of gs susqunt rfinmnts, ut th gs to ontrt r hosn using som spifi huristi, n so th numr of gs ontrt n vry uring th srh. Th p-ecr mov s us in this ppr ws fin rntly in [8], whr th nighorhoos of trs inu y th 2-ECR mov n y th TBR mov wr ompr n wr shown to hv smll intrstion. In this ppr, w prsnt svrl rsults out th proprtis of th gnrl p-ecr oprtion n th srh sp inu y it. In prtiulr, w prsnt ffl symptotilly tight ouns for th imtr of trsp unr p-ecr movs s funtion of p, showing tht th imtr of th srh sp is in Θ( nlogn plog p ) (whr n is th numr of lvs in th trs). This rsult oul potntilly usful in slting suitl rng of vlus of p for prforming lol srhs s on p-ecr oprtions. ffl omprison of th nighorhoos of tr inu y TBR n p-ecr movs, showing tht thir intrstion is of siz O(minfn2 p ;n 2 pg). Th nighorhoos thmslvs r muh lrgr: thr oul Θ(n 3 ) trs in th TBR nighorhoo of tr, whil th p-ecr nighorhoo ontins Ω(n p 2 p ) trs. Ths rsults my hlp xplin why th omintion of th two movs improvs upon th us of just on, s rport in [9]. This work gnrlizs th rsult in [8] for 2-ECR.

2 ffl n O(n) pr-prossing-tim, O(1) upt-tim lgorithm for smpling tr uniformly t rnom from th st of 2-ECR nighors of phylognti tr. This potntilly hs pplitions in Mrkov Chin Mont Crlo mthos for infrring volutionry historis through Bysin nlysis [15, 12, 13]. ffl struturl nlysis of th p-ecr oprtion, motivt y its pplition in our lgorithm for uniformly smpling from th 2-ECR nighorhoo of tr. W fin th proprtis of irruiility n ommuttivity of p-ecr oprtions, n osrv surprising onntion twn irruil p-ecr oprtions n lmntry iprtit grphs. W xploit this onntion to vlop n O(n + p 2 ) lgorithm to ru p-ecr oprtion into n quivlnt squn of irruil ECR oprtions. Th rst of th ppr is orgniz s follows: In Stion 2 w introu som si onpts nssry for th rmining stions. In Stion 3 w prsnt uppr n lowr ouns on th imtr of th srh sp inu y th p- ECR oprtion. In Stion 4 w ompr th nighorhoos of tr inu y th p-ecr n TBR oprtions. In Stion 5 w prsnt our lgorithm for smpling uniformly from th st of 2-ECR nighors of tr, n in Stion 6 w rry out struturl nlyss of th p-ecr oprtion vis--vis th proprtis of irruiility n ommuttivity. 2 Bsis A phylogny is n unroot tr (root, if th volutionry origin is known) whos lvs r ll n rprsnt xtnt spis, n ll of whos intrnl nos hv gr t lst thr. A inry phylogny is on whr ll intrnl nos r of gr thr. Egs tht r not inint on lvs r ll intrnl gs. Non-inry phylognis r rfrr to s ing unrsolv t th nos of gr grtr thn thr. Any isomorphism twn phylognis must prsrv th lf lls. 2.1 Biprtitions A notion ruil to th stuy of phylognis is tht of iprtition: rmoving n g from lf-ll tr T inus iprtition π on its st of lvs. W not y C(T ) th st fπ : 2 E(T )g, whih rprsnts th st of iprtitions inu y T.ThstC(T ) is known s th hrtr noing of th tr T. Bunmn prov [2] tht two phylognis r isomorphi if n only if thy hv th sm hrtr noing. 2.2 Tr Trnsformtions Contrtions n Rfinmnts A ontrtion ollpss n g in th tr n intifis its two n points, whil rfinmnt xpns n unrsolv no into two nos onnt y n g (s Figur 1). Th p-ecr tr rrrngmnt oprtion on inry phylogny is fin to p g-ontrtions, whih r thn follow y rfinmnts tht giv k inry phylogny. Th trs T 1 n T 5 in Figur 1 r sprt y on 2-ECR oprtion. Th Roinson-Fouls Mtri Th Roinson-Fouls istn twn two unroot lf-ll (not nssrily inry) trs T n T 0, not RF(T;T 0 ) is fin to th lngth of shortst squns of ontrtions n rfinmnts tht trnsforms T to T 0 [21]. It ws lso shown in [21] tht RF(T;T 0 )=jc(t ) C(T 0 )j + jc(t 0 ) C(T )j Bs on th ov finitions w n u th following simpl ft. OBSERVATION 1. Lt T n T 0 two unroot inry lfll trs on n lvs, n lt p ny intgr twn 1 n n 3. ThnRF(T;T 0 )» 2p if n only if T n T 0 r on p-ecr mov prt. Tr Bistion n Ronntion (TBR) In TBR mov, n g is rmov from T, rting sutrs t n T t, n thn nw g is twn th mipoints of ny two gs in t n T t, rting nw tr. Throughout th oprtion ny intrnl no of gr two is supprss. Th TBR oprtion is illustrt in Figur 2. Nrst Nighor Intrhng (NNI) Th NNI mov swps on root sutr on on si of n intrnl g with nothr on th othr si; not tht this is quivlnt to ontrting th g, n thn rsolving th rsultnt tr into nw inry tr. Th NNI oprtion is thus th sm s 1-ECR oprtion, n is lso spil s of th TBR oprtion. Evry squn of p NNI movs on tr is p-ecr mov on tht tr; howvr thr r p-ecr movs tht nnot prform y squn of p NNI movs (s,.g., Figur 1). Nighorhoos, istns, n imtrs W fin th nighorhoo of n unroot inry lf-ll tr T unr tr-rrrngmnt mov to th st of ll trs tht n otin from T y on mov. For h of th iffrnt tr rrrngmnt oprtions (TBR, NNI, n p- ECR), w fin th it istn twn two trs on th sm st of lvs s th minimum numr of movs n to mov from on tr to th othr. All ths istns r known to finit (follows from [20] ), ut tn to hr to omput [1, 11, 4]. W not th it istn unr th p-ecr mov y δ p ECR (T;T 0 ), n th othrs r similrly fin. Givn spifi mov (suh s TBR, p-ecr, t.), w n fin th imtr of tr sp to th mximum it istn twn ny two trs. For onvnin, w will phrs th imtr of th srh sp s th imtr of grph, in whih th trs on givn st of lvs onstitut th vrtis, n n g xists twn two trs if thy r rlt to h othr y on mov. Thus, th grph fin y th p-ecr mov is G p ECR =(U;E), whr U is th st of unroot lf-ll inry trs on

3 1 2 T1 ontrt 1 2 ontrt 2 T2 T3 rfinmnt rfinmnt T3 T4 T5 Figur 1: Two gs r ontrt in T1 to prou T3, whih is thn rfin to prou T5; T3 n T5 r thus sprt y on 2-ECR oprtion. i f t g h TBR i t f g h T T Figur 2: Tr T 00 is on TBR mov wy from T. n lvs, n (u;v) 2 E if n only if u n v r sprt y on p-ecr mov. W not th imtr of G p ECR y (G p ECR ). 3 Bouns on th imtr of G p ECR In this stion w riv symptotilly tight ouns for th imtr of th tr-sp inu y th p-ecr oprtion (s funtion of p). It ws shown in [16] tht (G NNI ) 2 Θ(nlogn), n it ws shown in [1] tht (G TBR ) 2 Θ(n). As mntion rlir, th NNI oprtion is just th 1-ECR oprtion. Hn th imtr of th 1-ECR oprtion is in Θ(nlogn). Th imtr of th (n 3)-ECR oprtion is, of ours, 1. Otining th imtr s funtion of p might giv us wy to pik th right rng of vlus of p to us in srh, s on th imtr. 3.1 Uppr Boun THEOREM 3.1. (G (2p 2) ECR ) 2 O( nlogn 2n 10 plog p )+ p 1. Proof. W show tht (G (2p 2) ECR )» nlogn plog p + 2n 10 2p 2,for p powr of two grtr thn on, n n > 5. It n thn shown tht (G (2p 2) ECR )» 2nlog 2 n p(log 2 p 1) + 2n 10 p 1,forll vlus of p 2nn > 5, thus proving out thorm. Lt C th sort trpillr tr for th st of lf lls [n] (Figur 3). W will show tht for ny unroot inry lf-ll tr T, δ (2p 2) ECR (T;C)» n p log p n + 2n 10 2p 2. W will first show tht th numr of (2p 2)-ECR stps n to onvrt omplt inry tr on n lvs to trpillr C is t most n p log p n. W will thn pply n i from [3] to show how ny tr n onvrt to omplt inry tr in (2n 10) NNI movs. This implis tht th numr of (2p 2)-ECR stps n to onvrt ny tr to omplt inry tr is t most 2n 10 2p 2. Th ov two rsults woul thn imply tht ny tr n onvrt to C in t most n p log p n + 2n 10 2p 2 stps. A omplt inry tr 1 n th sort trpillr tr for th st of lvs ll from 1 through 7 r givn in Figur 3. Convrting n ritrry omplt inry tr to sort trpillr tr Th prour is rursiv, n is illustrt in Figurs?? n??. LtB th omplt inry tr on n lvs. Lt B 1, B 2, B 3,...B p th sutrs of B t pth of log 2 p.sinb is omplt inry tr, so r sutrs B 1 through B p. Rursivly onvrt h of th p sutrs to sort trpillr tr, prouing th -tr (inry-umtrpillr tr) B 0. Th sutrs of B 0 t pth log 2 p r now sort trpillr trs C 1 through C p (s Figur??). Th following pross is illustrt in Figur??: onsir th first p lvs in th sort orr. Ths p lvs n pull up to th root y ontrting only (2p 2) gs (this is us th trpillr trs C 1 through C p r sort). Th ontrtion of ths (2p 2) gs mk th root of th tr unrsolv, with h of th p lvs now snnt of th root. To omplt th (2p 2)-ECR 1 A omplt inry tr is shown root t th g tht ivis th st of lvs most vnly. Th tr ing root mks littl iffrn to our nlysis.

4 B C Figur 3: B is omplt root inry tr on svn lvs. C is th sort trpillr tr for th sm st of lvs. oprtion, w hv to rfin th root, n whn w rfin th root th p lvs n trnsfrr to ov (s Figur??) th root in sort orr. Th nxt (2p 2)-ECR mov will trnsfr th nxt p lvs in th sort orr to ov th root. In this mnnr w n otin C from B 0 in n p (2p 2)-ECR movs. This givs us th following rursiv qution for th numr of movs rquir to onvrt B to C. Lt S(n) not th numr of (2p 2)-ECR stps rquir to onvrt n n-lf omplt inry tr to th orrsponing sort trpillr tr. Thn, n n S(n)» ps( p )+ p Solving th rurrn yils us S(n)» n p log p n. Convrting ny tr to omplt inry tr in O(n=p) p-secr movs In trpillr w fin th n lvs s th two pirs of lvs t h n of th trpillr; th rmining lvs will ll intrnl lvs. Th pth onnting th two pirs of n lvs is th spin of th trpillr. W fin q-trpillr s trpillr in whih h intrnl lf is rpl y q-spok, whih is trpillr with q 2 intrnl lvs n on pir of n lvs (s figur). Th vry lst spok (on tht is jnt to th prnt of on of th two n pirs of lvs) is q 0 -spok for q 0 = n 4 n=q. Lt T n unroot inry tr. Any inry tr ontins two pirs of lvs whr h pir hs ommnt prnt. W fix two suh pirs of lvs in T n w ll th uniqu pth onnting thir prnts p 1 n p 2 s its spin. W fix on of th prnts, sy p 1, n rltiv to p 1 w fin th potntil φ(t )=2 n 1 + n 2,whrn 1 is th numr of su ssiv q-spoks in T strting with th vrtx jnt to p 1 in T,nn 2 is th numr of sussiv sutrs of siz t lst q root t vrtis following th initil n 1 q-spoks. Consir th trnsformtion of n ritrry inry tr T into q-trpillr using p-secr movs, whr q = p=2. Th initil potntil of T is non-ngtiv n finl potntil of th trnsform tr is 2 n=q. W now sri mtho tht trnsforms T into q-trpillr using p-ecr movs, whih inrss th potntil of th trnsform tr in h stp y t lst on. Thus this mtho trnsforms T into q-trpill r in O(n=p) movs. Our mtho will pply p-secr mov y ontrting gs strting with th gs in th sutr root t th vrtx v on th spin tht is jnt to th lst vrtx tht is root of on of th n 1 q-spoks lry onstrut (if n 1 = 0 thn this is th first vrtx on th spin). Th rsulting ontrt sutr S on p intrnl gs will hv p + 3 xtrnl gs inint on it, of whih two r on th spin n p + 1 r within sutrs root t on or mor vrtis on th spin. If S n rfin to form nw sussiv q-spok, thn th potntil inrss y t lst on. Othrwis, t lst q xtrnl gs n in sutrs, h of whih ontin t lst two lvs, whih implis tht S n rfin into two sutrs, h ontining t lst q lvs. Furthr, sin S oul not rfin into q-spok th sutr root t v ws not of siz twn q n 2q, so on of th two sutrs form is nw on, rsulting in n inrs in potntil of t lst on. Hn T n trnsform into q-trpillr in O(n=p) p-secr movs. By rvrsing th ov strtgy th q-trpillr n trnsform into ny inry tr in th sm numr of movs, hn ny inry tr n trnsform into omplt inry tr in O(n=p) p-secr movs. THEOREM 3.2. (G p ECR ) nlog 2 n o(nlogn) 8plog 2 p+o(p), for ll p > 1. Proof. Lt T n unroot inry tr on n ll lvs, n lt T 0 trsuhthtδ p ECR (T;T 0 )=1. W first show tht, δ NNI (T;T 0 )» 2plog 2 p + O(p),forp Without loss of gnrlity, ssum tht jc(t ) C(T 0 )j = p,nltx th p-ecr oprtion tht trnsforms T to T 0. If th gs orrsponing to iprtitions in C(T ) C(T 0 ) form sutr of T,syS, lt th orrsponing sutr in T 0 S 0.ThnSn S 0 my onsir to form tr with p + 3 lvs h, n S n trnsform into S 0 using t most 2plog 2 p + O(p) NNI movs, s ws shown in [16]. If th gs orrsponing to iprtitions in C(T ) C(T 0 ) form forst of k trs, thn it n shown tht thr xist som k ECR oprtions X 1 through X k tht t on isjoint st of iprtitions suh tht X is quivlnt to prforming th k oprtions X 1 through X k on ftr th othr (s Corollry 6.3). Lt X i p i -ECR oprtion. W hv k i=1 p i = p. Lt T i th tr otin y th

5 pplition of X i on T i 1 (thus, T = T 0 n T 0 = T k ). Thn, δ NNI (T i 1 ;T i )» 2p i log 2 p i + O(p i ). Hn, δ NNI (T;T 0 )» 2 k i=1 p i log p i + O(p). Th summtion on th right-hn si is lss thn plog 2 p for ll p > 1nk > 1, n hn δ NNI (T;T 0 )» 2plog 2 p + O(p),forp > 1. From th rsults in [16, 1], (G NNI ) nlog 2 n o(nlogn) 4. This, togthr with th ft tht ny p-ecr mov n mult y t most 2plog 2 p + O(p) NNI movs, givs us th sir rsult. 4 Comprison of p-ecr n TBR nighorhoos Rll tht th nighorhoo of tr T unr tr rrrngmnt oprtion is th st of ll trs tht n otin y prforming on suh oprtion on T. Inthisstionw first stlish ouns on th siz of th p-ecr nighorhoo oftronnlvs, n thn show tht siz of th intrstion of th p-ecr nighorhoo n th TBR nighorhoo of tr is smll. W will not th nighorhoo of tr T unr, sy, th TBR oprtion, s Γ TBR (T ). It is known tht jγ TBR (T )j = Θ(n 3 ) [1]. LEMMA 4.1. Lt T n unroot inry lf-ll tr on n lvs. Thn, p n 3 k=1 k 2k»jΓp ECR (T n )j» p (p + 3)!!,whr(p + 3)!! is th prout of ll o numrs up to p + 3. Proof. For ny tr T 0 in Γ p ECR (T ), RF(T;T 0 ) 2 f2;4;6;:::;2pg. W will show tht th numr of trs T 0 in Γ p ECR (T ) suh tht RF(T;T 0 )=2k is t lst n 3 2k k, n tht will giv us th rsult tht w sir. Lt k suh tht 1» k» (n 3). For vry wy of hoosing k gs in T, thr r t lst 2 k iffrnt k-ecr movs tht n prform on T : for h hosn g, ontrt th g n rfin th rsulting unrsolv no on of t lst two wys tht rsults in th ltrtion of th iprtition orrsponing to th g. Thus, thr r t lst n 3 2k k trs T 0 suh tht RF(T;T 0 )=2k. This omplts our proof of th lowr oun. For th uppr oun, osrv tht for h of th n p wys of slting p gs to ontrt, thr r t most (p +3)!! nighors ((p +3)!! is th numr of unroot lf-ll inry trs on p + 3lvs). This omplts our proof. THEOREM 4.1. Lt T n unroot inry lf-ll tr on n lvs. Thn, for ny p, jγ p ECR (T ) Γ TBR (T )j» minf(2n 3)(p + 1)2 p+3 ; (2n 3) 2 (p + 1)g). Proof. Lt S = Γ p ECR (T ) Γ TBR (T ), nltt 0 in S. Thn, jc(t ) C(T 0 )j»p, sint 0 2 Γ p ECR (T ). Morovr, sin T 0 2 Γ TBR (T ), th gs in T orrsponing to iprtitions in C(T ) C(T 0 ) ll must li on pth, n th iprtitions orrsponing to ll gs on th pth xpt thr (th first g, th lst g n th g tht is rokn for th TBR mov) must in C(T ) C(T 0 ). Hn, h suh T 0 n spifi y thr gs tht li on pth of lngth t most (p + 3). Now, th numr of pths of lngth t most (p + 3) is t most (2n 3)2 p+3. This is us th numr of pths of lngth xtly p + 3istmost(2n 3)2 p+2 :fix on of th trminl gs of th pth, thr r t most 2 p+3 pths with givn trminl g, sin th tr is inry. But in this mnnr, h pth will ount t lst twi, n hn thr r t most (2n 3)2 p+2 pths of lngth xtly (p +3). Summing ovr ll p w gt tht th numr of pths of lngth t most (p + 3) is t most (2n 3)2 p+3. Also, h pth of lngth t most (p + 3) orrspons to t most (p + 1) trs tht r in S, sin thr r (p + 1) wys of hoosing th g tht is rokn for th TBR mov. Hn w hv tht jsj»(2n 3)2 p+3 (p + 1). Morovr, th totl numr of pths in T is (2n 3) 2. For vry tr in S, thrispthint, n h pth ontriuts t most p + 1 trs to S. Hn jsj»(2n 3) 2 (p + 1). Thus, w hv tht jγ p ECR (T ) Γ TBR (T )j» minf(2n 3)(p + 1)2 p+3 ; (2n 3) 2 (p + 1)g). 5 Uniform Smpling from th st of 2-ECR Nighors Th us of MCMC (Mrkov Chin Mont Crlo) lgorithms in phylogny ronstrution is of inrsing intrst in th rsrh n usr ommunity [13, 12, 15]. In this stion, thrfor, w rss th prolm of slting tr uniformly t rnom from th st of 2-ECR nighors of tr. Our lgorithm tks O(1) tim, ftr on-tim pr-prossing stp tht osts O(n) tim. W prtition th st of 2-ECR nighors of T into two susts: Γ NNI (T ) n S = Γ 2 ECR (T ) Γ NNI (T ). Thsiz of th formr st is 2n 6, n th siz of th lttr st pns on th strutur of T. Th outlin of our lgorithm is s follows: 1. Comput, in O(n) tim, s = jsj. 2. Gnrt q t rnom from uniform istriution on [0;1]. 3. If q» 2n 6+s 2n 6, gnrt tr uniformly t rnom from Γ NNI (T ). 4. If q > 2n 6+s 2n 6, gnrt tr uniformly t rnom from S. Smpling from Γ NNI (T ): Stp (3) is sy n n prform in O(1) tim, givn th st of intrnl gs of T. W hoos n intrnl g uniformly t rnom, n pik h of th two trs tht n otin y ontrting n rfining with proility 1=2. It n vrifi tht in this mnnr w o smpl uniformly t rnom from Γ NNI (T ). Smpling from S: This is omplit y th ft tht smpling two gs 1 n 2 on ftr th othr without r-

6 plmnt, n thn smpling uniformly t rnom from th st of nighors otin y prforming 2-ECR mov involving gs 1 n 2 os not inu uniform istriution on S. This is u to th following rson: whn 1 n 2 r jnt, thr r 14 nighors, whil thr r only 8whn 1 n 2 r not jnt. Hn, w opt th following strtgy: w ritrrily orr th intrnl gs in T,nltinx() not th position of th g in suh n orr. ffl W lt Y th st of nighors tht n otin from T through squn of two 1-ECR movs, th first on involving g 1 n th nxt involving 2, n suh tht inx( 1 ) < inx( 2 ). Evry pir of intrnl gs (whthr jnt or non-jnt) ontriuts four trs to Y. WltjY j = y. ffl Lt X = S Y, nltjx j = x. Th st of nighors X ontins th following two lsss of trs: Trs tht nnot otin y squn of two 1-ECR movs. Thr r two suh trs for vry pir of jnt intrnl gs. Trs tht r otin y two 1-ECR movs involving two jnt intrnl gs, 1 first n 2 nxt, suh tht inx( 1 ) > inx( 2 ).Evrypir of jnt intrnl gs ontriuts four suh trs to X. Not tht two 1-ECR oprtions prform in th rvrs orr on two non-jnt gs o not gnrt ny nw trs, sin th orr os not mttr whn th gs r nonjnt. Not tht jγ 2 ECR (T )j = 2n 6 + x + y. Wrnowin position to sri our lgorithm. Algorithm to smpl uniformly from S 1. Clultx ny. Thisn onin O(n) tim sin x pns only on th numr of pirs of jnt intrnl gs in T,ny pns only on n. 2. Gnrt q t rnom from uniform istriution on [0;1]. 3. if q» x+y x, thn smpl pir of jnt intrnl gs 1 n 2, n thn smpl tr uniformly t rnom from th st of nighors ontriut to X y 2-ECR mov involving 1 n 2 (this involvs smpling on tr from st of six trs). 4. if q > x x+y, thn smpl two intrnl gs 1 n 2 on ftr th othr without rplmnt from th st of intrnl gs. Thn smpl tr uniformly t rnom from th st of nighors ontriut to Y y 2-ECR mov involving 1 n 2 (this involvs smpling on tr from st of four trs). Evry 2-ECR nighor is gnrt with proility 1 of 2n 6+x+y y our lgorithm. Th running tim is O(n), th tim tkn to to lult th numr of pirs of jnt intrnl gs in T. Howvr, not tht on nw tr is gnrt, this numr n lult for th nw tr in O(1) tim, sin 2-ECR mov mks only lol hngs to th tr strutur. Hn, w hv th following: THEOREM 5.1. W n gnrt tr uniformly t rnom from th st of 2-ECR nighors of n unroot lf-ll inry tr on n lvs in O(1) tim, ftr n O(n) prprossing stp. At first sight, our lgorithm sms to sris of s nlyss. Howvr, th nlyss rvls som intrsting proprtis of strutur of 2-ECR movs: thr r som 2- ECR oprtions r not ruil to two sussiv NNI movs, n mong thos tht r thus ruil, som involv sussiv NNI movs tht r ommutl (i., thos tht n rorr), n th rst involv sussiv movs tht r not ommutl. W liv tht ths onpts (n gnrliztions of thm) will ssntil in signing n lgorithm tht smpls ffiintly from th st of p-ecr nighors of tr for p > 2. In th nxt stion w stuy ruiility n ommutility of p-ecr movs, n show tht ths onpts gnrliz to gnrl p through surprising onntion to lmntry iprtit grphs. 6 Struturl Anlyss of th p-ecr Oprtion In this stion w will show how to onstrut, for ny two givn trs, squn of lmntry or irruil ECR oprtions tht trnsforms on tr to nothr, whr n ECR oprtion is p-ecr oprtion for som (unspifi) p. W first introu som trminology n nottion. Lt T n unroot lf-ll tr. Lt X n Y two ECR oprtions on T. W will sy X quls Y if prforming X on T rsults in th sm tr s th on otin y prforming Y on T.FortwoECR squns X n Y, w will lt Y ffix th following squn of two ECR oprtions: X on T,follow y Y on th tr tht rsults from prforming X on T. DEFINITION 1. Ruil p-ecr oprtion Lt T n unroot lf-ll tr. Lt X p- ECR oprtion on T. X is si to ruil if thr xists p 1 -ECR oprtion X 1 n p 2 -ECR oprtion X 2 suh tht X = X 2 ffi X 1 n p = p 1 + p 2. Th onpts of ruiility n irruiility of ECR oprtions r illustrt in Figur 4. Th prolm tht w rss in this stion is this: givn two inry trs T n T 0 suh tht RF(T;T 0 )=2p, ompos th p-ecr oprtion X tht sprts T n T 0 suh tht,

7 on irruil 2 ECR mov T1 T2 1 ECR mov 1 ECR mov T1 T4 T3 on ruil 2 ECR mov Figur 4: Trs T1 n T2 r on irruil 2-ECR mov wy, n trs T1 n T3 r on ruil 2-ECR mov wy. ffl X = X k ffi X k 1 ffi :::ffi X 1, with X i ing n irruil p i - ECR oprtion, n ffl k i=1 p i = p 6.1 Irruiility n Elmntry Biprtit Grphs W gin with finition: DEFINITION 2. Biprtition (or g) omptiility: A st of iprtitions B is si to omptil if n only if B C(T ) for som tr T. LEMMA 6.1. (FROM BUNEMAN [2]) A st of iprtitions is omptil iff ny two iprtitions in th st r r pirwis omptil. Furthrmor, two iprtitions A = A 1 : A 2 n B = B 1 : B 2 r omptil iff t lst on of th four sts A 1 B 1,A 1 B 2,A 2 B 1 n A 2 B 2 is mpty. Osrv tht thr n not mor thn 2n 3 gs in phylognti tr with n lvs, sin thr r no intrnl nos of gr two (through out th rst of th ppr w us n to not th numr of lvs). This givs us th following: COROLLARY 6.1. Th mximum rinlity of ny st of omptil iprtitions of st of n lmnts is 2n 3. W now fin grph, whih w ll th inomptiility grph, fin y two lf-ll trs. DEFINITION 3. Inomptiility Grph Lt T n T 0 two unroot lf-ll trs. Th inomptiility grph G twn T n T 0,G,isfin thus: G is iprtit grph, n G =(U;V;E) whr U = C(T ) C(T 0 ),V =C(T 0 ) C(T ) 2, n (u;v) 2 E if n only if u n v r inomptil. 2 Not tht th finition hr is lmost th sm s th finition of th inomptiility grph ppring in [19], whr U n V wr C(T ) n C(T 0 ) rsptivly. Our finition hs th fft of rmoving isolt vrtis from th inomptiility grph. An lmntry iprtit grph is on whr vry g is in som prft mthing [17]. Suppos T n T 0 r two trs suh tht δ p ECR (T;T 0 )=1, thn, w show tht th p- ECR mov tht sprts thm is irruil if n only if th inomptiility grph inu y th two trs is lmntry. W strt with th following lmm. LEMMA 6.2. Lt G th inomptiility grph twn two unroot inry lf-ll trs. Thn G hs prft mthing. Proof. W will show tht th inomptiility grph G stisfis th following two proprtis: (1) For vry sust S of V, jγ(s)j jsj, n (2) For vry sust R of U, jγ(r)j jrj. Our rsult will thn follow from Hll s mthing thorm [10]. Lt q = jc(t ) C(T 0 )j = jc(t 0 ) C(T )j. W first show tht (1) hols. Lt S sust of V. Not thn tht th st of iprtitions A =(U Γ(S)) [ S [ (C(T ) C(T 0 )) is omptil. Now if jγ(s)j < jsj, thn th st A ontins mor thn 2n 3 iprtitions tht r pirwis omptil, sin j(u Γ(S)) [ Sj > q n jc(t ) C(T 0 )j = 2n 3 q. But this is ontrition y Corollry 6.1. Similrly, w n show tht (2) hols. THEOREM 6.1. Lt X p-ecr mov tht n rri out on n unroot lf-ll inry tr T. Lt T 0 th rsult of rrying out X on T. Lt G =(U;V; E) th inomptiility grph twn T n T 0. Thn, X is ruil if n only if thr is propr sust S of V suh tht jγ(s)j = jsj. Proof. Suppos tht X is ruil n is quivlnt to X 2 ffi X 1. Thn th st of iprtitions S tht rsults from th rfinmnt phs of X 1 stisfis th onition tht jγ(s)j = jsj. If not thr is t lst on iprtition in S tht is inomptil with iprtition in U Γ(S). But this mks rrying out X 1 on T impossil, n hn jsj = Γ(S).

8 Convrsly, if thr is st S ρ V tht stisfis jsj = jγ(s)j, thn th ontrtion of th iprtitions in Γ(S) n th rtion of iprtitions in S n shul for th othr ontrtions n rfinmnts in X, ntht mks X ruil. COROLLARY 6.2. A p-ecr mov is irruil if n only if th orrsponing inomptiility grph is lmntry. Using th ov hrtriztion, w now show tht w n hk ffiintly if p-ecr mov is irruil. It lso mns tht w n omput, for ny givn p-ecr mov, n quivlnt squn of irruil ECR oprtions. THEOREM 6.2. Lt X p-ecr mov tht n prform on n unroot inry lf-ll tr on n lvs. Thn, in O(n + p 2 ) tim, w n trmin if X is ruil, n w n omput squn of ECR movs X 1 through X k (for som k), with h X i ing n irruil p i -ECR mov for 1» i» k, suh tht X = X k ffi :::ffi X 1 n k i=1 p i = p. Proof. Lt G =(U;V; E) th inomptiility grph orrsponing to th p-ecr mov X. Th grph G n onstrut in O(n + p 2 ) tim s follows: Th sts U n V n omput in O(n) tim, whil lulting th RF istn twn T n T 0 [5]. On U n V hv n trmin, E n lult in O(n + p 2 ) tim, sin for h iprtition in U, w n intify ll iprtitions in V inomptil with it in O(p) tim. On w hv G, w us th mtho in [17] (Stion 4.3) to ompos G into mximl vrtx-isjoint omponnts suh tht th sugrph of G inu y h omponnt is lmntry, s follows: w omput prft mthing M in G (whih is gurnt to xist y Lmm 6.2) n thn omput n ssoit irt grph, sy H. Th grph H is omput from G y first orinting ll th gs uniformly towrs ithr U or V, n thn intifying th vrtis mth y M. Th irt grph H is strongly onnt if n only if G is lmntry. This is u to th following rson: h g of G not in M is in som prft mthing if n only if th orrsponing irt g in H is in irt yl. Hn, G is lmntry if n only if vry g not in M is lso in prft mthing, finition. Evry g in H is in yl if n only if H is strongly onnt. This provs our lim. If G is not lmntry, thn H n ompos into strongly onnt omponnts, sy C 1 through C k, with omponnt C i rprsnting n lmntry sugrph of G inu y th sts of vrtis (S i ;T i ), with S i ρ U n T i ρ V. Without loss of gnrlity, lt C 1 ;C 2 ;:::;C k th topologilly sort orr of th strongly onnt omponnts. Thn, this rprsnts n orring of th orrsponing lmntry sugrphs of G, s follows: if (u;v) 2 E suh tht u 2 S i n v 2 T j,thni» j (ssuming without loss of gnrlity tht ll gs wr orint towrs V whil rting H from G). Hn, if w lt th inu sugrph (S i ;T i ) stn for th i th ECR oprtion X i, it is ssur tht X i n prform on oprtions X 1 through X i 1 hv n prform. This is us th inomptiilitis of th iprtitions rt y X i (i., thos in T i ) r with iprtitions in omponnts S j with j < i, n ths iprtitions woul hv n limint y th ECR movs from X 1 through X i 1. Th outom of th squn of oprtions X 1 through X k is X. 6.2 Commutl p-ecr movs DEFINITION 4. A p-ecr oprtion X is sprl if n only if thr r two ECR movs X 1 n X 2 suh tht X = X 2 ffi X 1 = X 1 ffi X 2. Th ECR movs X 1 n X 2 r thn si to ommutl. Suppos for n ECR mov X, th orrsponing inomptiility grph is not onnt. Tht X is ruil is immit. Howvr, in th following lmm (proof omitt) w osrv tht X is in ft sprl. LEMMA 6.3. Lt X n ECR mov xutl on n unroot lf-ll inry tr. Th inomptiility grph inu y X is not onnt if n only if X is sprl. W now prsnt nssry n suffiint onition for sprility of X tht n vrifi without omputing th inomptiility grph. COROLLARY 6.3. Lt X p-ecr mov tht n rri out on n unroot lf-ll tr T. Lt T 0 th rsult of rrying out X on T. Thn X is sprl if n only if th gs orrsponing to th iprtitions in C(T ) C(T 0 ) o not form onnt sutr. Proof. Lt U = C(T ) C(T 0 ) n V = C(T 0 ) C(T ). Lt susts S 1 n S 2 prtition U, suh tht th gs in S 1 n S 2 form vrtx-isjoint omponnts in T.LtT 1 n T 2 form th orrsponing prtition of V.NowltG =(U;V;E) th inomptiility grph twn T n T 0.InG, it n sn tht thr n not ny gs twn ithr S 1 n T 2 or S 2 n T 1. To prov th othr irtion, w prov th following: lt u 1 ;u 2 two iprtitions in U, orrsponing to two gs 1 n 2 jnt in T.Ltv 1 n v 2 two iprtitions in V suh tht, ffl (u 1 ;v 1 ) 2 E, ffl (u 2 ;v 2 ) 2 E,

9 ffl (u 1 ;v 2 ) 62 E,n ffl (u 2 ;v 1 ) 62 E. W show tht u 1, u 2, v 1 n v 2 n rh from on nothr in G. This woul imply tht if th gs in U form singl sutr in T, thng is onnt. W now prov th ov lim. Lt u 1 th iprtition P : P 0 n lt u 2 P [Y : P 0 Y, forsomy ρ P 0 (this ntils no loss of gnrlity sin u 1 n u 2 r omptil). Similrly, lt v 1 n v 2 Q : Q 0 n Q [ Z : Q 0 Z rsptivly, for som Z ρ Q 0. Sin u 1 n v 2 r inomptil, w hv P (Q 0 Z) =/0 (it n vrifi tht th othr thr pirwis intrstion nnot mpty) from Lmm 6.1. Similrly, w hv Q (P 0 Y )=/0. Now, sin th tr T is inry, n th gs 1 n 2 r jnt, w hv tht Y : Y 0 (whr Y 0 is th omplmnt of Y ) is iprtition in T, n th orrsponing g is jnt to oth 1 n 2. W show tht Y : Y 0 is inomptil with oth v 1 n v 2, thus showing tht u 1 ; u 2 ; v 1 ; v 2 r rhl from h othr. Now, Q (P 0 Y )=/0 n Q P 0 6= /0 implis tht Q P 0 Y. Now, w show tht Y 6 Q P 0. Suppos, to th ontrry, tht Y Q P 0. Thn, Y Q. This, omin with th ft tht (Q 0 Z) P, mns tht (Q 0 Z) (P 0 Y ). Howvr, this ontrits (Q 0 Z) (P [Y ) 6= /0, n hn Y 6 Q P 0. Thus, w hv (Q P 0 ) ρ Y. W now show tht Y : Y 0 is inomptil with oth v 1 n v 2, thus omplting our proof. 1. Y Q 6= /0, sin s w lry sw, Q P 0 ρ Y.Also, Y 6 Q. Hn, Y Q 0 6= /0. Morovr, Q 6 Y (sin Q 6 P 0 ), n hn Q Y 0 6= /0. Similrly, Q 0 Y 0 6= /0. Thus, w hv tht Y : Y 0 is inomptil with v Y (Q [ Z) 6= /0, siny Q 6= /0. Now, sin (Q 0 Z) P = /0 n (Q 0 Z) (P [ Y ) 6= /0, whvy (Q 0 Z) 6= /0. This mns tht Y 0 (Q [ Z) 6= /0 n Y 0 (Q 0 Z) 6= /0 s wll. Thus, w hv tht Y : Y 0 is inomptil with v 2. This omplts our proof. Corollry 6.3 n gnrliz s follows: COROLLARY 6.4. Lt T n unroot lf-ll tr. Lt X p-ecr oprtion on T tht woul rsult in tr T 0. Suppos th gs orrsponing to iprtitions in C(T ) C(T 0 ) onstitut forst with k trs. Thr xist k ECR oprtions X 1,X 2,...X k suh tht X = X k ffi X k 1 ffi :::ffi X Existn of Irruil p-ecr movs In this stion w stlish tht on n onstrut n irruil p-ecr mov for vry st of p onnt gs in ny tr. Our onstrution rlis on th onpt of n g-miniml lmntry iprtit grph, i.., n lmntry iprtit grph in whih th rmovl of ny singl g mks th grph non-lmntry. THEOREM 6.3. Lt T ny unroot inry tr with t lst p intrnl gs. Thn thr is tr T 0 suh tht RF(T;T 0 )=2p, n th inomptiility grph twn T n T 0 is lmntry. Proof. Th proof is y xpliit onstrution. Givn ny T,w show how to onstrut suh T 0. W will ll pir of lvs tht r silings s forming hrry. LtT hv k hrris, (x 1 ;y 1 );:::;(x k ;y k ). W rt T 0 thus: T 0 is intil to T s fr s tr topology (nglting lf-lls) is onrn. Hn, T 0 lso ontins k hrris. In T 0 w lt (x 1 ;y k ); (x 2 ;y 1 ); (x 3 ;y 2 );:::;(x k ;y k 1 ) th hrris. For n illustrtion of this onstrution, s Figur 5. W lim tht T n T 0 r sprt y on irruil p-ecr mov. W will prov this y showing tht th inomptiility grph of T n T 0 is lmntry. W omit til proof n just prsnt n outlin hr. Lt G =(U;V;E) th inomptiility grph whr U = C(T ) C(T 0 ) n V = C(T ) C(T 0 ). Thn, 1. It n shown tht juj = jv j = p. 2. Osrv tht our trnsformtion just prmuts th lvs. For h iprtition π in U thr is uniqu iprtition π 0 in V tht is otin y just prmuting th lvs in π oring to our trnsformtion. Thn, π is inomptil with π Thr is prmuttion of th vrtis in U, π 1 ; π 2 ;:::;π p, suh tht π 1 ; π 0 1 ; π 2; π 0 2 ; :::;π p; π 0 p ; π 1 is (Hmiltonin) yl in G. S Figur 5 for n xmpl on how to otin this prmuttion. ThprsnofHmiltoninylinG implis tht G is lmntry, sin th yl y itslf is minimlly lmntry iprtit grph on U n V. This omplts our proof. Aknowlgmnt. W thnk th rfr for pointing us to rfrn [22]. Proof. By rpt pplition of Corollry 6.3. Rfrns

10 1 h g f g f U V T h T 5 5 Figur 5: Trs T n T 0 r sprt y on irruil 5-ECR mov. A minimlly lmntry sugrph ( Hmiltonin yl) of th inomptiility grph of T n T 0 is shown longsi. Othr gs in th grph hv n omitt for th sk of lrity. [1] B. Alln n M. Stl. Sutr Trnsfr Oprtions n Thir Inu mtris on Evolutionry Trs. Annls of Comintoris, 5:1 15, [2] P. Bunmn. Th Rovry of Trs from Msurs of Dissimilrity. Mthmtis in th Arhlogil n Historil Sins, pgs , [3] Krol Culik-II n Drik Woo. A not on Som Tr Similrity Msurs. Informtion Prossing Lttrs, 15:39 42, [4] B. Dsgupt, X. H, T. Jing, M. Li, J. Tromp, n L. Zhng. On th Distns Btwn Phylognti Trs. In Proings of th 8th Annul ACM-SIAM Symposium on Disrt Algorithms, pgs ACM-SIAM, [5] W. H. E. Dy. Optiml Algorithms for Compring Trs with Ll Lvs. Journl of Clssifition, 2:7 28, [6] J. Flsnstin. Evolutionry Trs for DNA Squns: A Mximum Liklihoo Approh. Journl of Molulr Evolution, 17: , [7] W. Fith. Towr Dfining Cours of Evolution: Minimum Chng for Spifi Tr Topology. Systmti Zoology, 20: , [8] G. Gnpthy, V. Rmhnrn, n T. Wrnow. Bttr Hill-Climing Shs for Prsimony. In Proings of th Thir Intrntionl Workshop on Algorithms in Bioinformtis (WABI), To ppr. [9] P. A. Golooff. Anlyzing Lrg Dtsts in Rsonl Tims: Solutions for Composit Optim. Clistis, 15: , [10] P. Hll. On Rprsnttivs of Susts. Journl of th Lonon Mthmtil Soity, 10:26 30, [11] J. Hin, T. Jing, L. Wng, n K. Zhng. On th Complxity of Compring Evolutionry trs. Disrt Appli Mthmtis, 71: , [12] J. P. Hulsnk n F. Ronquist. MRBAYES: Bysin Infrn of Phylognti Trs. Bioinformtis, 17(8): , [13] J. P. Hulsnk, F. Ronquist, R. Nilsn, n J. P. Bollk. Bysin Infrn of Phylogny n its Impt on Evolutionry Biology. Sin, 294: , [14] B. Kirkup n J. Kim. From Rolling Hills to Jgg Mountins: Sling of Huristi Srhs For Phylognti Estimtion. Molulr Biology n Evolution, In Rvision. [15] B. Lrgt n D.L.Simon. Mrkov Chin Mont Crlo Algorithms for th Bysin Anlysis of Phylognti Trs. Molulr Biology n Evolution, 16: , [16] M. Li, J. Tromp, n L. Zhng. On th Nrst Nighour Intrhng Distn Btwn Evolutionry Trs. Journl of Thortil Biology, 182: , [17] L. Lovsz n M. D. Plummr. Mthing Thory. North- Holln Pulishing Compny, [18] D. R. Mison. Th Disovry n Importn of Multipl Islns of Most Prsimonious Trs. Systmti Zoology, 43(3): , [19] C. A. Phillips n T. Wrnow. Th Asymmtri Min Tr: A Nw Mol for Builing Consnsus Trs. Disrt Appli Mthmtis, 71: , [20] D. F. Roinson. Comprison of Ll Trs with Vlny Thr. Journl of Comintoril Thory, 11: , [21] D. F. Roinson n L. R. Fouls. Comprison of Phylognti Trs. Mthmtil Bio-sins, 53: , [22] D. Snkoff, Y. Al, n J. Hin. A Tr, A Winow, A Hill, Gnrliztion of Nrst Nighor Intrhng in Phylognti Optimiztion. Journl of Clssifition, 11: , [23] D. Swoffor, G. J. Olson, P. J. Wll, n D. M. Hillis. Molulr Systmtis, hptr Phylognti Infrn, pgs Sinur Assoits, Sunrln, Msshustts, son ition, 1996.

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2 Grt Thortil Is In Computr Sin Vitor Amhik CS 15-251 Ltur 9 Grphs - II Crngi Mllon Univrsity Grph Isomorphism finition. Two simpl grphs G n H r isomorphi G H if thr is vrtx ijtion V H ->V G tht prsrvs jny

More information

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph Intrntionl J.Mth. Comin. Vol.1(2014), 80-86 Algorithmi n NP-Compltnss Aspts of Totl Lit Domintion Numr of Grph Girish.V.R. (PES Institut of Thnology(South Cmpus), Bnglor, Krntk Stt, Ini) P.Ush (Dprtmnt

More information

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1. Why th Juntion Tr lgorithm? Th Juntion Tr lgorithm hris Willims 1 Shool of Informtis, Univrsity of Einurgh Otor 2009 Th JT is gnrl-purpos lgorithm for omputing (onitionl) mrginls on grphs. It os this y

More information

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

CSC Design and Analysis of Algorithms. Example: Change-Making Problem CSC 801- Dsign n Anlysis of Algorithms Ltur 11 Gry Thniqu Exmpl: Chng-Mking Prolm Givn unlimit mounts of oins of nomintions 1 > > m, giv hng for mount n with th lst numr of oins Exmpl: 1 = 25, 2 =10, =

More information

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura Moul grph.py CS 231 Nomi Nishimur 1 Introution Just lik th Python list n th Python itionry provi wys of storing, ssing, n moifying t, grph n viw s wy of storing, ssing, n moifying t. Bus Python os not

More information

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes. Nm: UCA ID Numr: Stion lttr: th 61 : Disrt Struturs Finl Exm Instrutor: Ciprin nolsu You hv 180 minuts. No ooks, nots or lultors r llow. Do not us your own srth ppr. 1. (2 points h) Tru/Fls: Cirl th right

More information

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013 CS Avn Dt Struturs n Algorithms Exm Solution Jon Turnr //. ( points) Suppos you r givn grph G=(V,E) with g wights w() n minimum spnning tr T o G. Now, suppos nw g {u,v} is to G. Dsri (in wors) mtho or

More information

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs. Pths.. Eulr n Hmilton Pths.. Pth D. A pth rom s to t is squn o gs {x 0, x 1 }, {x 1, x 2 },... {x n 1, x n }, whr x 0 = s, n x n = t. D. Th lngth o pth is th numr o gs in it. {, } {, } {, } {, } {, } {,

More information

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V Unirt Grphs An unirt grph G = (V, E) V st o vrtis E st o unorr gs (v,w) whr v, w in V USE: to mol symmtri rltionships twn ntitis vrtis v n w r jnt i thr is n g (v,w) [or (w,v)] th g (v,w) is inint upon

More information

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari Grphs CSC 1300 Disrt Struturs Villnov Univrsity Grphs Grphs r isrt struturs onsis?ng of vr?s n gs tht onnt ths vr?s. Grphs n us to mol: omputr systms/ntworks mthm?l rl?ons logi iruit lyout jos/prosss f

More information

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem) 12/3/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 Ciruits Cyl 2 Eulr

More information

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs Prt 10. Grphs CS 200 Algorithms n Dt Struturs 1 Introution Trminology Implmnting Grphs Outlin Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 2 Ciruits Cyl A spil yl

More information

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS OMPLXITY O OUNTING PLNR TILINGS Y TWO RS KYL MYR strt. W show tht th prolm o trmining th numr o wys o tiling plnr igur with horizontl n vrtil r is #P-omplt. W uil o o th rsults o uquir, Nivt, Rmil, n Roson

More information

Garnir Polynomial and their Properties

Garnir Polynomial and their Properties Univrsity of Cliforni, Dvis Dprtmnt of Mthmtis Grnir Polynomil n thir Proprtis Author: Yu Wng Suprvisor: Prof. Gorsky Eugny My 8, 07 Grnir Polynomil n thir Proprtis Yu Wng mil: uywng@uvis.u. In this ppr,

More information

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018 CSE 373: Mor on grphs; DFS n BFS Mihl L Wnsy, F 14, 2018 1 Wrmup Wrmup: Disuss with your nighor: Rmin your nighor: wht is simpl grph? Suppos w hv simpl, irt grph with x nos. Wht is th mximum numr of gs

More information

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Similarity Search. The Binary Branch Distance. Nikolaus Augsten. Similrity Srh Th Binry Brnh Distn Nikolus Augstn nikolus.ugstn@sg..t Dpt. of Computr Sins Univrsity of Slzurg http://rsrh.uni-slzurg.t Vrsion Jnury 11, 2017 Wintrsmstr 2016/2017 Augstn (Univ. Slzurg) Similrity

More information

0.1. Exercise 1: the distances between four points in a graph

0.1. Exercise 1: the distances between four points in a graph Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 pg 1 Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 u: W, 3 My 2017, in lss or y mil (grinr@umn.u) or lss S th wsit or rlvnt mtril. Rsults provn in th nots, or in

More information

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1 CSC 00 Disrt Struturs : Introuon to Grph Thory Grphs Grphs CSC 00 Disrt Struturs Villnov Univrsity Grphs r isrt struturs onsisng o vrs n gs tht onnt ths vrs. Grphs n us to mol: omputr systms/ntworks mthml

More information

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s? MATH 3012 Finl Exm, My 4, 2006, WTT Stunt Nm n ID Numr 1. All our prts o this prolm r onrn with trnry strings o lngth n, i.., wors o lngth n with lttrs rom th lpht {0, 1, 2}.. How mny trnry wors o lngth

More information

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem) 4/25/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 2 Eulr s rig prolm

More information

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008 Th Univrsity o Syny MATH2969/2069 Grph Thory Tutoril 5 (Wk 12) Solutions 2008 1. (i) Lt G th isonnt plnr grph shown. Drw its ul G, n th ul o th ul (G ). (ii) Show tht i G is isonnt plnr grph, thn G is

More information

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)} Introution Computr Sin & Enginring 423/823 Dsign n Anlysis of Algorithms Ltur 03 Elmntry Grph Algorithms (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) I Grphs r strt t typs tht r pplil to numrous

More information

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp CSE 373 Grphs 1: Conpts, Dpth/Brth-First Srh ring: Wiss Ch. 9 slis rt y Mrty Stpp http://www.s.wshington.u/373/ Univrsity o Wshington, ll rights rsrv. 1 Wht is grph? 56 Tokyo Sttl Soul 128 16 30 181 140

More information

Constructive Geometric Constraint Solving

Constructive Geometric Constraint Solving Construtiv Gomtri Constrint Solving Antoni Soto i Rir Dprtmnt Llngutgs i Sistms Inormàtis Univrsitt Politèni Ctluny Brlon, Sptmr 2002 CGCS p.1/37 Prliminris CGCS p.2/37 Gomtri onstrint prolm C 2 D L BC

More information

arxiv: v1 [cs.ds] 20 Feb 2008

arxiv: v1 [cs.ds] 20 Feb 2008 Symposium on Thortil Aspts of Computr Sin 2008 (Borux), pp. 361-372 www.sts-onf.org rxiv:0802.2867v1 [s.ds] 20 F 2008 FIXED PARAMETER POLYNOMIAL TIME ALGORITHMS FOR MAXIMUM AGREEMENT AND COMPATIBLE SUPERTREES

More information

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management nrl tr T is init st o on or mor nos suh tht thr is on sint no r, ll th root o T, n th rminin nos r prtition into n isjoint susts T, T,, T n, h o whih is tr, n whos roots r, r,, r n, rsptivly, r hilrn o

More information

Present state Next state Q + M N

Present state Next state Q + M N Qustion 1. An M-N lip-lop works s ollows: I MN=00, th nxt stt o th lip lop is 0. I MN=01, th nxt stt o th lip-lop is th sm s th prsnt stt I MN=10, th nxt stt o th lip-lop is th omplmnt o th prsnt stt I

More information

Planar Upward Drawings

Planar Upward Drawings C.S. 252 Pro. Rorto Tmssi Computtionl Gomtry Sm. II, 1992 1993 Dt: My 3, 1993 Sri: Shmsi Moussvi Plnr Upwr Drwings 1 Thorm: G is yli i n only i it hs upwr rwing. Proo: 1. An upwr rwing is yli. Follow th

More information

Section 10.4 Connectivity (up to paths and isomorphism, not including)

Section 10.4 Connectivity (up to paths and isomorphism, not including) Toy w will isuss two stions: Stion 10.3 Rprsnting Grphs n Grph Isomorphism Stion 10.4 Conntivity (up to pths n isomorphism, not inluing) 1 10.3 Rprsnting Grphs n Grph Isomorphism Whn w r working on n lgorithm

More information

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim's Alorithm Introution Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #33 3 Alorithm Gnrl Constrution Mik Joson (Univrsity o Clry)

More information

12. Traffic engineering

12. Traffic engineering lt2.ppt S-38. Introution to Tltrffi Thory Spring 200 2 Topology Pths A tlommunition ntwork onsists of nos n links Lt N not th st of nos in with n Lt J not th st of nos in with j N = {,,,,} J = {,2,3,,2}

More information

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review rmup CSE 7: AVL trs rmup: ht is n invrint? Mihl L Friy, Jn 9, 0 ht r th AVL tr invrints, xtly? Disuss with your nighor. AVL Trs: Invrints Intrlu: Exploring th ln invrint Cor i: xtr invrint to BSTs tht

More information

Trees as operads. Lecture A formalism of trees

Trees as operads. Lecture A formalism of trees Ltur 2 rs s oprs In this ltur, w introu onvnint tgoris o trs tht will us or th inition o nroil sts. hs tgoris r gnrliztions o th simpliil tgory us to in simpliil sts. First w onsir th s o plnr trs n thn

More information

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12 Aministrivi: CS61B Ltur #33 Autogrr will run this vning. Toy s Rings: Grph Struturs: DSIJ, Chptr 12 Lst moifi: W Nov 8 00:39:28 2017 CS61B: Ltur #33 1 Why Grphs? For xprssing non-hirrhilly rlt itms Exmpls:

More information

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)} s s of s Computr Sin & Enginring 423/823 Dsign n Anlysis of Ltur 03 (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) s of s s r strt t typs tht r pplil to numrous prolms Cn ptur ntitis, rltionships twn

More information

CS 461, Lecture 17. Today s Outline. Example Run

CS 461, Lecture 17. Today s Outline. Example Run Prim s Algorithm CS 461, Ltur 17 Jr Si Univrsity o Nw Mxio In Prim s lgorithm, th st A mintin y th lgorithm orms singl tr. Th tr strts rom n ritrry root vrtx n grows until it spns ll th vrtis in V At h

More information

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality: CS2: Grphs Prihr Ch. 4 Rosn Ch. Grphs A olltion of nos n gs Wht n this rprsnt? n A omputr ntwork n Astrtion of mp n Soil ntwork CS2 - Hsh Tls 2 Dirt Grphs Grphs/Ntworks Aroun Us A olltion of nos n irt

More information

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1 Solutions for HW Exris. () Us th rurrn rltion t(g) = t(g ) + t(g/) to ount th numr of spnning trs of v v v u u u Rmmr to kp multipl gs!! First rrw G so tht non of th gs ross: v u v Rursing on = (v, u ):

More information

IEEE TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. TK, NO. TK, MONTHTK YEARTK 1. Hamiltonian Walks of Phylogenetic Treespaces

IEEE TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. TK, NO. TK, MONTHTK YEARTK 1. Hamiltonian Walks of Phylogenetic Treespaces IEEE TRNSTIONS ON OMPUTTIONL IOLOGY ND IOINFORMTIS, VOL. TK, NO. TK, MONTHTK YERTK Hmiltonin Wlks of Phylognti Trsps Kvughn Goron, Eri For, n Kthrin St. John strt W nswr rynt s omintoril hllng on miniml

More information

COMP108 Algorithmic Foundations

COMP108 Algorithmic Foundations Grdy mthods Prudn Wong http://www.s.liv..uk/~pwong/thing/omp108/01617 Coin Chng Prolm Suppos w hv 3 typs of oins 10p 0p 50p Minimum numr of oins to mk 0.8, 1.0, 1.? Grdy mthod Lrning outoms Undrstnd wht

More information

Computational Biology, Phylogenetic Trees. Consensus methods

Computational Biology, Phylogenetic Trees. Consensus methods Computtionl Biology, Phylognti Trs Consnsus mthos Asgr Bruun & Bo Simonsn Th 16th of Jnury 2008 Dprtmnt of Computr Sin Th univrsity of Copnhgn 0 Motivtion Givn olltion of Trs Τ = { T 0,..., T n } W wnt

More information

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely . DETERMINANT.. Dtrminnt. Introution:I you think row vtor o mtrix s oorint o vtors in sp, thn th gomtri mning o th rnk o th mtrix is th imnsion o th prlllppi spnn y thm. But w r not only r out th imnsion,

More information

1 Introduction to Modulo 7 Arithmetic

1 Introduction to Modulo 7 Arithmetic 1 Introution to Moulo 7 Arithmti Bor w try our hn t solvin som hr Moulr KnKns, lt s tk los look t on moulr rithmti, mo 7 rithmti. You ll s in this sminr tht rithmti moulo prim is quit irnt rom th ons w

More information

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths Dt Strutur LECTURE Shortt pth lgorithm Proprti of hortt pth Bllmn-For lgorithm Dijktr lgorithm Chptr in th txtook (pp ). Wight grph -- rminr A wight grph i grph in whih g hv wight (ot) w(v i, v j ) >.

More information

1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers.

1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers. Mth 0 Exm - Prti Prolm Solutions. Dtrmin whthr or not th ollowing inry rltions r quivln rltions. B sur to justiy your nswrs. () {(0,0),(0,),(0,),(,),(,),(,),(,),(,0),(,),(,),(,0),(,),(.)} on th st A =

More information

BMC Bioinformatics. Open Access. Abstract

BMC Bioinformatics. Open Access. Abstract BMC Bioinformtis BioM Cntrl Rsrh A topologil trnsformtion in volutionry tr srh mthos s on mximum liklihoo omining p-ecr n nighor joining Mo-Zu Guo, Jin-Fu Li* n Yng Liu Opn Ass Arss: Dprtmnt of Computr

More information

Discovering Pairwise Compatibility Graphs

Discovering Pairwise Compatibility Graphs Disovring Pirwis Comptiility Grphs Muhmm Nur Ynhon, M. Shmsuzzoh Byzi, n M. Siur Rhmn Dprtmnt of Computr Sin n Enginring Bnglsh Univrsity of Enginring n Thnology nur.ynhon@gmil.om, shms.yzi@gmil.om, siurrhmn@s.ut..

More information

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths. How os it work? Pl vlu o imls rprsnt prts o whol numr or ojt # 0 000 Tns o thousns # 000 # 00 Thousns Hunrs Tns Ons # 0 Diml point st iml pl: ' 0 # 0 on tnth n iml pl: ' 0 # 00 on hunrth r iml pl: ' 0

More information

CS 241 Analysis of Algorithms

CS 241 Analysis of Algorithms CS 241 Anlysis o Algorithms Prossor Eri Aron Ltur T Th 9:00m Ltur Mting Lotion: OLB 205 Businss HW6 u lry HW7 out tr Thnksgiving Ring: Ch. 22.1-22.3 1 Grphs (S S. B.4) Grphs ommonly rprsnt onntions mong

More information

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012 Rgistr Allotion W now r l to o rgistr llotion on our intrfrn grph. W wnt to l with two typs of onstrints: 1. Two vlus r liv t ovrlpping points (intrfrn grph) 2. A vlu must or must not in prtiulr rhitturl

More information

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology! Outlin Computr Sin 331, Spnnin, n Surphs Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #30 1 Introution 2 3 Dinition 4 Spnnin 5 6 Mik Joson (Univrsity o Clry) Computr Sin 331 Ltur #30 1 / 20 Mik

More information

Graph Contraction and Connectivity

Graph Contraction and Connectivity Chptr 17 Grph Contrtion n Conntivity So r w hv mostly ovr thniqus or solving prolms on grphs tht wr vlop in th ontxt o squntil lgorithms. Som o thm r sy to prllliz whil othrs r not. For xmpl, w sw tht

More information

QUESTIONS BEGIN HERE!

QUESTIONS BEGIN HERE! Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt of Computr n Informtion Sins CSCI 710 (Trnoff) Disrt Struturs TEST for Fll Smstr, 00 R this for strtin! This tst is los ook

More information

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim s Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #34 Introution Min-Cost Spnnin Trs 3 Gnrl Constrution 4 5 Trmintion n Eiiny 6 Aitionl

More information

EE1000 Project 4 Digital Volt Meter

EE1000 Project 4 Digital Volt Meter Ovrviw EE1000 Projt 4 Diitl Volt Mtr In this projt, w mk vi tht n msur volts in th rn o 0 to 4 Volts with on iit o ury. Th input is n nlo volt n th output is sinl 7-smnt iit tht tlls us wht tht input s

More information

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017 MAT3707/201/1/2017 Tutoril lttr 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS MAT3707 Smstr 1 Dprtmnt o Mtmtil Sins SOLUTIONS TO ASSIGNMENT 01 BARCODE Din tomorrow. univrsity o sout ri SOLUTIONS TO ASSIGNMENT

More information

Numbering Boundary Nodes

Numbering Boundary Nodes Numring Bounry Nos Lh MBri Empori Stt Univrsity August 10, 2001 1 Introution Th purpos of this ppr is to xplor how numring ltril rsistor ntworks ffts thir rspons mtrix, Λ. Morovr, wht n lrn from Λ out

More information

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk Grphs & Grph Algorithms Ltur CS Spring 6 Announmnts A6 rls toy: Risk Strt signing with your prtnr sp Prlim usy Not grphs hs r Grphs K 5 K, =...not th kin w mn, nywy Applitions o Grphs Communition ntworks

More information

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation A Simpl Co Gnrtor Co Gnrtion Chptr 8 II Gnrt o for singl si lok How to us rgistrs? In most mhin rhitturs, som or ll of th oprnsmust in rgistrs Rgistrs mk goo tmporris Hol vlus tht r omput in on si lok

More information

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata CSE303 - Introduction to th Thory of Computing Smpl Solutions for Exrciss on Finit Automt Exrcis 2.1.1 A dtrministic finit utomton M ccpts th mpty string (i.., L(M)) if nd only if its initil stt is finl

More information

Outline. Binary Tree

Outline. Binary Tree Outlin Similrity Srh Th Binry Brnh Distn Nikolus Austn nikolus.ustn@s..t Dpt. o Computr Sins Univrsity o Slzur http://rsrh.uni-slzur.t 1 Binry Brnh Distn Binry Rprsnttion o Tr Binry Brnhs Lowr Boun or

More information

Chapter 9. Graphs. 9.1 Graphs

Chapter 9. Graphs. 9.1 Graphs Chptr 9 Grphs Grphs r vry gnrl lss of ojt, us to formliz wi vrity of prtil prolms in omputr sin. In this hptr, w ll s th sis of (finit) unirt grphs, inluing grph isomorphism, onntivity, n grph oloring.

More information

Analysis for Balloon Modeling Structure based on Graph Theory

Analysis for Balloon Modeling Structure based on Graph Theory Anlysis for lloon Moling Strutur bs on Grph Thory Abstrt Mshiro Ur* Msshi Ym** Mmoru no** Shiny Miyzki** Tkmi Ysu* *Grut Shool of Informtion Sin, Ngoy Univrsity **Shool of Informtion Sin n Thnology, hukyo

More information

MULTIPLE-LEVEL LOGIC OPTIMIZATION II

MULTIPLE-LEVEL LOGIC OPTIMIZATION II MUTIPE-EVE OGIC OPTIMIZATION II Booln mthos Eploit Booln proprtis Giovnni D Mihli Don t r onitions Stnfor Univrsit Minimition of th lol funtions Slowr lgorithms, ttr qulit rsults Etrnl on t r onitions

More information

O n t h e e x t e n s i o n o f a p a r t i a l m e t r i c t o a t r e e m e t r i c

O n t h e e x t e n s i o n o f a p a r t i a l m e t r i c t o a t r e e m e t r i c O n t h x t n s i o n o f p r t i l m t r i t o t r m t r i Alin Guénoh, Bruno Llr 2, Vlimir Mkrnkov 3 Institut Mthémtiqus Luminy, 63 vnu Luminy, F-3009 MARSEILLE, FRANCE, gunoh@iml.univ-mrs.fr 2 Cntr

More information

Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players.

Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players. Stphn P. Borgtti Grph Thory A lthough grph thory is on o th youngr rnhs o mthmtis, it is unmntl to numr o ppli ils, inluing oprtions rsrh, omputr sin, n soil ntwork nlysis. In this hptr w isuss th si onpts

More information

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem Thorm 10-1: Th Hnshkin Thorm Lt G=(V,E) n unirt rph. Thn Prt 10. Grphs CS 200 Alorithms n Dt Struturs v V (v) = 2 E How mny s r thr in rph with 10 vrtis h of r six? 10 * 6 /2= 30 1 Thorm 10-2 An unirt

More information

QUESTIONS BEGIN HERE!

QUESTIONS BEGIN HERE! Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt o Computr n Inormtion Sins CSCI 2710 (Trno) Disrt Struturs TEST or Sprin Smstr, 2005 R this or strtin! This tst is los ook

More information

The Plan. Honey, I Shrunk the Data. Why Compress. Data Compression Concepts. Braille Example. Braille. x y xˆ

The Plan. Honey, I Shrunk the Data. Why Compress. Data Compression Concepts. Braille Example. Braille. x y xˆ h ln ony, hrunk th t ihr nr omputr in n nginring nivrsity of shington t omprssion onpts ossy t omprssion osslss t omprssion rfix os uffmn os th y 24 2 t omprssion onpts originl omprss o x y xˆ nor or omprss

More information

Lecture 7 Phylogenetic Analysis

Lecture 7 Phylogenetic Analysis Ltur 7 Phylognti Anlysis Aitionl Rfrn Molulr Evolution: A Phylognti Approh Rori D. M. Pg n Ewr C. Holms 1 Uss of Phylognti Anlysis Evolutionry trs Multipl squn lignmnt Evolutionry Prolms i) Th fossil ror

More information

Section 3: Antiderivatives of Formulas

Section 3: Antiderivatives of Formulas Chptr Th Intgrl Appli Clculus 96 Sction : Antirivtivs of Formuls Now w cn put th is of rs n ntirivtivs togthr to gt wy of vluting finit intgrls tht is ct n oftn sy. To vlut finit intgrl f(t) t, w cn fin

More information

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c Chptr 8 Minimum Spnning Trs In this hptr w ovr importnt grph prolm, Minimum Spnning Trs (MST). Th MST o n unirt, wight grph is tr tht spns th grph whil minimizing th totl wight o th gs in th tr. W irst

More information

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim MULTIPLE STITCHES Nrtiti Ehos o Rgl omponnts vok visions o th pst sign y Hln Tng-Lim Us vrity o stiths to rt this rgl yt wrl sign. Prt sping llows squr s to mk roun omponnts tht rp utiully. FCT-SC-030617-07

More information

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms rp loritms lrnin ojtivs loritms your sotwr systm sotwr rwr lrn wt rps r in mtmtil trms lrn ow to rprsnt rps in omputrs lrn out typil rp loritms wy rps? intuitivly, rp is orm y vrtis n s twn vrtis rps r

More information

RAM Model. I/O Model. Real Machine Example: Nehalem : Algorithms in the Real World 4/9/13

RAM Model. I/O Model. Real Machine Example: Nehalem : Algorithms in the Real World 4/9/13 4//3 RAM Mol 5-853: Algorithms in th Rl Worl Lolity I: Ch-wr lgorithms Introution Sorting List rnking B-trs Bur trs Stnr thortil mol or nlyzing lgorithms: Ininit mmory siz Uniorm ss ost Evlut n lgorithm

More information

Seven-Segment Display Driver

Seven-Segment Display Driver 7-Smnt Disply Drivr, Ron s in 7-Smnt Disply Drivr, Ron s in Prolm 62. 00 0 0 00 0000 000 00 000 0 000 00 0 00 00 0 0 0 000 00 0 00 BCD Diits in inry Dsin Drivr Loi 4 inputs, 7 outputs 7 mps, h with 6 on

More information

Quartets and unrooted level-k networks

Quartets and unrooted level-k networks Phylogntis Workshop, Is Nwton Institut or Mthmtil Sins Cmrig 21/06/2011 Qurtts n unroot lvl-k ntworks Philipp Gmtt Outlin Astrt n xpliit phylognti ntworks Lvl-k ntworks Unroot lvl-1 ntworks n irulr split

More information

(a) v 1. v a. v i. v s. (b)

(a) v 1. v a. v i. v s. (b) Outlin RETIMING Struturl optimiztion mthods. Gionni D Mihli Stnford Unirsity Rtiming. { Modling. { Rtiming for minimum dly. { Rtiming for minimum r. Synhronous Logi Ntwork Synhronous Logi Ntwork Synhronous

More information

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations Mr Funtins Grphs, Pruts, & Rltins Unirt Grphs An unirt grph is pir f 1. A st f ns 2. A st f gs (whr n g is st f tw ns*) Friy, Sptmr 2, 2011 Ring: Sipsr 0.2 ginning f 0.4; Stughtn 1.1.5 ({,,,,}, {{,}, {,},

More information

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS C 24 - COMBINATIONAL BUILDING BLOCKS - INVST 3 DCODS AND NCODS FALL 23 AP FLZ To o "wll" on this invstition you must not only t th riht nswrs ut must lso o nt, omplt n onis writups tht mk ovious wht h

More information

CS September 2018

CS September 2018 Loil los Distriut Systms 06. Loil los Assin squn numrs to msss All ooprtin prosss n r on orr o vnts vs. physil los: rport tim o y Assum no ntrl tim sour Eh systm mintins its own lol lo No totl orrin o

More information

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael. 0 Computr i Dsign or Eltroni Systms Ciruit Moling n si Grph Conptslgorithms Instrutor: Mri K. Mihl MKM - Ovrviw hviorl vs. Struturl mols Extrnl vs. Intrnl rprsnttions Funtionl moling t Logi lvl Struturl

More information

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata A 4-stt solution to th Firing Squ Synhroniztion Prolm s on hyri rul 60 n 102 llulr utomt LI Ning 1, LIANG Shi-li 1*, CUI Shung 1, XU Mi-ling 1, ZHANG Ling 2 (1. Dprtmnt o Physis, Northst Norml Univrsity,

More information

Page 1. Question 19.1b Electric Charge II Question 19.2a Conductors I. ConcepTest Clicker Questions Chapter 19. Physics, 4 th Edition James S.

Page 1. Question 19.1b Electric Charge II Question 19.2a Conductors I. ConcepTest Clicker Questions Chapter 19. Physics, 4 th Edition James S. ConTst Clikr ustions Chtr 19 Physis, 4 th Eition Jms S. Wlkr ustion 19.1 Two hrg blls r rlling h othr s thy hng from th iling. Wht n you sy bout thir hrgs? Eltri Chrg I on is ositiv, th othr is ngtiv both

More information

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski Dut with Dimons Brlt DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Lsli Roglski Photo y Anrw Wirth Supruo DUETS TM from BSmith rt olor shifting fft tht mks your work tk on lif of its own s you mov! This

More information

Problem solving by search

Problem solving by search Prolm solving y srh Tomáš voo Dprtmnt o Cyrntis, Vision or Roots n Autonomous ystms Mrh 5, 208 / 3 Outlin rh prolm. tt sp grphs. rh trs. trtgis, whih tr rnhs to hoos? trtgy/algorithm proprtis? Progrmming

More information

Research Article On the Genus of the Zero-Divisor Graph of Z n

Research Article On the Genus of the Zero-Divisor Graph of Z n Intrntionl Journl o Comintoris, Artil ID 7, pgs http://x.oi.org/.1/14/7 Rsrh Artil On th Gnus o th Zro-Divisor Grph o Z n Huong Su 1 n Piling Li 2 1 Shool o Mthmtil Sins, Gungxi Thrs Eution Univrsity,

More information

arxiv: v1 [math.mg] 5 Oct 2015

arxiv: v1 [math.mg] 5 Oct 2015 onvx pntgons tht mit i-lok trnsitiv tilings sy Mnn, Jnnifr MLou-Mnn, vi Von ru rxiv:1510.01186v1 [mth.mg] 5 Ot 2015 strt Univrsity of Wshington othll Univrsity of Wshington othll Univrsity of Wshington

More information

THE evolutionary history of a set of species is usually

THE evolutionary history of a set of species is usually COMPUTATION OF HYBRIDIZATION NETWORKS FOR REALISTIC PHYLOGENETIC TREES 1 Autumn Algorithm Computtion of Hyriiztion Ntworks for Rlisti Phylognti Trs Dnil H. Huson n Simon Linz Astrt A minimum hyriiztion

More information

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA. S i m p l i y i n g A l g r SIMPLIFYING ALGEBRA www.mthltis.o.nz Simpliying SIMPLIFYING Algr ALGEBRA Algr is mthmtis with mor thn just numrs. Numrs hv ix vlu, ut lgr introus vrils whos vlus n hng. Ths

More information

Can transitive orientation make sandwich problems easier?

Can transitive orientation make sandwich problems easier? Disrt Mthmtis 07 (007) 00 04 www.lsvir.om/lot/is Cn trnsitiv orinttion mk snwih prolms sir? Mihl Hi, Dvi Klly, Emmnull Lhr,, Christoph Pul,, CNRS, LIRMM, Univrsité Montpllir II, 6 ru A, 4 9 Montpllir C,

More information

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms Grphs & Grph Algorithms Ltur CS Fll 5 Announmnts Upoming tlk h Mny Crrs o Computr Sintist Or how Computr Sin gr mpowrs you to o muh mor thn o Dn Huttnlohr, Prossor in th Dprtmnt o Computr Sin n Johnson

More information

arxiv: v1 [math.co] 15 Dec 2015

arxiv: v1 [math.co] 15 Dec 2015 On th Plnr Split Thiknss of Grphs Dvi Eppstin, Philipp Kinrmnn, Stphn Koourov, Giuspp Liott, Ann Luiw, Au Mignn, Djyoti Monl, Hmih Vosoughpour, Su Whitsis 8, n Stphn Wismth 9 rxiv:.89v [mth.co] D Univrsity

More information

Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT

Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT Complt Solutions or MATH 012 Quiz 2, Otor 25, 2011, WTT Not. T nswrs ivn r r mor omplt tn is xpt on n tul xm. It is intn tt t mor omprnsiv solutions prsnt r will vlul to stunts in stuyin or t inl xm. In

More information

This chapter covers special properties of planar graphs.

This chapter covers special properties of planar graphs. Chptr 21 Plnr Grphs This hptr ovrs spil proprtis of plnr grphs. 21.1 Plnr grphs A plnr grph is grph whih n b rwn in th pln without ny gs rossing. Som piturs of plnr grph might hv rossing gs, but it s possibl

More information

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas SnNCutCnvs Using th Printl Stikr Funtion On-o--kin stikrs n sily rt y using your inkjt printr n th Dirt Cut untion o th SnNCut mhin. For inormtion on si oprtions o th SnNCutCnvs, rr to th Hlp. To viw th

More information

LEO VAN IERSEL TU DELFT

LEO VAN IERSEL TU DELFT LEO VAN IERSEL TU DELFT UT LEO VAN IERSEL TU DELFT UT LEO VAN IERSEL TU DELFT TU/ CWI UT LEO VAN IERSEL TU DELFT TU/ CWI UT TUD LEO VAN IERSEL TU DELFT TU/ Tnzni & Kny yr LEO VAN IERSEL TU DELFT Nw Zln.5

More information

Discovering Frequent Graph Patterns Using Disjoint Paths

Discovering Frequent Graph Patterns Using Disjoint Paths Disovring Frqunt Grph Pttrns Using Disjoint Pths E. Gus, S. E. Shimony, N. Vntik {hu,shimony,orlovn}@s.gu..il Dpt. of Computr Sin, Bn-Gurion Univrsity of th Ngv, Br-Shv, Isrl Astrt Whrs t-mining in strutur

More information

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal? NP-Compltnss 1. Polynomil tim lgorithm 2. Polynomil tim rution 3.P vs NP 4.NP-ompltnss (som slis y P.T. Um Univrsity o Txs t Dlls r us) Trvling Slsprson Prolm Fin minimum lngth tour tht visits h ity on

More information

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, * CmSc 365 Thory of Computtion Finit Stt Automt nd Rgulr Exprssions (Chptr 2, Sction 2.3) ALPHABET oprtions: U, conctntion, * otin otin Strings Form Rgulr xprssions dscri Closd undr U, conctntion nd * (if

More information