Deflation DFA: Remembering History is Adequate

Size: px
Start display at page:

Download "Deflation DFA: Remembering History is Adequate"

Transcription

1 This full text pper ws peer reviewe t the iretion of IEEE Communitions Soiety subjet mtter experts for publition in the IEEE ICC 21 proeeings Defltion DFA: Remembering History is Aequte Yi Tng 1, Tinfn Xue 2, Junhen Jing 1 n Bin Liu 1 1 Ntionl Lbortory for Informtion Siene n Tehnology, 1 Deprtment of Computer Siene n Tehnology, Tsinghu University, Beijing, PRC 2 Deprtment of Informtion Engineering, The Chinese University of Hong Kong, Hong Kong Emil: tngy5@mils.tsinghu.eu, jimmyxuetinfn@gmil.om, livej@gmil.om, lmyujie@gmil.om ABSTRACT There is n inresing emn for network evies to perform eep pket inspetion (DPI) to enhne network seurity. In DPI the pket pylo is ompre ginst set of preefine ptterns whih n be speifie using regulr expressions (regexes). It is well-known tht mpping regexes to eterministi finite utomt (DFA) will suffer from the stte explosion problem. Through observtion, we ttribute DFA explosion to the neessity of remembering mthing history. In this pper, we investigte how to reor the mthing history effiiently n propose n extene DFA pproh for regex mthing lle fq-fa, whih n mke memory size reution of bout 1 times with fully utomte pproh. In fq-fa, we use pipeline s n ounters to help reoring the mthing history. Hene, stte explosion use by Kleene losure n repetitions n be efinitely voie. Further, it hieves fully utomte signture ompiltion with polynomil running time n spe. Key Wors Deterministi Finite Automt (DFA), Deep Pket Inspetion (DPI), Regulr Expression (Regex) I. INTRODUCTION Nowys, seurity hs beome one of the most serious onerns on urrent Internet. Network Intrusion Detetion Systems (NIDSes) hve been opte by enterprises to efen ginst ll kins of exploits towrs them. In the ommeril worl, regulr expression (regex) hs lrey been the e fto signture stnr for signture-bse NIDSes [7][1], beuse of its expressiveness n mthing effiieny [14]. The fmous open-soure NIDS, Snort [7], hs more thn 11 signtures. To mke the signture hrer to be eve by ttkers, people ten to write more n more omplex regexes s signtures. It use the memory size of nïve DFA-bse regex pprohes uneptble, whih inreses exponentilly in worst se, e.g., the Snort HTTP signture set will result in DFA lrger thn 15GB [4]. Vrious pprohes [1][3][4][5][8][9][13] hve been propose to solve this issue. As is well known regex DFA explosion is result of some funtions suh s Kleene losure (.*, [^]* ) or length restritions ( {1} ). However, few works investigtes tht ifferent losures n restritions hve ifferent impt on the DFA stte explosion. Tble I is n exmple of exponentil infltion use by length restrition. Though the regexes re very simple, the sttes ber for these regexes hnge rmtilly. In this pper, we ttribute the regex DFA explosion to the neessity of remembering mthing history. For regex [ b]{13}, the prefix overlps with length restrition [ b]{13}. To over ll ses, the DFA shoul remember the ounter sttus when prefix is mthe eh time. For regex 'b[^b]{1}', the prefix b oes not overlp with [^b]{1}. So, it is not neessry to remember ny history informtion. For rel wor ses, it is more omplite, we will isuss intensively in setion III.E. TABLE I. INFLATION CAUSED BY LENGTH RESTRICTION Regex # of sttes Regex # of sttes A 2 b 3 [ b]{11} 496 b[^b]{1} 33 [ b]{12} 8192 b[^b]{1} 33 [ b]{13} b[^b]{1} 33 On the purpose of proviing n lterntive regex implementtion rther thn DFA or erous DFA ompression methos, we investigte how to reor the regex mthing history effiiently. In this pper, we introue bit- to remember mthing history n further propose new sheme lle fq-fa. Fq-FA hieves fully utomte signture ompiltion with polynomil running time n spe. In generl, our mjor ontributions n vntges re highlighte below: 1. By introuing bit-s we n remember the history on whih prts of the regulr expressions hve been mthe esily. This enbles us to onvert regex to fq-fa in fully utomte mnner. As fr s we know, our reserh is the first effort to hieve memory reution n mthing effiieny in fully utomti generte regex mthing system in polynomil time n spe 2. Different losures require ifferent mount of uxiliry informtion n we evise generl rule to eie whether losure is frienly (requiring little uxiliry informtion) or not. Therefore, we n istribute less uxiliry informtion to those frienly rules to hieve better ompression effet. 3. Our metho supports inrementl upting for regex rules. It is esy to insert or elete ny regex rule t running time without requiring the mthing system to reompile ll the other rules. Current utomton bse methos n hrly support inrementl upting regex rules. The evlution is bse on 71 rnomly hosen Snort HTTP rules. They require more thn 2GB memory to ombine together, however, in our pproh only nee 53KB DFA plus.3kb register memory for keeping the histori mthing informtion. Further, we hieve suh performne in fully utomte mnner. This pper is orgnize s follows. After relte work presente in setion II, we give the ie of fq-fa n its optimiztion in setion III. The experimentl is provie in setion IV. We will rw the onlusion in setion V /1/$ IEEE

