Survey and Taxonomy of IP Address Lookup Algorithms

Size: px
Start display at page:

Download "Survey and Taxonomy of IP Address Lookup Algorithms"

Transcription

1 Survy n Txonomy of IP Arss Lookup Algorithms Migul Á. Ruiz-Sánhz, INRIA Sophi Antipolis, Univrsi Autónom Mtropolitn Ernst W. Birsk, Institut Euréom Sophi Antipolis Wli Dbbous, INRIA Sophi Antipolis Abstrt Du to th rpi growth of trffi in th Intrnt, bkbon links of svrl gigbits pr son r ommonly ploy. To hnl gigbit-pr-son trffi rts, th bkbon routrs must b bl to forwr millions of pkts pr son on h of thir ports. Fst IP rss lookup in th routrs, whih uss th pkt s stintion rss to trmin for h pkt th nxt hop, is thrfor ruil to hiv th pkt forwring rts rquir. IP rss lookup is iffiult bus it rquirs longst mthing prfix srh. In th lst oupl of yrs, vrious lgorithms for high-prformn IP rss lookup hv bn propos. W prsnt survy of stt-of-th-rt IP rss lookup lgorithms n ompr thir prformn in trms of lookup sp, slbility, n upt ovrh. T h primry rol of routrs is to forwr pkts towr thir finl stintions. To this purpos, routr must i for h inoming pkt whr to sn it nxt. Mor xtly, th forwring ision onsists of fining th rss of th nxt-hop routr s wll s th grss port through whih th pkt shoul b snt. This forwring informtion is stor in forwring tbl tht th routr omputs bs on th informtion gthr by routing protools. To onsult th forwring tbl, th routr uss th pkt s stintion rss s ky; this oprtion is ll rss lookup. On th forwring informtion is rtriv, th routr n trnsfr th pkt from th inoming link to th pproprit outgoing link, in pross ll swithing. Th xponntil growth of th Intrnt hs strss its routing systm. Whil th t rts of links hv kpt p with th inrsing trffi, it hs bn iffiult for th pkt prossing pity of routrs to kp up with ths inrs t rts. Spifilly, th rss lookup oprtion is mjor bottlnk in th forwring prformn of toy s routrs. This rtil prsnts survy of th ltst lgorithms for ffiint IP rss lookup. W strt by tring th volution of th IP rssing rhittur. Th rssing rhittur is of funmntl importn to th routing rhittur, n rviwing it will hlp us to unrstn th rss lookup problm. Th Clssful Arssing Shm In IPv4, IP rsss r 32 bits long n, whn brokn up into 4 groups of 8 bits, r normlly rprsnt s four iml numbrs sprt by ots. For xmpl, th rss orrspons in ott-iml nottion to On of th funmntl objtivs of th Intrnt Protool is to intronnt ntworks, so routing on ntwork bsis ws nturl hoi (rthr thn routing on host bsis). Thus, th IP rss shm initilly us simpl two-lvl hirrhy, with ntworks t th top lvl n hosts t th bottom lvl. This hirrhy is rflt in th ft tht n IP rss onsists of two prts, ntwork prt n host prt. Th ntwork prt intifis th ntwork to whih host is tth, n thus ll hosts tth to th sm ntwork gr in th ntwork prt of thir IP rsss. Sin th ntwork prt orrspons to th first bits of th IP rss, it is ll th rss prfix. W will writ prfixs s bit strings of up to 32 bits in IPv4 follow by *. For xmpl, th prfix * rprsnts ll th 2 6 rsss tht bgin with th bit pttrn. Altrntivly, prfixs n b init using th ott-iml nottion, so th sm prfix n b writtn s 3.86/6, whr th numbr ftr th slsh inits th lngth of th prfix. With two-lvl hirrhy, IP routrs forwr pkts bs only on th ntwork prt, until pkts rh th stintion ntwork. As rsult, forwring tbl only n to stor singl ntry to forwr pkts to ll th hosts tth to th sm ntwork. This thniqu is ll rss ggrgtion n llows using prfixs to rprsnt group of rsss. Eh ntry in forwring tbl ontins prfix, s n b sn in Tbl. Thus, fining th forwring infor- Dstintion rss Nxt-hop Output intrf prfix / / / / / Tbl. A forwring tbl //$. 2 IEEE IEEE Ntwork Mrh/April 2

2 mtion rquirs srhing for th prfix in th forwring tbl tht mths th orrsponing bits of th stintion rss. Th rssing rhittur spifis how th llotion of rsss is prform; tht is, it fins how to prtition th totl IP rss sp of 2 32 rsss spifilly, how mny ntwork rsss will b llow n wht siz h of thm shoul b. Whn Intrnt rssing ws initilly sign, rthr simpl rss llotion shm ws fin, whih is known toy s th lssful rssing shm. Bsilly, thr iffrnt sizs of ntworks wr fin in this shm, intifi by lss nm: A, B, or C (Fig. ). Ntwork siz ws trmin by th numbr of bits us to rprsnt th ntwork n host prts. Thus, ntworks of lss A, B, or C onsist of n 8, 6, or 24-bit ntwork prt n orrsponing 24, 6, or 8-bit host prt. With this shm thr wr vry fw lss A ntworks, n thir rssing sp rprsnt 5 prnt of th totl IPv4 rss sp (2 3 rsss out of totl of 2 32 ). Thr wr 6,384 (2 4 ) lss B ntworks with mximum of 65,534 hosts/ntwork, n 2,97,52 (2 2 ) lss C ntworks with up to 256 hosts. This llotion shm work wll in th rly ys of th Intrnt. Howvr, th ontinuous growth of th numbr of hosts n ntworks hs m pprnt two problms with th lssful rssing rhittur. First, with only thr iffrnt ntwork sizs from whih to hoos, th rss sp ws not us ffiintly n th IP rss sp ws gtting xhust vry rpily, vn though only smll frtion of th rsss llot wr tully in us. Son, lthough th stt informtion stor in th forwring tbls i not grow in proportion to th numbr of hosts, it still grw in proportion to th numbr of ntworks. This ws spilly importnt in th bkbon routrs, whih must mintin n ntry in th forwring tbl for vry llot ntwork rss. As rsult, th forwring tbls in th bkbon routrs grw vry rpily. Th growth of th forwring tbls rsult in highr lookup tims n highr mmory rquirmnts in th routrs, n thrtn to impt thir forwring pity. Th CIDR Arssing Shm To llow mor ffiint us of th IP rss sp n to slow own th growth of th bkbon forwring tbls, nw shm ll lsslss intromin routing (CIDR) ws introu. Rmmbr tht in th lssful rss shm, only thr iffrnt prfix lngths r llow: 8, 6, n 24, orrsponing to lsss A, B n C, rsptivly (Fig. ). CIDR uss th IP rss sp mor ffiintly by llowing finr grnulrity in th prfix lngths. With CIDR, prfixs n b of rbitrry lngth rthr thn onstrining thm to b 8, 6, or 24 bits long. To rss th problm of forwring tbl xplosion, CIDR llows rss ggrgtion t svrl lvls. Th i is Figur 3. Prfix rngs / /24 Clss A Clss B Clss C Figur. Clssful rsss. 7 Ntwork 4 Ntwork 2 Ntwork Host tht th llotion of rsss hs topologil signifin. Thn w n rursivly ggrgt rsss t vrious points within th hirrhy of th Intrnt s topology. As rsult, bkbon routrs mintin forwring informtion not t th ntwork lvl, but t th lvl of rbitrry ggrgts of ntworks. Thus, rursiv rss ggrgtion rus th numbr of ntris in th forwring tbl of bkbon routrs. To unrstn how this works, onsir th ntworks rprsnt by th ntwork numbrs from /24 through /24 (Figs. 2 n 3). Suppos tht in routr ll ths ntwork rsss r rhbl through th sm srvi provir. From th binry rprsnttion w n s tht th lftmost 2 bits of ll th rsss in this rng r th sm ( ). Thus, w n ggrgt ths 6 ntworks into on suprntwork rprsnt by th 2-bit prfix, whih in iml nottion givs /2. Not tht initing th prfix lngth is nssry in 24 6 Host /24 * /24 * /24 * /2 * Figur 2. Prfix ggrgtion /24 Totl IPv4 rss sp 2 32 Host iml nottion, bus th sm vlu my b ssoit with prfixs of iffrnt lngths; for instn, /2 ( *) is iffrnt from /22 ( *). Whil grt l of ggrgtion n b hiv if rsss r r- 8 IEEE Ntwork Mrh/April 2 9

