An Algorithm for Enumerating All Maximal Tree Patterns Without Duplication Using Succinct Data Structure

Size: px
Start display at page:

Download "An Algorithm for Enumerating All Maximal Tree Patterns Without Duplication Using Succinct Data Structure"

Transcription

1 , Mrch 12-14, 2014, Hong Kong An Algorithm for Enumerting All Mximl Tree Ptterns Without Dupliction Using Succinct Dt Structure Yuko ITOKAWA, Tomoyuki UCHIDA nd Motoki SANO Astrct In order to extrct structured fetures from ig tree-structured dt, fst nd memory-efficient tree mining lgorithm is needed. In this pper, we propose n efficient lgorithm, given set S of ordered trees s input, to enumerte ll mximl ordered tree ptterns explining ll ordered trees in S without dupliction. The enumertion lgorithm uses depth-first unry degree sequence (DFUDS), which is succinct dt structure for n ordered tree, s succinct dt structure for ordered tree ptterns tht express structured fetures of tree structure. We lso implement the proposed lgorithm on computer nd evlute the lgorithm y experiments. The results re reported nd discussed. Index Terms tree-mining lgorithm, enumertion of tree ptterns, succinct dt structure, tree-structured dt 0 y 1 4 x 2 3 t v 1 u 2 x v 2 u 3 z G 1 G 2 u 1 s y I. INTRODUCTION We documents consist of HTML/XML dt nd other tree-structured dt, such s TEX sources, nturl lnguges nd so on, whose structure is not entirely cler is referred to s tree-structured dt. Tree-structured dt cn e represented y n ordered tree. To extrct useful informtion from tree-structured dt, it is necessry to extrct tree ptterns tht re common to tree-structured dt. To design efficient tree mining tools for ig tree-structured dt, the following fst nd memory-efficient lgorithms re necessry to e efficient. One is pttern mtching lgorithm for determining whether or not given tree-structured dt hs structured fetures represented y given tree pttern. Another is n lgorithm for extrcting common structured fetures to given tree structured dt. To reduce the memory required to store n ordered tree, succinct dt structures for ordered trees hve een proposed [1], [2], [3], [5], [7], [8], [10]. D. Benoit et l. proposed depth-first unry degree sequence (DFUDS) representtion [1] s succinct dt structure for n ordered tree. The DFUDS representtion uses string of prentheses constructed y depth-first trversl of ll nodes in which, if the index of node is k, the k-th ( nd its susequent ) re output. By tking ( to e 0 nd ) to e 1, the ordered tree representtion cn e hndled s it string. As previous work [6], we proposed term tree pttern s tree pttern which cn represent structured fetures common to treestructured dt. We lso defined DFUDS representtion for term tree pttern sed on DFUDS representtion of n ordered tree [6]. In Fig. 1, we give term tree pttern t nd Y. Itokw is with Fculty of Psychologicl Science, Hiroshim Interntionl University Kurose-Gkuendi, Higshi-Hiroshim, Hiroshim Jpn e-mil: y-itok@he.hirokoku-u.c.jp T. Uchid nd M. Sno re with Deprtment of Intelligent Systems, Hiroshim City University. Hiroshim, Jpn, emil: uchid@hiroshimcu.c.jp T 1 T 2 T 3 Fig. 1. Term tree ptterns t, s, ordered trees G 1, G 2, T 1, T 2, T 3 ( ( ( # ( ( x y Fig. 2. DFUDS representtion of the term tree pttern t given in Fig. 1. The indexes under DFUDS representtion show node IDs. s s exmples. Moreover, in Fig. 2, we show the DFUDS representtion of the term tree pttern t s n exmple. If n ordered tree T is otined from term tree pttern t y sustituting ll structured vriles in given term tree pttern with ritrry ordered trees, t is sid to mtch with T. In [6], we proposed fst pttern mtching lgorithm for determining whether or not given ordered tree mtches with given term tree pttern, using DFUDS s dt structure. For exmple, in Fig. 1, we cn see tht the ordered tree T 1 mtches the term tree pttern t, since T 1 cn e otined from t y sustituting vriles x nd y with ordered trees G 1 nd G 2, respectively. For term tree pttern t, the set of ll ordered trees which mtch with t is denoted y L(t). When set S of term tree ptterns is given, if there exists no term tree pttern s such tht S L(s) L(t) holds, t is sid to e mximl with respect to S. For exmple, in Fig. 1, the term tree pttern s isn t mximl with respect to the set S = {T 1, T 2, T 3 } of ordered trees T 1, T 2, T 3. On the other hnd, the term tree pttern t is mximl with respect to S. The im of this pper is to present fst nd memory-efficient lgorithms for enumerting ll mximl term tree ptterns which cn represent ll ordered trees in given set of ordered trees. As relted works, Miyhr et l.

2 , Mrch 12-14, 2014, Hong Kong [9] presented the lgorithm GEN-MFOTTP for generting ll mximl ordered tg tree ptterns tht cn represent structured fetures common to given set of ordered trees. A tg tree pttern is vrint of term tree pttern treted in this pper. GEN-MFOTTP employs the pttern mtching lgorithm for tg tree ptterns presented y Suzuki et l. [12]. We lredy showed in [6] tht Itokw s pttern mtching lgorithm is fster thn Suzuki s lgorithm. In this pper, we show tht proposed lgorithm in this pper is fster thn GEN-MFOTTP. This pper is orgnized s follows. In section II-A, we introduce term tree pttern which represents the structured fetures of ordered trees. In section II-B, we descrie the DFUDS representtion for ordered term tree ptterns proposed y Itokw et l. [6]. In section III, we formulte prolem for enumerting ll mximl term tree ptterns whose lnguges contin given set of edge-leled trees s suset nd propose n enumertion lgorithm for solving it. In section IV, the proposed enumertion lgorithm is implemented on computer. The test results for the implementtion re reported nd discussed. Section V concludes the pper. A. Term Tree Ptterns II. PRELIMINARIES Let Σ nd χ denote finite lphets with Σ χ =. Elements of Σ nd χ re clled edge lel nd vrile lel, respectively. Let V t e set of nodes nd E t V t (Σ χ) V t set of edges. An edge leled with vrile lel is prticulrly clled vrile. For n vrile e = (u, x, v), u nd v re clled prent port nd child port of e, respectively. t = (V t, E t ) is clled n edge-leled ordered term tree pttern or simply term tree pttern if t hs only one node u whose coming degree is 0, (V t, {{u, v} (u,, v) E t } is rooted tree hving u s its root nd ny its internl nodes hve ordered children. In this pper, we del with term tree ptterns hving ll mutully different vriles. OTTP denotes the set of ll term tree ptterns hving ll mutully different vriles. A term tree pttern hving no vriles is simply tree. The set of ll trees is denoted y OT. The lst lef of term tree pttern t in preorder is clled rightmost lef of t. Moreover, the pth from the rightmost lef to the root is clled rightmost pth of t. For two children u nd u of node u of term tree pttern h, u < h u u denotes tht in the ordering of the children of u, u is lower thn u. For term tree ptterns t = (V t, E t ) nd f = (V f, E f ), if ijection π : V t V f tht stisfies the following conditions (1)-(3) exists, then t nd f re isomorphic, denoted y t = f. (1) For ny Σ, (u,, v) E t if nd only if (π(u),, π(v)) E f. (2) There is x χ so tht (u, x, v) E t, if nd only if there is y χ so tht (π(u), y, π(v)) E f. (3) For node u of t nd two children u nd u of u, u < t u u if nd only if π(u ) < f π(u) π(u ). For vrile lel x χ nd tree g hving r s its root nd l s its lef, the form x := [g, (r, l)] is clled inding of x nd finite set of indings is clled sustitution. Let g = (V g, E g ) e term tree pttern hving vriles leled with x 0, x 1,..., x n nd θ = {x 0 := [g 0, (r 0, l 0 )],..., x n := [g n, (r n, l n )]} sustitution. A new term tree pttern f cn e otined from g nd θ y pplying θ to g in the following wy. f is otined y, for ech 0 i n, identifying the prent port of the vrile hving the vrile lel x i with r i nd identifying the child port with l i, nd y removing the vrile leled with x i. The resultnt term tree pttern f is denoted y gθ. For exmple, in Fig. 1, we cn see tht the tree T 1 is otined the term tree pttern t y pplying the sustitution θ = {x := [G 1, (v 1, v 2 )], y := [G 2, (u 1, u 3 )]} to t, tht is, T 1 = tθ. We hve the following lemm. LEMMA 1: Let t nd s e term tree ptterns such tht t = s holds. Then, L(t) L(s) if nd only if there exists sustitution θ such tht t = sθ holds. For term tree pttern t, the set, denoted y L(t), of trees otined from t y sustituting ll of vriles in t with pproprite trees, tht is, L(t) = {T OT θ s.t. T = tθ}. For set of trees S nd term tree pttern t in OTTP, the lnguge L(t) of t is sid to e miniml with respect to S if there exists no term tree pttern s in OTTP such tht S L(s) L(t) holds. Such term tree pttern t is sid to e mximl with respect to S. For exmple, in Fig. 1, the term tree pttern s isn t mximl with respect to the set S = {T 1, T 2, T 3 } ecuse of S L(t) L(s). On the other hnd, we cn see tht t is mximl with respect to S, tht is, L(t) is miniml with respect to S. B. Succinct Dt Structures for Term Tree Ptterns We explin the sic dt structure for deling with term tree pttern. In this pper, word RAM with word length of Θ(log n) its is used s the computtion model. [1] proposed the depth-first unry degree sequence (DFUDS) representtion, which is succinct dt structure for ordered trees. The DFUDS representtion for n ordered tree t of m edges is defined inductively s follows. The DFUDS representtion of the tree consisting only one node is ( ). The DFUDS representtion of t tht hs k sutrees t 1,..., t k is sequence of prentheses constructed y conctenting k+1 (, one ), k DFUDS representtions of t 1,..., nd t k in this order (here, the initil ( of the DFUDS representtion of ech sutree hs een removed). The DFUDS representtion is sequence of lnced prentheses of length 2m. The DFUDS representtion proposed y [1] is dt structure for n ordered tree with no edge lels. In the DFUDS representtion of [1], ) must occupy the rightmost position for ech node. Therefore, hsh function tht returns the edge lel tht corresponds to tht node for ech ) mkes DFUDS representtion of tree possile. DFUDS representtion for the term tree pttern t is shown in Fig. 2. For convenience in this exmple, hsh function tht returns the edge lels tht correspond to ll of the ) hs een executed. For term tree pttern t, the length of DFUDS representtion of t is denoted y t. The sequence of prentheses tht is DFUDS representtion cn e interpreted s the result of visiting ll nodes in preorder nd outputting k ( for ech node whose index is k the following one ). Hence, the following lemm oviously holds.

3 , Mrch 12-14, 2014, Hong Kong LEMMA 2: ([6]) Given term tree pttern t of m edges, the edge-leled DFUDS representtion for t cn e computed in O(m) time. In [6], we presented n efficient lgorithm for determining whether or not, for given term tree pttern t OTTP, the lnguge L(t) of t contins given tree T OT. We showed the following lemm. LEMMA 3: ([6]) When n ordered tree T nd term tree pttern t re given, we cn determine whether or not T mtch with t in O( T t ) time. III. ENUMERATION ALGORITHM FOR TERM TREE PATTERNS In this section, we present n efficient lgorithm for enumerting ll of term tree ptterns whose lnguges re miniml mong term tree lnguges including given set of ordered trees. We consider the following Enumerting Mximl TTPs Prolem in this pper. Enumerting Mximl TTPs Prolem Instnce: Set of trees S Question: Enumerte ll term tree ptterns whose lnguges include S. In Algorithm 1, we give n efficient lgorithm ENUMER- ATIONMAXIMALTTPS for solving Enumerting Mximl TTPs prolem for given set of trees. ENUMERATIONMAX- IMALTTPS consists of three procedures, ENUMTREEPAT- TERNS, EDGESUBST S nd MAXCHECK S. Given set of trees S, the first procedure ENUMTREEPATTERNS, presented in Procedure 2, enumertes ll term tree ptterns hving no edges ech of whose lnguge contins S s suset. ENUMTREEPATTERNS is n enumertion lgorithm sed on level-wise strtegy in similr wy to the lgorithm for enumerting ordered trees without dupliction presented y Nkno [11]. ENUMTREEPATTERNSemploys procedure, denoted y RightmostExpnsion, which cretes new term tree ptterns otined from given term tree pttern t y ttching new one vrile to ech node in the rightmost pth of t. Fig.3 explins out detil of RightmostExpnsion. For ech vrile (v 2, x, v 1 ) in the rightmost pth of term tree pttern g with k nodes, we dd node u p such tht v 1 < g v 2 u p to g y connecting vrile (v 2, x, u p ). Then we cn otin new term tree pttern g 1 with k + 1 nodes. For the rightmost lef v l of g, we dd node u s to g y ttching vrile (v l, x, u s ), nd we cn otin new term tree pttern g 2 with k + 1 nodes. Given set E of term tree ptterns creted y ENUMTREEPATTERNS, the second procedure EDGESUBST S, presented in Procedure 3, cretes new term tree ptterns otined from term tree ptterns in E y replcing vriles with edges leled with elements in Σ. Given set D of term tree ptterns creted y EDGESUBST S, MAXCHECK S presented in Procedure 4, select ll mximl term tree ptterns with respect to S in D y checking for ech term tree pttern t D whether or not there exists term tree pttern s in D such tht L(s) L(t) holds. For term tree pttern s D, let s e tree which is creted from s y replcing ll vriles in s with n edge lel e / Λ. For term tree pttern t D, if s mtches to t, then L(s) L(t), tht is, we cn determine tht t is not mximl term tree pttern. g g 1 g 2 Fig. 3. Rightmost Expnsion from g to g 1 nd g 2 Algorithm 1 ENUMERATIONMAXIMALTTPS Require: set of trees S Ensure: set of mximl term tree ptterns R whose lnguges contin S s suset. 1: E ENUMTREEPATTERNS(S) 2: D EDGESUBST S (E) 3: R MAXCHECK S (D) 4: return R In ENUMERATIONMAXIMALTTPS, we use tree structure, clled n enumertion tree, to mnge enumerted term tree ptterns. The initil term tree pttern creted in line 1 of ENUMTREEPATTERNS is stored in the root of the enumertion tree. Let p e term tree pttern creted from term tree pttern t in the procedure RightmostExpnsion of line 6 in ENUMTREEPATTERNS or in EDGESUBST S. Then, in the constructed enumertion tree in ENUMERA- TIONMAXIMALTTPS, p is stored in child of the node storing t if L(t) S holds. Using this dt structure, we cn restrict n input set of term tree ptterns of MAXCHECK S to the set of ll leves of the enumertion tree constructed t the end of ENUMTREEPATTERNS. For exmple, given the set S = {T 1, T 2, T 3 } of ordered trees T 1, T 2, T 3 in Fig. 1, ENUMERATIONMAXIMALTTPS constructs the enumertion tree in Fig. 4 t the end of ENUMTREEPAT- TERNS. Moreover, in Fig. 5, we show the descendnt of the node storing the term tree pttern g 5 in the constructed enumertion tree t the end of EDGESUBST S. In Figs 4 nd 5, the mrk (cross) on term tree pttern shows tht its lnguge doesn t contin the set S s suset. In Fig. 6, we show the enumertion tree ech of whose nodes hs DFUDS representtion of the ssigned term tree pttern. When term tree pttern t is generted from term tree pttern s y the procedure RightmostExpnsion, we cn see tht the DFUDS representtion of t cn e mde y inserting ( t pproprite index nd ppending the vrile lel t the end of the DFUDS representtion of s. For exmple, in Fig. 6, we cn see tht the DFUDS representtion (((#((xxxx of the term tree pttern g 10 cn e otined from the DFUDS representtion ((#((xxx of the term tree pttern g 4 y inserting ( t the index 2 nd ppending x t the end of ((#((xxx. Moreover, when term tree pttern t is generted from term tree pttern s y the procedure EDGESUBST S, we cn see tht the DFUDS representtion of t cn e mde y replcing the vrile lel t pproprite index of the DFUDS representtion of s with n edge lel. For exmple, in Fig. 6, we cn see tht the DFUDS representtion (((#(xx of the term tree pttern g 5,0 cn e otined from

4 , Mrch 12-14, 2014, Hong Kong Procedure 2 ENUMTREEPATTERNS Require: set of trees S Ensure: set E of ll term tree ptterns whose lnguges contin S s suset 1: Let p e the term tree pttern consisting of only one vrile 2: F {p}, E 3: while F is not empty do 4: C, D 5: for ll t F do 6: C RightmostExpnsion(t) 7: for ll f C do 8: if L(f) S then 9: E E {f}, D D {f} 10: end if 11: end for 12: end for 13: F D 14: end while 15: return E Procedure 4 MAXCHECK S Require: set of term tree ptterns D creted in EDGESUBST S Ensure: set R of ll mximl term tree ptterns whose lnguges contin S s suset 1: R 2: for ll t D do 3: crete the new term tree pttern p y replcing ll vriles in t with edges leled with c Σ χ 4: check flse 5: for ll s D (t s) do 6: if p L(s) then 7: check true 8: end if 9: end for 10: if check=flse then 11: R R {t} 12: end if 13: end for 14: return R Procedure 3 EDGESUBST S Require: set of term tree ptterns E creted in ENUMTREEPATTERNS Ensure: set D of ll term tree ptterns whose lnguges contin S s suset 1: D E 2: for ll t E do 3: U {(t, 0)} 4: while U do 5: for ll (s, pos) U do 6: U U {(s, pos)} 7: for ll vrile e in s ppered fter index pos do 8: for ll edge lel Σ do 9: crete new term tree pttern p y replcing e with the edge leled with 10: if L(p) S then 11: D D {p} 12: end if 13: let pos e e the ppered index of e in DFUDS representtion of s 14: if there re vriles in e ppered fter pos e + 1 then 15: U U {(p, pos e + 1)} 16: end if 17: end for 18: end for 19: end for 20: end while 21: end for 22: return D the DFUDS representtion (((#(xxx of the term tree pttern g 5 y replcing the vrile t the index 5 of the DFUDS representtion (((#((xxx of the term tree pttern g 5 with the edge lel. Therefore, y ssigning n integer i or n pir (j, ), insted of term tree pttern, to node of the constructed enumertion tree, where i indictes the index inserting ( nd j indictes the index replcing vrile lel with the edge lel. For exmple, in Fig. 7, we show the compct expression corresponding to the enumertion tree grown y ENUMERATIONMAXIMALTTPS. From lemms 1, 2, 3 nd the proposed lgorithm ENU- MERATIONMAXIMALTTPS, we hve the following theorem. THEOREM 1: We cn enumerte ll mximl term tree ptterns with respect to given set of ordered trees without dupliction in incrementl polynomil time. IV. EXPERIMENT AND DISCUSSION We report results of evlute experiments of n lgorithm for generting the enumertion tree. We implemented the lgorithm descried in section III on computer. In this section, we descrie the experimentl setup, present the results. The lgorithm ENUMERATIONMAXIMALTTPS for enumerting ll mximl term tree ptterns of n ordered tree set S ws implemented in C++ on computer equipped with 2.8 GHz Intel Core i7 processor, min memory of GB nd running the pple OSX operting system. Let, e n edge lel in Σ. We hve rtificilly creted dt collections D(n) of one hundred ech of edge-leled trees in OT Σ tht hs the edge lel,, n edges nd mximum degree 5. For ech n {100, 200, 300, 400, 500, 600, 700, 800}, we hve generted mximl term tree ptterns y ENUMERA- TIONMAXIMALTTPS using dt collections D(n) s inputs. Fig.8 shows the results of numers of generted ll term tree ptterns, numers of element of generted enumertion tree, numers of leves of generted enumertion tree, nd numers of enumerted mximl term tree ptterns, respectively. We compred ENUMERATIONMAXIMALTTPS with the lgorithm GEN-MFOTTP[9]. The lgorithm GEN- MFOTTP is s follows. 1) Generte set of term tree ptterns E y using ENUMTREEPATTERNS.

5 , Mrch 12-14, 2014, Hong Kong g 5,0 g 5 Fig. 4. Enumertion tree t the end of the Procedure ENUMTREEPAT- TERNS when S in Fig. 1 is given 2) For ech vriles x in t E, we execute following opertions: Generte term tree pttern t p y replcing x to g p of Fig.9. If L(t p ) S, t is not mximl term tree ptterns. Generte term tree pttern t s y replcing x to g s of Fig.9. If L(t s ) S then t is not mximl term tree ptterns. For l Λ, let g l e tree hving only one edge leled with l (Fig.9). Generte term tree pttern t l y replcing x to g l. If L(t l ) S then t is not mximl term tree pttern. 3) t is mximl term tree ptterns. In this experiment, we hve used DFUDS s dt structure nd mtching lgorithm proposed y [6] for mtching term tree ptterns to trees in GEN-MFOTTP. We hve otined running times of enumerting ll mximl term tree ptterns y ENUMERATIONMAXIMALTTPS nd y GEN-MFOTTP. Those results re shown in Fig.10. An pproximtion for ENUMERATIONMAXIMALTTPS is y = 0.36 exp(1.23n), nd n pproximtion for GEN-MFOTTP is y = 0.58 exp(1.48n). Notice tht the difference etween running times of ENUMERATIONMAXIMALTTPS nd GEN-MFOTTP is Fig. 5. Descendnts of the term tree pttern g 5 in constructed enumertion tree t the end of the procedure EDGESUBST S when S in Fig. 1 is given cost of MAXCHECK S ecuse for ENUMERATION- MAXIMALTTPS nd GEN-MFOTTP, we dopted the sme dt structure nd mtching lgorithm. In Fig.10, y compring ENUMERATIONMAXIMALTTPSnd GEN- MFOTTP, we cn see tht the running time is improved. V. CONCLUSION We hve proposed n effective lgorithm enumerting ll mximl term tree ptterns whose lnguges include given tree set y employing the efficient mtching lgorithm presented in [6] using succinct dt structure, clled DFUDS. Evlution experiments performed with computer implementtion of the lgorithm demonstrted its efficiency. As pplictions of this reserch, we re considering dpttion of the DFUDS representtion proposed here to succinct dt structures of TTSP grphs sed on forest representtion proposed y Miyoshi et l. [5] nd the compressed tree proposed y Kto et l. [4]. Moreover, we re considering grph mining lgorithms for semi-structured dt using succinct dt structure. REFERENCES [1] D. Benoit, E. D. Demine, J. I. Munro, nd R. Rmn. Representing trees of higher degree. Algorithmic, 43(4): , 2005.

6 , Mrch 12-14, 2014, Hong Kong Fig. 9. g s g p g l Term trees using for the lgorithm GEN-MFOTTP Fig. 6. Enumertion tree hving DFUDS representtions of enumerted term tree ptterns Fig. 10. Running times of enumertion of mximl term tree ptterns y ENUMERATIONMAXIMALTTPS nd GEN-MFOTTP Fig. 7. Compct expression of constructed enumertion tree Science nd Engineering, pges 33 40, [6] Y. Itokw, M. Wd, T. Ishii, nd T. Uchid. Pttern Mtching Algorithm Using Succinct Dt Structure for Tree-Structured Ptterns, pges Lecture Notes in Electricl Engineering 110. Springer, [7] G. Jcoson. Spce-efficient sttic trees nd grphs. In IEEE FOCS, pges , [8] J. Jnsson, K. Sdkne, nd W.-K. Sung. Ultr-succinct representtion of ordered trees. In ACM-SIAM SODA 2007, pges , [9] T. Miyhr, Y. Suzuki, T. Shoudi, T. Uchid, K. Tkhshi, nd H. Ued. Discovery of mximlly frequent tg tree ptterns with contrctile vriles from semistructured documents. In PAKDD- 2004, LNAI 3056, pges Springer, [10] J. I. Munro nd V. Rmn. Succinct representtion of lnced prentheses nd sttic trees. SIAM Journl on Computing, 31(3): , [11] S. Nkno. Efficient genertion of plne trees. Inf. Process. Lett., 84(3): , [12] Y. Suzuki, K. Inome, T. Shoudi, T. Miyhr, nd T. Uchid. A polynomil time mtching lgorithm of structured ordered tree ptterns for dt mining from semistructured dt. In ILP-2002, LNAI 2583, pges Springer, Fig. 8. The results of Numers of generted ll term trees, elements of generted enumertion tree, leves of generted enumertion tree nd generted mximl term tree ptterns. [2] Y.-T. Ching, C.-C. Lin, nd H.-I. Lu. Orderly spnning trees with pplictions. SIAM Journl on Computing, 34(4): , [3] R. F. Gery, N. Rhmn, R. Rmn, nd V. Rmn. A simple optiml representtion for lnced prentheses. In CPM, pges , [4] Y. Itokw, K. Ktoh, T. Uchid, nd T. Shoudi. Algorithm using Expnded LZ Compression Scheme for Compressing Tree Structured Dt, pges Lecture Notes in Electricl Engineering. Springer, [5] Y. Itokw, J. Miyoshi, M. Wd, nd T. Uchid. Succinct representtion of ttsp grphs nd its ppliction to the pth serch prolem. In Sixth IASTED Interntionl Conference on Advnces in Computer

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries Tries Yufei To KAIST April 9, 2013 Y. To, April 9, 2013 Tries In this lecture, we will discuss the following exct mtching prolem on strings. Prolem Let S e set of strings, ech of which hs unique integer

More information

What are suffix trees?

What are suffix trees? Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl

More information

COMP 423 lecture 11 Jan. 28, 2008

COMP 423 lecture 11 Jan. 28, 2008 COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring

More information

COMBINATORIAL PATTERN MATCHING

COMBINATORIAL PATTERN MATCHING COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized

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

Slides for Data Mining by I. H. Witten and E. Frank

Slides for Data Mining by I. H. Witten and E. Frank Slides for Dt Mining y I. H. Witten nd E. Frnk Simplicity first Simple lgorithms often work very well! There re mny kinds of simple structure, eg: One ttriute does ll the work All ttriutes contriute eqully

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

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

Presentation Martin Randers

Presentation Martin Randers Presenttion Mrtin Rnders Outline Introduction Algorithms Implementtion nd experiments Memory consumption Summry Introduction Introduction Evolution of species cn e modelled in trees Trees consist of nodes

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

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Adm Sheffer. Office hour: Tuesdys 4pm. dmsh@cltech.edu TA: Victor Kstkin. Office hour: Tuesdys 7pm. 1:00 Mondy, Wednesdy, nd Fridy. http://www.mth.cltech.edu/~2014-15/2term/m006/

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

Position Heaps: A Simple and Dynamic Text Indexing Data Structure

Position Heaps: A Simple and Dynamic Text Indexing Data Structure Position Heps: A Simple nd Dynmic Text Indexing Dt Structure Andrzej Ehrenfeucht, Ross M. McConnell, Niss Osheim, Sung-Whn Woo Dept. of Computer Science, 40 UCB, University of Colordo t Boulder, Boulder,

More information

Suffix trees, suffix arrays, BWT

Suffix trees, suffix arrays, BWT ALGORITHMES POUR LA BIO-INFORMATIQUE ET LA VISUALISATION COURS 3 Rluc Uricru Suffix trees, suffix rrys, BWT Bsed on: Suffix trees nd suffix rrys presenttion y Him Kpln Suffix trees course y Pco Gomez Liner-Time

More information

Information Retrieval and Organisation

Information Retrieval and Organisation Informtion Retrievl nd Orgnistion Suffix Trees dpted from http://www.mth.tu.c.il/~himk/seminr02/suffixtrees.ppt Dell Zhng Birkeck, University of London Trie A tree representing set of strings { } eef d

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

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

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

From Dependencies to Evaluation Strategies

From Dependencies to Evaluation Strategies From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute

More information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016 Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence Winter 2016 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl

More information

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Instructor: Adm Sheffer. TA: Cosmin Pohot. 1pm Mondys, Wednesdys, nd Fridys. http://mth.cltech.edu/~2015-16/2term/m006/ Min ook: Introduction to Grph

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

documents 1. Introduction

documents 1. Introduction www.ijcsi.org 4 Efficient structurl similrity computtion etween XML documents Ali Aïtelhdj Computer Science Deprtment, Fculty of Electricl Engineering nd Computer Science Mouloud Mmmeri University of Tizi-Ouzou

More information

The Greedy Method. The Greedy Method

The Greedy Method. The Greedy Method Lists nd Itertors /8/26 Presenttion for use with the textook, Algorithm Design nd Applictions, y M. T. Goodrich nd R. Tmssi, Wiley, 25 The Greedy Method The Greedy Method The greedy method is generl lgorithm

More information

Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST

Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST Suffi Trees Outline Introduction Suffi Trees (ST) Building STs in liner time: Ukkonen s lgorithm Applictions of ST 2 3 Introduction Sustrings String is ny sequence of chrcters. Sustring of string S is

More information

Topological Queries on Graph-structured XML Data: Models and Implementations

Topological Queries on Graph-structured XML Data: Models and Implementations Topologicl Queries on Grph-structured XML Dt: Models nd Implementtions Hongzhi Wng, Jinzhong Li, nd Jizhou Luo Astrct In mny pplictions, dt is in grph structure, which cn e nturlly represented s grph-structured

More information

CS201 Discussion 10 DRAWTREE + TRIES

CS201 Discussion 10 DRAWTREE + TRIES CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the

More information

The dictionary model allows several consecutive symbols, called phrases

The dictionary model allows several consecutive symbols, called phrases A dptive Huffmn nd rithmetic methods re universl in the sense tht the encoder cn dpt to the sttistics of the source. But, dpttion is computtionlly expensive, prticulrly when k-th order Mrkov pproximtion

More information

Graphs with at most two trees in a forest building process

Graphs with at most two trees in a forest building process Grphs with t most two trees in forest uilding process rxiv:802.0533v [mth.co] 4 Fe 208 Steve Butler Mis Hmnk Mrie Hrdt Astrct Given grph, we cn form spnning forest y first sorting the edges in some order,

More information

Intermediate Information Structures

Intermediate Information Structures CPSC 335 Intermedite Informtion Structures LECTURE 13 Suffix Trees Jon Rokne Computer Science University of Clgry Cnd Modified from CMSC 423 - Todd Trengen UMD upd Preprocessing Strings We will look t

More information

Suffix Tries. Slides adapted from the course by Ben Langmead

Suffix Tries. Slides adapted from the course by Ben Langmead Suffix Tries Slides dpted from the course y Ben Lngmed en.lngmed@gmil.com Indexing with suffixes Until now, our indexes hve een sed on extrcting sustrings from T A very different pproch is to extrct suffixes

More information

CS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig

CS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of

More information

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs. Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop

More information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl component

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

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

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded

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

Typing with Weird Keyboards Notes

Typing with Weird Keyboards Notes Typing with Weird Keyords Notes Ykov Berchenko-Kogn August 25, 2012 Astrct Consider lnguge with n lphet consisting of just four letters,,,, nd. There is spelling rule tht sys tht whenever you see n next

More information

ASTs, Regex, Parsing, and Pretty Printing

ASTs, Regex, Parsing, and Pretty Printing ASTs, Regex, Prsing, nd Pretty Printing CS 2112 Fll 2016 1 Algeric Expressions To strt, consider integer rithmetic. Suppose we hve the following 1. The lphet we will use is the digits {0, 1, 2, 3, 4, 5,

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

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion

More information

Topic 2: Lexing and Flexing

Topic 2: Lexing and Flexing Topic 2: Lexing nd Flexing COS 320 Compiling Techniques Princeton University Spring 2016 Lennrt Beringer 1 2 The Compiler Lexicl Anlysis Gol: rek strem of ASCII chrcters (source/input) into sequence of

More information

Lexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay

Lexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay Lexicl Anlysis Amith Snyl (www.cse.iit.c.in/ s) Deprtment of Computer Science nd Engineering, Indin Institute of Technology, Bomy Septemer 27 College of Engineering, Pune Lexicl Anlysis: 2/6 Recp The input

More information

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011 CSCI 3130: Forml Lnguges nd utomt Theory Lecture 12 The Chinese University of Hong Kong, Fll 2011 ndrej Bogdnov In progrmming lnguges, uilding prse trees is significnt tsk ecuse prse trees tell us the

More information

PLWAP Sequential Mining: Open Source Code

PLWAP Sequential Mining: Open Source Code PL Sequentil Mining: Open Source Code C.I. Ezeife School of Computer Science University of Windsor Windsor, Ontrio N9B 3P4 cezeife@uwindsor.c Yi Lu Deprtment of Computer Science Wyne Stte University Detroit,

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

Compression Outline :Algorithms in the Real World. Lempel-Ziv Algorithms. LZ77: Sliding Window Lempel-Ziv

Compression Outline :Algorithms in the Real World. Lempel-Ziv Algorithms. LZ77: Sliding Window Lempel-Ziv Compression Outline 15-853:Algorithms in the Rel World Dt Compression III Introduction: Lossy vs. Lossless, Benchmrks, Informtion Theory: Entropy, etc. Proility Coding: Huffmn + Arithmetic Coding Applictions

More information

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrd-coded using this

More information

Efficient K-NN Search in Polyphonic Music Databases Using a Lower Bounding Mechanism

Efficient K-NN Search in Polyphonic Music Databases Using a Lower Bounding Mechanism Efficient K-NN Serch in Polyphonic Music Dtses Using Lower Bounding Mechnism Ning-Hn Liu Deprtment of Computer Science Ntionl Tsing Hu University Hsinchu,Tiwn 300, R.O.C 886-3-575679 nhliou@yhoo.com.tw

More information

Premaster Course Algorithms 1 Chapter 6: Shortest Paths. Christian Scheideler SS 2018

Premaster Course Algorithms 1 Chapter 6: Shortest Paths. Christian Scheideler SS 2018 Premster Course Algorithms Chpter 6: Shortest Pths Christin Scheieler SS 8 Bsic Grph Algorithms Overview: Shortest pths in DAGs Dijkstr s lgorithm Bellmn-For lgorithm Johnson s metho SS 8 Chpter 6 Shortest

More information

Today. Search Problems. Uninformed Search Methods. Depth-First Search Breadth-First Search Uniform-Cost Search

Today. Search Problems. Uninformed Search Methods. Depth-First Search Breadth-First Search Uniform-Cost Search Uninformed Serch [These slides were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI t UC Berkeley. All CS188 mterils re vilble t http://i.berkeley.edu.] Tody Serch Problems Uninformed Serch Methods

More information

Registering as an HPE Reseller

Registering as an HPE Reseller Registering s n HPE Reseller Quick Reference Guide for new Prtners Mrch 2019 Registering s new Reseller prtner There re four min steps to register on the Prtner Redy Portl s new Reseller prtner: Appliction

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

9 Graph Cutting Procedures

9 Graph Cutting Procedures 9 Grph Cutting Procedures Lst clss we begn looking t how to embed rbitrry metrics into distributions of trees, nd proved the following theorem due to Brtl (1996): Theorem 9.1 (Brtl (1996)) Given metric

More information

A New Learning Algorithm for the MAXQ Hierarchical Reinforcement Learning Method

A New Learning Algorithm for the MAXQ Hierarchical Reinforcement Learning Method A New Lerning Algorithm for the MAXQ Hierrchicl Reinforcement Lerning Method Frzneh Mirzzdeh 1, Bbk Behsz 2, nd Hmid Beigy 1 1 Deprtment of Computer Engineering, Shrif University of Technology, Tehrn,

More information

RETRACTS OF TREES AND FREE LEFT ADEQUATE SEMIGROUPS

RETRACTS OF TREES AND FREE LEFT ADEQUATE SEMIGROUPS Proceedings of the Edinurgh Mthemticl Society (2011) 54, 731 747 DOI:10.1017/S0013091509001230 RETRACTS OF TREES AND FREE LEFT ADEQUATE SEMIGROUPS MARK KAMBITES School of Mthemtics, University of Mnchester,

More information

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers Mth Modeling Lecture 4: Lgrnge Multipliers Pge 4452 Mthemticl Modeling Lecture 4: Lgrnge Multipliers Lgrnge multipliers re high powered mthemticl technique to find the mximum nd minimum of multidimensionl

More information

10.5 Graphing Quadratic Functions

10.5 Graphing Quadratic Functions 0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions

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

A dual of the rectangle-segmentation problem for binary matrices

A dual of the rectangle-segmentation problem for binary matrices A dul of the rectngle-segmenttion prolem for inry mtrices Thoms Klinowski Astrct We consider the prolem to decompose inry mtrix into smll numer of inry mtrices whose -entries form rectngle. We show tht

More information

Suffix trees. December Computational Genomics

Suffix trees. December Computational Genomics Computtionl Genomics Prof Irit Gt-Viks, Prof. Ron Shmir, Prof. Roded Shrn School of Computer Science, Tel Aviv University גנומיקה חישובית פרופ' עירית גת-ויקס, פרופ' רון שמיר, פרופ' רודד שרן ביה"ס למדעי

More information

I/O Efficient Dynamic Data Structures for Longest Prefix Queries

I/O Efficient Dynamic Data Structures for Longest Prefix Queries I/O Efficient Dynmic Dt Structures for Longest Prefix Queries Moshe Hershcovitch 1 nd Him Kpln 2 1 Fculty of Electricl Engineering, moshik1@gmil.com 2 School of Computer Science, himk@cs.tu.c.il, Tel Aviv

More information

CSCI 446: Artificial Intelligence

CSCI 446: Artificial Intelligence CSCI 446: Artificil Intelligence Serch Instructor: Michele Vn Dyne [These slides were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI t UC Berkeley. All CS188 mterils re vilble t http://i.berkeley.edu.]

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

Registering as a HPE Reseller. Quick Reference Guide for new Partners in Asia Pacific

Registering as a HPE Reseller. Quick Reference Guide for new Partners in Asia Pacific Registering s HPE Reseller Quick Reference Guide for new Prtners in Asi Pcific Registering s new Reseller prtner There re five min steps to e new Reseller prtner. Crete your Appliction Copyright 2017 Hewlett

More information

Inference of node replacement graph grammars

Inference of node replacement graph grammars Glley Proof 22/6/27; :6 File: id293.tex; BOKCTP/Hin p. Intelligent Dt Anlysis (27) 24 IOS Press Inference of node replcement grph grmmrs Jcek P. Kukluk, Lwrence B. Holder nd Dine J. Cook Deprtment of Computer

More information

Containment of Nested XML Queries

Containment of Nested XML Queries Continment of Nested XML Queries Xin Dong Alon Y. Hlevy Igor Ttrinov {lundong,lon,igor}@cs.wshington.edu University of Wshington, Settle Astrct Query continment is the most fundmentl reltionship etween

More information

Research Announcement: MAXIMAL CONNECTED HAUSDORFF TOPOLOGIES

Research Announcement: MAXIMAL CONNECTED HAUSDORFF TOPOLOGIES Volume 2, 1977 Pges 349 353 http://topology.uburn.edu/tp/ Reserch Announcement: MAXIMAL CONNECTED HAUSDORFF TOPOLOGIES by J. A. Guthrie, H. E. Stone, nd M. L. Wge Topology Proceedings Web: http://topology.uburn.edu/tp/

More information

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) * Pln for Tody nd Beginning Next week Interpreter nd Compiler Structure, or Softwre Architecture Overview of Progrmming Assignments The MeggyJv compiler we will e uilding. Regulr Expressions Finite Stte

More information

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997.

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997. Forced convex n-gons in the plne F. R. K. Chung y University ofpennsylvni Phildelphi, Pennsylvni 19104 R. L. Grhm AT&T Ls - Reserch Murry Hill, New Jersey 07974 Mrch 2,1997 Astrct In seminl pper from 1935,

More information

SAPPER: Subgraph Indexing and Approximate Matching in Large Graphs

SAPPER: Subgraph Indexing and Approximate Matching in Large Graphs SAPPER: Sugrph Indexing nd Approximte Mtching in Lrge Grphs Shijie Zhng, Jiong Yng, Wei Jin EECS Dept., Cse Western Reserve University, {shijie.zhng, jiong.yng, wei.jin}@cse.edu ABSTRACT With the emergence

More information

MTH 146 Conics Supplement

MTH 146 Conics Supplement 105- Review of Conics MTH 146 Conics Supplement In this section we review conics If ou ne more detils thn re present in the notes, r through section 105 of the ook Definition: A prol is the set of points

More information

TO REGULAR EXPRESSIONS

TO REGULAR EXPRESSIONS Suject :- Computer Science Course Nme :- Theory Of Computtion DA TO REGULAR EXPRESSIONS Report Sumitted y:- Ajy Singh Meen 07000505 jysmeen@cse.iit.c.in BASIC DEINITIONS DA:- A finite stte mchine where

More information

UNIT 11. Query Optimization

UNIT 11. Query Optimization UNIT Query Optimiztion Contents Introduction to Query Optimiztion 2 The Optimiztion Process: An Overview 3 Optimiztion in System R 4 Optimiztion in INGRES 5 Implementing the Join Opertors Wei-Png Yng,

More information

Lexical Analysis and Lexical Analyzer Generators

Lexical Analysis and Lexical Analyzer Generators 1 Lexicl Anlysis nd Lexicl Anlyzer Genertors Chpter 3 COP5621 Compiler Construction Copyright Roert vn Engelen, Florid Stte University, 2007-2009 2 The Reson Why Lexicl Anlysis is Seprte Phse Simplifies

More information

Approximation of Two-Dimensional Rectangle Packing

Approximation of Two-Dimensional Rectangle Packing pproximtion of Two-imensionl Rectngle Pcking Pinhong hen, Yn hen, Mudit Goel, Freddy Mng S70 Project Report, Spring 1999. My 18, 1999 1 Introduction 1-d in pcking nd -d in pcking re clssic NP-complete

More information

L2-Python-Data-Structures

L2-Python-Data-Structures L2-Python-Dt-Structures Mrch 19, 2018 1 Principl built-in types in Python (Python ) numerics: int, flot, long, complex sequences: str, unicode, list, tuple, byterry, buffer, xrnge mppings: dict files:

More information

Applied Databases. Sebastian Maneth. Lecture 13 Online Pattern Matching on Strings. University of Edinburgh - February 29th, 2016

Applied Databases. Sebastian Maneth. Lecture 13 Online Pattern Matching on Strings. University of Edinburgh - February 29th, 2016 Applied Dtses Lecture 13 Online Pttern Mtching on Strings Sestin Mneth University of Edinurgh - Ferury 29th, 2016 2 Outline 1. Nive Method 2. Automton Method 3. Knuth-Morris-Prtt Algorithm 4. Boyer-Moore

More information

Lecture 10: Suffix Trees

Lecture 10: Suffix Trees Computtionl Genomics Prof. Ron Shmir, Prof. Him Wolfson, Dr. Irit Gt-Viks School of Computer Science, Tel Aviv University גנומיקה חישובית פרופ' רון שמיר, פרופ' חיים וולפסון, דר' עירית גת-ויקס ביה"ס למדעי

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy RecogniNon of Tokens if expressions nd relnonl opertors if è if then è then else è else relop è

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

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment File Mnger Quick Reference Guide June 2018 Prepred for the Myo Clinic Enterprise Khu Deployment NVIGTION IN FILE MNGER To nvigte in File Mnger, users will mke use of the left pne to nvigte nd further pnes

More information

Lists in Lisp and Scheme

Lists in Lisp and Scheme Lists in Lisp nd Scheme Lists in Lisp nd Scheme Lists re Lisp s fundmentl dt structures, ut there re others Arrys, chrcters, strings, etc. Common Lisp hs moved on from eing merely LISt Processor However,

More information

ON THE DEHN COMPLEX OF VIRTUAL LINKS

ON THE DEHN COMPLEX OF VIRTUAL LINKS ON THE DEHN COMPLEX OF VIRTUAL LINKS RACHEL BYRD, JENS HARLANDER Astrct. A virtul link comes with vriety of link complements. This rticle is concerned with the Dehn spce, pseudo mnifold with oundry, nd

More information

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the LR() nlysis Drwcks of LR(). Look-hed symols s eplined efore, concerning LR(), it is possile to consult the net set to determine, in the reduction sttes, for which symols it would e possile to perform reductions.

More information

PARALLEL AND DISTRIBUTED COMPUTING

PARALLEL AND DISTRIBUTED COMPUTING PARALLEL AND DISTRIBUTED COMPUTING 2009/2010 1 st Semester Teste Jnury 9, 2010 Durtion: 2h00 - No extr mteril llowed. This includes notes, scrtch pper, clcultor, etc. - Give your nswers in the ville spce

More information

A Heuristic Approach for Discovering Reference Models by Mining Process Model Variants

A Heuristic Approach for Discovering Reference Models by Mining Process Model Variants A Heuristic Approch for Discovering Reference Models by Mining Process Model Vrints Chen Li 1, Mnfred Reichert 2, nd Andres Wombcher 3 1 Informtion System Group, University of Twente, The Netherlnds lic@cs.utwente.nl

More information

2-3 search trees red-black BSTs B-trees

2-3 search trees red-black BSTs B-trees 2-3 serch trees red-lck BTs B-trees 3 2-3 tree llow 1 or 2 keys per node. 2-node: one key, two children. 3-node: two keys, three children. ymmetric order. Inorder trversl yields keys in scending order.

More information

CS 340, Fall 2014 Dec 11 th /13 th Final Exam Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.

CS 340, Fall 2014 Dec 11 th /13 th Final Exam Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string. CS 340, Fll 2014 Dec 11 th /13 th Finl Exm Nme: Note: in ll questions, the specil symol ɛ (epsilon) is used to indicte the empty string. Question 1. [5 points] Consider the following regulr expression;

More information

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have Rndom Numers nd Monte Crlo Methods Rndom Numer Methods The integrtion methods discussed so fr ll re sed upon mking polynomil pproximtions to the integrnd. Another clss of numericl methods relies upon using

More information

COS 333: Advanced Programming Techniques

COS 333: Advanced Programming Techniques COS 333: Advnced Progrmming Techniques Brin Kernighn wk@cs, www.cs.princeton.edu/~wk 311 CS Building 609-258-2089 (ut emil is lwys etter) TA's: Junwen Li, li@cs, CS 217,258-0451 Yong Wng,yongwng@cs, CS

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

INTRODUCTION TO SIMPLICIAL COMPLEXES INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min

More information

Lecture 7: Integration Techniques

Lecture 7: Integration Techniques Lecture 7: Integrtion Techniques Antiderivtives nd Indefinite Integrls. In differentil clculus, we were interested in the derivtive of given rel-vlued function, whether it ws lgeric, eponentil or logrithmic.

More information

4-1 NAME DATE PERIOD. Study Guide. Parallel Lines and Planes P Q, O Q. Sample answers: A J, A F, and D E

4-1 NAME DATE PERIOD. Study Guide. Parallel Lines and Planes P Q, O Q. Sample answers: A J, A F, and D E 4-1 NAME DATE PERIOD Pges 142 147 Prllel Lines nd Plnes When plnes do not intersect, they re sid to e prllel. Also, when lines in the sme plne do not intersect, they re prllel. But when lines re not in

More information

The Math Learning Center PO Box 12929, Salem, Oregon Math Learning Center

The Math Learning Center PO Box 12929, Salem, Oregon Math Learning Center Resource Overview Quntile Mesure: Skill or Concept: 80Q Multiply two frctions or frction nd whole numer. (QT N ) Excerpted from: The Mth Lerning Center PO Box 99, Slem, Oregon 9709 099 www.mthlerningcenter.org

More information

UT1553B BCRT True Dual-port Memory Interface

UT1553B BCRT True Dual-port Memory Interface UTMC APPICATION NOTE UT553B BCRT True Dul-port Memory Interfce INTRODUCTION The UTMC UT553B BCRT is monolithic CMOS integrted circuit tht provides comprehensive MI-STD- 553B Bus Controller nd Remote Terminl

More information

Preserving Constraints for Aggregation Relationship Type Update in XML Document

Preserving Constraints for Aggregation Relationship Type Update in XML Document Preserving Constrints for Aggregtion Reltionship Type Updte in XML Document Eric Prdede 1, J. Wenny Rhyu 1, nd Dvid Tnir 2 1 Deprtment of Computer Science nd Computer Engineering, L Trobe University, Bundoor

More information

Geometrical tile design for complex neighborhoods

Geometrical tile design for complex neighborhoods COMPUTATIONAL NEUROSCIENCE ORIGINAL RESEARCH ARTICLE pulished: 23 Novemer 2009 doi: 103389/neuro100202009 Geometricl tile design for complex neighorhoods Eugen Czeizler* nd Lil Kri Deprtment of Computer

More information