2 This full text pper ws peer reviewe t the iretion of IEEE Communitions Soiety subjet mtter experts for publition in the IEEE ICC 21 proeeings II. RELATED WORK Currently, most pprohes fous on how to moify DFA struture to sve memory without muh mthing overhe. There re two mjor iretions in the reserh of DFA s efltion. One is to eliminte trnsition reunny; the other is to reue stte explosion. For trnsition eliminting, Kumr et l. propose D2FA [9], whih ompresses DFA through the introution of efult trnsition, n it tres off storge requirement with proessing time. CD2FA [8] following D2FA is propose by using reursive ontent lbels to reue the imeter bouns of D2FA to 2 with only one 64-bit wie memory ess. In [13], Behi propose to limit the boun of the ber of efult pths in D2FA, n improve the worst se of it. Essentilly these methos re trgeting t reue the ber of trnsition, whih oes not touh the kernel of regex DFA explosion n fil to obtin goo performne. For efltion stte explosion, in [6], Behi propose n lgorithm to merge sttes, whih reue prtil sttes into lbele trnsitions n n hieve memory reution one orer of mgnitue. However, to buil the ombine DFA is very hr given its size my be 1GB or even 1GB. Currently, the stte of rt work XFA [2][4]. It uses uxiliry informtion to reue spe requirement. To buil DFA with uxiliry informtion, first, NXFA (A NXFA is NFA with noneterministi uxiliry t omin) is onstrute from the prsing tree of regulr expression; Seon, n originl XFA is built from NXFA by ε-elimintion n eterminiztion; Thir, n effiient implementble t omin (EIDD) is foun n mppe to the originl XFA, in orer reue the size of uxiliry informtion. However, the tul performne of this lgorithm remins rguble. First of ll, the originl XFA hs little effet on reuing the spe requirement. In XFA, it first uses noneterministi uxiliry informtion (t omin) to represent rules n then onverts it to eterministi one. However, this will use possible uxiliry memory bloting up, s n possible vlues of uxiliry memory in NXFA my le to 2 n possible ones in XFA, just like n possible stte in NFA my le to 2 n possible sttes in DFA. This t omin explosion in XFA n lso be expline in forml wy. If the originl DFA hs A sttes, n the XFA hs B sttes n C possible vlues of uxiliry informtion, then it must stisfy the following ineqution: A<BC, otherwise XFA nnot emonstrte ll ses of originl DFA. Consequently, the totl memory requirement B+C is no less thn O( A. For the originl DFA with O(2 ) sttes, XFA will hve O(2 /2) sttes, whih is lso n exponentil size. Notie, this is best se boun. Atully, for most rules, the originl XFA hs similr size of the tritionl DFA. To solve this problem, XFA introues EIDD to reue uxiliry informtion requirement. Although EIDD n gretly reue the size of uxiliry memory, it brings nother problem: fining mpping from EIDD to XFA is rther time onsuming job. As no systemti wy to fin goo EIDD, the only wy is to refully exmine the rules n esign EIDD mnully. This my be fesible for simple rule, but for those omplex rules with lrge uxiliry informtion, there is no gurntee tht most effiient EIDD n be foun by mnul-effort, or even if it is foun, it my require muh time n effort. Aoring to [4], these kins of rules oupy the 13.5% in the rule set they hoose. The mjor problem of XFA is the use of noneterministi uxiliry informtion s gngwy to buil XFA. This not only fils to mke the problems simpler, but tully introue gret time n mnul ost in onstruting XFA. In the next setion, we will give n utomt iretly onstrute from regex, whih n voi the problems in XFA. III. THE IDEA OF FCQ-FA As its nme, fq-fa ontins three prts: DFA, flg/ounter n. DFA prt is just norml DFA built from sub-rules resulte from breking rules by eliminting Kleene losure n length restrition. There re some tions tken on sttes, usully on finl sttes. Flg/ounter is use to mrk n rrivl of losure or length restrition respetively. The is use to reor the mthing history of ertin prts of regex. To lerly stte our ie, we strt with simple exmple with losures using fq-fa (without ounter), then followe by nother exmple with length restrition opting q-fa (without flg). A. The Bsi Ie of fq-fa For the smple with two rules: r1=.*b[^]*, r2=.*ef. We first eliminte losures of the regexes, brek them into three sub-rules: s1= b, s2=, s3= ef. Figure 1 shows the orresponing fq-fa struture (some of the trnsitions hve been omitte to keep it reble). In this exmple the orresponing regex of the DFA is (.*s1.*s2.*s3)=(.*b.*.*ef). Sine there is only one losure, we use single flg. The flg represents whether the sub-regex hs mthe up to the losure, b[^]* in this exmple. Eh time when new hrter is re in, the flg n be set or 1, or remin unhnge. Here we set the flg whenever the DFA rehes stte 2 n ler it s long s the input hrter is, otherwise the flg remins unhnge. If [1]=1, mth b[^]* 3 4 e Set flg 1 Mth ef 5 f 6 flg: -If input =, flg <= -If ur_stte = 2, flg <= 1 flg : [] [1] : -For eh input hrter, will shift right & [] <= flg Figure 1. Exmple of fq-fa for Regex (r1=.*b[^]*, r2=.*ef ) The system mintins to store most reent n flg vlues. When input hrter omes, we shift to the right for one step n set [] the flg vlue of lst yle. The length is eie by the length of sub-rule just fter losure. Here length is 2 s the length of s2. The following is smple illustrting the exeution of fq-fa, using bef s n input string. When prsing to

3 This full text pper ws peer reviewe t the iretion of IEEE Communitions Soiety subjet mtter experts for publition in the IEEE ICC 21 proeeings stte 2, it will set flg 1, whih mens b[^]* is mthe. When rriving stte 3, [1] will be heke. As the vlue is 1, it will report tht rule b[^]* hs been mthe. Notie tht lthough flg is t tht time, fq-fa still remembers tht flg ws 1 two hrters go using, n therefore it orretly reports mth. The intuition behin this exmple is tht fq-fa remember the history when b[^]* is mthe. After the is mthe we use the bit- to hek whether the b[^]* hs lrey been mthe before rriving. If yes, it is vli mth of whole expression. The key is to use struture to reor the history informtion. B. The bsi ie of q-fa We tke rule set: r1= b[^]{2}e, r2= ef s n illustrtion. For eliminte length restrition, we brek rules into sub-rules: r1= b, r2= e, r3= ef n then onstrut the orresponing q-fa, s Figure 2 shows. In q-fa we move the rightmost bit of the ounter, rther thn the previous flg vlue, to the leftmost bit of. A ounter is n m+1 -bit- s stte bove. It n be set n reset, n shifte right on every input. When ounter is set, ount[] will be set to 1 ; When the ounter is reset, ll in it will be set to. This ours when the input hrter is onfliting with hrter set of losure (in this se, { }). Besies, ll will shift one step right eh turn, n the leftmost bit is put into the oringly. For input string bbee, notie tht the seon time sub-rule e is mthe, it will not report mth, beuse t tht time [1] is lrey sine the first input of hs reset the whole vlue of ounter. By ombining fq-fa n q-fa, we n get the fq-fa. The following subsetions will show the steps in builing mthing system using fq-fa. C. Rewrite rules n buil DFA Engine The first step of onstruting fq-fa system is to rewrite rules. One originl rule will be broken into severl sub-rules to stisfy following requirements: First, no losure or length restrition ppers t sub-rules; seon, sub-rule shoul hve fixe length, otherwise it shoul be further split. Tble II shows the result of rewriting rule b[^]*(b b)[^b]*e. First two losures [^]* n [^b]* hve been eliminte, then we get three sub-rules ounter[] <= 1 ounter : [] [1] [2] : [] [1] ounter : : -if input =, -eh turn, 3 e 4 f 5 Mth ounter[i] <=, i=,1,2 1. will shift right ef -if ur_stte = 2, ounter[] <= 1 2.[] <= ounter[2] if [1]=1, -eh turn mth b[^]{2} ounter will shift right Figure 2. Exmple of q-fa for Regex(r1= b[^]{2}e, r2= ef ) b, (b b) n e. Sine (b b) oes not hve fixe length, it is further split into b n b. Besies, some tgs re ssigne to show positions of sub-rules in the originl rule. In this se, f1 is use to represent the losure [^]* n f2 is use to represent [^b]*, so (f1,f2) mens tht sub-rule b is lote between [^b]* n [^]*. For eh losure, we use n flg; for eh length restrition, we use n ounter. TABLE II. REWRITTEN RULES Then we buil DFA using these sub-rules. We ombine ll the sub-rules vi opertor, n then buil DFA to represent this regex. The DFA of.*b.*(b b).*e is shown in Figure 3 (Still, some less importnt trnsitions re ignore to mke the figure reble. We lso mrk tions nee to tke n tgs we got bove). Besies, the inex of sub-rules being mthe nee to store on eh finl stte. [^b] b Sub-rule1: (,f1) f1 <= Sub-rule2: (f1,f2) if q1[1] = 1, f2 <= 1 Sub-rule3: (f1,f2) if q1[2] = 1, f2 <= 1 6 e 7 Sub-rule4: (f2,) if q2[1] = 1, f2: report mth - If input = b, flg2 <= Figure 3. fq-fa of b[^]*(b b)[^b]*e f1: - If input =, flg1 <= D. Builing mthing system Here, we use two tbles (tion tble n invlition tble) to store the tions to tke on eh stte. Ation tble tells us when to set flg, ounter or report mth, while invlition tble preserve when to reset flg or ounter. TABLE III. ACTION TABLE OF AB[^A]*(B AB)C[^B]*DE request length tion While Reing (sub-rule) null 2 set f1 b f1 2 set f2 b f1 3 set f2 b f2 2 report mth r1 e

4 This full text pper ws peer reviewe t the iretion of IEEE Communitions Soiety subjet mtter experts for publition in the IEEE ICC 21 proeeings In tion tble, eh row stns for sub-rule. An for eh sub-rule, there re three entries: request, length n tion. The request entry inite whih we nee to hek when this sub-rule is mthe. The length entry shows the length of this sub-rule, n further implies whih bit of tht nees to be heke. An tion entry illustrtes wht we nee to o if the sub-rule is mthe n request is fit. We still use the exmple mentione bove. Sine the requeste entry of sub-rule b is f1 n the length entry is 2 (shown in Tble III), when sub-rule b is mthe, we nee to hek whether q1[2-1] is 1. If yes, we will set flg2. (Here, flg k n q[k] represent kth flg n kth respetively, n we suppose tht kth flg is orrespon with kth ) TABLE IV. INVALIDATION TABLE OF AB[^A]*(B AB)C[^B]*DE input f1 f2 1 b 1 others 1 1 In the invlition tble, eh row represents possible input hrter n eh olumn represents flg or ounter. The vlue of the tble entry my be either or 1. If ertin entry is, for exmple, t[, f1] = (shown in tble IV), it mens tht when the input hrter is, it will reset f1; Otherwise the f1 will remin unhnge. E. Reue uxiliry informtion The fq-fa hs signifintly reue the sttes ber of DFA, but the uxiliry memory lso inurs high ost. In this subsetion, we introue metho to eliminte some of reunnt uxiliry informtion for fq-fa. Different losures n length restritions tully ply ifferent roles in regex, through istinguishing ifferent properties of losures n treting them iversely, we hieve reution memory bout 5% for bit-s. First, for rule like r1[^]*r2, if it stisfies the following two qulities, only one bit is require to represent the losure without introuing ny flse negtive or flse positive (Here enotes for ny hrter or hrter set): 1. For ny string s 1 Lr () 1 ns 2 Lr () 2, suffix of s1 oesn t equl to prefix of s2. Also, s1 itself oesn t pper in s2. 2. For ny string s 2 Lr ( 2 ), ny hrter ' s shoul 2 not pper t (tht is ' ). The onition 1 ensures tht when mthing r2, the flg will not be set to 1 ; the onition 2 gurntees tht when mthing the sub-rule r2, flg will not be set to. In this wy, we n eliminte the from fq-fa, n when r2 is mthe, we nee only hek the orresponing flg. If the regex just stisfies onition 2 but not onition 1, the flg n be reple by n integer ounter of strlen(r2), not just 1 bit. Tking regex b[^]*b s n exmple, the regex stisfies onition 2 but not onition 1. Hene, the bit- for losure [^]* nnot be eliminte. Otherwise, when system is reing b, the flg is set 1, menwhile DFA for b b mthes string b. If using 1-bit flg, rther thn bit-, the system will report flse positive results. Another exmple, for regex b[^]*ef, it stisfies onition 1 but not onition 2. So, while mthing ef, the flg for [^]* will be set to. If using just 1-bit flg, system woul report flse negtive results. As for ounter, we n use n integer ounter rther thn n-bit- in some ses. For rule like r1[^]{n}r2, if the following property is met, the length restrition n be reple by simple integer ounter: 1. For ny string s 1 Lr () 1, there is t lest one hrter ' s1 ppering t (tht is ' ) This onition ensures tht when mthing [^]{n}, r1 will not be mthe n onsequently the ounter will not be set gin. Hene, n integer ounter is enough in this se. This n reue the spe requirement, beuse for length restrition [^]{n}, we nee (n+1) if bit- is use, while only log(n) re is neee if n integer is use. F. A more Complite Exmple Tking regex of protool imesh in L7-filter [12] s exmple, using originl wy to buil DFA, it will hve 3416 sttes n trnsitions. Suh lrge memory requirement will mke the hrwre implementtion impossible if we ombine suh rules together. The regex is: ^(post[\x9-\x\x2-~]*<pssworhsh>...</psswor Hsh><ClientVer> \x34\x8?\x?\xf\xff\x4 get[\x9-\x\x2-~]*host :\x2imsh\.ownlo-pro\.musinet\.om \x2(\x1 \x2)\x83.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?\x2(\x1 \x2)\x83) First, we ivie the big rule into smll ones oring to the opertor. The bove regex is split into 4: 1.^(post[\x9-\x\x2-~]*<PssworHsh>...</Psswo rhsh><clientver>) 2.^(\x34\x8?\x?\xf\xff\x4) 3.^(get[\x9-\x -~]*Host: imsh\.ownlo-pro\.musinet\.om) 4.^(\x2(\x1 \x2)\x83.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?\x 2(\x1 \x2)\x83) An tion tble is proue by going through the regex. TABLE V. ACTION TABLE OF IMESH REGEX Sub-rule Request Length Ation ^post null set f1 <PssworHsh> f1 14() set q1 </PssworHsh><ClientVer> q mthe ^(\x34\x8?\x?\xf\xff\x4) null mthe ^get null set f2 Host: imsh\.ownlo-pro\.musinet\.om f2 37() mthe ^\x2(\x1 \x2)\x83 null set q2 \x2(\x1 \x2)\x83 q2-24 mth Menwhile, we ombine new generte sub-rules. The DFA for ombine rules hs 1 sttes n 38 trnsitions. Compring with the tritionl DFA whih hs 3416 sttes n trnsitions, fq-fa efltes the DFA gretly by only introuing 4 bit-s, while 2 of them (f1 n f2) n be further eliminte s optimiztion