3 Figur 4. An xption prfix /24 fully ssign, in som situtions fw ntworks n intrfr with th pross of ggrgtion. For xmpl, suppos now tht ustomr owning th ntwork /24 hngs its srvi provir n os not wnt to rnumbr its ntwork. Now, ll th ntworks from /24 through /24 n b rh through th sm srvi provir, xpt for th ntwork /24 (Fig. 3). W nnot prform ggrgtion s bfor, n inst of only on ntry, 6 ntris n to b stor in th forwring tbl. On solution tht n b us in this sitution is ggrgting in spit of th xption ntworks n itionlly storing ntris for th xption ntworks. In our xmpl, this will rsult in only /2 Totl IPv4 rss sp 2 32 Numbr of ntris Figur 5. Tbl growth of typil bkbon routr. Numbr of ntris (log sl), 8, 6, 4, 2,,, Jn. 94 Tlstr routr 2 Dmbr, 2 2 Jn. 95 Tlstr routr 2 Dmbr, 2 Ths rsss mth both prfixs Jn. 96 Jn. 97 Jn. 98 Jn. 99 Jn. Jn Prfix lngth Figur 6. Prfix lngth istribution of typil bkbon routr. two ntris in th forwring tbl: /2 n /24 (Fig. 4 n Tbl ). Not, howvr, tht now som rsss will mth both ntris bus prfixs ovrlp. In orr to lwys mk th orrt forwring ision, routrs n to o mor thn to srh for prfix tht mths. Sin xptions in th ggrgtions my xist, routr must fin th most spifi mth, whih is th longst mthing prfix. In summry, th rss lookup problm in routrs rquirs srhing th forwring tbl for th longst prfix tht mths th stintion rss of pkt. Diffiulty of th Longst Mthing Prfix Srh In th lssful rssing rhittur, th lngth of th prfixs ws o in th most signifint bits of n IP rss (Fig. ), n th rss lookup ws rltivly simpl oprtion: in th forwring tbl wr orgniz in thr sprt tbls, on for h of th thr llow lngths. Th lookup oprtion mount to fining n xt prfix mth in th pproprit tbl. Th srh for n xt mth oul b prform using stnr lgorithms bs on hshing or binry srh. Whil CIDR llows th siz of th forwring tbls to b ru, th rss lookup problm now boms mor omplx. With CIDR, th stintion prfixs in th forwring tbls hv rbitrry lngths n no longr orrspon to th ntwork prt sin thy r th rsult of n rbitrry numbr of ntwork ggrgtions. Thrfor, whn using CIDR, th srh in forwring tbl n no longr b prform by xt mthing bus th lngth of th prfix nnot b riv from th rss itslf. As rsult, trmining th longst mthing prfix involvs not only ompring th bit pttrn itslf, but lso fining th pproprit lngth. Thrfor, w tlk bout srhing in two imnsions: vlu n lngth. Th srh mthos w will rviw try to ru th srh sp t h stp in both of ths imnsions. In wht follows w will us N to not th numbr of prfixs in forwring tbl n W to init th mximum lngth of prfixs, whih typilly is lso th lngth of th IP rsss. Rquirmnts on Arss Lookup Algorithms It is importnt to brifly rviw th hrtristis of toy s routing nvironmnt to riv qut rquirmnts n mtris for th rss lookup lgorithms w will survy. As w hv sn, using rss prfixs is simpl mtho to rprsnt groups of ontiguous rsss. Arss prfixs llow ggrgtion of forwring informtion n hn support th growth of th Intrnt. Figur 5 shows th growth of typil bkbon routr tbl. W n obsrv thr phss of tbl growth: bfor th introution of CIDR, growth ws xponntil (prtly visibl in rly 994). From mi-994 to mi-998, growth slow own n ws nrly linr. From mi-998 to now growth is gin xponntil. Sin th numbr of ntris in routr tbls is still growing, it is importnt tht srh mthos rstilly ru th srh sp t h stp. Algorithms must b slbl with rspt to th numbr of prfixs. Anothr hrtristi of th routing nvironmnt IEEE Ntwork Mrh/April 2

4 is tht forwring tbl ns to b upt ynmilly to rflt rout hngs. In ft, instbilitis in th bkbon routing protools n firly frquntly hng th ntris in forwring tbl. Lbovitz [] foun tht bkbon routrs my riv bursts of rout hngs t rts xing svrl hunr prfix upts pr son. H lso foun tht, on vrg, rout hngs our tims/s. Thus, upt oprtions must b prform in ms or lss. Th prfix lngth istribution in th forwring tbls n b us s mtri of th qulity of th Intrnt hirrhy n rss ggrgtion. Shortr prfixs rprsnt grtr gr of ggrgtion. Thus, rs in vrg prfix lngth woul init improv ggrgtion n hirrhy in th Intrnt. In Fig. 6 w n s tht th historil lss C with its 24-bit prfix lngth still omints th numbr of ntris in th forwring tbl (not tht th sl is logrithmi). A rnt stuy shows tht th numbr of xptions in th rss ggrgtion is growing. Mor prisly, Huston [2] foun tht urrntly 4 prnt of th ntris of typil bkbon forwring tbl r prfix xptions. Th Clssil Solution A Binry Tri A nturl wy to rprsnt prfixs is using tri. A tri is tr-bs t strutur llowing th orgniztion of prfixs on igitl bsis by using th bits of prfixs to irt th brnhing. Figur 7 shows binry tri (h no hs t most two hilrn) rprsnting st of prfixs of forwring tbl. In tri, no on lvl l rprsnts th st of ll rsss tht bgin with th squn of l bits onsisting of th string of bits lbling th pth from th root to tht no. For xmpl, no in Fig. 7 is t lvl 3 n rprsnts ll rsss bginning with th squn. Th nos tht orrspon to prfixs r shown in rkr sh; ths nos will ontin th forwring informtion or pointr to it. Not lso tht prfixs r not only lot t lvs but lso t som intrnl nos. This sitution riss bus of xptions in th ggrgtion pross. For xmpl, in Fig. 7 th prfixs b n rprsnt xptions to prfix. Figur 8 illustrts this sitution bttr. Th tri shows th totl rss sp, ssuming 5-bit long rsss. Eh lf rprsnts on possibl rss. W n s tht th rss sps ovr by prfixs b n ovrlp with th rss sp * b* * * * f * g* h* i * b Figur 7. A binry tri for st of prfixs. ovr by prfix. Thus, prfixs b n rprsnt xptions to prfix n rfr to spifi subintrvls of th rss intrvl ovr by prfix. In th tri in Fig. 7, this is rflt by th ft tht prfixs b n r snnts of prfix ; in othr wors, prfix is itslf prfix of b n. As rsult, som rsss will mth svrl prfixs. For xmpl, rsss bginning with will mth both prfixs n. Nvrthlss, prfix must b prfrr bus it is mor spifi (longst mth rul). Tris llow fining, in strightforwr wy, th longst prfix tht mths givn stintion rss. Th srh in tri is gui by th bits of th stintion rss. At h no, th srh pros to th lft or right oring to th squntil insption of th rss bits. Whil trvrsing th tri, vry tim w visit no mrk s prfix (i.., rk no) w rmmbr this prfix s th longst mth foun so fr. Th srh ns whn thr r no mor brnhs to tk, n th longst or bst mthing prfix will b th lst prfix rmmbr. For instn, if w srh th bst mthing prfix (BMP) for n rss bginning with th bit pttrn w strt t th root in Fig. 7. Sin th first bit of th rss is w mov to th right, to th no mrk s prfix, n w rmmbr s th BMP foun so fr. Thn w mov to th lft sin th son rss bit is ; this tim th no is not mrk s prfix, so is still th BMP foun so fr. Nxt, th thir rss bit is, but t this point thr is no brnh lbl, so th srh ns n th lst rmmbr BMP (prfix ) is th longst mthing prfix. f g h i * b* * * * f * g* h* i * f g h i b f f g g h h i i Figur 8. An rss sp. IEEE Ntwork Mrh/April 2

5 * b* * * * f * g* h* i * 3 Figur 9. A pth-omprss tri. b In ft, wht w r oing is squntil prfix srh by lngth, trying t h stp to fin bttr mth. W bgin by looking in th st of lngth- prfixs, whih r lot t th first lvl in th tri, thn in th st of lngth-2, lot t th son lvl, n so on. Morovr, using tri hs th vntg tht whil stpping through th tri, th srh sp is ru hirrhilly. At h stp, th st of potntil prfixs is ru, n th srh ns whn this st is ru to on. Upt oprtions r lso strightforwr to implmnt in binry tris. Insrting prfix bgins by oing srh. Whn rriving t no with no brnh to tk, w n insrt th nssry nos. Dlting prfix strts gin by srh, unmrking th no s prfix n, if nssry lting unus no (i.., lv nos not mrk s prfixs). Not finlly tht sin th bit strings of prfixs r rprsnt by th strutur of th tri, th nos mrk s prfixs o not n to stor th bit strings thmslvs. Pth-Comprss Tris Whil binry tris llow th rprsnttion of rbitrry-lngth prfixs, thy hv th hrtristi tht long squns of on-hil nos my xist (s prfix b in Fig. 7). Sin ths bits n to b inspt, vn though no tul brnhing ision is m, srh tim n b longr thn nssry in som ss. Also, on-hil nos onsum itionl mmory. In n ttmpt to improv tim n sp prformn, thniqu ll pth omprssion n b us. Pth omprssion onsists of ollpsing on-wy brnh nos. Whn onwy brnh nos r rmov from tri, itionl informtion must b kpt in rmining nos so tht srh oprtion n b prform orrtly. Thr r mny wys to xploit th pth omprssion thniqu; prhps th simplst to xplin is illustrt in Fig. 9, orrsponing to th binry tri in Fig. 7. Not tht th two nos pring b now hv bn rmov. Not lso tht sin prfix ws lot t on-hil no, it hs bn mov to th nrst snnt tht is not on-hil no. Sin in pth to b omprss svrl on-hil nos my ontin prfixs, in gnrl, list of prfixs must b mintin in som of th nos. Bus on-wy brnh nos r now rmov, w n jump irtly to th bit whr signifint ision is to b m, bypssing th bit insption of som bits. As rsult, bit numbr fil must b kpt now to init whih bit is th nxt bit to inspt. In Fig. 9 ths bit numbrs r shown nxt to th nos. Morovr, th bit strings of prfixs must b xpliitly stor. A srh in this kin of pth-omprss tri is s follows. Th lgorithm prforms, s usul, snt in th tri unr th guin of th rss bits, but this tim only inspting bit positions init by th bit-numbr fil in th nos trvrs. Whn no mrk s prfix is nountr, f g h i omprison with th tul prfix vlu is prform. This is nssry sin uring th snt in th tri w my skip som bits. If mth is foun, w pro trvrsing th tri n kp th prfix s th BMP so fr. Th srh ns whn lf is nountr or mismth foun. As usul, th BMP will b th lst mthing prfix nountr. For instn, if w look for th BMP of n 4 rss bginning with th bit pttrn in th pth-omprss tri shown in Fig. 9, w pro s follows. W strt t th root no n, sin its bit numbr is, w inspt th first bit of th rss. Th first bit is, so w go to th lft. Sin th no is mrk s prfix, w ompr prfix with th orrsponing prt of th rss (). Sin thy mth, w pro n kp s th BMP so fr. Sin th no s bit numbr is 3, w skip th son bit of th rss n inspt th thir on. This bit is, so w go to th lft. Agin, w hk whthr th prfix b mths th orrsponing prt of th rss (). Sin thy o not mth, th srh stops, n th lst rmmbr BMP (prfix ) is th orrt BMP. Pth omprssion ws first propos in shm ll PATRICIA [3], but this shm os not support longst prfix mthing. Sklowr propos shm with moifitions for longst prfix mthing in [4]. In ft, this vrint ws originlly sign to support not only prfixs but lso mor gnrl nonontiguous msks. Sin this ftur ws rlly nvr us, urrnt implmnttions iffr somwht from Sklowr s originl shm. For xmpl, th BSD vrsion of th pth-omprss tri (rfrr to s BSD tri) is ssntilly th sm s tht just srib. Th bsi iffrn is tht in th BSD shm, th tri is first trvrs without hking th prfixs t intrnl nos. On t lf, th trvrs pth is bktrk in srh of th longst mthing prfix. At h no with prfix or list of prfixs, omprison is prform to hk for mth. Th srh ns whn mth is foun. Comprison oprtions r not m on th ownwr pth in th hop tht not mny xption prfixs xist. Not tht with this shm, in th worst s th pth is ompltly trvrs two tims. In th s of Sklowr s originl shm, th bktrk phs lso ns to o rursiv snts of th tri bus nonontiguous msks r llow. Until rntly, th longst mthing prfix problm ws rss by using t struturs bs on pth-omprss tris suh s th BSD tri. Pth omprssion mks lot of sns whn th binry tri is sprsly popult; but whn th numbr of prfixs inrss n th tri gts nsr, using pth omprssion hs littl bnfit. Morovr, th prinipl isvntg of pth-omprss tris, s wll s binry tris in gnrl, is tht srh ns to o mny mmory sss, in th worst s 32 for IPv4 rsss. For xmpl, for typil bkbon routr [5] with 47,3 prfixs, th BSD vrsion for pth-omprss tri rts 93,34 nos. Th mximl hight is 26, whil th vrg hight is lmost 2. For th sm prfixs, simpl binry tri (with on-hil nos) hs mximl hight of 3 n n vrg hight of lmost 22. As w n s, th hights of both tris r vry similr, n th BSD tri my prform itionl omprison oprtions whn bktrking is n. Nw IP Lookup Algorithms W hv sn tht th iffiulty with th longst prfix mthing oprtion is its ul imnsions: lngth n vlu. Th nw shms for fst IP lookups iffr in th imnsion to srh 2 IEEE Ntwork Mrh/April 2

6 n whthr this srh is linr or binry. In th following, w prsnt lssifition of th iffrnt IP lookup shms. A Txonomy of IP Lookup Algorithms Srh on vlus pprohs: Squntil srh on vlus is th simplst mtho to fin th BMP. Th t strutur n is just n rry with unorr prfixs. Th srh lgorithm is vry simpl. It gos through ll th ntris ompring th prfix with th orrsponing bits of givn rss. Whn mth is foun, w kp th longst mth so fr n ontinu. At th n, th lst prfix rmmbr is th BMP. Th problm with this pproh is tht th srh sp is ru only by on prfix t h stp. Clrly, th srh omplxity in tim for this shm is funtion of th numbr of prfixs O(N), n hn th shm is not slbl. With th srh on vlu pproh, w gt ri of th lngth imnsion bus of th xhustiv srh. It is lr tht binry srh on vlus woul b bttr, n w will s in ltr stion how this n b on. Srh on lngth pprohs: Anothr possibility is to bs th srh on th lngth imnsion n us linr or binry srh. Two possibl wys to orgniz th prfixs for srh on lngth xist. In ft, w hv lry sn linr srh on lngth, whih is prform on tri. Tris llow to hk th prfixs of lngth i t stp i. Morovr, prfixs in tri r orgniz in suh wy tht stpping through th tri rus th st of possibl prfixs. As w will s in ltr stion, on optimiztion of this shm is using multibit tris. Multibit tris still o linr srh on lngth, but inspt svrl bits simultnously t h stp. Th othr possibl wy to orgniz th prfixs to llow srh on lngth is to us iffrnt tbl for h possibl lngth. Thn linr srh on lngth n b m by oing t h stp srh on prtiulr tbl using hshing, for instn. W will s how Wlvogl t l. [6] us hsh tbls to o binry srh on lngth. In ition to th lgorithm-t strutur spt, vrious pprohs us iffrnt thniqus, suh s trnsformtion of th prfix st, omprssion of runnt informtion to ru th mmory rquirmnts, pplition of optimiztion thniqus, n xploittion of th mmory hirrhy in omputrs. W introu h of ths spts brifly in th following substion n thn isuss th nw lookup shms in til oring to th lgorithm-t strutur spt in th nxt stions. Auxiliry Thniqus Prfix Trnsformtion Forwring informtion is spifi with prfixs tht rprsnt rngs of rsss. Although th st of prfixs us is usully trmin by th informtion gthr by th routing protools, th sm forwring informtion n b xprss with iffrnt sts of prfixs. Vrious trnsformtions r possibl oring to spil ns, but on of th most ommon prfix trnsformtion thniqus is prfix xpnsion. Expning prfix mns trnsforming on prfix into svrl longr n mor spifi prfixs tht ovr th sm rng of rsss. As n xmpl, th rng of rsss ovr by prfix * n lso b spifi with th two prfixs *, *; or with th four prfixs *, *, *, *. If w o prfix xpnsion ppropritly, w n gt st of prfixs tht hs fwr iffrnt lngths, whih n b us to mk fstr srh, s w will show ltr. W hv sn tht prfixs n ovrlp (Fig. 4). In tri, whn two prfixs ovrlp, on of thm is itslf prfix of th othr (Figs. 7 n 8). Sin prfixs rprsnt intrvls of ontiguous rsss, whn two prfixs ovrlp it mns tht * b* * * * f * g* h* i * Figur. A isjoint-prfix binry tri. b 2 3 on intrvl of rsss ontins nothr intrvl of rsss (Figs. 4 n 8). In ft, tht is why n rss n b mth to svrl prfixs. If svrl prfixs mth, th longst prfix mth rul is us in orr to fin th most spifi forwring informtion. On wy to voi th us of th longst prfix mth rul n still fin th most spifi forwring informtion is to trnsform givn st of prfixs into st of isjoint prfixs. Disjoint prfixs o not ovrlp, n thus no rss prfix is itslf prfix of nothr. A tri rprsnting st of isjoint prfixs will hv prfixs t th lvs but not t intrnl nos. To obtin isjoint-prfix binry tri, w simply lvs to nos tht hv only on hil. Ths nw lvs r nw prfixs tht inhrit th forwring informtion of th losst nstor mrk s prfix. Finlly, intrnl nos mrk s prfixs r unmrk. For xmpl, Fig. shows th isjoint-prfix binry tri tht orrspons to th tri in Fig. 7., 2, n 3 hv inhrit th forwring informtion of th originl prfix, whih now hs bn supprss. Prfix hs bn obtin in similr wy. Sin prfixs t intrnl nos r xpn or push own to th lvs of th tri, this thniqu is ll lf pushing by Srinivsn t l. [7]. Figur shows th isjoint intrvls of rsss tht orrspon to th isjointprfix binry tri of Fig.. Comprssion Thniqus Dt omprssion ttmpts to rmov runny from th noing. Th i to us omprssion oms from th ft tht xpning th prfixs inrss informtion runny. Comprssion shoul b on suh tht mmory onsumption is rs, n rtriving th informtion from th omprss strutur n b on sily n with minimum numbr of mmory sss. Run-lngth noing is vry simpl omprssion thniqu tht rpls onsutiv ourrns of givn symbol with only on ourrn plus ount of how mny tims th symbol ours. This thniqu is wll pt to our problm bus prfixs rprsnt intrvls of ontiguous rsss tht hv th sm forwring informtion. Applition of Optimiztion Thniqus Thr r mor thn on wy to trnsform th st of prfixs. Optimiztion llows us to fin som onstrints n fin th right st of prfixs to stisfy thos onstrints. Normlly w wnt to minimiz th mount of mmory onsum. Mmory Hirrhy in Computrs On of th hrtristis of toy s omputrs is th iffrn in sp btwn prossor n mmory, n lso btwn mmoris of iffrnt hirrhis (h, RAM, isk). Rtriving informtion from mmory is xpnsiv, so smll t struturs r sirbl f g h i IEEE Ntwork Mrh/April 2 3

7 * b* * * * f * g* h* i * 3 f g h i b f f g g h h i i Disjoint intrvls of rsss Figur. An xpn isjoint-prfix binry tri. bus thy mk it mor likly for th forwring tbl to fit into th fstr h mmory. Furthrmor, th numbr of mmory sss must b minimiz to mk srhing fstr. Nw lgorithms to th longst prfix mthing problm us on or svrl of th spts just outlin. W will survy th iffrnt lgorithms by lssifying thm oring to th lgorithm-t strutur spt, n isuss othr spts s wll. It is worth mntioning tht orgnizing th prfixs in iffrnt wys llows for iffrnt tr-offs btwn th srh n upt osts, s wll s mmory onsumption. W isuss ths tr-offs whn w xplin th iffrnt shms. W now prsnt in til som of th most ffiint lgorithms for IP rss lookup. * b* * * * f * g* h* i * b Figur 2. A vribl-stri multibit tri. f g h i Srh on Prfix Lngths Using Multibit Tris Th Bsi Shm Binry tris provi n sy wy to hnl rbitrry lngth prfixs. Lookup n upt oprtions r strightforwr. Nvrthlss, th srh in binry tri n b rthr slow bus w inspt on bit t tim n in th worst s 32 mmory sss r n for n IPv4 rss. On wy to spup th srh oprtion is to inspt not just on bit tim but svrl bits simultnously. For instn, if w inspt 4 bits t tim w woul n only 8 mmory sss in th worst s for n IPv4 rss. Th numbr of bits to b inspt pr stp is ll stri n n b onstnt or vribl. A tri strutur tht llows th insption of bits in stris of svrl bits is ll multibit tri. Thus, multibit tri is tri whr h no hs 2 k hilrn, whr k is th stri. Sin multibit tris llow th t strutur to b trvrs in stris of svrl bits t tim, thy nnot support rbitrry prfix lngths. To us givn multibit tri, th prfix st must b trnsform into n quivlnt st with th prfix lngths llow by th nw strutur. For instn, multibit tri orrsponing to our xmpl from Fig. 7 is shown in Fig. 2. W s tht first stri of 2 bits is us, so prfixs of lngth r not llow, n w n to xpn prfixs n to prou four quivlnt prfixs of lngth 2. In th sm figur it is shown how prfix hs bn xpn to lngth 4. Not tht th hight of th tri hs rs, n so hs th numbr of mmory sss whn oing srh. Figur 3 shows iffrnt multibit tri for our xmpl. W n s gin tht prfixs n hv bn xpn, but now to lngth 3. Howvr, two of th prfixs prou by xpnsion lry xist (prfixs n ). W must prsrv th forwring informtion of prfixs n sin thir forwring informtion is mor spifi thn tht of th xpn prfix. Thus, xpnsion of prfixs n finlly rsults in six prfixs, not ight. In gnrl, whn n xpn prfix ollis with n xisting longr prfix, forwring informtion of th xisting prfix must b prsrv to rspt th longst mthing rul. Srhing in multibit tri is ssntilly th sm s in binry tri. To fin th BMP of givn rss onsists of sussivly looking for longr prfixs tht mth. Th multibit tri is trvrs, n h tim prfix is foun t no, it is rmmbr s th nw BMP sn so fr. At th n, th lst BMP foun is th orrt BMP for th givn rss. Multibit tris still o linr srh on lngths s o binry tris, but th srh is fstr bus th tri is trvrs using lrgr stris. In multibit tri, if ll nos t th sm lvl hv th sm stri siz, w sy tht it is fix stri; othrwis, it is vribl stri. W n hoos multibit tris with fix or vribl stris. Fix stris r simplr to implmnt thn vribl stris, but in gnrl wst mor mmory. Figur 3 is n xmpl of fix-stri multibit tri, Fig. 2 vriblstri multibit tri. Choi of Stris Choosing th stris rquirs tr-off btwn srh sp n mmory onsumption. In th xtrm s, w oul mk tri with singl lvl (i.., on-lvl tri with 32-bit stri for IPv4). Srh woul tk in this s just on ss, but w woul n hug mount of mmory to stor 2 32 ntris. 4 IEEE Ntwork Mrh/April 2