5 This full text pper ws peer reviewe t the iretion of IEEE Communitions Soiety subjet mtter experts for publition in the IEEE ICC 21 proeeings sheme isusse in setion III.E. Moreover, the whole proess is omplishe utomtilly without ny mnul effort. IV. EXPERIMENTAL EVALUATION A. Experiment on smple rules We rnomly selet 71 rules from Snort s web pre ruleset. The result is shown in tble VI. Sub rules TABLE VI. Flg ount BIT-QUEUES S CONSUMPTION Flg flg ount ounter flg ounter The rule set ontins of 71 regexes, whih proues 174 sub-rules s tble VI shows. The length restrition ppers 28 times in 71 rules. The verge length of them is 266 (7445/28), n the longest is 124. fq-fa n be onstrute regrless the length n. In evlution, 13 of 28 ounter bit-s n be reple. An the totl length of ounter reues from 7445 to In fq-fa, the DFA for the ombintion of 174 sub-rules requires 2862 sttes. For totl memory requirement of fq-fa, we must onsier memory use by DFA s well s bit-. As the bove Tble VI, less thn.6m bytes of stti memory plus.3k bytes ynmi register re neee to represent the ombintion of these 71 Snort rules. B. Experiment on Snort rule We lulte the memory onsumption of our system for Snort-web, Snort-ftp, Snort-smtp n Snort-voip. Notie tht bitmp ompression oes not use to optimize bit- here. set TABLE VII. SNORT RULE S MEMORY INFOMATION Flg Counter flg ounter web ftp smtp voip Mem. Sub Combine Combine in fq-fa set for rule DFA DFA Sttes Sttes Trnsition web 9KB 495 >3.1M ftp 3KB 114 >3.1M smtp 7kB 141 >3.1M voip 1KB 513 >3.1M Tble VII shows the gret effet of fq-fa on eflting the DFA of Snort rules. Espeilly, to buil mthing system of 733 Snort web rules, 9MB stti memory n 2KB ynmi memory is require here, whih the tritionl DFA implementtion my ost lrger thn 1 GB. V.CONCLUSION AND FUTURE WORK In this pper we fin the essene of regex DFA explosion is to remember the mthing history. Bse on this observtion, we propose kin of extene DFA with severl bit-s (fq-fa) to help reoring the mthing history. It elimintes most losures n length restritions in regex, whih re the mjor uses of the explosion. Compre with other lgorithms using uxiliry memory, fq-fa hieves better spe performne n less generting n upting time. The essene of fq-fa is utilizing bit-s to reor mthing history to hieve the efltion of DFA. While, XFA uses instrutions to hnle regexes, whih is generl CPU pproh n requires lots of mnul work to hieve optimiztion n is error-prone. ACKNOWLEDGMENT This work is supporte by NSFC (662521, , ), 973 projet (27CB3171), 863 high-teh projet (27AA1Z216) n Tsinghu University Inititive Sientifi Reserh Progrm VI.REFERENCES [1] F. Yu et lt., Fst n Memory-Effiient Regulr Expression Mthing for Deep Pket Inspetion, in ANCS 26 [2] R. Smith, C. Estn, Somesh Jh, Deflting the Big Bng: fst n slble eep pket inspetion with vrible-extene utomt SIGCOMM, August 2 [3] S. Kumr, Blkrishnn Chnrsekrn, Jonthn Turner, George Vrghese, Curing Regulr Expressions Mthing Algorithms from Insomni, Amnesi, n Aluli, in ANCS 27 [4] R. Smith, C. Estn, Somesh Jh XFAs: Fster signture mthing with extene utomt, IEEE Symposium on Seurity n Privy (Okln), My 28 [5] B.C. Broie, R.K. Cytron, n D.E. Tylor. A Slble Arhiteture for High-Throughput Regulr-Expression Pttern Mthing. In ISCA, Boston, MA, June 26. [6] M. Behi n S. Cmbi. Memory-effiient regulr expression serh using stte merging. INFOCOM, My 27. [7] Snort [8] S. Kumr, J. Turner n J. Willims, Avne Algorithms for Fst n Slble Deep Pket Inspetion, in ANCS 26 [9] S. Kumr et lt., Algorithms to Aelerte Multiple Regulr Expressions Mthing for Deep Pket Inspetion, in ACM SIGCOMM, Sept 26. [1] Bro Intrusion Detetion System. [11] Perl Comptible Regulr Expressions: [12] "Applition Lyer Pket Clssifier for Linux." [13] M. Behi n P. Crowley, An Improve Algorithm to Aelerte Regulr Expression Evlution, ANCS 27. [14] R. Sommer n V. Pxson, Enhning Byte-Level Network Intrusion Detetion Signtures with Context, Pro. ACM CCS 23