8 * b* * * * f * g* h* i * b f f g g h h i i Figur 3. A fix-stri multibit tri. On nturl wy to hoos stris n ontrol mmory onsumption is to lt th strutur of th binry tri trmin this hoi. For xmpl, if w look t Fig. 7, w obsrv tht th subtri with its root th right hil of no is full subtri of two lvls ( full binry subtri is subtri whr h lvl hs th mximum numbr of nos). W n rpl this full binry subtri with on-lvl multibit subtri. Th stri of th multibit subtri is simply th numbr of lvls of th substitut full binry subtri, two in our xmpl. In ft, this trnsformtion ws lry m in Fig. 2. This trnsformtion is strightforwr, but sin it is th only trnsformtion w n o in Fig. 7, it hs limit bnfit. W will s ltr how to rpl, in ontroll wy, binry subtris tht r unnssry full subtris. Th hight of th multibit tri will b ru whil ontrolling mmory onsumption. W will lso s how optimiztion thniqus n b us to hoos th stris. Upting Multibit Tris Siz of stris lso trmins upt tim bouns. A multibit tri n b viw s tr of on-lvl subtris. For instn, in Fig. 3 w hv on subtri t th first lvl n thr subtris t th son lvl. Whn w o prfix xpnsion in subtri, wht w tully o is omput for h no of th subtri its lol BMP. Th BMP is lol bus it is omput from subst of th totl of prfixs. For instn, in th subtri t th first lvl w r only onrn with fining for h no th BMP mong prfixs,,,. In th lftmost subtri t th son lvl th BMP for h no will b slt from only prfix b. In th son subtri t th son lvl, th BMP is slt for h no mong prfixs f n g, n th rightmost subtri is onrn only with prfixs h n i. Som nos my b mpty, initing tht thr r no BMPs for ths nos mong th prfixs orrsponing to this subtri. As rsult, multibit tris ivi th problm of fining th BMP into smll problms in whih lol BMPs r slt mong subst of prfixs. Hn, whn looking for th BMP of givn rss, w trvrs th tr n rmmbr th lst lol BMP s w go through it. It is worth noting tht th BMPs omput t h subtri r inpnnt of th BMPs omput t othr subtris. Th vntg of this shm is tht insrting or lting prfix only ns to upt on of th subtris. Prfix upt is ompltly lol. In prtiulr, if th prfix is or will b stor in subtri with stri of k bits, th upt ns to moify t most 2 k nos ( prfix popults t most th hlf of th nos in subtri). Thus, hoosing pproprit stri vlus llows th upt tim to b boun. Lol BMPs llow inrmntl upts, but rquir tht intrnl nos, bsis lvs, stor prfixs; thus, mmory onsumption is inrmnt. As w know, w n voi prfixs t intrnl nos if w us st of isjoint prfixs. W n obtin multibit tri with isjoint prfixs if w xpn prfixs t intrnl nos of th multibit tri own to its lvs (lf pushing). Figur 4 shows th rsult of this pross whn ppli to th multibit tri in Fig. 3. Nvrthlss, not tht now, in th gnrl s, prfix n b thortilly xpn to svrl subtris t ll lvls. Clrly, with this pproh, th BMPs omput t h subtri r no longr lol; thus, upts will suffr longr worst s tims. As w n s, multibit tri with svrl lvls llows, by vrying stri k, n intrsting tr-off btwn srh tim, * b* * * * f * g* h* i * b f f g g h h i i Figur 4. A isjoint-prfix multibit tri. IEEE Ntwork Mrh/April 2 5

9 Dstintion rss First mmory bnk 2 24 ntris Figur 5. Th hrwr shm of [8]. 8 Forwring informtion Son mmory bnk 2 2 ntris mmory onsumption, n upt tim. Th lngth of th pth n b ontroll to ru srh tim. Choosing lrgr stris will mk fstr srhs, but mor mmory will b n, n upts will rquir mor ntris to b moifi bus of xpnsion. As w hv sn, inrmntl upts r possibl with multibit tris if w o not us lf pushing. Howvr, insrting n lting oprtions r slightly mor omplit thn with binry tris bus of prfix trnsformtion. Insrting on prfix mns fining th pproprit subtri, oing n xpnsion, n insrting h of th rsulting prfixs. Dlting is still mor omplit bus it mns lting th xpn prfixs n, mor importnt, upting th ntris with th nxt BMP. Th problm is tht originl prfixs r not tully stor in th tri. To s this bttr, suppos w insrt prfixs *, * n * in th multibit tri in Fig. 3. Clrly, prfix will isppr; n if ltr w lt prfix *, for instn, thr will b no wy to fin th nw BMP () for no. Thus, upt oprtions n n itionl strutur for mnging originl prfixs. Multibit Tris in Hrwr Th bsi shm of Gupt t l. [8] uss two-lvl multibit tri with fix stris similr to th on in Fig. 4. Howvr, th first lvl orrspons to stri of 24 bits n th son lvl to stri of 8 bits. On ky obsrvtion in this shm is tht in typil bkbon routr, most of th ntris hv prfixs of lngth 24 bits or lss (Fig. 6, with logrithmi sl on th y xis). As rsult, using first stri of 24 bits llows th BMP to b foun in on mmory ss for th mjority of ss. Also, sin fw prfixs hv lngth longr thn 24, thr will b only smll numbr of subtris t th son lvl. In orr to sv mmory, intrnl nos r not llow to stor prfixs. Hn, shoul prfix orrspon to n intrnl no, it will b xpn to th son lvl (lf pushing). This pross rsults in multibit tri with isjoint xpn prfixs similr to th on in Fig. 4 for th xmpl in Fig. 3. Th first lvl of th multibit tri hs 2 24 nos n is implmnt s tbl with th sm numbr of ntris. An ntry in th first lvl ontins ithr th forwring informtion or pointr to th orrsponing subtri t th son lvl. Entris in th first tbl n 2 byts to stor pointr; hn, mmory bnk of 32 Mbyts is us to stor 2 24 ntris. Atully, th pointrs us 5 bits bus th first bit of n ntry inits if th informtion stor is th forwring informtion or pointr to son-lvl subtri. Th numbr of subtris t th son lvl pns on th numbr of prfixs longr thn 24 bits. In th worst s h of ths prfixs will n iffrnt subtri t th son lvl. Sin th stri for th son lvl is 8 bits, subtri t th son lvl hs lvs. Th son-lvl subtris r stor in son mmory bnk. Th siz of this son mmory bnk pns on th xpt worst s prfix lngth istribution. In th MEst tbl [5] w xmin on August 6, 999, only 96 prfixs wr longr thn 24 bits. For xmpl, for mmory bnk of 2 2 ntris of byt h (i.., mmory bnk of Mbyt), th sign supports mximum of subtris t th son lvl. In Fig. 5 w n s how th oing of stintion rss is on to fin th orrsponing forwring informtion. Th first 24 bits of th stintion rss r us to inx into th first mmory bnk (th first lvl of th multibit tri). If th first bit of th ntry is, th ntry ontins th forwring informtion; othrwis, th forwring informtion must b look up in th son mmory bnk (th son lvl of th multibit tri). In tht s, w ontnt th lst 8 bits of th stintion rss with th pointr just foun in th first tbl. Th rsult is us s n inx to look up th forwring informtion in th son mmory bnk. Th vntg of this simpl shm is tht th lookup rquirs mximum of two mmory sss. Morovr, sin it is hrwr pproh, th mmory sss n b piplin or prllliz. As rsult th lookup oprtion tks prtilly on mmory ss tim. Nvrthlss, sin th first stri is 24 bits n lf pushing is us, upts my tk long tim in som ss. Multibit Tris with th Pth Comprssion Thniqu Nilsson t l. [9] rursivly trnsform binry tri with prfixs into multibit tri. Strting t th root, thy rpl th lrgst full binry subtri with orrsponing on-lvl multibit subtri. This pross is rpt rursivly with th hilrn of th multibit subtri obtin. Aitionlly, on-hil pths r omprss. Sin w rpl t h stp binry subtri of svrl lvls with multibit tri of on lvl, th pross n b viw s omprssion of th lvls of th originl binry tri. Lvl-omprss (LC) is th nm givn by Nilsson to ths multibit tris. Nvrthlss, ltting th strutur of th binry tri stritly trmin th hoi of stris os not llow ontrol of th hight of th rsulting multibit tri. On wy to furthr ru th hight of th multibit tri is to lt th strutur of th tri only gui, not trmin, th hoi of stris. In othr wors, w will rpl nrly full binry subtris with multibit subtri (i.., binry subtris whr only fw nos r missing). Nilsson proposs rpling nrly full binry subtri with multibit subtri of stri k if th nrly full binry subtri hs suffiint frtion of th 2 k nos t lvl k, whr suffiint frtion of nos is fin using singl prmtr ll fill ftor x, with x. For instn, in Fig. 7, if th fill ftor is.5, th frtion of nos t th fourth lvl is not nough to hoos stri of 4, sin only 5 of th 6 possibl nos r prsnt. Inst, thr r nough nos t th thir lvl (5 of th 8 possibl nos) for multibit subtri of stri 3. In orr to sv mmory sp, ll th nos of th LC tri r stor in singl rry: first th root, thn ll th nos t th son lvl, thn ll th nos t th thir lvl, n so 6 IEEE Ntwork Mrh/April 2