CS 241 Week 4 Tutorial Solutions

CS 241 Week 4 Tutorial Solutions CS 4 Week 4 Tutoril Solutions Writing n Assemler, Prt & Regulr Lnguges Prt Winter 8 Assemling instrutions utomtilly. slt $d, $s, $t. Solution: $d, $s, nd $t ll fit in -it signed integers sine they re 5-it

More information

Outline. Motivation Background ARCH. Experiment Additional usages for Input-Depth. Regular Expression Matching DPI over Compressed HTTP

Outline. Motivation Background ARCH. Experiment Additional usages for Input-Depth. Regular Expression Matching DPI over Compressed HTTP ARCH This work ws supported y: The Europen Reserh Counil, The Isreli Centers of Reserh Exellene, The Neptune Consortium, nd Ntionl Siene Foundtion wrd CNS-119748 Outline Motivtion Bkground Regulr Expression

More information

Table-driven look-ahead lexical analysis

Table-driven look-ahead lexical analysis Tle-riven look-he lexil nlysis WUU YANG Computer n Informtion Siene Deprtment Ntionl Chio-Tung University, HsinChu, Tiwn, R.O.C. Astrt. Moern progrmming lnguges use regulr expressions to efine vli tokens.

More information

Distance vector protocol

Distance vector protocol istne vetor protool Irene Finohi finohi@i.unirom.it Routing Routing protool Gol: etermine goo pth (sequene of routers) thru network from soure to Grph strtion for routing lgorithms: grph noes re routers

More information

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved. Chpter 9 Greey Tehnique Copyright 2007 Person Aison-Wesley. All rights reserve. Greey Tehnique Construts solution to n optimiztion prolem piee y piee through sequene of hoies tht re: fesile lolly optiml

More information

Paradigm 5. Data Structure. Suffix trees. What is a suffix tree? Suffix tree. Simple applications. Simple applications. Algorithms

Paradigm 5. Data Structure. Suffix trees. What is a suffix tree? Suffix tree. Simple applications. Simple applications. Algorithms Prdigm. Dt Struture Known exmples: link tble, hep, Our leture: suffix tree Will involve mortize method tht will be stressed shortly in this ourse Suffix trees Wht is suffix tree? Simple pplitions History

More information

Hash-based Subgraph Query Processing Method for Graph-structured XML Documents

Hash-based Subgraph Query Processing Method for Graph-structured XML Documents Hsh-bse Subgrph Query Proessing Metho for Grph-struture XML Douments Hongzhi Wng Hrbin Institute of Teh. wngzh@hit.eu.n Jinzhong Li Hrbin Institute of Teh. lijzh@hit.eu.n Jizhou Luo Hrbin Institute of

More information

Greedy Algorithm. Algorithm Fall Semester

Greedy Algorithm. Algorithm Fall Semester Greey Algorithm Algorithm 0 Fll Semester Optimiztion prolems An optimiztion prolem is one in whih you wnt to fin, not just solution, ut the est solution A greey lgorithm sometimes works well for optimiztion

More information

10.2 Graph Terminology and Special Types of Graphs

10.2 Graph Terminology and Special Types of Graphs 10.2 Grph Terminology n Speil Types of Grphs Definition 1. Two verties u n v in n unirete grph G re lle jent (or neighors) in G iff u n v re enpoints of n ege e of G. Suh n ege e is lle inient with the

More information

Pattern Matching. Pattern Matching. Pattern Matching. Review of Regular Expressions

Pattern Matching. Pattern Matching. Pattern Matching. Review of Regular Expressions Pttern Mthing Pttern Mthing Some of these leture slides hve een dpted from: lgorithms in C, Roert Sedgewik. Gol. Generlize string serhing to inompletely speified ptterns. pplitions. Test if string or its

More information

Cooperative Routing in Multi-Source Multi-Destination Multi-hop Wireless Networks

Cooperative Routing in Multi-Source Multi-Destination Multi-hop Wireless Networks oopertive Routing in Multi-Soure Multi-estintion Multi-hop Wireless Networks Jin Zhng Qin Zhng eprtment of omputer Siene n ngineering Hong Kong University of Siene n Tehnology, HongKong {zjzj, qinzh}@se.ust.hk

More information

Lesson 4.4. Euler Circuits and Paths. Explore This

Lesson 4.4. Euler Circuits and Paths. Explore This Lesson 4.4 Euler Ciruits nd Pths Now tht you re fmilir with some of the onepts of grphs nd the wy grphs onvey onnetions nd reltionships, it s time to egin exploring how they n e used to model mny different

More information

ECE 468/573 Midterm 1 September 28, 2012

ECE 468/573 Midterm 1 September 28, 2012 ECE 468/573 Midterm 1 September 28, 2012 Nme:! Purdue emil:! Plese sign the following: I ffirm tht the nswers given on this test re mine nd mine lone. I did not receive help from ny person or mteril (other

More information

CS 340, Fall 2016 Sep 29th Exam 1 Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.

CS 340, Fall 2016 Sep 29th Exam 1 Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string. CS 340, Fll 2016 Sep 29th Exm 1 Nme: Note: in ll questions, the speil symol ɛ (epsilon) is used to indite the empty string. Question 1. [10 points] Speify regulr expression tht genertes the lnguge over

More information

V = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V)

V = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V) Definitions G = (V, E) V = set of verties (vertex / noe) E = set of eges (v, w) (v, w in V) (v, w) orere => irete grph (igrph) (v, w) non-orere => unirete grph igrph: w is jent to v if there is n ege from

More information

FEEDBACK: The standard error of a regression is not an unbiased estimator for the standard deviation of the error in a multiple regression model.

FEEDBACK: The standard error of a regression is not an unbiased estimator for the standard deviation of the error in a multiple regression model. Introutory Eonometris: A Moern Approh 6th Eition Woolrige Test Bnk Solutions Complete ownlo: https://testbnkre.om/ownlo/introutory-eonometris-moern-pproh-6th-eition-jeffreym-woolrige-test-bnk/ Solutions

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In the last lecture, we discussed how valid tokens may be specified by regular expressions. LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.

More information

IMAGE COMPRESSION USING HIRARCHICAL LINEAR POLYNOMIAL CODING

IMAGE COMPRESSION USING HIRARCHICAL LINEAR POLYNOMIAL CODING Rsh Al-Tmimi et l, Interntionl Journl of Computer Siene nd Mobile Computing, Vol.4 Issue.1, Jnury- 015, pg. 11-119 Avilble Online t www.ijsm.om Interntionl Journl of Computer Siene nd Mobile Computing

More information

COMMON FRACTIONS. or a / b = a b. , a is called the numerator, and b is called the denominator.

COMMON FRACTIONS. or a / b = a b. , a is called the numerator, and b is called the denominator. COMMON FRACTIONS BASIC DEFINITIONS * A frtion is n inite ivision. or / * In the frtion is lle the numertor n is lle the enomintor. * The whole is seprte into "" equl prts n we re onsiering "" of those

More information

UTMC APPLICATION NOTE UT1553B BCRT TO INTERFACE PSEUDO-DUAL-PORT RAM ARCHITECTURE INTRODUCTION ARBITRATION DETAILS DESIGN SELECTIONS

UTMC APPLICATION NOTE UT1553B BCRT TO INTERFACE PSEUDO-DUAL-PORT RAM ARCHITECTURE INTRODUCTION ARBITRATION DETAILS DESIGN SELECTIONS UTMC APPLICATION NOTE UT1553B BCRT TO 80186 INTERFACE INTRODUCTION The UTMC UT1553B BCRT is monolithi CMOS integrte iruit tht provies omprehensive Bus Controller n Remote Terminl funtions for MIL-STD-

More information

Midterm Exam CSC October 2001

Midterm Exam CSC October 2001 Midterm Exm CSC 173 23 Otoer 2001 Diretions This exm hs 8 questions, severl of whih hve suprts. Eh question indites its point vlue. The totl is 100 points. Questions 5() nd 6() re optionl; they re not

More information

Error Numbers of the Standard Function Block

Error Numbers of the Standard Function Block A.2.2 Numers of the Stndrd Funtion Blok evlution The result of the logi opertion RLO is set if n error ours while the stndrd funtion lok is eing proessed. This llows you to rnh to your own error evlution

More information

Graph Contraction and Connectivity

Graph Contraction and Connectivity Chpter 14 Grph Contrtion n Connetivity So fr we hve mostly overe tehniques for solving problems on grphs tht were evelope in the ontext of sequentil lgorithms. Some of them re esy to prllelize while others

More information

Evaluating Regular Expression Matching Engines on Network and General Purpose Processors

Evaluating Regular Expression Matching Engines on Network and General Purpose Processors Evluting Regulr Expression Mthing Engines on Network n Generl Purpose Proessors Mihel Behi Wshington University Computer Siene n Engineering St. Louis, MO 63130-4899 mehi@se.wustl.eu Chrlie Wisemn Wshington

More information

MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts. Introduction to Matroids and Applications. Srikumar Ramalingam

MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts. Introduction to Matroids and Applications. Srikumar Ramalingam Cmrige, Msshusetts Introution to Mtrois n Applitions Srikumr Rmlingm MERL mm//yy Liner Alger (,0,0) (0,,0) Liner inepenene in vetors: v, v2,..., For ll non-trivil we hve s v s v n s, s2,..., s n 2v2...

More information

Internet Routing. IP Packet Format. IP Fragmentation & Reassembly. Principles of Internet Routing. Computer Networks 9/29/2014.

Internet Routing. IP Packet Format. IP Fragmentation & Reassembly. Principles of Internet Routing. Computer Networks 9/29/2014. omputer Networks 9/29/2014 IP Pket Formt Internet Routing Ki Shen IP protool version numer heder length (words) for qulity of servie mx numer remining hops (deremented t eh router) upper lyer protool to

More information

Advanced Programming Handout 5. Enter Okasaki. Persistent vs. Ephemeral. Functional Queues. Simple Example. Persistent vs.

Advanced Programming Handout 5. Enter Okasaki. Persistent vs. Ephemeral. Functional Queues. Simple Example. Persistent vs. Avne Progrmming Hnout 5 Purel Funtionl Dt Strutures: A Cse Stu in Funtionl Progrmming Persistent vs. Ephemerl An ephemerl t struture is one for whih onl one version is ville t time: fter n upte opertion,

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

Dr. D.M. Akbar Hussain

Dr. D.M. Akbar Hussain Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence

More information

Introduction. Example

Introduction. Example OMS0 Introution isjoint sets n minimum spnning trees In this leture we will strt by isussing t struture use for mintining isjoint subsets of some bigger set. This hs number of pplitions, inluing to mintining

More information

A matching algorithm for measuring the structural similarity between an XML document and a DTD and its applications $

A matching algorithm for measuring the structural similarity between an XML document and a DTD and its applications $ Informtion Systems 29 (2004) 23 46 A mthing lgorithm for mesuring the struturl similrity etween n XML oument n DTD n its pplitions $ Elis Bertino, Giovnn Guerrini, Mro Mesiti, * Diprtimento i Informti

More information

Class Overview. Database Design. Database Design Process. Database Design. Introduction to Data Management CSE 414

Class Overview. Database Design. Database Design Process. Database Design. Introduction to Data Management CSE 414 Introution to Dt Mngement CSE 44 Unit 6: Coneptul Design E/R Digrms Integrity Constrints BCNF Introution to Dt Mngement CSE 44 E/R Digrms ( letures) CSE 44 Autumn 08 Clss Overview Dtse Design Unit : Intro

More information

COMPUTER EDUCATION TECHNIQUES, INC. (WEBLOGIC_SVR_ADM ) SA:

COMPUTER EDUCATION TECHNIQUES, INC. (WEBLOGIC_SVR_ADM ) SA: In orer to lern whih questions hve een nswere orretly: 1. Print these pges. 2. Answer the questions. 3. Sen this ssessment with the nswers vi:. FAX to (212) 967-3498. Or. Mil the nswers to the following

More information

Internet Routing. Reminder: Routing. CPSC Network Programming

Internet Routing. Reminder: Routing. CPSC Network Programming PS 360 - Network Progrmming Internet Routing Mihele Weigle eprtment of omputer Siene lemson University mweigle@s.lemson.eu pril, 00 http://www.s.lemson.eu/~mweigle/ourses/ps360 Reminer: Routing Internet

More information

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2: Solutions. Please write your name in the upper corner of each page.

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2: Solutions. Please write your name in the upper corner of each page. 6045J/18400J: Automt, Computbility nd Complexity Mrh 30, 2005 Quiz 2: Solutions Prof Nny Lynh Vinod Vikuntnthn Plese write your nme in the upper orner of eh pge Problem Sore 1 2 3 4 5 6 Totl Q2-1 Problem

More information

Honors Thesis: Investigating the Algebraic Properties of Cayley Digraphs

Honors Thesis: Investigating the Algebraic Properties of Cayley Digraphs Honors Thesis: Investigting the Algebri Properties of Cyley Digrphs Alexis Byers, Wittenberg University Mthemtis Deprtment April 30, 2014 This pper utilizes Grph Theory to gin insight into the lgebri struture

More information

CICS Application Design

CICS Application Design CICS Applition Design In orer to lern whih questions hve een nswere orretly: 1. Print these pges. 2. Answer the questions. 3. Sen this ssessment with the nswers vi:. FAX to (212) 967-3498. Or. Mil the

More information

2014 Haskell January Test Regular Expressions and Finite Automata

2014 Haskell January Test Regular Expressions and Finite Automata 0 Hskell Jnury Test Regulr Expressions nd Finite Automt This test comprises four prts nd the mximum mrk is 5. Prts I, II nd III re worth 3 of the 5 mrks vilble. The 0 Hskell Progrmming Prize will be wrded

More information

Declarative Routing: Extensible Routing with Declarative Queries

Declarative Routing: Extensible Routing with Declarative Queries elrtive Routing: Extensile Routing with elrtive Queries Boon Thu Loo 1 Joseph M. Hellerstein 1,2, Ion toi 1, Rghu Rmkrishnn3, 1 University of Cliforni t Berkeley, 2 Intel Reserh Berkeley, 3 University

More information

CS553 Lecture Introduction to Data-flow Analysis 1

CS553 Lecture Introduction to Data-flow Analysis 1 ! Ide Introdution to Dt-flow nlysis!lst Time! Implementing Mrk nd Sweep GC!Tody! Control flow grphs! Liveness nlysis! Register llotion CS553 Leture Introdution to Dt-flow Anlysis 1 Dt-flow Anlysis! Dt-flow

More information

Pipeline Example: Cycle 1. Pipeline Example: Cycle 2. Pipeline Example: Cycle 4. Pipeline Example: Cycle 3. 3 instructions. 3 instructions.

Pipeline Example: Cycle 1. Pipeline Example: Cycle 2. Pipeline Example: Cycle 4. Pipeline Example: Cycle 3. 3 instructions. 3 instructions. ipeline Exmple: Cycle 1 ipeline Exmple: Cycle X X/ /W X X/ /W $3,$,$1 lw $,0($5) $3,$,$1 3 instructions 8 9 ipeline Exmple: Cycle 3 ipeline Exmple: Cycle X X/ /W X X/ /W sw $6,($7) lw $,0($5) $3,$,$1 sw

More information

MATH 25 CLASS 5 NOTES, SEP

MATH 25 CLASS 5 NOTES, SEP MATH 25 CLASS 5 NOTES, SEP 30 2011 Contents 1. A brief diversion: reltively prime numbers 1 2. Lest common multiples 3 3. Finding ll solutions to x + by = c 4 Quick links to definitions/theorems Euclid

More information

Parallelization Optimization of System-Level Specification

Parallelization Optimization of System-Level Specification Prlleliztion Optimiztion of System-Level Speifition Luki i niel. Gjski enter for Emedded omputer Systems University of liforni Irvine, 92697, US {li, gjski} @es.ui.edu strt This pper introdues the prlleliztion

More information

Distributed Systems Principles and Paradigms. Chapter 11: Distributed File Systems

Distributed Systems Principles and Paradigms. Chapter 11: Distributed File Systems Distriuted Systems Priniples nd Prdigms Mrten vn Steen VU Amsterdm, Dept. Computer Siene steen@s.vu.nl Chpter 11: Distriuted File Systems Version: Deemer 10, 2012 2 / 14 Distriuted File Systems Distriuted

More information

Compilers Spring 2013 PRACTICE Midterm Exam

Compilers Spring 2013 PRACTICE Midterm Exam Compilers Spring 2013 PRACTICE Midterm Exm This is full length prctice midterm exm. If you wnt to tke it t exm pce, give yourself 7 minutes to tke the entire test. Just like the rel exm, ech question hs

More information

A decision support system prototype for fuzzy multiple objective optimization

A decision support system prototype for fuzzy multiple objective optimization EUSFLAT - LFA A eision support system prototype for fuzzy multiple ojetive optimiztion Fengjie Wu Jie Lu n Gungqun Zhng Fulty of Informtion Tehnology University of Tehnology Syney Austrli E-mil: {fengjiewjieluzhngg}@it.uts.eu.u

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distriuted Systems Priniples nd Prdigms Christoph Dorn Distriuted Systems Group, Vienn University of Tehnology.dorn@infosys.tuwien..t http://www.infosys.tuwien..t/stff/dorn Slides dpted from Mrten vn Steen,

More information

GENG2140 Modelling and Computer Analysis for Engineers

GENG2140 Modelling and Computer Analysis for Engineers GENG4 Moelling n Computer Anlysis or Engineers Letures 9 & : Gussin qurture Crete y Grn Romn Joles, PhD Shool o Mehnil Engineering, UWA GENG4 Content Deinition o Gussin qurture Computtion o weights n points

More information

Minimal Memory Abstractions

Minimal Memory Abstractions Miniml Memory Astrtions (As implemented for BioWre Corp ) Nthn Sturtevnt University of Alert GAMES Group Ferury, 7 Tlk Overview Prt I: Building Astrtions Minimizing memory requirements Performnes mesures

More information

CS 551 Computer Graphics. Hidden Surface Elimination. Z-Buffering. Basic idea: Hidden Surface Removal

CS 551 Computer Graphics. Hidden Surface Elimination. Z-Buffering. Basic idea: Hidden Surface Removal CS 55 Computer Grphis Hidden Surfe Removl Hidden Surfe Elimintion Ojet preision lgorithms: determine whih ojets re in front of others Uses the Pinter s lgorithm drw visile surfes from k (frthest) to front

More information

Containers: Queue and List

Containers: Queue and List Continers: Queue n List Queue A ontiner in whih insertion is one t one en (the til) n eletion is one t the other en (the he). Also lle FIFO (First-In, First-Out) Jori Cortell n Jori Petit Deprtment of

More information

Scalable Spatio-temporal Continuous Query Processing for Location-aware Services

Scalable Spatio-temporal Continuous Query Processing for Location-aware Services Slle Sptio-temporl Continuous uery Proessing for Lotion-wre Servies iopeng iong Mohme F. Mokel Wli G. Aref Susnne E. Hmrush Sunil Prhkr Deprtment of Computer Sienes, Purue University, West Lfyette, IN

More information

Homework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22)

Homework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22) Homework Context Free Lnguges III Prse Trees nd Homework #5 (due 10/22) From textbook 6.4,b 6.5b 6.9b,c 6.13 6.22 Pln for tody Context Free Lnguges Next clss of lnguges in our quest! Lnguges Recll. Wht

More information

Duality in linear interval equations

Duality in linear interval equations Aville online t http://ijim.sriu..ir Int. J. Industril Mthemtis Vol. 1, No. 1 (2009) 41-45 Dulity in liner intervl equtions M. Movhedin, S. Slhshour, S. Hji Ghsemi, S. Khezerloo, M. Khezerloo, S. M. Khorsny

More information

Asurveyofpractical algorithms for suffix tree construction in external memory