10 * b* * * * f * g* h* i * b f f g g h h i i Figur 6. A two-lvl fully xpn multibit tri. on. Morovr, intrnl nos r not llow to stor prfixs. Inst, h lf hs linr list with prfixs, in s th pth to th lf shoul hv on or svrl prfixs (lss spifi prfixs). As rsult, srh in n LC tri pros s follows. Th LC tri is trvrs s is th bsi multibit tri. Nvrthlss, sin pth omprssion is us, n xpliit omprison must b prform whn rriving t lf. In s of mismth, srh of th list of prfixs must b prform (lss spifi prfixs, i.., prfixs in intrnl nos in th originl binry tri). Sin th LC tri is implmnt using singl rry of onsutiv mmory lotions n list of prfixs must b mintin t lvs, inrmntl upts r vry iffiult. Multibit Tris n Optimiztion Thniqus On sy wy to boun worst-s srh tims is to fin fix stris tht yil wll-fin hight for th multibit tri. Th problm is tht, in gnrl, mmory onsumption will b lrg, s sn rlir. On th othr hn, w n minimiz th mmory onsumption by ltting th prfix istribution stritly trmin th hoi of stris. Unfortuntly, th hight of th rsulting multibit tri nnot b ontroll n pns xlusivly on th spifi prfix istribution. W sw in th lst stion tht Nilsson uss th fill ftor s prmtr to ontrol th influn of th prfix istribution on stri hoi, n so influns somwht th hight of th rsulting multibit tri. Sin prfix istribution still guis stri hoi, mmory onsumption is still ontroll. Nvrthlss, th us of th fill ftor is simply rsonbl huristi n, mor importnt, os not llow gurnt on worst-s hight. Srinivsn t l. [7] us ynmi progrmming to trmin, for givn prfix istribution, th optiml stris tht minimiz mmory onsumption n gurnt worst-s numbr of mmory sss. Th uthors giv mtho to fin th optiml stris for th two typs of multibit tris: fix stri n vribl stri. Anothr wy to minimiz lookup tim is to tk into ount, on on hn, th hirrhil strutur of th mmory in systm n, on th othr, th probbility istribution of th usg of prfixs (whih is trffi-pnnt). Chung t l. [] giv mthos to minimiz th vrg lookup tim pr prfix for this s. Thy suppos systm hving thr typs of hirrhil mmoris with iffrnt ss tims n sizs. Using optimiztion thniqus mks sns if th ntris of th forwring tbl o not hng t ll or hng vry littl, but this is rrly th s for bkbon routrs. Insrting n lting prfixs grs th improvmnt u to optimiztion, n rbuiling th strutur my b nssry. * b* * * * f * g* h* i * Multibit Tris n Comprssion Expnsion rts svrl prfixs tht ll inhrit th forwring informtion of th originl prfix. Thus, if w us multibit tris with lrg stris, w will hv grt numbr of ontiguous nos with th sm BMP. W n us this ft n omprss th runnt informtion, whih will llow sving mmory n mk th srh oprtion fstr bus of th smll hight of th tri. On xmpl of this pproh is th full xpnsion/omprssion shm propos by Crsnzi t l. []. W will illustrt thir mtho with smll xmpl whr w o mximl xpnsion supposing 5-bit rsss n us twolvl multibit tri. Th first lvl uss stri of 2 bits, th son lvl stri of 3 bits, s shown in Fig. 6. Th i is to omprss h of th subtris t th son lvl. In Fig. 7 w n s how th lvs of h son-lvl subtri hv bn pl vrtilly. Eh olumn orrspons to on of th son-lvl subtris. Th gol is to omprss th rpt ourrns of th BMPs. Nvrthlss, th omprssion is on in suh wy tht t h stp th numbr of omprss symbols is th sm for h olumn. With this strtgy th omprssion is not optiml for ll olumns, but sin th omprssion is m in synhroniz wy for ll th olumns, ssing ny of th omprss subtris n b m with on ommon itionl tbl of pointrs, s shown in Fig. 7. To fin th BMP of givn rss w trvrs th first lvl of th multibit tri s usul; tht is, th first 2 bits of th rss r us to hoos th orrt subtri t th son lvl. Thn th lst 3 bits of th rss r us to fin th pointr in th itionl tbl. With this pointr w n rily fin th BMP in th omprss subtri. For xmpl, srhing for th rss will gui us to th thir subtri (olumn) in th omprss strutur; n using th Aitionl tbl Figur 7. A full xpnsion prlll omprssion shm. b f f g h i Comprss tri lvs b f f g g h h i i Tri lvs IEEE Ntwork Mrh/April 2 7

11 * b* * * * f * g* h* i * j * k* p* b j M Figur 8. Binry srh on prfix lngths. pointr ontin in th ntry of th itionl tbl, w will fin s th bst mthing prfix. In th tul shm propos by Crsnzi, prfixs r xpn to 32 bits. A multibit tri of two lvls is lso us, but th stri of th first n son lvls is 6 bits. It is worth noting tht vn though omprssion is on, th rsulting strutur is not smll nough to fit in th h mmory. Nvrthlss, bus of th wy to ss th informtion, srh lwys tks only thr mmory sss. Th rport mmory siz for typil bkbon forwring tbl is.2 Mbyts. Anothr shm tht ombins multibit tris with th omprssion i hs bn ubb th Lul lgorithm [2]. In this shm, multibit tri with fix stri lngths is us. Th stris r 6,8,8, for th first, son, n thir lvl rsptivly, whih givs tri of hight 3. In orr to o ffiint omprssion, th Lul shm must us st of isjoint prfixs; hn, th Lul shm first trnsforms th st of prfixs into isjoint-prfix st. Thn th prfixs r xpn in orr to mt th stri onstrints of th multibit tri. Aitionlly, in orr to sv mmory, prfixs r not llow t intrnl nos of th multibit tri ; thus, lf pushing is us. Agin, th i is to omprss th prfix informtion in th subtris by supprssing rpt ourrns of onsutiv BMPs. Nvrthlss, ontrry to th lst shm, h subtri is omprss inpnnt of th othrs. On subtri is omprss, lvr oing mhnism llows th ss to th BMPs. Du to lk of sp w o not giv th tils of th oing mhnism. Whil th tri hight in th Lul shm is 3, tully mor thn thr mmory rfrns r n bus of th oing rquir to ss th omprss t strutur. Srhing t h lvl of th multibit tri ns, in gnrl, four mmory rfrns. This mns tht in th worst s 2 mmory rfrns r n for IPv4. Th vntg of th Lul shm, howvr, is tht ths rfrns r lmost lwys to th h mmory bus th whol t strutur is vry smll. For instn, for forwring tbl ontining 32,732 prfixs th rport siz of th t strutur is 6 kbyts. Shms using multibit tris n omprssion giv vry fst srh tims. Howvr, omprssion n th lf pushing thniqu us o not llow inrmntl upts. Rbuiling th whol strutur is th only solution. A iffrnt shm using omprssion is th Full Tr Bit Mp by Ethrton [3]. Lf pushing is voi, so inrmntl upts r llow. p f g h i M k Binry srh on lngths Binry Srh on Prfix Lngths Th problm with rbitrry prfix lngths is 2 tht w o not know how mny bits of th stintion rss shoul b tkn into ount whn ompr with th prfix vlus. Tris llow squntil srh on th lngth imnsion: first w look in th st of 4 prfixs of lngth, thn in th st of lngth 2 prfixs, n so on. Morovr, t h stp th srh sp is ru bus of th prfix orgniztion in th tri. Anothr pproh to squntil srh 6 on lngths without using tri is orgnizing th prfixs in iffrnt tbls oring to thir lngths. In this s, hshing thniqu n b us to srh in h of ths tbls. Sin w look for th longst mth, w bgin th srh in th tbl holing th longst prfixs; th srh ns s soon s mth is foun in on of ths tbls. Nvrthlss, th numbr of tbls quls th numbr of iffrnt prfix lngths. If W is th rss lngth (32 for IPv4), th tim omplxity of th srh oprtion is O(W) ssuming prft hsh funtion, whih is th sm s for tri. In orr to ru th srh tim, binry srh on lngths ws propos by Wlvogl t l. [6]. In binry srh, w ru th srh sp in h stp by hlf. On whih hlf to ontinu th srh pns on th rsult of omprison. Howvr, n orring rltion ns to b stblish bfor bing bl to mk omprisons n pro to srh in irtion oring to th rsult. Comprisons r usully on using ky vlus, but our problm is iffrnt sin w o binry srh on lngths. W r rstrit to hking whthr mth xists t givn lngth. Using mth to i wht to o nxt is possibl: if mth is foun, w n ru th srh sp to only longr lngths. Unfortuntly, if no mth is foun, w nnot b sur tht th srh shoul pro in th irtion of shortr lngths, bus th BMP oul b of longr lngth s wll. Wlvogl t l. insrt xtr prfixs of qut lngth, ll mrkrs, to b sur tht, whn no mth is foun, th srh must pro nssrily in th irtion of shortr prfixs. To illustrt this pproh onsir th prfixs shown in Fig. 8. In th tri w n obsrv th lvls t whih th prfixs r lot. At th right, binry srh tr shows th lvls or lngths tht r srh t h stp of th binry srh on lngths lgorithm. Not tht th tri is only shown to unrstn th rltionship btwn mrkrs n prfixs, but th lgorithm os not us tri t strutur. Inst, for h lvl in th tri, hsh tbl is us to stor th prfixs. For xmpl, if w srh for th BMP of th rss, w bgin by srhing th tbl orrsponing to lngth 4; mth will b foun bus of prfix f, n th srh pros in th hlf of longr prfixs. Thn w srh t lngth 6, whr th mrkr * hs bn pl. Sin mth is foun, th srh pros to lngth 7 n fins prfix k s th BMP. Not tht without th mrkr t lvl 6, th srh prour woul fil to fin prfix k s th BMP. In gnrl, for h prfix ntry sris of mrkrs r n to gui th srh. Sin binry srh only hks mximum of log 2 W lvls, h ntry will gnrt mximum of log 2 W mrkrs. In ft, th numbr of mrkrs rquir will b muh smllr for two rsons: no mrkr will b insrt if th orrsponing prfix ntry lry xists (prfix f in Fig. 8), n singl mrkr n b us to gui 8 IEEE Ntwork Mrh/April 2