Asurveyofpractical algorithms for suffix tree construction in external memory Asurveyofprtil lgorithms for suffix tree onstrution in externl memory M. Brsky,, U. Stege n A. Thomo University of Vitori, PO Box, STN CSC Vitori, BC, VW P, Cn SUMMAY The onstrution of suffix trees in

More information

CSc 453 Compilers and Systems Software. 6 : Top-Down Parsing I

CSc 453 Compilers and Systems Software. 6 : Top-Down Parsing I C 45 Compilers n ystems oftwre 6 : op-down Prsing I Christin Collberg Deprtment of Computer iene University of rizon ollberg@gmil.om Copyright 2009 Christin Collberg eptember 14, 2009 1 Overview 2 Compiler

More information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

Inter-domain Routing

Inter-domain Routing COMP 631: NETWORKED & DISTRIBUTED SYSTEMS Inter-domin Routing Jsleen Kur Fll 2016 1 Internet-sle Routing: Approhes DV nd link-stte protools do not sle to glol Internet How to mke routing slle? Exploit

More information

McAfee Web Gateway

McAfee Web Gateway Relese Notes Revision C MAfee We Gtewy 7.6.2.11 Contents Aout this relese Enhnement Resolved issues Instlltion instrutions Known issues Additionl informtion Find produt doumenttion Aout this relese This

More information

12-B FRACTIONS AND DECIMALS

12-B FRACTIONS AND DECIMALS -B Frctions nd Decimls. () If ll four integers were negtive, their product would be positive, nd so could not equl one of them. If ll four integers were positive, their product would be much greter thn

More information

Section 3.1: Sequences and Series

Section 3.1: Sequences and Series Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one

More information

Section 2.3 Functions. Definition: Let A and B be sets. A function (mapping, map) f from A to B, denoted f :A B, is a subset of A B such that

Section 2.3 Functions. Definition: Let A and B be sets. A function (mapping, map) f from A to B, denoted f :A B, is a subset of A B such that Setion 2.3 Funtions Definition: Let n e sets. funtion (mpping, mp) f from to, enote f :, is suset of suh tht x[x y[y < x, y > f ]] n [< x, y 1 > f < x, y 2 > f ] y 1 = y 2 Note: f ssoites with eh x in

More information

Generating Editors for Direct Manipulation of Diagrams

Generating Editors for Direct Manipulation of Diagrams Generting Eitors for Diret Mnipultion of Digrms Gerhr Viehstet n Mrk Mins Lehrstuhl für Progrmmiersprhen Universität Erlngen-Nürnerg Mrtensstr. 3, 91058 Erlngen, Germny E-mil: fviehste,minsg@informtik.uni-erlngen.e

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5 CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,

More information

WORKSHOP 9 HEX MESH USING SWEEP VECTOR

WORKSHOP 9 HEX MESH USING SWEEP VECTOR WORKSHOP 9 HEX MESH USING SWEEP VECTOR WS9-1 WS9-2 Prolem Desription This exerise involves importing urve geometry from n IGES file. The urves re use to rete other urves. From the urves trimme surfes re

More information

CS453 INTRODUCTION TO DATAFLOW ANALYSIS

CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 Leture Register llotion using liveness nlysis 1 Introdution to Dt-flow nlysis Lst Time Register llotion for expression trees nd lol nd prm vrs Tody Register

More information

CS481: Bioinformatics Algorithms

CS481: Bioinformatics Algorithms CS481: Bioinformtics Algorithms Cn Alkn EA509 clkn@cs.ilkent.edu.tr http://www.cs.ilkent.edu.tr/~clkn/teching/cs481/ EXACT STRING MATCHING Fingerprint ide Assume: We cn compute fingerprint f(p) of P in

More information

PROBLEM OF APOLLONIUS

PROBLEM OF APOLLONIUS PROBLEM OF APOLLONIUS In the Jnury 010 issue of Amerin Sientist D. Mkenzie isusses the Apollonin Gsket whih involves fining the rius of the lrgest irle whih just fits into the spe etween three tngent irles

More information

FASTEST METHOD TO FIND ALTERNATIVE RE-ROUTE

FASTEST METHOD TO FIND ALTERNATIVE RE-ROUTE INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS ISSN 2320-7345 FASTEST METHOD TO FIND ALTERNATIVE RE-ROUTE 1 M.JothiLkshmi, M.S., M.Phil. 2 C.Theeendr, M.S., M.Phil. 3 M.K.Pvithr,

More information

Using Red-Eye to improve face detection in low quality video images

Using Red-Eye to improve face detection in low quality video images Using Re-Eye to improve fe etetion in low qulity vieo imges Rihr Youmrn Shool of Informtion Tehnology University of Ottw, Cn youmrn@site.uottw. Any Aler Shool of Informtion Tehnology University of Ottw,

More information

Lecture 12 : Topological Spaces

Lecture 12 : Topological Spaces Leture 12 : Topologil Spes 1 Topologil Spes Topology generlizes notion of distne nd loseness et. Definition 1.1. A topology on set X is olletion T of susets of X hving the following properties. 1. nd X

More information

Loop Shifting and Compaction for the High-Level Synthesis of Designs with Complex Control Flow

Loop Shifting and Compaction for the High-Level Synthesis of Designs with Complex Control Flow Shifting n Comption for the High-Level Synthesis of Designs with Complex Control low Sumit Gupt Nikil Dutt Rjesh Gupt Alexnru Niolu Center for Emee Computer Systems Shool of Informtion n Computer Siene

More information

CMSC 331 First Midterm Exam

CMSC 331 First Midterm Exam 0 00/ 1 20/ 2 05/ 3 15/ 4 15/ 5 15/ 6 20/ 7 30/ 8 30/ 150/ 331 First Midterm Exm 7 October 2003 CMC 331 First Midterm Exm Nme: mple Answers tudent ID#: You will hve seventy-five (75) minutes to complete

More information

5 ANGLES AND POLYGONS

5 ANGLES AND POLYGONS 5 GLES POLYGOS urling rige looks like onventionl rige when it is extene. However, it urls up to form n otgon to llow ots through. This Rolling rige is in Pington sin in Lonon, n urls up every Friy t miy.

More information

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012 Dynmic Progrmming Andres Klppenecker [prtilly bsed on slides by Prof. Welch] 1 Dynmic Progrmming Optiml substructure An optiml solution to the problem contins within it optiml solutions to subproblems.

More information

Algorithm Design (5) Text Search

Algorithm Design (5) Text Search Algorithm Design (5) Text Serch Tkshi Chikym School of Engineering The University of Tokyo Text Serch Find sustring tht mtches the given key string in text dt of lrge mount Key string: chr x[m] Text Dt:

More information

[SYLWAN., 158(6)]. ISI

[SYLWAN., 158(6)]. ISI The proposl of Improved Inext Isomorphi Grph Algorithm to Detet Design Ptterns Afnn Slem B-Brhem, M. Rizwn Jmeel Qureshi Fulty of Computing nd Informtion Tehnology, King Adulziz University, Jeddh, SAUDI

More information

CS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata

CS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata CS 432 Fll 2017 Mike Lm, Professor (c)* Regulr Expressions nd Finite Automt Compiltion Current focus "Bck end" Source code Tokens Syntx tree Mchine code chr dt[20]; int min() { flot x = 42.0; return 7;

More information

CSE 401 Compilers. Agenda. Lecture 4: Implemen:ng Scanners Michael Ringenburg Winter 2013

CSE 401 Compilers. Agenda. Lecture 4: Implemen:ng Scanners Michael Ringenburg Winter 2013 CSE 401 Compilers Leture 4: Implemen:ng Snners Mihel Ringenurg Winter 013 Winter 013 UW CSE 401 (Mihel Ringenurg) Agend Lst week we overed regulr expressions nd finite utomt. Tody, we ll finish our finl

More information

Cellular-based Population to Enhance Genetic Algorithm for Assignment Problems

Cellular-based Population to Enhance Genetic Algorithm for Assignment Problems Amerin Journl of Intelligent Systems. 0; (): -5 DOI: 0. 593/j.jis.000.0 Cellulr-se Popultion to Enhne Geneti Algorithm for Assignment Prolems Hossein Rjlipour Cheshmehgz *, Hiollh Hron, Mohmm Rez Myoi

More information

Accurate Indirect Branch Prediction

Accurate Indirect Branch Prediction Aurte Indiret Brnh Predition Krel Driesen nd Urs Hölzle Deprtment of Computer Siene University of Cliforni Snt Brbr, CA 9 Abstrt Indiret brnh predition is likely to beome inresingly importnt in the future

More information

Efficient Subscription Management in Content-based Networks

Efficient Subscription Management in Content-based Networks Effiient Susription Mngement in Content-sed Networks Rphël Chnd, Psl A. Feler Institut EURECOM 06904 Sophi Antipolis, Frne {hnd feler}@eureom.fr Astrt Content-sed pulish/susrie systems offer onvenient

More information

Research Article Distributed Dynamic Memetic Algorithm Based Coding Aware Routing for Wireless Mesh Sensor Networks

Research Article Distributed Dynamic Memetic Algorithm Based Coding Aware Routing for Wireless Mesh Sensor Networks Hinwi Pulishing Corportion Interntionl Journl of Distriute Sensor Networks Volume 26, Artile ID 542933, 7 pges http://x.oi.org/.55/26/542933 Reserh Artile Distriute Dynmi Memeti Algorithm Bse Coing Awre

More information

3D convex hulls. Convex Hull in 3D. convex polyhedron. convex polyhedron. The problem: Given a set P of points in 3D, compute their convex hull

3D convex hulls. Convex Hull in 3D. convex polyhedron. convex polyhedron. The problem: Given a set P of points in 3D, compute their convex hull Convex Hull in The rolem: Given set P of oints in, omute their onvex hull onvex hulls Comuttionl Geometry [si 3250] Lur Tom Bowoin College onvex olyheron 1 2 3 olygon olyheron onvex olyheron 4 5 6 Polyheron

More information

CS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08

CS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08 CS412/413 Introduction to Compilers Tim Teitelum Lecture 4: Lexicl Anlyzers 28 Jn 08 Outline DFA stte minimiztion Lexicl nlyzers Automting lexicl nlysis Jlex lexicl nlyzer genertor CS 412/413 Spring 2008

More information

The Droplet Virtual Brush for Chinese Calligraphic Character Modeling

The Droplet Virtual Brush for Chinese Calligraphic Character Modeling The Droplet Virtul Brush for Chinese Clligrphi Chrter Moeling Xiofeng Mi Jie Xu Min Tng Jinxing Dong CAD & CG Stte Key L of Chin, Zhejing University, Hngzhou, Chin Artifiil Intelligene Institute, Zhejing

More information

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl

More information

Bruce McCarl's GAMS Newsletter Number 37

Bruce McCarl's GAMS Newsletter Number 37 Bruce McCrl's GAMS Newsletter Number 37 This newsletter covers 1 Uptes to Expne GAMS User Guie by McCrl et l.... 1 2 YouTube vieos... 1 3 Explntory text for tuple set elements... 1 4 Reing sets using GDXXRW...

More information

EECS 281: Homework #4 Due: Thursday, October 7, 2004

EECS 281: Homework #4 Due: Thursday, October 7, 2004 EECS 28: Homework #4 Due: Thursdy, October 7, 24 Nme: Emil:. Convert the 24-bit number x44243 to mime bse64: QUJD First, set is to brek 8-bit blocks into 6-bit blocks, nd then convert: x44243 b b 6 2 9

More information

Reducing a DFA to a Minimal DFA

Reducing a DFA to a Minimal DFA Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,

More information

To access your mailbox from inside your organization. For assistance, call:

To access your mailbox from inside your organization. For assistance, call: 2001 Ative Voie, In. All rights reserved. First edition 2001. Proteted y one or more of the following United Sttes ptents:,070,2;,3,90;,88,0;,33,102;,8,0;,81,0;,2,7;,1,0;,90,88;,01,11. Additionl U.S. nd

More information

CS 321 Programming Languages and Compilers. Bottom Up Parsing

CS 321 Programming Languages and Compilers. Bottom Up Parsing CS 321 Progrmming nguges nd Compilers Bottom Up Prsing Bottom-up Prsing: Shift-reduce prsing Grmmr H: fi ; fi b Input: ;;b hs prse tree ; ; b 2 Dt for Shift-reduce Prser Input string: sequence of tokens

More information

Prefetching in an Intelligent Memory Architecture Using a Helper Thread

Prefetching in an Intelligent Memory Architecture Using a Helper Thread Prefething in n Intelligent Memory Arhiteture Using Helper Thre Yn Solihin, Jejin Lee, n Josep Torrells University of Illinois t Urn-Chmpign Mihign Stte University solihin,torrells @s.uiu.eu jlee@se.msu.eu

More information

Using a User-Level Memory Thread for Correlation Prefetching

Using a User-Level Memory Thread for Correlation Prefetching Using User-Level Memory Thre for Correltion Prefething Yn Solihin Jejin Lee Josep Torrells University of Illinois t Urn-Chmpign Mihign Stte University http://iom.s.uiu.eu http://www.se.msu.eu/ jlee Astrt

More information

Midterm I Solutions CS164, Spring 2006

Midterm I Solutions CS164, Spring 2006 Midterm I Solutions CS164, Spring 2006 Februry 23, 2006 Plese red ll instructions (including these) crefully. Write your nme, login, SID, nd circle the section time. There re 8 pges in this exm nd 4 questions,

More information

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications. 15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

Efficient Answering of Set Containment Queries for Skewed Item Distributions

Efficient Answering of Set Containment Queries for Skewed Item Distributions Eiient Answering o Set Continment Queries or Skewed Item Distributions Mnolis Terrovitis IMIS, RC Athen Greee mter@imis.theninnovtion.gr Timos Sellis NTU Athens nd IMIS, RC Athen Greee timos@imis.theninnovtion.gr

More information

Lexical Analysis: Constructing a Scanner from Regular Expressions

Lexical Analysis: Constructing a Scanner from Regular Expressions Lexicl Anlysis: Constructing Scnner from Regulr Expressions Gol Show how to construct FA to recognize ny RE This Lecture Convert RE to n nondeterministic finite utomton (NFA) Use Thompson s construction

More information

An Efficient Code Update Scheme for DSP Applications in Mobile Embedded Systems

An Efficient Code Update Scheme for DSP Applications in Mobile Embedded Systems An Effiient Code Updte Sheme for DSP Applitions in Moile Emedded Systems Weiji Li, Youto Zhng Computer Siene Deprtment,University of Pittsurgh,Pittsurgh, PA 526 {weijili,zhngyt}@s.pitt.edu Astrt DSP proessors

More information

CSE 401 Midterm Exam 11/5/10 Sample Solution

CSE 401 Midterm Exam 11/5/10 Sample Solution Question 1. egulr expressions (20 points) In the Ad Progrmming lnguge n integer constnt contins one or more digits, but it my lso contin embedded underscores. Any underscores must be preceded nd followed

More information