12 * b* * * * f * g* h* i * f g h i b f f g g h h i i Prfix rngs b f g h i BMP Bsi intrvls I b I 2 I 3 I 4 I 5 I 6 f I 7 g I 8 h I 9 i I Figur 9. Binry rng srh. th srh for svrl prfixs (.g., prfixs n p, whih us th sm mrkr t lvl 2). Howvr, for th vry sm rsons, th srh my b irt towr longr prfixs, lthough no longr prfix will mth. For xmpl, suppos w srh for th BMP for rss. W bgin t lvl 4 n fin mth with prfix f, so w pro to lngth 6, whr w fin gin mth with th mrkr, so w pro to lvl 7. Howvr, t lvl 7 no mth will b foun bus th mrkr hs gui us in b irtion. Whil mrkrs provi vli hints in som ss, thy n misl in othrs. To voi bktrking whn bing misl, Wlvogl uss promputtion of th BMP for h mrkr. In our xmpl, th mrkr t lvl 6 will hv f s th promput BMP. Thus, s w srh, w kp trk of th promput BMP so fr, n thn in s of filur w lwys hv th lst BMP. Th mrkrs n promput BMP vlus inrs th mmory rquir. Aitionlly, th upt oprtions bom iffiult bus of th svrl iffrnt vlus tht must b upt. Prfix Rng Srh A srh on vlus only, to fin th longst mthing prfix, is possibl if w n gt ri of th lngth imnsion. On wy of oing so is to trnsform th prfixs to uniqu lngth. Sin prfixs r of rbitrry lngths, w n to o full xpnsion, trnsforming ll prfixs to 32-bit-lngth prfixs in th s of IPv4. Whil binry srh on vlus oul b on now, this pproh ns hug mount of mmory. Fortuntly, it is not nssry to stor ll of th 2 32 ntris. Sin full xpnsion hs bn on, informtion runny xists. A prfix rprsnts n ggrgtion of ontiguous rsss; in othr wors, prfix trmins wll-fin rng of rsss. For xmpl, supposing 5-bit-lngth rsss, prfix * fins th rng of rsss [,5]. So why not simpl stor th rng npoints inst of vry singl rss? Th BMP of th npoints is, in thory, th sm for ll th rsss in th intrvl; n srh of th BMP for givn rss woul b ru to fining ny of th npoints of th orrsponing intrvl (.g., th prssor, whih is th grtst npoint smllr thn or qul to givn rss). Th BMP problm woul b rily solv, bus fining th prssor of givn rss n b prform with lssil binry srh mtho. Unfortuntly, this pproh my not work bus prfix rngs my ovrlp (i.., prfix rngs my b inlu in othr prfix rngs; Fig. 4). For xmpl, Fig. 9 shows th full xpnsion of prfixs ssuming 5-bit-lngth rsss. Th sm figur shows th npoints of th iffrnt prfix rngs, in binry s wll s iml form. Thr w n s tht th prssor of rss vlu 9, for instn, is npoint vlu 8; nvrthlss, th BMP of rss 9 is not ssoit with npoint 8 (b), but with npoint () inst. Clrly, th ft tht rng my b ontin in nothr rng os not llow this pproh to work. On solution is to voi intrvl ovrlp. In ft, by obsrving th npoints w n s tht ths vlus ivi th totl rss sp into isjoint bsi intrvls. In bsi intrvl, vry rss tully hs th sm BMP. Figur 9 shows th BMP for h bsi intrvl of our xmpl. Not tht for h bsi intrvl, its BMP is th BMP of th shortst prfix rng nlosing th bsi intrvl. Th BMP of givn rss n now b foun by using th npoints of th bsi intrvls. Nvrthlss, w n obsrv in Fig. 9 tht som bsi intrvls o not hv xpliit npoints (.g., I 3 n I 6 ). In ths ss, w n ssoit th bsi intrvl with th losr npoint to its lft. As rsult, som npoints n to b ssoit to two bsi intrvls, n thus npoints must mintin in gnrl two BMPs, on for th intrvl thy blong to n on for th potntil nxt bsi intrvl. For instn, npoint vlu 8 will b ssoit with bsi intrvls I2 n I3, n must mintin BMPs b n. Figur 2 shows th srh tr initing th stps of th binry srh lgorithm. Th lvs orrspon to th npoints, whih stor th two BMPs ( n ). For xmpl, if w srh th BMP for rss (22), w bgin ompring th rss with ky 26; sin 22 is smllr thn 26, w tk th lft brnh in th srh tr. Thn w ompr 22 with ky 6 n go to th right; thn t no 24 w go to th lft rriving t IEEE Ntwork Mrh/April 2 9

13 Figur 2. A bsi rng srh tr. no 9; n finlly, w go to th right n rriv t th lf with ky 9. Bus th rss (22) is grtr thn 9, th BMP is th vlu ssoit with (i.., ). As for tritionl binry srh, th implmnttion of this shm n b m by xpliitly builing th binry srh tr. Morovr, inst of binry srh tr, multiwy srh tr n b us to ru th hight of th tr n thus mk th srh fstr. Th i is similr to th us of multibit tris inst of binry tris. In multiwy srh tr, intrnl nos hv k brnhs n k kys; this is spilly ttrtiv if n ntir no fits into singl h lin bus srh in th no will b ngligibl ompr to norml mmory sss. As prviously mntion, th BMP for h bsi intrvl ns to b promput by fining th shortst rng (longst prfix) nlosing th bsi intrvl. Th problm with this pproh, whih ws propos by Lmpson t l. [4], is tht insrting or lting singl prfix my rquir romputing th BMP for mny bsi intrvls. In gnrl, vry prfix rng spns svrl bsi intrvls. Th mor bsi intrvls prfix rng ovrs, th highr th numbr of BMPs to potntilly romput. In ft, in th worst s w woul n to upt th BMP for N bsi intrvls, N s usul bing th numbr of prfixs. This is th s whn ll 2N npoints r iffrnt n on prfix ontins ll th othr prfixs. On i to ru th numbr of intrvls ovr by prfix rng is to us lrgr, yt still isjoint, intrvls. Th lvs of th tr in Fig. 2 orrspon to bsi intrvls. A ruil obsrvtion is tht intrnl nos orrspon to intrvls tht r th union of bsi intrvls (Fig. 2). Also, ll th nos t givn lvl form st of isjoint intrvls. For xmpl, t th son lvl th nos mrk 2, 24, n 28 orrspon to th intrvls [,5], [6,25], n [26,29], rsptivly. So why stor BMPs only t lvs? For instn, if w stor t th no mrk 2 in th son lvl, w will not n to stor t lvs, n upt prformn will b bttr. In othr wors, inst of omposing prfix rngs into bsi intrvls, w ompos prfix rngs into isjoint intrvls s lrg s possibl. Figur 2 shows how prfixs b f f f g g g g h 28 h h h i 3 i i i n b stor using this i. Srh oprtion is lmost th sm, xpt tht now it ns to kp trk of th BMP nountr whn trvrsing th pth to th lvs. W n ompr th bsi shm to using lf pushing n th nw mtho to not oing so. Agin, w n s tht pushing informtion to lvs mks upt iffiult, bus th numbr of ntris to moify grows. Th multiwy rng tr pproh [5] prsnts n vlops this i to llow inrmntl upts. Comprison n Msurmnts of Shms Eh of th shms prsnt hs its strngths n wknsss. In this stion, w ompr th iffrnt shms n isuss th importnt mtris to vlut ths shms. Th il shm woul b on with fst srhing, fst ynmi upts, n smll mmory rquirmnt. Th shms prsnt mk iffrnt troffs btwn ths spts. Th most importnt mtri is obviously lookup tim, but upt tim must lso b tkn into ount, s wll s mmory rquirmnts. Slbility is lso nothr importnt issu, with rspt to both th numbr n lngth of prfixs. Complxity Anlysis Th omplxity of th iffrnt shms is ompr in Tbl 2. Th nxt stions rry out til omprison. Tris In binry tris w potntilly trvrs numbr of nos qul to th lngth of rsss. Thrfor, th srh omplxity is O(W). Upt oprtions r rily m n bsilly n srh, so upt omplxity is lso O(W). Sin insrting prfix potntilly rts W sussiv nos (long th pth tht rprsnts th prfix), th mmory onsumption for st of N prfixs hs Shm Worst s Upt Mmory lookup Binry tri O(W) O(W) O(NW) Pth-omprss tris O(W) O(W) O(N) k-stri multibit tri O(W/k) O(W/k + 2 k ) O(2 k NW/k) LC tri O(W/k) O(2 k NW/k) Lul tri O(W/k) O(2 k NW/k) Full xpnsion/omprssion 3 O(2 k + N 2 ) Binry srh on prfix lngths O(log 2 W) O(Nlog 2 W) O(log 2 W) Binry rng srh O(log 2 N) O(N) O(N) Multiwy rng srh O(log 2 N) O(N) O(N) Multiwy rng trs O(log 2 N) O(klog k N) O(Nklog k N) Tbl 2. Complxity omprison. 2 IEEE Ntwork Mrh/April 2

14 [,5] [,25] [,] [2,5] [6,23] [24,25] [26,27] [28,29] [3,3] Figur 2. A rng srh tr. [,3] omplxity O(NW). Not tht this uppr boun is not tight, sin som nos r, in ft, shr long th prfix pths. Pth omprssion rus th hight of sprs binry tri, but whn th prfix istribution in tri gts nsr, hight rution is lss fftiv. Hn, omplxity of srh n upt oprtions in pth-omprss tris is th sm s in lssil binry tris. Pth-omprss tris r full binry tris. Full binry tris with N lvs hv N intrnl nos. Hn, sp omplxity for pth omprss tris is O(N). Multibit tris still o linr srh on lngths, but sin th tri is trvrs in lrgr stris th srh is fstr. If srh is on in stris of k bits, th omplxity of th lookup oprtion is O(W/k). As w hv sn, upts rquir srh n will moify mximum of 2 k ntris (if lf pushing is not us). Upt omplxity is thus O(W/k + 2 k ) whr k is th mximum stri siz in bits in th multibit tri. Mmory onsumption inrss xponntilly with k: h prfix ntry my n potntilly n ntir pth of lngth W/k, n pths onsist of on-lvl subtris of siz 2 k. Hn, mmory us hs omplxity (O(2 k NW/k). Sin th Lul n full xpnsion/omprssion shms us omprss multibit tris togthr with lf pushing, inrmntl upts r iffiult if not impossibl, n w hv not init upt omplxity for ths shms. Th LC tri shm uss n rry lyout n must mintin lists of lss spifi prfixs. Hn, inrmntl upts r lso vry iffiult. Binry Srh on Lngths For binry srh on lngths, th omplxity of th lookup oprtion is logrithmi in th prfix lngth. Noti tht th lookup oprtion is inpnnt of th numbr of ntris. Nvrthlss, upts r omplit u to th us of mrkrs. As w hv sn, in th worst s log 2 W mrkrs r nssry pr prfix; hn, mmory onsumption hs omplxity O(Nlog 2 W). For th shm to work, w n to promput th BMP of vry mrkr. This promput BMP is funtion of th ntris bing prfixs of th mrkr; spifilly, th BMP is th longst. Whn on of ths prfix ntris is lt or nw on is, th promput BMP my hng for mny of th mrkrs tht r longr thn th nw (or lt) prfix ntry. Thus, th 26 [6,25] [26,29] [26,3] b 3 f 27 g 29 h 3 i mrkr upt omplxity is O(Nlog 2 W) sin thortilly n ntry my potntilly b prfix of N longr ntris, h hving potntilly log 2 W mrkrs to upt. Rng Srh Th rng srh pproh gts ri of th lngth imnsion of prfixs n prforms srh bs on th npoints limiting isjoint bsi intrvls of rsss. Th numbr of bsi intrvls pns on th ovring rltionship btwn th prfix rngs, but in th worst s it is qul to 2N. Sin binry or multiwy srh is prform, th omplxity of th lookup oprtion is O(log 2 N) or O(log k N), rsptivly, whr k is th numbr of brnhs t h no of th srh tr. Rmmbr tht th BMP must b promput for h bsi intrvl, n in th worst s n upt ns to romput th BMP of N bsi intrvls. Th upt omplxity is thus O(N). Sin th rng srh shm ns to stor th npoints, th mmory rquirmnt hs omplxity O(N). W prviously mntion tht by using intrvls m of unions of th bsi intrvls, th pproh of [5] llows bttr upt prformn. In ft, th upt omplxity is O(klog k N), whr k is th numbr of brnhs t h no of th multiwy srh tr. Slbility n IPv6 An importnt issu in th Intrnt is slbility. Two spts r importnt: th numbr of ntris n th prfix lngth. Th lst spt is spilly importnt bus of th nxt gnrtion of IP (IPv6), whih uss 28- bit rsss. Multibit tris improv lookup sp with rspt to binry tris, but only by onstnt ftor on th lngth imnsion. Hn, multibit tris sl bly to longr rsss. Binry srh on lngths hs logrithmi omplxity with rspt to th prfix lngth, n its slbility proprty is vry goo. Th rng srh pprohs hv logrithmi lookup omplxity with rspt to th numbr of ntris but inpnnt, in prinipl, of prfix lngth. Thus, if th numbr of ntris os not grow xssivly, th rng srh pproh is slbl for IPv6. Msur Lookup Tim Whil th omplxity mtris of th iffrnt shms srib bov r n importnt spt for omprison, it is qully importnt to msur th prformn of ths shms unr rl onitions. W now show th rsults of prformn omprison m using ommon pltform n prfix tbs of typil bkbon routr [5]. Our pltform onsists of Pntium-Pro-bs omputr with lok sp of 2 MHz. Th siz of mmory h L2 is 52 kbyts. All progrms r o in C n wr xut unr th Linux oprting systm. Th o for th pth-omprss tri (BSD tri) ws xtrt from th FrBSD implmnttion, th o for th multibit tri ws implmnt by us [6], n th o for th othr shms ws obtin from th orrsponing uthors. Whil prfix tbss in bkbon routrs r publily vilbl, this is not th s for trffi trs. In, trffi sttistis pn on th lotion of th routr. Thus, wht w hv on to msur th prformn of th lookup opr- IEEE Ntwork Mrh/April 2 2

15 Frquny Full xpnsion/omprssion LC tri Multibit tri Figur 22. Lookup tim istributions of svrl lookup mhnisms. MEst routr (6 August, 999) 473 prfixs Binry srh on lngths Mirosons tion is to onsir tht vry prfix hs th sm probbility of bing ss. In othr wors, th trffi pr prfix is suppos to b th sm for ll prfixs. Although knowlg of th ss probbilitis of th forwring tbl ntris woul llow bttr vlution of th vrg lookup tim, ssuming onstnt trffi pr prfix still llows us to msur importnt hrtristis, suh s th worst-s lookup tim. In orr to ru th ffts of h lolity w us rnom prmuttion of ll ntris in th forwring tbl (xtn to 32 bits by ing zros). Figur 22 shows th istributions of th lookup oprtion for fiv iffrnt shms. Th lookup tim vribility for th fiv iffrnt shms is summriz in Tbl 3. Lookup tim msur for th BSD tri shm rflts th pnn on th prfix lngth istribution. W n obsrv lrg vrin btwn tim for short prfixs n tim for long prfixs bus of th high hight of th BSD tri. On th ontrry, th full xpnsion/omprssion shm lwys ns xtly thr mmory sss. This shm hs th bst prformn for th lookup oprtion in our xprimnt. Smll vritions shoul b u to h misss s wll s bkgroun oprting systm tsks. As w know, lookup tims for multibit tris n b tun by hoosing iffrnt stris. W hv msur th lookup tim for th LC tri shm, whih uss n rry lyout n th pth omprssion thniqu. W hv lso msur th lookup tim for multibit tri implmnt with link tr strutur n without pth omprssion [6]. Both r vribl-stri multibit tris tht us th istribution of prfixs to gui th hoi of stris. Aitionlly, th fill ftor ws hosn suh tht stri of k bits is us if t lst 5 prnt of th totl possibl nos t lvl k xist (isuss rlir). Evn with this simpl strtgy to buil multibit tris, lookup tims r muh bttr thn for th BSD tri. Tbl 4 shows th sttistis of th BSD tri n multibit tris, whih xplins th prformn obsrv. Th sttistis for th orrsponing binry tri r lso shown. Noti tht th hight vlus of th BSD tri r vry los to vlus for th binry tri. Hn, pth omprssion thniqu us lon, s in th BSD tri, hs lmost no bnfit for typil bkbon routr. Pth omprssion in th multibit tri LC mks th mximum hight muh smllr thn in th pur multibit tri. Nvrthlss, th vrg hight is only on lvl smllr thn for th pur multibit tri. Morovr, sin th LC tri ns to o xtr omprisons in som ss, th gin in lookup prformn is not vry signifint. Th binry srh on lngths shm lso shows bttr prformn thn th BSD tri shm. Howvr, th lookup tim hs lrg vrin. As w n s in Fig. 23, iffrnt prfix lngths n iffrnt numbr of hshing oprtions. W n istinguish fiv iffrnt groups, whih n from on to fiv hshing oprtions. Sin hshing oprtions r not bsi oprtions, th iffrn, btwn srh tht ns fiv hshs n on tht ns only on hsh n b signifint. For xmpl, lookup tims of bout 3.5 ms orrspon to prfix lngths tht n fiv hsh oprtions. BSD tri Shm th 5th prntil 99th prntil (min) prntil BSD tri Multibit tri LC tri Full xpnsion/omprssion Binry srh on prfix lngths Tbl 3. Prntils of lookup tims (ms). Summry Shm Avrg Mximum hight hight Binry tri BSD tri LC tri.8 5 Multibit tri Tbl 4. Tri sttistis for th MEst routr (6 August, 999). To voi running out of vilbl IP rsss n ru th mount of informtion xhng by th routing protools, nw rss llotion shm, CIDR, ws introu. CIDR promots hirrhil ggrgtion of rsss n ls to rltivly smll forwring tbls, but rquirs longst prfix mthing oprtion. Longst prfix mthing is mor omplx thn xt mthing. Th lookup shms w hv survy mnipult prfixs by oing ontroll isggrgtion in orr to provi fstr srh. Sin originl prfixs r usully trnsform into svrl prfixs, to, lt or hng singl prfix rquirs upting svrl ntris, n in th worst s th ntir t strutur ns to b rbuilt. Thus, in gnrl tr-off btwn lookup tim n inrmntl upt tim ns to b m. W provi frmwork n lssify th shms oring to th lgorithmt strutur spt. W hv sn tht th iffiulty with th longst prfix mthing oprtion is its ul imnsion: lngth n vlu. Furthrmor, w srib how lssil srh thniqus hv bn pt to 22 IEEE Ntwork Mrh/April 2

Survey and Taxonomy of IP Address Lookup Algorithms

Survey and Taxonomy of IP Address Lookup Algorithms Survy n Txonomy of IP Arss Lookup Algorithms Migul Á. Ruiz-Sánhz, Ernst W. Birsk, Wli Dbbous mruiz@sophi.inri.fr rbi@urom.fr bbous@sophi.inri.fr Jnury 2, 2 INRIA Sophi Antipolis 24, rout s Luiols, BP 93

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

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

, 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# 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

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

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

(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

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

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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently? Rgistr Allotion Rgistr Allotion How to ssign vrils to initly mny rgistrs? Wht to o whn it n t on? How to o so iintly? Mony, Jun 3, 13 Mmory Wll Disprity twn CPU sp n mmory ss sp improvmnt Mony, Jun 3,

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

Multipoint Alternate Marking method for passive and hybrid performance monitoring

Multipoint Alternate Marking method for passive and hybrid performance monitoring Multipoint Altrnt Mrkin mtho or pssiv n hyri prormn monitorin rt-iool-ippm-multipoint-lt-mrk-00 Pru, Jul 2017, IETF 99 Giuspp Fiool (Tlom Itli) Muro Coilio (Tlom Itli) Amo Spio (Politnio i Torino) Riro

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

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

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

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

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

Aquauno Video 6 Plus Page 1

Aquauno Video 6 Plus Page 1 Connt th timr to th tp. Aquuno Vio 6 Plus Pg 1 Usr mnul 3 lik! For Aquuno Vio 6 (p/n): 8456 For Aquuno Vio 6 Plus (p/n): 8413 Opn th timr unit y prssing th two uttons on th sis, n fit 9V lklin ttry. Whn

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

Designing A Concrete Arch Bridge

Designing A Concrete Arch Bridge This is th mous Shwnh ri in Switzrln, sin y Rort Millrt in 1933. It spns 37.4 mtrs (122 t) n ws sin usin th sm rphil mths tht will monstrt in this lsson. To pro with this lsson, lik on th Nxt utton hr

More information

Walk Like a Mathematician Learning Task:

Walk Like a Mathematician Learning Task: Gori Dprtmnt of Euction Wlk Lik Mthmticin Lrnin Tsk: Mtrics llow us to prform mny usful mthmticl tsks which orinrily rquir lr numbr of computtions. Som typs of problms which cn b on fficintly with mtrics

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

Efficient Broadcast in MANETs Using Network Coding and Directional Antennas

Efficient Broadcast in MANETs Using Network Coding and Directional Antennas Effiint Brost in MANETs Using Ntwork Coing n Dirtionl Antnns Shuhui Yng Dprtmnt of Computr Sin Rnsslr Polythni Institut Troy, NY 28 Ji Wu n Mihl Cri Dprtmnt of Computr Sin n Enginring Flori Atlnti Univrsity

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

A Low Noise and Reliable CMOS I/O Buffer for Mixed Low Voltage Applications

A Low Noise and Reliable CMOS I/O Buffer for Mixed Low Voltage Applications Proings of th 6th WSEAS Intrntionl Confrn on Miroltronis, Nnoltronis, Optoltronis, Istnul, Turky, My 27-29, 27 32 A Low Nois n Rlil CMOS I/O Buffr for Mix Low Voltg Applitions HWANG-CHERNG CHOW n YOU-GANG

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

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

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

Multi-Prefix Trie: a New Data Structure for Designing Dynamic Router-Tables

Multi-Prefix Trie: a New Data Structure for Designing Dynamic Router-Tables 1 Multi-Prix Tri: Nw Dt Strutur or Dsigning Dynmi Routr-Tls Sun-Yun Hsih Mmr, IEEE, Yi-Ling Hung, n Ying-Chi Yng Astrt IP looup ts th sp o n inoming pt n th tim rquir to trmin whih output port th pt shoul

More information

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am 16.unii Introution to Computrs n Prormmin SOLUTIONS to Exmintion /30/0 9:05m - 10:00m Pro. I. Kristin Lunqvist Sprin 00 Grin Stion: Qustion 1 (5) Qustion (15) Qustion 3 (10) Qustion (35) Qustion 5 (10)

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spnning Trs Minimum Spnning Trs Problm A town hs st of houss nd st of rods A rod conncts nd only houss A rod conncting houss u nd v hs rpir cost w(u, v) Gol: Rpir nough (nd no mor) rods such tht:

More information

ME 522 PRINCIPLES OF ROBOTICS. FIRST MIDTERM EXAMINATION April 19, M. Kemal Özgören

ME 522 PRINCIPLES OF ROBOTICS. FIRST MIDTERM EXAMINATION April 19, M. Kemal Özgören ME 522 PINCIPLES OF OBOTICS FIST MIDTEM EXAMINATION April 9, 202 Nm Lst Nm M. Kml Özgörn 2 4 60 40 40 0 80 250 USEFUL FOMULAS cos( ) cos cos sin sin sin( ) sin cos cos sin sin y/ r, cos x/ r, r 0 tn 2(

More information

HIGHER ORDER DIFFERENTIAL EQUATIONS

HIGHER ORDER DIFFERENTIAL EQUATIONS Prof Enriqu Mtus Nivs PhD in Mthmtis Edution IGER ORDER DIFFERENTIAL EQUATIONS omognous linr qutions with onstnt offiints of ordr two highr Appl rdution mthod to dtrmin solution of th nonhomognous qution

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

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

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

XML and Databases. Outline. Recall: Top-Down Evaluation of Simple Paths. Recall: Top-Down Evaluation of Simple Paths. Sebastian Maneth NICTA and UNSW

XML and Databases. Outline. Recall: Top-Down Evaluation of Simple Paths. Recall: Top-Down Evaluation of Simple Paths. Sebastian Maneth NICTA and UNSW Smll Pth Quiz ML n Dtss Cn you giv n xprssion tht rturns th lst / irst ourrn o h istint pri lmnt? Ltur 8 Strming Evlution: how muh mmory o you n? Sstin Mnth NICTA n UNSW

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

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees /1/018 W usully no strns y ssnn -lnt os to ll rtrs n t lpt (or mpl, 8-t on n ASCII). Howvr, rnt rtrs our wt rnt rquns, w n sv mmory n ru trnsmttl tm y usn vrl-lnt non. T s to ssn sortr os to rtrs tt our

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

Throughput Optimal Routing in Overlay Networks

Throughput Optimal Routing in Overlay Networks Fifty-son Annul Allrton Confrn Allrton Hous, UIUC, Illinois, USA Otobr - 3, 4 Throughput Optiml Routing in Ovrly Ntworks Gorgios S. Pshos n Eytn Moino Lbortory for Informtion n Dision Systms Msshustts

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

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

Last time: introduced our first computational model the DFA.

Last time: introduced our first computational model the DFA. Lctur 7 Homwork #7: 2.2.1, 2.2.2, 2.2.3 (hnd in c nd d), Misc: Givn: M, NFA Prov: (q,xy) * (p,y) iff (q,x) * (p,) (follow proof don in clss tody) Lst tim: introducd our first computtionl modl th DFA. Tody

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

Lecture 11 Waves in Periodic Potentials Today: Questions you should be able to address after today s lecture:

Lecture 11 Waves in Periodic Potentials Today: Questions you should be able to address after today s lecture: Lctur 11 Wvs in Priodic Potntils Tody: 1. Invrs lttic dfinition in 1D.. rphicl rprsnttion of priodic nd -priodic functions using th -xis nd invrs lttic vctors. 3. Sris solutions to th priodic potntil Hmiltonin

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

UNCORRECTED SAMPLE PAGES 4-1. Naming fractions KEY IDEAS. 1 Each shape represents ONE whole. a i ii. b i ii

UNCORRECTED SAMPLE PAGES 4-1. Naming fractions KEY IDEAS. 1 Each shape represents ONE whole. a i ii. b i ii - Nming frtions Chptr Frtions Eh shp rprsnts ONE whol. i ii Wht frtion is shdd? Writ s frtion nd in words. Wht frtion is not shdd? Writ s frtion nd in words. i ii i ii Writ s mny diffrnt frtions s you

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

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued... Progrssiv Printing T.M. CPITLS g 4½+ Th sy, fun (n FR!) wy to tch cpitl lttrs. ook : C o - For Kinrgrtn or First Gr (not for pr-school). - Tchs tht cpitl lttrs mk th sm souns s th littl lttrs. - Tchs th

More information

CS553 Lecture Register Allocation 1

CS553 Lecture Register Allocation 1 Low-Lvl Issus Lst ltur Livnss nlysis Rgistr llotion Toy Mor rgistr llotion Wnsy Common suxprssion limintion or PA2 Logistis PA1 is u PA2 hs n post Mony th 15 th, no lss u to LCPC in Orgon CS553 Ltur Rgistr

More information

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016 Ltur 4 Gry Algorithms, Ativity Sltion, Minimum Spnning Trs Sris: Logn Short (5), Virgini Dt: My, Gry Algorithms Suppos w wnt to solv prolm, n w r l to om up with som rursiv ormultion o th prolm tht woul

More information

In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions.

In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions. Crystl Rports for Visul Stuio.NET In orr to lrn whih qustions hv n nswr orrtly: 1. Print ths pgs. 2. Answr th qustions. 3. Sn this ssssmnt with th nswrs vi:. FAX to (212) 967-3498. Or. Mil th nswrs to

More information

Design Optimization Based on Diagnosis Techniques

Design Optimization Based on Diagnosis Techniques Dsign Optimiztion Bs on Dignosis Thniqus Anrs Vnris Mgy S. Air Irhim N. Hjj Univrsity of Toronto Motorol Univrsity of Illinois ECE Dprtmnt 77 W. Prmr ECE Dprtmnt n CSL Toronto, ON M5S 34 Austin, T 78729

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

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

Decimals DECIMALS.

Decimals DECIMALS. Dimls DECIMALS www.mthltis.o.uk ow os it work? Solutions Dimls P qustions Pl vlu o imls 0 000 00 000 0 000 00 0 000 00 0 000 00 0 000 tnths or 0 thousnths or 000 hunrths or 00 hunrths or 00 0 tn thousnths

More information

Expert System. Knowledge-Based Systems. Page 1. Development of KB Systems. Knowledge base. Expert system = Structured computer program

Expert System. Knowledge-Based Systems. Page 1. Development of KB Systems. Knowledge base. Expert system = Structured computer program Knowlg-Bs Systms Exprt Systm Anrw Kusik 2139 Smns Cntr Iow City, Iow 52242-1527 nrw-kusik@uiow.u http://www.in.uiow.u/~nkusik Tl: 319-335 5934 Fx: 319-335 5669 Knowlg s Infrn Engin Dt Exprt systm = Strutur

More information

A Graph-Based Synthesis Algorithm for AND/XOR Networks 1. Yibin Ye Kaushik Roy. a minimum ESOP of a function except for those with

A Graph-Based Synthesis Algorithm for AND/XOR Networks 1. Yibin Ye Kaushik Roy. a minimum ESOP of a function except for those with A Grph-Bs Synthsis Algorithm or AND/XOR Ntworks Yibin Y Kushik Roy Shool o Eltril n Computr Enginring Puru Univrsity, Wst Lytt, IN 4797-285, USA Abstrt In this ppr, w introu Shr Multipl Root XORbs Domposition

More information