arxiv: v1 [cs.ds] 9 Apr 2018

Size: px
Start display at page:

Download "arxiv: v1 [cs.ds] 9 Apr 2018"

Transcription

1 From Regular Expression Matching to Parsing Philip Bille Technical University of Denmark Inge Li Gørtz Technical University of Denmark arxiv: v1 [cs.ds] 9 Apr 2018 Abstract Given a regular expression R and a string Q the regular expression matching problem is to determine if Q is a member of the language generated by R. The classic textbook algorithm by Thompson [C. ACM 1968] constructs and simulates a non-deterministic finite automaton in O(nm) time and O(m) space, where n and m are the lengths of the string and the regular expression, respectively. Assuming the strong exponential time hypothesis Backurs and Indyk [FOCS 2016] showed that this result is nearly optimal. However, for most applications determining membership is insufficient and we need to compute how we match, i.e., to identify or replace matches or submatches in the string. Using backtracking we can extend Thompson s algorithm to solve this problem, called regular expression parsing, in the same asymptotic time but with a blow up in space to Ω(nm). Surprisingly, all existing approaches suffer the same or a similar quadratic blow up in space and no known solutions for regular expression parsing significantly improve this gap between matching and parsing. In this paper, we overcome this gap and present a new algorithm for regular expression parsing using O(nm) time and O(n + m) space. To achieve our result, we develop a novel divide and conquer approach similar in spirit to the classic divide and conquer technique by Hirshberg [C. ACM 1975] for computing a longest common subsequence of two strings in quadratic time and linear space. We show how to carefully decompose the problem to handle cyclic interactions in the automaton leading to a subproblem construction of independent interest. Finally, we generalize our techniques to convert other existing stateset transition algorithms for matching to parsing using only linear space. 1

2 1 Introduction A regular expression specifies a set of strings formed by characters combined with concatenation, union ( ), and kleene star (*) operators, e.g., (a (ba))* is a string of as and bs where every b is followed by an a. For instance, (a (ba))*) is a string of as and bs, where every b is followed by an a. Regular expressions are a fundamental concept in formal language theory and a basic tool in computer science for specifying search patterns. We distinguish between two basic variants of regular expression search. Given a regular expression R and a string Q, the regular expression matching problem is to decide if Q is a member of the set of strings derived from R. The closely related regular expression parsing problem is to determine if the string matches and if so determine how it matches by computing the corresponding sequence of positions of characters in R, i.e., the mapping of each character in Q to a character in R corresponding to the match. For instance, if R = (a (ba))*) and Q = aaba, then Q matches R and 1, 1, 2, 3 is a corresponding parse specifying that Q[1] and Q[2] match the first a in R, Q[3] match the b in R, and Q[4] match the last a in R 1. Searching for regular expressions is a key computational primitive widely used in programming languages and software tools such as Perl, Python, Javascript, Ruby, grep, sed, and AWK. Regular expressions are also a key component in many data processing applications, such as internet traffic analysis [12, 24, 15], data mining [9], data bases [16, 18], computational biology [20], and human computer interaction [14]. In most scenarios, solving the matching problem is insufficient and we need parsing to solve the task, i.e., to identify or replace matches or submatches of the expression. Let n and m be length of string and regular expression, respectively. A classic textbook algorithm for regular expression matching, due to Thompson [23], constructs and simulates a non-deterministic finite automaton (NFA) in O(nm) time and O(m) space. A few more recent algorithms have improved the O(nm) time bound for matching [19, 3, 4, 5, 6] by polylogarithmic factors by speeding up the O(nm) time solution. On the other hand, Backurs and Indyk [2] recently showed that matching cannot be solved in Ω((nm) 1 ε ) time assuming the strong exponential time hypothesis. We can extend Thompson s algorithm to solve the parsing problem by using backtracking. To do so, we store all state-sets produced during the NFA simulation and then process these in reverse order to recover an accepting path in the NFA matching Q. From the path we then immediately obtain the corresponding parse of Q since each transition labeled by a character uniquely correspond to a character in R. This algorithm uses O(nm) time and space. Hence, we achieve the same time bound as matching but increase the space quadratically. Existing alternative approaches to parsing, see e.g. [13, 7, 8, 21, 22], have the same or similar issues and none of the existing results significantly improve the combination of Θ(nm) time and space (ignoring polylogarithmic factors). The goal of this paper is to address this gap between regular expression matching and parsing. 1.1 Results We present a new technique to efficiently extend the classic state-set transition algorithms for matching to solve also solve parsing in the same time complexity while only using linear 1 Another typical definition of parsing is to compute a parse tree (or a variant thereof) of the derivation of Q on R. Our definition simplifies our presentation and it is straightforward to derive a parse tree from our parses. 2

3 space. Specifically, we obtain the following main result based on Thompson s algorithm: Theorem 1 Given a regular expression of length m and a string of length n, we can solve the regular expression parsing problem in O(nm) time and O(n + m) space. This is the first bound to significantly improve upon the combination of Θ(nm) time and space. The result holds on a comparison-based, pointer machine model of computation. Our techniques are sufficiently general to also handle the more recent faster state-set transition algorithms [19, 4, 3] and we also obtain similar space improvement for these. 1.2 Techniques Our overall approach is similar in spirit to the classic divide and conquer algorithm by Hirschberg [11] for computing a longest common subsequence of two strings of lengths in linear space. Let A be the Thompson NFA (TNFA) for R built according to Thompson s rules [23] (see also Fig. 1) with m states, and let Q be the string of length n. We first decompose A using standard techniques into an pair of nested subtnfas called the inner subtnfa and the outer subtnfa. Each have roughly at most 2/3 of the states of A and overlap in at most 2 boundary states. We then show how carefully to simulate A to decompose Q into substrings corresponding to subparts of an accepting path in each of the subtnfas. The key challenge here is to efficiently handle cyclic dependencies between the subtnfas. From this we construct a sequence of subproblems for each of the substrings corresponding to the inner subtnfas and a single subproblem for the outer subtnfa. We recursively solve these to construct a complete accepting path in A. This strategy leads to an O(nm) time and O(n log m + n) space solution. We show how to tune and organize the recursion to avoid storing intermediate substrings leading to the linear space solution in Thm. 1. Finally, we show how to extend our solution to obtain linear space parsing solutions for other state-set transition algorithms. 2 Preliminaries Regular Expressions First we briefly review the classical concepts used in the paper. For more details see, e.g., Aho et al. [1]. The set of regular expressions over Σ are defined recursively as follows: A character α Σ is a regular expression, and if S and T are regular expressions then so is the concatenation, (S) (T ), the union, (S) (T ), and the star, (S). The language L(R) generated by R is defined as follows: L(α) = {α}, L(S T ) = L(S) L(T ), that is, any string formed by the concatenation of a string in L(S) with a string in L(T ), L(S) L(T ) = L(S) L(T ), and L(S ) = i 0 L(S)i, where L(S) 0 = {ɛ} and L(S) i = L(S) i 1 L(S), for i > 0. Here ɛ denotes the empty string. The parse tree T (R) of R (not to be confused with the parse of Q wrt. to R) is the rooted, binary tree representing the hierarchical structure of R. The leaves of T (R) are labeled by a character from Σ and internal nodes are labeled by either,, or. Finite Automata A finite automaton is a tuple A = (V, E, Σ, θ, φ), where V is a set of nodes called states, E is a set of directed edges between states called transitions either labeled ɛ (called ɛ-transitions) or labeled by a character from Σ (called character-transitions), θ V is a start state, and φ V is an accepting state 2. In short, A is an edge-labeled directed 2 Sometimes NFAs are allowed a set of accepting states, but this is not necessary for our purposes. 3

4 (a) α (b) N(S) N(T ) N(S) (c) N(T ) (d) N(S) Figure 1: Thompson s recursive NFA construction. The regular expression for a character α Σ corresponds to NFA (a). If S and T are regular expressions then N(ST ), N(S T ), and N(S ) correspond to NFAs (b), (c), and (d), respectively. In each of these figures, the leftmost node θ and rightmost node φ are the start and the accept nodes, respectively. For the top recursive calls, these are the start and accept nodes of the overall automaton. In the recursions indicated, e.g., for N(ST ) in (b), we take the start node of the subautomaton N(S) and identify with the state immediately to the left of N(S) in (b). Similarly the accept node of N(S) is identified with the state immediately to the right of N(S) in (b). graph with a special start and accepting node. A is a deterministic finite automaton (DFA) if A does not contain any ɛ-transitions, and all outgoing transitions of any state have different labels. Otherwise, A is a non-deterministic automaton (NFA). When we deal with multiple automatons, we use a subscript A to indicate information associated with automaton A, e.g., θ A is the start state of automaton A. Given a string Q and a path P in A we say that Q and P match if the concatenation of the labels on the transitions in P is Q. Given a state s in A we define the state-set transition δ A (s, Q) to be the set of states reachable from s through paths matching Q. For a set of states S we define δ A (S, Q) = s S δ A(s, Q). We say that A accepts the string Q if φ A δ A (θ A, Q). Otherwise A rejects q. For an accepting path P in A, we define the parse of P for A to be the sequence of character transitions in A on P. Given a string Q accepted by A, a parse of Q is a parse for A of any accepting path matching Q. We can use a sequence of state-set transitions to test acceptance of a string Q of length n by computing a sequence of state-sets S 0,..., S n, given by S 0 = δ A (θ A, ɛ) and S i = δ A (S i 1, Q[i]), i = 1,..., n. We have that φ A S n iff A accepts Q. We can extend the algorithm to also compute the parse of Q for A by processing the state-sets in reverse order to recover an accepting path and output the character transitions. Note that for matching we only need to store the latest two state-sets at any point to compute the final state-set S n, whereas for parsing we store the full sequence of state-sets. Thompson NFA Given a regular expression R, we can construct an NFA accepting precisely the strings in L(R) by several classic methods [17, 10, 23]. In particular, Thompson [23] gave the simple well-known construction shown in Fig. 1. We will call an NFA constructed with these rules a Thompson NFA (TNFA). Note that each character in R corresponds to a unique character transition in N(R) and hence a parse of a string Q for N(R) directly corresponds to a parse of Q for R. A TNFA N(R) for R has at most 2m states, at most 4m transitions, and can be computed in O(m) time. With a breadth-first search of A we can compute a state-set transition for a single character in O(m) time. By our above discussion, it follows that we can solve regular expression matching in O(nm) time and O(m) space, and 4

5 <latexit sha1_base64="mnaegcefhonx4wsm+lgphsz/u/w=">aaab8xicbza9swnbeibn/iyjh1flm8mgwiu7c7wmwggzwxxgcos9zsrzsrd37m4j4ci/semhik3/xs5/4+aj0mqxfh7ed4admtcrwpdnfttr6xubw9u5nxxhd2//ohh4vddxqjnwecxj3qyzqsku1kiqxgaikuwhxey4vj3mjwfurstqkuyjbhhrk9etnjg1nto0qgkd7gbckza8sjetuwr+akqvwt0erkqd4le7g/m0qkvcmmnavpdqkdfngksc59upwytxietjy6jiezogm008ds+s03v7sbzpkttzf3dkldjmfiw2mmi0mmvz1pwva6xuuw4yozkuuph5r71uuhs70/xdrtdisy4smk6fndxla6yzj3ukvd2cv7zyktqvyr5x9h/8uuus5srbczzcofhwbrw4hyrugiocf3ifn8c4e+fd+zixrjmlnmp4i+fzbz4gkgq=</latexit> <latexit sha1_base64="rjzedx0fjz4js+ujvn4+ahnmcaw=">aaab8xicbzc7sgnbfiznvcbes9qyzwaqrmkuhvpgllsmyc6ylgf29iqzmju7zjwvwpk3semhik3p4qvy+tzoloum/jdw8f/nmoecijhcoot+o2vrg5tb27mdfgf3b/+gehjumhgqodr5lgpdcpgbkrtuuacevqkbrygezjc8mebnj9bgxoobrwn4eesr0rocobueozgazn3setwtlt2koxndbw8b5wrhdll6biw1bvgre8y8juahl8yytucm6gdmo+asxvloaibhfmj60laowatgz2ytj+mpdulai7v9cunm/d2rsciyurtyyojhwcxnu/o/rj1i78rphepsbmxnh/vsstgm0/vpkdrwlcmljgthz6v8wdtjai+ut0fwlldehcz5xxmr3r1xrl6quxkkre7igfhijamso1ijdckjis/khbw6xpk4b877vhtnwfqckz9ypn4azsotoa==</latexit> <latexit sha1_base64="rjzedx0fjz4js+ujvn4+ahnmcaw=">aaab8xicbzc7sgnbfiznvcbes9qyzwaqrmkuhvpgllsmyc6ylgf29iqzmju7zjwvwpk3semhik3p4qvy+tzoloum/jdw8f/nmoecijhcoot+o2vrg5tb27mdfgf3b/+gehjumhgqodr5lgpdcpgbkrtuuacevqkbrygezjc8mebnj9bgxoobrwn4eesr0rocobueozgazn3setwtlt2koxndbw8b5wrhdll6biw1bvgre8y8juahl8yytucm6gdmo+asxvloaibhfmj60laowatgz2ytj+mpdulai7v9cunm/d2rsciyurtyyojhwcxnu/o/rj1i78rphepsbmxnh/vsstgm0/vpkdrwlcmljgthz6v8wdtjai+ut0fwlldehcz5xxmr3r1xrl6quxkkre7igfhijamso1ijdckjis/khbw6xpk4b877vhtnwfqckz9ypn4azsotoa==</latexit> <latexit sha1_base64="c/4rq29zir/i/4ishogf3i9v1qg=">aaab8xicbva9swnbej2lxzf+rs1tdongfe4s1djiyxnbfgbyhl3njfmyt3fszgnhyl+wsvde1n9j579xk1yhiq8ghu/nmdmvtkqw5hnftmftfwnzq7hd2tnd2z8ohx41tzxqjg0ey1i3q2zqcouneisxnwhkusixfy5vz37rcbursxqgsyjbxizkdarnzkxhlo2qwc+7mfbkfa/qzeguej8nfchr75w/uv2ypxeq4piz0/g9hikmarjc4rtutq0mji/zeduwkhahcbl5xvp3zcp9dxbrw4rcufp7imormzmotj0ro5fz9mbif14npcf1kamvpisklxynuuls7m7ed/tciyc5syrxleytlh8xztjzkeo2bh/55vxsvkj6xtw/9yu1yzyoipzakzydd1dqgzuoqwm4khigv3hzjppivdsfi9ack88cwx84nz+p2jdz</latexit> A<latexit sha1_base64="j5bv2gbo9wlyhgfsaptwlfyfcea=">aaab6hicbzc7sgnbfibpeo3xfrw0gqycvdi1uwym2fgmyc6qlgf2cjyzmzu7zmwkyckt2fgoyqsv4jpyig/j5fjo4g8dh/9/dnpocrlbtxhdb2dpewv1bt23kd/c2t7zlezt13wckoy1fotynqoquxcjnconwgaikeabweywub7njxtumsfy1gwt9cpakzzkjbprva86hajbcicii+dnohj58f4fvpvo4bpdjvkaotrmuk1bnpsyp6pkcczwlg+nghpkbrshlyusrqj9bdloibxbp0vcwnkndzm4vzsygmk9jajbgvht1/pz2pwva6umppczlppuogttj8juebot8dakyxuyi4ywkfpczkpynyrkjl1n3h7bm195eeqnjc8tevwvwl6aqxjwcedwah6cqrluoai1yidwae/w7nw5j86l8zotxxjmpqfwr87bd+ejjzm=</latexit> <latexit sha1_base64="n5+flpspa4y4oymemkx7ltib0nc=">aaab6hicbzdlsgnbeevr4iuor6hln41bcbvm3cicghhjmghzggqipz2ape3pg+4eiqz5ajcufhgrfojf4eb8gzujc0280hc4t4qukj8rxgnh+bjyc4tlyyv5vxttfwnzq7c9u1dxkhnwwcxi2fspqsejrgmubtytitt0btb8weu4b9yivdyorvuwqs+kvyghnfftropfp1b0ss5ezb7chyiev79+2mfjw6vt+gh3y5agggkmqfit10m0l1gporm4stupwosyae1hy2beq1renhl0ra6m0yvblm2lnjm4vzsygio1dh1tgvldv7pz2pwva6u6opeyhiwpxohnpwpsqxrmxlutlpfitbgaoexymythfsop0+y2tjmco7vypnspsq5tcqtusxwku+vhd/bhefw4hjjcqqvqwadhdh7g0bqx7q0n63lamrn+enbhj6yxb7caki4=</latexit> sha1_base64="ocw8dn+6yli4x55/oik9vjp/apm=">aaab6hicbva9swnbej2lxzf+rs1tfongfe5sdfyrg8sezackr9jbzcvr9vao3t0hhpkfnhak2pqt7pw3bpirnphbwoo9gwbmbyng2rjut1py2nza3inulvb2dw6pyscnbr2nimglxsjw3ybqffxiy3ajsjsopfegsbnm7uz+5wmv5rf8mnme/yioja85o8zkzdtbuejw3qxiovfyuoecjuh5qz+mwrqhnexqrxuemxg/o8pwjnbw6qcae8omdiq9sywnupvz4tazubdkkisxsiunwai/jziaat2natszutpwq95c/m/rpsas+rmxswpqsuwimbxexgt+nrlyhcyiqswukw5vjwxmfwxgzloyixirl6+t9lxvc6te06vub/i4inag53ajhlxdhe6has1ggpamr/dmpdovzrvzswwtopnmkfyb8/kdj4wmug==</latexit> <latexit sha1_base64="vsige9fc66ktzj/e5fkksjlmsai=">aaab6nicbzc7sgnbfibpxlumt1vlqqadybv2brsrii2dec0fkixmtmatibozy8xziyq8go2fira2voydny/i5fjo4g8dh/9/dnpocvmpdhrel5nbwl5zxcuvfzy2t7z33n29mkkyzxivjtlrjzaaloxivrqoespvnmah5pwwfzxo6w9cg5goexykpihpv4limirwurts37tdolfyjikl4m+gwhypp74bonj2p1udhguxv8gknabpeykgq6prmmlhhvzmeepzn3z506kimtfbcdlqibxbp0oirnunkezc3x1dghszienbgvpsmflsbp6xntomzoohugmgxlhpr1emcszkvdfpcm0zyoefyrswsxlwo5oytncp2cp48ysvqu205hsl/9yvli9gqjwcwbgcga9nuizrqeavghthez7hxzhok/pqve1lc86szx/+yhn/ay2fj3c=</latexit> <latexit sha1_base64="fyzz1opiz11rw4y6hsmpfi1ahle=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qriht3vrqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ayblkwk=</latexit> <latexit sha1_base64="fyzz1opiz11rw4y6hsmpfi1ahle=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qriht3vrqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ayblkwk=</latexit> <latexit sha1_base64="p9pdyf2bdma7ff1afes6votbeby=">aaab6nicbva9swnbej2lxzf+rs1tfongfe5sdfyrgzsjmg9ijrc32uuw7o0du3ncopitbcwusfux2flv3crxaokdgcd7m8zmcxipdlrut1nyw9/y3cpul3z29/ypyodhlronmvemi2wsowe1xarfmyhq8k6ioy0cydvb+gbmt5+4nijwjzhjub/rorkhybst9hddv+uxk27vnyosei8nfcjr6je/eooyprfxycq1puu5cfoz1siy5nnslzu8owxmh7xrqairn342p3vkzqwyiggsbskkc/x3reyjyyzrydsjiioz7m3e/7xuimhnz4rkuusklrafqsqyk9nfzca0zygnllcmhb2vsbhvlkfnp2rd8jzfxiwti6rnvr17r1k/yumowgmcwjl4cal1uiugnihbej7hfd4c6bw4787horxg5dph8afo5w/h9418</latexit> <latexit sha1_base64="ohfq6psn58nil9puempet+jyzxq=">aaab6nicbzc7sgnbfibpxlumt1vlqqadybv2brsrii12ec0fkixmtmatibozy8xziyq8go2fira2voydny/i5fjo4g8dh/9/dnpocvmpdhrel5nbwl5zxcuvfzy2t7z33n29mkkyzxivjtlrjzaaloxivrqoespvnmah5pwwfzxo6w9cg5goexykpihpv4limirwurts37tdolfyjikl4m+gwhypp74bonj2p1udhguxv8gknabpeykgq6prmmlhhvzmeepzn3z506kimtfbcdlqibxbp0oirnunkezc3x1dghszienbgvpsmflsbp6xntomzoohugmgxlhpr1emcszkvdfpcm0zyoefyrswsxlwo5oytncp2cp48ysvqu205hsl/9yvli9gqjwcwbgcga9nuizrqeavghthez7hxzhok/pqve1lc86szx/+yhn/ayrtj3e=</latexit> <latexit sha1_base64="13/tgg1mxqbhmfi7tt1taay5i3k=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qrihvdvbqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ax2zkwm=</latexit> <latexit sha1_base64="13/tgg1mxqbhmfi7tt1taay5i3k=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qrihvdvbqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ax2zkwm=</latexit> <latexit sha1_base64="ze+f4yvgffiufk73qxvnxhz1gzs=">aaab6nicbva9swnbej2lxzf+rs1tfongfe5sdfyrg+0img9ijrc32uuw7o0du3ncopitbcwusfux2flv3crxaokdgcd7m8zmcxipdlrut1nyw9/y3cpul3z29/ypyodhlronmvemi2wsowe1xarfmyhq8k6ioy0cydvb+gbmt5+4nijwjzhjub/rorkhybst9hddv+uxk27vnyosei8nfcjr6je/eooyprfxycq1puu5cfoz1siy5nnslzu8owxmh7xrqairn342p3vkzqwyiggsbskkc/x3reyjyyzrydsjiioz7m3e/7xuimhnz4rkuusklrafqsqyk9nfzca0zygnllcmhb2vsbhvlkfnp2rd8jzfxiwti6rnvr17r1k/yumowgmcwjl4cal1uiugnihbej7hfd4c6bw4787horxg5dph8afo5w/y3412</latexit> <latexit sha1_base64="ziap/xfhy3l94riaxlw6vk88djs=">aaab8xicbzdjsgnbeizrxgpc4nlz0hget2fgbd1gvogtglkwgyaetidp0tmzdtciychbepggifdfwpmp4m23sbmcnpghho//r6krkkykmoi6387c4tlyympulb++sbm1xdjzrzk41yxxwsxj3qip4vioxkwbkjcszwkusl4p+5ejvp7atrgxusvbwv2idpxocebrwnetpcec7ck4hgafoltyxylz4e2hwn6///wagepq+gq1y5zgxcgt1jim5yboz1sjyjip863u8isypu3ypkvfi278bdzxkbxzp006sbzpirm7vzsyghkziejbgvhsmdlszp6xnvpsnpuzuemkxlhjr51ueozjah3sfpozlamllglhzywsrzvlai+ut0fwzleeh9pjyxnl3o1xlj/crdk4gem4bg/ooaxxuieqmfdwcm/w4hjnyxl13ialc860zw/+yhn/axxqkvu=</latexit> <latexit sha1_base64="hpnwztdthoh98brqr4qqkh8ocg8=">aaab8xicbzdlsgmxfibpek31vi87n8eiucotexrzcao7cvac7tbk0kwbmsmmsuyoq9/cjqtf3poa4l53ln0t08tcw38ifpz/oesceysca+o6x87c/mli0njujb+6tr6xwdjaruk4vzrvasxi1qiizojlvjxccnzifcnrifg96j0p8/odu5rh8tr0e+zfpcn5yckx1rppjv3uz2f+5cavfn2soxkabtybynn39v3jo/dw8qufrxzm04hjqwxruondxhgzuyztwqb5vqpzqmipdfjtoiqr0142mniadqztrmgs7jmgjdzfhrmjto5hga2mionq6wxo/pc1uxoeehmxswqypoopwlqge6ph+qjnfang9c0qqridfdeuuyqae6s8pqkexnkwakcl7jbwfs6wj2gshozbphwchhmowwvuoaoujnzdizw52nlwnp2xcemcm+nzgt9yxn8a0igusw==</latexit> <latexit sha1_base64="hpnwztdthoh98brqr4qqkh8ocg8=">aaab8xicbzdlsgmxfibpek31vi87n8eiucotexrzcao7cvac7tbk0kwbmsmmsuyoq9/cjqtf3poa4l53ln0t08tcw38ifpz/oesceysca+o6x87c/mli0njujb+6tr6xwdjaruk4vzrvasxi1qiizojlvjxccnzifcnrifg96j0p8/odu5rh8tr0e+zfpcn5yckx1rppjv3uz2f+5cavfn2soxkabtybynn39v3jo/dw8qufrxzm04hjqwxruondxhgzuyztwqb5vqpzqmipdfjtoiqr0142mniadqztrmgs7jmgjdzfhrmjto5hga2mionq6wxo/pc1uxoeehmxswqypoopwlqge6ph+qjnfang9c0qqridfdeuuyqae6s8pqkexnkwakcl7jbwfs6wj2gshozbphwchhmowwvuoaoujnzdizw52nlwnp2xcemcm+nzgt9yxn8a0igusw==</latexit> <latexit sha1_base64="y0fbq/nozjcnkaxrscmhlujsucs=">aaab8xicbvbns8naej3ur1q/qh69lbbbu0le0gpfi94q2fpsq9hsj+3szsbsboqs+i+8efdeq//gm//gbzudtj4yelw3w8y8mbvcg9f9dkorq2vrg+xnytb2zu5edf+grznmmwyxrcsqe1kngktsgw4edlkfna4fposj66n/8irk80tem3gkfkwhkkecuwolx1465ef+fdxogmrnrbszkgxifaqgbzpb9avxt1gwozrmuk27npsap6fkcczwuullglpkrnsaxusljvh7+ezictmxsp9eibildzmpvydygms9jkpbgvmz1ivevpzp62ymuvrzltpmogtzrvemieni9h3s5wqzewnlkfpc3krykcrkja2pykpwfl9eju2zuufwvtuv1jgv4ijderzdkxhwaq24gsa0gigez3ifn0c7l8678zfvltnfzch8gfp5a2r3kko=</latexit> <latexit sha1_base64="zwwhyhtxeg6myyuznzqmeuokoy4=">aaab7xicbvdlsgnbeoynrxhfir69dabbu9j1ob4jxjxgma9ilja76u3gzm4sm7nccpkewyshrbz6p978gyepgyywnbrv3xr3rangxvr+t5dbw9/y3mpvf3z29/ypiqxdhlgzzlhnsijdiqhbwsxwlbccw6lgmkqcm9hwzuo3h1ebrus9hauyjrqvecwztu5qdnib7153i2w/4s9avkmwiovq6akedrvu8avtuyxlufomqdhtwe9tokbacizwuuhkblpkhrspbucltdce49m1e3lqlb6jlxyllzmpvyfgndfmlesum6f2yja9qfif185sfbwouuwzi5lnf8wzifar6eukxzuyk0aouka5u5wwadwuwrdqwyuqll+8shrnlccvbhcujquyiw/hcajnemalvoewalahbg/wdk/w5invxxv3puatow8xcwr/4h3+aji/j9i=</latexit> <latexit sha1_base64="nublebec4it8rmubisatwycf9dg=">aaab7xicbvc7sgnbfl0bxzg+ntppmxgeq7brozyrg8si5ghjemyns8my2zllzlyisz5bslfqxnbw37c180psntwkttxw4xdovdx7t5hwpo3nftm5pewv1bx8emfjc2t7xy3u1rvmfae1irluzrbrypmgncmmp81euryhndbcwexyb9xrpzkun2ay0cdgpceirrcxur2d9fnnouowvli3avok/oyuksv793v/473act/bxunsmapdona65xujctksdcocjgrtvnmekwhu0zalasdub9nk2he6skoxrvlzegzn1n8tgy61hsah7yyx6et5byz+57vse50hgrnjaqgg00vrypgrapw66jjfiefdszbrzn6ksb8rtiwnqgbd8odfxit1k7lvlf1rm8yptjghaziey/dhdcpwbvwoayfbeianehak8+i8ok/t1pwzm9mdp3defgd0f5jz</latexit> <latexit sha1_base64="nublebec4it8rmubisatwycf9dg=">aaab7xicbvc7sgnbfl0bxzg+ntppmxgeq7brozyrg8si5ghjemyns8my2zllzlyisz5bslfqxnbw37c180psntwkttxw4xdovdx7t5hwpo3nftm5pewv1bx8emfjc2t7xy3u1rvmfae1irluzrbrypmgncmmp81euryhndbcwexyb9xrpzkun2ay0cdgpceirrcxur2d9fnnouowvli3avok/oyuksv793v/473act/bxunsmapdona65xujctksdcocjgrtvnmekwhu0zalasdub9nk2he6skoxrvlzegzn1n8tgy61hsah7yyx6et5byz+57vse50hgrnjaqgg00vrypgrapw66jjfiefdszbrzn6ksb8rtiwnqgbd8odfxit1k7lvlf1rm8yptjghaziey/dhdcpwbvwoayfbeianehak8+i8ok/t1pwzm9mdp3defgd0f5jz</latexit> <latexit sha1_base64="te0irxpyl8kjm93+os2toofy0rg=">aaab7xicbva9swnbej2lxzf+rs1tfongfe4s1djiyxnbfebyhl3njfmzt3vs7gnhyh+wsvde1v9j579xk1yhiq8ghu/nmdmvsgq31ve/vcla+sbmvng7tlo7t39qpjxqgpvqhg2mhnltibouxgldciuwnwikcsswfy1vz37rcbxhsj7ysyjhtiesdzij1knnbjlivzteuejx/tnikglyuoec9v75q9txli1rwiaomz3at2yyuw05ezgtdvodcwvjossoo5lgamjsfu2undmltwzku5kwznxfexmnjznekeumqr2zzw8m/ud1uju4djmuk9sizitfg1qqq8jsddlngpkve0co09zdstiiasqsc6jkqgiwx14lzytq4fede79su8zjkmijnmi5bhafnbidojsawsm8wyu8ecp78d69j0vrwctnjuepvm8ftqqo4w==</latexit> <latexit sha1_base64="mnaegcefhonx4wsm+lgphsz/u/w=">aaab8xicbza9swnbeibn/iyjh1flm8mgwiu7c7wmwggzwxxgcos9zsrzsrd37m4j4ci/semhik3/xs5/4+aj0mqxfh7ed4admtcrwpdnfttr6xubw9u5nxxhd2//ohh4vddxqjnwecxj3qyzqsku1kiqxgaikuwhxey4vj3mjwfurstqkuyjbhhrk9etnjg1nto0qgkd7gbckza8sjetuwr+akqvwt0erkqd4le7g/m0qkvcmmnavpdqkdfngksc59upwytxietjy6jiezogm008ds+s03v7sbzpkttzf3dkldjmfiw2mmi0mmvz1pwva6xuuw4yozkuuph5r71uuhs70/xdrtdisy4smk6fndxla6yzj3ukvd2cv7zyktqvyr5x9h/8uuus5srbczzcofhwbrw4hyrugiocf3ifn8c4e+fd+zixrjmlnmp4i+fzbz4gkgq=</latexit> <latexit sha1_base64="rjzedx0fjz4js+ujvn4+ahnmcaw=">aaab8xicbzc7sgnbfiznvcbes9qyzwaqrmkuhvpgllsmyc6ylgf29iqzmju7zjwvwpk3semhik3p4qvy+tzoloum/jdw8f/nmoecijhcoot+o2vrg5tb27mdfgf3b/+gehjumhgqodr5lgpdcpgbkrtuuacevqkbrygezjc8mebnj9bgxoobrwn4eesr0rocobueozgazn3setwtlt2koxndbw8b5wrhdll6biw1bvgre8y8juahl8yytucm6gdmo+asxvloaibhfmj60laowatgz2ytj+mpdulai7v9cunm/d2rsciyurtyyojhwcxnu/o/rj1i78rphepsbmxnh/vsstgm0/vpkdrwlcmljgthz6v8wdtjai+ut0fwlldehcz5xxmr3r1xrl6quxkkre7igfhijamso1ijdckjis/khbw6xpk4b877vhtnwfqckz9ypn4azsotoa==</latexit> <latexit sha1_base64="rjzedx0fjz4js+ujvn4+ahnmcaw=">aaab8xicbzc7sgnbfiznvcbes9qyzwaqrmkuhvpgllsmyc6ylgf29iqzmju7zjwvwpk3semhik3p4qvy+tzoloum/jdw8f/nmoecijhcoot+o2vrg5tb27mdfgf3b/+gehjumhgqodr5lgpdcpgbkrtuuacevqkbrygezjc8mebnj9bgxoobrwn4eesr0rocobueozgazn3setwtlt2koxndbw8b5wrhdll6biw1bvgre8y8juahl8yytucm6gdmo+asxvloaibhfmj60laowatgz2ytj+mpdulai7v9cunm/d2rsciyurtyyojhwcxnu/o/rj1i78rphepsbmxnh/vsstgm0/vpkdrwlcmljgthz6v8wdtjai+ut0fwlldehcz5xxmr3r1xrl6quxkkre7igfhijamso1ijdckjis/khbw6xpk4b877vhtnwfqckz9ypn4azsotoa==</latexit> <latexit sha1_base64="c/4rq29zir/i/4ishogf3i9v1qg=">aaab8xicbva9swnbej2lxzf+rs1tdongfe4s1djiyxnbfgbyhl3njfmyt3fszgnhyl+wsvde1n9j579xk1yhiq8ghu/nmdmvtkqw5hnftmftfwnzq7hd2tnd2z8ohx41tzxqjg0ey1i3q2zqcouneisxnwhkusixfy5vz37rcbursxqgsyjbxizkdarnzkxhlo2qwc+7mfbkfa/qzeguej8nfchr75w/uv2ypxeq4piz0/g9hikmarjc4rtutq0mji/zeduwkhahcbl5xvp3zcp9dxbrw4rcufp7imormzmotj0ro5fz9mbif14npcf1kamvpisklxynuuls7m7ed/tciyc5syrxleytlh8xztjzkeo2bh/55vxsvkj6xtw/9yu1yzyoipzakzydd1dqgzuoqwm4khigv3hzjppivdsfi9ack88cwx84nz+p2jdz</latexit> <latexit sha1_base64="vsige9fc66ktzj/e5fkksjlmsai=">aaab6nicbzc7sgnbfibpxlumt1vlqqadybv2brsrii2dec0fkixmtmatibozy8xziyq8go2fira2voydny/i5fjo4g8dh/9/dnpocvmpdhrel5nbwl5zxcuvfzy2t7z33n29mkkyzxivjtlrjzaaloxivrqoespvnmah5pwwfzxo6w9cg5goexykpihpv4limirwurts37tdolfyjikl4m+gwhypp74bonj2p1udhguxv8gknabpeykgq6prmmlhhvzmeepzn3z506kimtfbcdlqibxbp0oirnunkezc3x1dghszienbgvpsmflsbp6xntomzoohugmgxlhpr1emcszkvdfpcm0zyoefyrswsxlwo5oytncp2cp48ysvqu205hsl/9yvli9gqjwcwbgcga9nuizrqeavghthez7hxzhok/pqve1lc86szx/+yhn/ay2fj3c=</latexit> <latexit sha1_base64="fyzz1opiz11rw4y6hsmpfi1ahle=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qriht3vrqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ayblkwk=</latexit> <latexit sha1_base64="fyzz1opiz11rw4y6hsmpfi1ahle=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qriht3vrqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ayblkwk=</latexit> <latexit sha1_base64="p9pdyf2bdma7ff1afes6votbeby=">aaab6nicbva9swnbej2lxzf+rs1tfongfe5sdfyrgzsjmg9ijrc32uuw7o0du3ncopitbcwusfux2flv3crxaokdgcd7m8zmcxipdlrut1nyw9/y3cpul3z29/ypyodhlronmvemi2wsowe1xarfmyhq8k6ioy0cydvb+gbmt5+4nijwjzhjub/rorkhybst9hddv+uxk27vnyosei8nfcjr6je/eooyprfxycq1puu5cfoz1siy5nnslzu8owxmh7xrqairn342p3vkzqwyiggsbskkc/x3reyjyyzrydsjiioz7m3e/7xuimhnz4rkuusklrafqsqyk9nfzca0zygnllcmhb2vsbhvlkfnp2rd8jzfxiwti6rnvr17r1k/yumowgmcwjl4cal1uiugnihbej7hfd4c6bw4787horxg5dph8afo5w/h9418</latexit> <latexit sha1_base64="ziap/xfhy3l94riaxlw6vk88djs=">aaab8xicbzdjsgnbeizrxgpc4nlz0hget2fgbd1gvogtglkwgyaetidp0tmzdtciychbepggifdfwpmp4m23sbmcnpghho//r6krkkykmoi6387c4tlyympulb++sbm1xdjzrzk41yxxwsxj3qip4vioxkwbkjcszwkusl4p+5ejvp7atrgxusvbwv2idpxocebrwnetpcec7ck4hgafoltyxylz4e2hwn6///wagepq+gq1y5zgxcgt1jim5yboz1sjyjip863u8isypu3ypkvfi278bdzxkbxzp006sbzpirm7vzsyghkziejbgvhsmdlszp6xnvpsnpuzuemkxlhjr51ueozjah3sfpozlamllglhzywsrzvlai+ut0fwzleeh9pjyxnl3o1xlj/crdk4gem4bg/ooaxxuieqmfdwcm/w4hjnyxl13ialc860zw/+yhn/axxqkvu=</latexit> <latexit sha1_base64="hpnwztdthoh98brqr4qqkh8ocg8=">aaab8xicbzdlsgmxfibpek31vi87n8eiucotexrzcao7cvac7tbk0kwbmsmmsuyoq9/cjqtf3poa4l53ln0t08tcw38ifpz/oesceysca+o6x87c/mli0njujb+6tr6xwdjaruk4vzrvasxi1qiizojlvjxccnzifcnrifg96j0p8/odu5rh8tr0e+zfpcn5yckx1rppjv3uz2f+5cavfn2soxkabtybynn39v3jo/dw8qufrxzm04hjqwxruondxhgzuyztwqb5vqpzqmipdfjtoiqr0142mniadqztrmgs7jmgjdzfhrmjto5hga2mionq6wxo/pc1uxoeehmxswqypoopwlqge6ph+qjnfang9c0qqridfdeuuyqae6s8pqkexnkwakcl7jbwfs6wj2gshozbphwchhmowwvuoaoujnzdizw52nlwnp2xcemcm+nzgt9yxn8a0igusw==</latexit> <latexit sha1_base64="hpnwztdthoh98brqr4qqkh8ocg8=">aaab8xicbzdlsgmxfibpek31vi87n8eiucotexrzcao7cvac7tbk0kwbmsmmsuyoq9/cjqtf3poa4l53ln0t08tcw38ifpz/oesceysca+o6x87c/mli0njujb+6tr6xwdjaruk4vzrvasxi1qiizojlvjxccnzifcnrifg96j0p8/odu5rh8tr0e+zfpcn5yckx1rppjv3uz2f+5cavfn2soxkabtybynn39v3jo/dw8qufrxzm04hjqwxruondxhgzuyztwqb5vqpzqmipdfjtoiqr0142mniadqztrmgs7jmgjdzfhrmjto5hga2mionq6wxo/pc1uxoeehmxswqypoopwlqge6ph+qjnfang9c0qqridfdeuuyqae6s8pqkexnkwakcl7jbwfs6wj2gshozbphwchhmowwvuoaoujnzdizw52nlwnp2xcemcm+nzgt9yxn8a0igusw==</latexit> <latexit sha1_base64="y0fbq/nozjcnkaxrscmhlujsucs=">aaab8xicbvbns8naej3ur1q/qh69lbbbu0le0gpfi94q2fpsq9hsj+3szsbsboqs+i+8efdeq//gm//gbzudtj4yelw3w8y8mbvcg9f9dkorq2vrg+xnytb2zu5edf+grznmmwyxrcsqe1kngktsgw4edlkfna4fposj66n/8irk80tem3gkfkwhkkecuwolx1465ef+fdxogmrnrbszkgxifaqgbzpb9avxt1gwozrmuk27npsap6fkcczwuullglpkrnsaxusljvh7+ezictmxsp9eibildzmpvydygms9jkpbgvmz1ivevpzp62ymuvrzltpmogtzrvemieni9h3s5wqzewnlkfpc3krykcrkja2pykpwfl9eju2zuufwvtuv1jgv4ijderzdkxhwaq24gsa0gigez3ifn0c7l8678zfvltnfzch8gfp5a2r3kko=</latexit> <latexit sha1_base64="zwwhyhtxeg6myyuznzqmeuokoy4=">aaab7xicbvdlsgnbeoynrxhfir69dabbu9j1ob4jxjxgma9ilja76u3gzm4sm7nccpkewyshrbz6p978gyepgyywnbrv3xr3rangxvr+t5dbw9/y3mpvf3z29/ypiqxdhlgzzlhnsijdiqhbwsxwlbccw6lgmkqcm9hwzuo3h1ebrus9hauyjrqvecwztu5qdnib7153i2w/4s9avkmwiovq6akedrvu8avtuyxlufomqdhtwe9tokbacizwuuhkblpkhrspbucltdce49m1e3lqlb6jlxyllzmpvyfgndfmlesum6f2yja9qfif185sfbwouuwzi5lnf8wzifar6eukxzuyk0aouka5u5wwadwuwrdqwyuqll+8shrnlccvbhcujquyiw/hcajnemalvoewalahbg/wdk/w5invxxv3puatow8xcwr/4h3+aji/j9i=</latexit> <latexit sha1_base64="nublebec4it8rmubisatwycf9dg=">aaab7xicbvc7sgnbfl0bxzg+ntppmxgeq7brozyrg8si5ghjemyns8my2zllzlyisz5bslfqxnbw37c180psntwkttxw4xdovdx7t5hwpo3nftm5pewv1bx8emfjc2t7xy3u1rvmfae1irluzrbrypmgncmmp81euryhndbcwexyb9xrpzkun2ay0cdgpceirrcxur2d9fnnouowvli3avok/oyuksv793v/473act/bxunsmapdona65xujctksdcocjgrtvnmekwhu0zalasdub9nk2he6skoxrvlzegzn1n8tgy61hsah7yyx6et5byz+57vse50hgrnjaqgg00vrypgrapw66jjfiefdszbrzn6ksb8rtiwnqgbd8odfxit1k7lvlf1rm8yptjghaziey/dhdcpwbvwoayfbeianehak8+i8ok/t1pwzm9mdp3defgd0f5jz</latexit> <latexit sha1_base64="nublebec4it8rmubisatwycf9dg=">aaab7xicbvc7sgnbfl0bxzg+ntppmxgeq7brozyrg8si5ghjemyns8my2zllzlyisz5bslfqxnbw37c180psntwkttxw4xdovdx7t5hwpo3nftm5pewv1bx8emfjc2t7xy3u1rvmfae1irluzrbrypmgncmmp81euryhndbcwexyb9xrpzkun2ay0cdgpceirrcxur2d9fnnouowvli3avok/oyuksv793v/473act/bxunsmapdona65xujctksdcocjgrtvnmekwhu0zalasdub9nk2he6skoxrvlzegzn1n8tgy61hsah7yyx6et5byz+57vse50hgrnjaqgg00vrypgrapw66jjfiefdszbrzn6ksb8rtiwnqgbd8odfxit1k7lvlf1rm8yptjghaziey/dhdcpwbvwoayfbeianehak8+i8ok/t1pwzm9mdp3defgd0f5jz</latexit> <latexit sha1_base64="te0irxpyl8kjm93+os2toofy0rg=">aaab7xicbva9swnbej2lxzf+rs1tfongfe4s1djiyxnbfebyhl3njfmzt3vs7gnhyh+wsvde1v9j579xk1yhiq8ghu/nmdmvsgq31ve/vcla+sbmvng7tlo7t39qpjxqgpvqhg2mhnltibouxgldciuwnwikcsswfy1vz37rcbxhsj7ysyjhtiesdzij1knnbjlivzteuejx/tnikglyuoec9v75q9txli1rwiaomz3at2yyuw05ezgtdvodcwvjossoo5lgamjsfu2undmltwzku5kwznxfexmnjznekeumqr2zzw8m/ud1uju4djmuk9sizitfg1qqq8jsddlngpkve0co09zdstiiasqsc6jkqgiwx14lzytq4fede79su8zjkmijnmi5bhafnbidojsawsm8wyu8ecp78d69j0vrwctnjuepvm8ftqqo4w==</latexit> <latexit sha1_base64="ohfq6psn58nil9puempet+jyzxq=">aaab6nicbzc7sgnbfibpxlumt1vlqqadybv2brsrii12ec0fkixmtmatibozy8xziyq8go2fira2voydny/i5fjo4g8dh/9/dnpocvmpdhrel5nbwl5zxcuvfzy2t7z33n29mkkyzxivjtlrjzaaloxivrqoespvnmah5pwwfzxo6w9cg5goexykpihpv4limirwurts37tdolfyjikl4m+gwhypp74bonj2p1udhguxv8gknabpeykgq6prmmlhhvzmeepzn3z506kimtfbcdlqibxbp0oirnunkezc3x1dghszienbgvpsmflsbp6xntomzoohugmgxlhpr1emcszkvdfpcm0zyoefyrswsxlwo5oytncp2cp48ysvqu205hsl/9yvli9gqjwcwbgcga9nuizrqeavghthez7hxzhok/pqve1lc86szx/+yhn/ayrtj3e=</latexit> <latexit sha1_base64="13/tgg1mxqbhmfi7tt1taay5i3k=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qrihvdvbqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ax2zkwm=</latexit> <latexit sha1_base64="13/tgg1mxqbhmfi7tt1taay5i3k=">aaab6nicbzdlsgmxfibpek31nupskgarxjuzn4qrihvdvbqxaiesstntacyzkoxqhj6cic4uceu27+azcc58g9plqlt/chz8/znknbmmngnjed/owuls8spqbi2/vrg5te3u7fa1tbwhfsk5vpuqa8qzobxddkf1rfech5zwwt7lkk/du6wzfhemn9agxh3bikawsdbtreu65ra8ojcwmgd/cowsezd8evwyllvuz7mtsrptyqjhwjd8lzfbhpvhhnnbvplqmmdswx3aschwthwqjucdocprtfeklx3colh7uypdsdb9olsvmtzdpzunzp+yrmqisybjikknfwtyuzryzcqa7y3atffien8cjorzwrhpyowjsdfj2yp4syvpq/wk6htf/8yvlm5hohzswyecgw+nuiirkemfchtgaz7hxehok/pqve1kf5xpzx78kfp+ax2zkwm=</latexit> <latexit sha1_base64="ze+f4yvgffiufk73qxvnxhz1gzs=">aaab6nicbva9swnbej2lxzf+rs1tfongfe5sdfyrg+0img9ijrc32uuw7o0du3ncopitbcwusfux2flv3crxaokdgcd7m8zmcxipdlrut1nyw9/y3cpul3z29/ypyodhlronmvemi2wsowe1xarfmyhq8k6ioy0cydvb+gbmt5+4nijwjzhjub/rorkhybst9hddv+uxk27vnyosei8nfcjr6je/eooyprfxycq1puu5cfoz1siy5nnslzu8owxmh7xrqairn342p3vkzqwyiggsbskkc/x3reyjyyzrydsjiioz7m3e/7xuimhnz4rkuusklrafqsqyk9nfzca0zygnllcmhb2vsbhvlkfnp2rd8jzfxiwti6rnvr17r1k/yumowgmcwjl4cal1uiugnihbej7hfd4c6bw4787horxg5dph8afo5w/y3412</latexit> <latexit sha1_base64="ziap/xfhy3l94riaxlw6vk88djs=">aaab8xicbzdjsgnbeizrxgpc4nlz0hget2fgbd1gvogtglkwgyaetidp0tmzdtciychbepggifdfwpmp4m23sbmcnpghho//r6krkkykmoi6387c4tlyympulb++sbm1xdjzrzk41yxxwsxj3qip4vioxkwbkjcszwkusl4p+5ejvp7atrgxusvbwv2idpxocebrwnetpcec7ck4hgafoltyxylz4e2hwn6///wagepq+gq1y5zgxcgt1jim5yboz1sjyjip863u8isypu3ypkvfi278bdzxkbxzp006sbzpirm7vzsyghkziejbgvhsmdlszp6xnvpsnpuzuemkxlhjr51ueozjah3sfpozlamllglhzywsrzvlai+ut0fwzleeh9pjyxnl3o1xlj/crdk4gem4bg/ooaxxuieqmfdwcm/w4hjnyxl13ialc860zw/+yhn/axxqkvu=</latexit> <latexit sha1_base64="hpnwztdthoh98brqr4qqkh8ocg8=">aaab8xicbzdlsgmxfibpek31vi87n8eiucotexrzcao7cvac7tbk0kwbmsmmsuyoq9/cjqtf3poa4l53ln0t08tcw38ifpz/oesceysca+o6x87c/mli0njujb+6tr6xwdjaruk4vzrvasxi1qiizojlvjxccnzifcnrifg96j0p8/odu5rh8tr0e+zfpcn5yckx1rppjv3uz2f+5cavfn2soxkabtybynn39v3jo/dw8qufrxzm04hjqwxruondxhgzuyztwqb5vqpzqmipdfjtoiqr0142mniadqztrmgs7jmgjdzfhrmjto5hga2mionq6wxo/pc1uxoeehmxswqypoopwlqge6ph+qjnfang9c0qqridfdeuuyqae6s8pqkexnkwakcl7jbwfs6wj2gshozbphwchhmowwvuoaoujnzdizw52nlwnp2xcemcm+nzgt9yxn8a0igusw==</latexit> <latexit sha1_base64="hpnwztdthoh98brqr4qqkh8ocg8=">aaab8xicbzdlsgmxfibpek31vi87n8eiucotexrzcao7cvac7tbk0kwbmsmmsuyoq9/cjqtf3poa4l53ln0t08tcw38ifpz/oesceysca+o6x87c/mli0njujb+6tr6xwdjaruk4vzrvasxi1qiizojlvjxccnzifcnrifg96j0p8/odu5rh8tr0e+zfpcn5yckx1rppjv3uz2f+5cavfn2soxkabtybynn39v3jo/dw8qufrxzm04hjqwxruondxhgzuyztwqb5vqpzqmipdfjtoiqr0142mniadqztrmgs7jmgjdzfhrmjto5hga2mionq6wxo/pc1uxoeehmxswqypoopwlqge6ph+qjnfang9c0qqridfdeuuyqae6s8pqkexnkwakcl7jbwfs6wj2gshozbphwchhmowwvuoaoujnzdizw52nlwnp2xcemcm+nzgt9yxn8a0igusw==</latexit> <latexit sha1_base64="y0fbq/nozjcnkaxrscmhlujsucs=">aaab8xicbvbns8naej3ur1q/qh69lbbbu0le0gpfi94q2fpsq9hsj+3szsbsboqs+i+8efdeq//gm//gbzudtj4yelw3w8y8mbvcg9f9dkorq2vrg+xnytb2zu5edf+grznmmwyxrcsqe1kngktsgw4edlkfna4fposj66n/8irk80tem3gkfkwhkkecuwolx1465ef+fdxogmrnrbszkgxifaqgbzpb9avxt1gwozrmuk27npsap6fkcczwuullglpkrnsaxusljvh7+ezictmxsp9eibildzmpvydygms9jkpbgvmz1ivevpzp62ymuvrzltpmogtzrvemieni9h3s5wqzewnlkfpc3krykcrkja2pykpwfl9eju2zuufwvtuv1jgv4ijderzdkxhwaq24gsa0gigez3ifn0c7l8678zfvltnfzch8gfp5a2r3kko=</latexit> A O A O A AI <latexit sha1_base64="bu/dwd5l8d2rxic/z/01/ca33ja=">aaab83icbvdlssnafl2pr1pf9bfzeyycq5kiomukg91vsa9oqphmj+3qysto3agl9dfcufderf/gyg9w5984fsy09ccfwzn3cu89ysq4rsf5tgplyyura8x10sbm1vzoexevqznmudagiuhuoysacs5zazkk1k4vi3eowcscxi391gntmifydocp82pskzzilkcrpa/7demqxwy3o6bccarobpyicwekuju4//waghpq/vk6cc1ijpekonxhdvl0c6kqu8fgjs/tlcv0qhqsy6gkmdn+prl5zb8bpwthitil0z6ovydyems9jeptgrps63lvlp7ndtkmlvycyzrdjul0uzqjgxn7hidd5yprfendcfxc3grtplgeoompzejw519ejm3tqutu3vu3ujudkypwcedwai6cqw2uoq4nojdcizzdi5vzt9ar9tztlvizmx34a+v9bxhkk94=</latexit> <latexit sha1_base64="nedfkvnkaqp+cvsff447wi8i9yg=">aaab83icbvdjsgnbeo2jw4xbxg5egopgkcyiomeif71fmatkwtdtquma9cx21whhyg948aciv/9cvovno39izzlo4oocx3tvvnxzeyk02vaxlvtyxfpeya8w1ty3nrek2zt1haekq43hmlznn2mqioiacptqtbsw0jfq8psxi79xb0qlolrbqqltkhujeqjo0eiuiz1a5mxn3txqk5bssj0gnsfoljqqe7fvh9/5t6px/hq7mu9dijblpnxlsrnsz0yh4bkgbtfvkddez11ogrqxehq7g988pidg6dagvqyipgp190tgqq0how86q4y9peunxp+8vorbwtstuziirhyykeglxzioaqadoycjhbjcublmvsp7tdgojqacccgzfxme1i/ljl12rp1s5yrmkcf75iaceyeckgq5jfvsi5wk5j48kicrtr6sz+tl0pqzpjo75a+s1x9mfzwc</latexit> <latexit sha1_base64="nedfkvnkaqp+cvsff447wi8i9yg=">aaab83icbvdjsgnbeo2jw4xbxg5egopgkcyiomeif71fmatkwtdtquma9cx21whhyg948aciv/9cvovno39izzlo4oocx3tvvnxzeyk02vaxlvtyxfpeya8w1ty3nrek2zt1haekq43hmlznn2mqioiacptqtbsw0jfq8psxi79xb0qlolrbqqltkhujeqjo0eiuiz1a5mxn3txqk5bssj0gnsfoljqqe7fvh9/5t6px/hq7mu9dijblpnxlsrnsz0yh4bkgbtfvkddez11ogrqxehq7g988pidg6dagvqyipgp190tgqq0how86q4y9peunxp+8vorbwtstuziirhyykeglxzioaqadoycjhbjcublmvsp7tdgojqacccgzfxme1i/ljl12rp1s5yrmkcf75iaceyeckgq5jfvsi5wk5j48kicrtr6sz+tl0pqzpjo75a+s1x9mfzwc</latexit> <latexit sha1_base64="k+9rmke9n4qxrcpbdwqe1wdypdc=">aaab83icbvbns8naen3ur1q/qh69lbbbu0le0gpfi94q2a9oqthsp+3szsbstoqs+je8efdeq3/gm//gbzudtj4yelw3w8y8kjxcoot+o6w19y3nrfj2zwd3b/+genjunkmmobr4ihpdjzgbkrs0ukcebqqbxzgetjs+nfmdj9bgjoorjykemrsqmrccozv8h0ealmxvwvtpwk25dxcoukq8gtrigwzy/fl7cc9iumglm6bnuskgodmouirpxc8mpiyp2rb6liowgwny+c1temavph0k2pzcold/t+qsnmysr7yzzjgyy95m/m/rzti4dnkh0gxb8cwiqsypjnqwao0ldrzlxblgtbc3uj5imng0mvvscn7yy6ukfvh33lr34nual0uczxjctsk58cgvaza70iqtwklknskrexmy58v5dz4wrswnmdkmf+b8/gd5/jgt</latexit> A I AI A A AI <latexit sha1_base64="bu/dwd5l8d2rxic/z/01/ca33ja=">aaab83icbvdlssnafl2pr1pf9bfzeyycq5kiomukg91vsa9oqphmj+3qysto3agl9dfcufderf/gyg9w5984fsy09ccfwzn3cu89ysq4rsf5tgplyyura8x10sbm1vzoexevqznmudagiuhuoysacs5zazkk1k4vi3eowcscxi391gntmifydocp82pskzzilkcrpa/7demqxwy3o6bccarobpyicwekuju4//waghpq/vk6cc1ijpekonxhdvl0c6kqu8fgjs/tlcv0qhqsy6gkmdn+prl5zb8bpwthitil0z6ovydyems9jeptgrps63lvlp7ndtkmlvycyzrdjul0uzqjgxn7hidd5yprfendcfxc3grtplgeoompzejw519ejm3tqutu3vu3ujudkypwcedwai6cqw2uoq4nojdcizzdi5vzt9ar9tztlvizmx34a+v9bxhkk94=</latexit> <latexit sha1_base64="nedfkvnkaqp+cvsff447wi8i9yg=">aaab83icbvdjsgnbeo2jw4xbxg5egopgkcyiomeif71fmatkwtdtquma9cx21whhyg948aciv/9cvovno39izzlo4oocx3tvvnxzeyk02vaxlvtyxfpeya8w1ty3nrek2zt1haekq43hmlznn2mqioiacptqtbsw0jfq8psxi79xb0qlolrbqqltkhujeqjo0eiuiz1a5mxn3txqk5bssj0gnsfoljqqe7fvh9/5t6px/hq7mu9dijblpnxlsrnsz0yh4bkgbtfvkddez11ogrqxehq7g988pidg6dagvqyipgp190tgqq0how86q4y9peunxp+8vorbwtstuziirhyykeglxzioaqadoycjhbjcublmvsp7tdgojqacccgzfxme1i/ljl12rp1s5yrmkcf75iaceyeckgq5jfvsi5wk5j48kicrtr6sz+tl0pqzpjo75a+s1x9mfzwc</latexit> <latexit sha1_base64="nedfkvnkaqp+cvsff447wi8i9yg=">aaab83icbvdjsgnbeo2jw4xbxg5egopgkcyiomeif71fmatkwtdtquma9cx21whhyg948aciv/9cvovno39izzlo4oocx3tvvnxzeyk02vaxlvtyxfpeya8w1ty3nrek2zt1haekq43hmlznn2mqioiacptqtbsw0jfq8psxi79xb0qlolrbqqltkhujeqjo0eiuiz1a5mxn3txqk5bssj0gnsfoljqqe7fvh9/5t6px/hq7mu9dijblpnxlsrnsz0yh4bkgbtfvkddez11ogrqxehq7g988pidg6dagvqyipgp190tgqq0how86q4y9peunxp+8vorbwtstuziirhyykeglxzioaqadoycjhbjcublmvsp7tdgojqacccgzfxme1i/ljl12rp1s5yrmkcf75iaceyeckgq5jfvsi5wk5j48kicrtr6sz+tl0pqzpjo75a+s1x9mfzwc</latexit> <latexit sha1_base64="k+9rmke9n4qxrcpbdwqe1wdypdc=">aaab83icbvbns8naen3ur1q/qh69lbbbu0le0gpfi94q2a9oqthsp+3szsbstoqs+je8efdeq3/gm//gbzudtj4yelw3w8y8kjxcoot+o6w19y3nrfj2zwd3b/+genjunkmmobr4ihpdjzgbkrs0ukcebqqbxzgetjs+nfmdj9bgjoorjykemrsqmrccozv8h0ealmxvwvtpwk25dxcoukq8gtrigwzy/fl7cc9iumglm6bnuskgodmouirpxc8mpiyp2rb6liowgwny+c1temavph0k2pzcold/t+qsnmysr7yzzjgyy95m/m/rzti4dnkh0gxb8cwiqsypjnqwao0ldrzlxblgtbc3uj5imng0mvvscn7yy6ukfvh33lr34nual0uczxjctsk58cgvaza70iqtwklknskrexmy58v5dz4wrswnmdkmf+b8/gd5/jgt</latexit> AI AI A A I AI <latexit sha1_base64="bu/dwd5l8d2rxic/z/01/ca33ja=">aaab83icbvdlssnafl2pr1pf9bfzeyycq5kiomukg91vsa9oqphmj+3qysto3agl9dfcufderf/gyg9w5984fsy09ccfwzn3cu89ysq4rsf5tgplyyura8x10sbm1vzoexevqznmudagiuhuoysacs5zazkk1k4vi3eowcscxi391gntmifydocp82pskzzilkcrpa/7demqxwy3o6bccarobpyicwekuju4//waghpq/vk6cc1ijpekonxhdvl0c6kqu8fgjs/tlcv0qhqsy6gkmdn+prl5zb8bpwthitil0z6ovydyems9jeptgrps63lvlp7ndtkmlvycyzrdjul0uzqjgxn7hidd5yprfendcfxc3grtplgeoompzejw519ejm3tqutu3vu3ujudkypwcedwai6cqw2uoq4nojdcizzdi5vzt9ar9tztlvizmx34a+v9bxhkk94=</latexit> <latexit sha1_base64="nedfkvnkaqp+cvsff447wi8i9yg=">aaab83icbvdjsgnbeo2jw4xbxg5egopgkcyiomeif71fmatkwtdtquma9cx21whhyg948aciv/9cvovno39izzlo4oocx3tvvnxzeyk02vaxlvtyxfpeya8w1ty3nrek2zt1haekq43hmlznn2mqioiacptqtbsw0jfq8psxi79xb0qlolrbqqltkhujeqjo0eiuiz1a5mxn3txqk5bssj0gnsfoljqqe7fvh9/5t6px/hq7mu9dijblpnxlsrnsz0yh4bkgbtfvkddez11ogrqxehq7g988pidg6dagvqyipgp190tgqq0how86q4y9peunxp+8vorbwtstuziirhyykeglxzioaqadoycjhbjcublmvsp7tdgojqacccgzfxme1i/ljl12rp1s5yrmkcf75iaceyeckgq5jfvsi5wk5j48kicrtr6sz+tl0pqzpjo75a+s1x9mfzwc</latexit> <latexit sha1_base64="nedfkvnkaqp+cvsff447wi8i9yg=">aaab83icbvdjsgnbeo2jw4xbxg5egopgkcyiomeif71fmatkwtdtquma9cx21whhyg948aciv/9cvovno39izzlo4oocx3tvvnxzeyk02vaxlvtyxfpeya8w1ty3nrek2zt1haekq43hmlznn2mqioiacptqtbsw0jfq8psxi79xb0qlolrbqqltkhujeqjo0eiuiz1a5mxn3txqk5bssj0gnsfoljqqe7fvh9/5t6px/hq7mu9dijblpnxlsrnsz0yh4bkgbtfvkddez11ogrqxehq7g988pidg6dagvqyipgp190tgqq0how86q4y9peunxp+8vorbwtstuziirhyykeglxzioaqadoycjhbjcublmvsp7tdgojqacccgzfxme1i/ljl12rp1s5yrmkcf75iaceyeckgq5jfvsi5wk5j48kicrtr6sz+tl0pqzpjo75a+s1x9mfzwc</latexit> <latexit sha1_base64="k+9rmke9n4qxrcpbdwqe1wdypdc=">aaab83icbvbns8naen3ur1q/qh69lbbbu0le0gpfi94q2a9oqthsp+3szsbstoqs+je8efdeq3/gm//gbzudtj4yelw3w8y8kjxcoot+o6w19y3nrfj2zwd3b/+genjunkmmobr4ihpdjzgbkrs0ukcebqqbxzgetjs+nfmdj9bgjoorjykemrsqmrccozv8h0ealmxvwvtpwk25dxcoukq8gtrigwzy/fl7cc9iumglm6bnuskgodmouirpxc8mpiyp2rb6liowgwny+c1temavph0k2pzcold/t+qsnmysr7yzzjgyy95m/m/rzti4dnkh0gxb8cwiqsypjnqwao0ldrzlxblgtbc3uj5imng0mvvscn7yy6ukfvh33lr34nual0uczxjctsk58cgvaza70iqtwklknskrexmy58v5dz4wrswnmdkmf+b8/gd5/jgt</latexit> AI (a) (b) (c) Figure 2: Decomposition into subtnfas. The dotted lines are the possible ɛ-paths that introduce cyclic dependencies. For simplicity, we have removed some of the additional states generated by Thompson s construction. (a) The automaton A decomposed into an outer sub- TNFA A O and and inner subtnfa A I. (b) The subtnfa A O with the extra β AI transition and possibly an ɛ-transition from θ AI to φ AI. (c) The subtnfa A I with the possibly extra ɛ-transition from φ AI to θ AI. regular expression parsing in O(nm) time and space. TNFA Decomposition We need the following decomposition result for TFNAs (see Fig. 2). Similar decompositions are used in [19, 3]. Given a TNFA A with m > 2 states, we decompose A into an inner subtnfa A I and an outer subtnfa A O. The inner subtnfa consists of a pair of boundary states θ AI and φ AI and all states and transitions reachable from θ AI, but not crossing φ AI. Furthermore, if there is a path of ɛ-transitions from φ AI to θ AI in A O, we add an ɛ-transition from φ AI to θ AI in A I (following the rules from Thompson s construction). The outer subtnfa is obtained by removing all states and transitions of A I except θ AI and φ AI. Between θ AI and φ AI we add a special transition labeled β AI Σ and if A I accepts the empty string we also add an ɛ-transition (corresponding to the regular expression (β AI ɛ)). Lemma 2 Let A be any TNFA with m > 2 states. In O(m) time we can decompose A into inner and outer subtnfas A O and A I such that (i) A O and A I have at most 2/3m + 8 states each, and (ii) any path from A O to A I crosses θ AI and any path from A I to A O crosses φ AI. Proof: Consider the parse tree T of A with v nodes. Since T is a binary tree with more than one node we can find a separator edge e in linear time whose removal splits T into subtrees T I and T O that each have at most 2/3v + 1 nodes. Here, T O is the subtree containing the root of T. The subtnfa A I is the TNFA induced by T I, possibly with a new union node as root with one child being the root T I and the other a leaf labeled ɛ. The subtnfa T O is the TNFA induced by the tree T O, where the separator edge is replaced by either a leaf labeled β AI or a union-node with children labeled β AI and ɛ. Thus, each subtnfa are induced by tree with at most 2/3v + 4 nodes. Since each node correspond to two states, each subtnfa has at most 2/3m + 8 states. 3 String Decompositions Let A be a TNFA decomposed into subtnfas A O and A I and Q be a string accepted by A. We show how to efficiently decompose Q into substrings corresponding to subpaths matched 5

6 in each subtnfa. The algorithm will be a key component in our recursive algorithm in the next section. Given an accepting path P in A, we define the path decomposition of P wrt. A I to be the partition of P into a sequence of subpaths P = p 1, p 1, p 2, p 2,..., p l, p l, p l+1, where the outer subpaths, p 1,..., p l+1, are subpaths in A O and the inner subpaths, p 1,..., p l+1 are the subpaths in A I. The string decomposition induced by P is the sequence of substrings Q = q 1, q 1, q 2, q 2,..., q l, q l, q l+1 formed by concatenating the labels of the corresponding subpath in A. A sequence of substrings is a substring decomposition wrt. to A I if there exists an accepting path that induces it. Our goal is to compute a string decomposition in O(nm) time and O(n + m) space, where n is the length of Q and m is the number of states in A. We need the following new definitions. Let i be a position in Q and let s be a state in A. We say that (i, s) is valid pair if there is a path from θ A to s matching Q[1, i] and from s to φ A matching Q[i + 1]. For any set of states X in A, we say that (i, X) is a valid pair if each pair (i, x), x X, is valid pair. A path in A intersects a valid pair (i, X) if (i, x) for some state x X is on the path. 3.1 Computing String Decompositions The high-level idea of our algorithm is as follows. In step 1, we process Q from left to right and right to left to compute and store the match sets, consisting of all valid pairs for the boundary states θ AI and φ AI. We then use the match sets in step 2 to process Q from left to right to build a sequence of valid pairs for the boundary states that all intersect a single accepting path P in A matching Q, and that has the property that all positions where the accepting path P contains θ AI or φ AI correspond to a valid pair in the sequence. Finally, in step 3 we use this sequence to construct the string decomposition. We describe the full details of each step below. Step 1: Computing Match Sets First, compute the match sets given by Match(θ AI ) = {i (i, θ AI ) is a valid pair} Match(φ AI ) = {i (i, φ AI ) is a valid pair} Thus, Match(θ AI ) and Match(φ AI ) are the positions in Q that correspond to a valid pair for the boundary states θ AI and φ AI, respectively. To compute these, we first compute the prefix match sets, Prefix(s), and suffix match sets, Suffix(s), for s {θ AI, φ AI }. A position i is in Prefix(s) if there is a path from θ A to s accepting the prefix Q[1, i], and in Suffix(s) if there is a path from s to φ A accepting the suffix Q[i + 1, n]. To compute the prefix match sets we perform state-set transitions on Q and A and whenever the current state-set contains either θ AI or φ AI we add the corresponding position to Prefix(s). We compute the suffix match sets in the same way, but now we perform the state-set transitions on Q from right to left and A with the direction of all transitions reversed. Each step of the state-set transition takes O(m) time and hence we use O(nm) time in total. Finally, we compute the match sets Match(s), for s {θ AI, φ AI }, by taking the intersection of Prefix(s) and Suffix(s). In total we use O(mn) time and O(n + m) space to compute and store the match sets. 6

7 Step 2: Computing Valid Pairs We now a compute a sequence of valid pairs V = (i 1, X 1 ), (i 2, X 2 ),..., (i k, X k ) such that 0 i 1 < < i k n and X j {θ AI, φ AI } and with the property that all pairs intersect a single accepting path P in A and all places that P contains either θ AI or φ AI correspond to a valid pair in V. To compute the sequence we run a slightly modified state-set transition algorithm: For i = 0, 1,..., n we set S i = δ A (S i 1, Q[i]) (for i = 0 set S 0 := δ A (θ A, ɛ)) and compute the set X := {x x {θ AI, φ AI } and i Match(x)} S i. Thus X is the boundary nodes in S i that corresponds to a valid pair computed in Step 1. If X we add (i, X) to the sequence V and set S i := X. We argue that this produces a sequence V of valid pairs with the required properties. First note that by definition of X we inductively produce state-set S 0,..., S n such that S i contains the set of states reachable from θ A that match Q[i] and intersect the valid pairs produced up to this point. Furthermore, we include all positions in V where S i contains θ AI or φ AI. It follows that V satisfies the properties. Each of modified state-set transition uses O(m) time and hence we use O(nm) time in total. The sequence V uses O(n) space. In addition to this we store the match sets and a constant number of active state-sets using O(n + m) space. Step 3: Computing the String Decomposition We now convert the sequence V = (i 1, X 1 ), (i 2, X 2 ),..., (i k, X k ) it into a string decomposition. The sequence V induces a string decomposition q 0,..., q k+1 of Q where q 0 = Q[1, i 1 ], q j = Q[i j + 1, i j+1 ], and q k+1 = Q[i k + 1, n]. Note that q 0 and q k+1 may be the empty string. We now show how to efficiently convert this decomposition into a string decomposition. First, we determine for each of the substrings wether it can be an inner substring, an outer substring, or both. Labeling First, note that q 0 and q k+1 are always (possibly empty) outer substrings. For the rest of the substrings, if X i = {θ AI } and X i+1 = {φ AI } then q i must be an inner substring, and if X i = {φ AI } and X i+1 = {θ AI } then q i must be an outer substring. However, due to cyclic dependencies we may have that X i and X i+1 contains more than one boundary node. This can happen if there is an ɛ-path from θ AI to φ AI and/or there is an ɛ-path from φ AI to θ AI. In this case, we use standard state-set transitions in A I and A O to determine if A I accepts q i or if there is a path in A O from φ AI to θ AI that matches q i. If a substring is only accepted by A I or A O it is labeled with inner or outer, respectively. Secondly, we assign substrings that can be both inner and outer to one of them depending on their adjacent substrings. Let q i be a substring that can be both an inner or an outer substring. Note that this implies that at least one of X i or X i+1 is greater than one and both A I and A O accepts q i. We divide this into two cases. If there is an ɛ-path from φ AI to θ AI then label all such q i with inner. Otherwise (there is an ɛ-path from θ AI to φ AI, but not from φ AI to θ AI ) label all such q i with outer. To see why this is correct, note that if there is an an ɛ-path from φ AI to θ AI, then it is safe to label q i with inner, since in the case where we are in φ AI after having read q i 1 we can just follow the ɛ-path to θ AI and then start reading q i from here. The argument for the other case is similar. 7

Sri vidya college of engineering and technology

Sri vidya college of engineering and technology Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order

More information

String Matching with Variable Length Gaps

String Matching with Variable Length Gaps String Matching with Variable Length Gaps Philip Bille, Inge Li Gørtz, Hjalte Wedel Vildhøj, and David Kofoed Wind Technical University of Denmark Abstract. We consider string matching with variable length

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

More information

CS 154. Finite Automata, Nondeterminism, Regular Expressions

CS 154. Finite Automata, Nondeterminism, Regular Expressions CS 54 Finite Automata, Nondeterminism, Regular Expressions Read string left to right The DFA accepts a string if the process ends in a double circle A DFA is a 5-tuple M = (Q, Σ, δ, q, F) Q is the set

More information

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

September 11, Second Part of Regular Expressions Equivalence with Finite Aut Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language

More information

CS 455/555: Finite automata

CS 455/555: Finite automata CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently

More information

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite

More information

What we have done so far

What we have done so far What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

Faster Regular Expression Matching. Philip Bille Mikkel Thorup

Faster Regular Expression Matching. Philip Bille Mikkel Thorup Fster Regulr Expression Mtching Philip Bille Mikkel Thorup Outline Definition Applictions History tour of regulr expression mtching Thompson s lgorithm Myers lgorithm New lgorithm Results nd extensions

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

Properties of Context-Free Languages

Properties of Context-Free Languages Properties of Context-Free Languages Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr

More information

Theory of Computation (I) Yijia Chen Fudan University

Theory of Computation (I) Yijia Chen Fudan University Theory of Computation (I) Yijia Chen Fudan University Instructor Yijia Chen Homepage: http://basics.sjtu.edu.cn/~chen Email: yijiachen@fudan.edu.cn Textbook Introduction to the Theory of Computation Michael

More information

Finite Automata and Regular languages

Finite Automata and Regular languages Finite Automata and Regular languages Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

More information

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite

More information

Unit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1

Unit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1 Unit 6 Non Regular Languages The Pumping Lemma Reading: Sipser, chapter 1 1 Are all languages regular? No! Most of the languages are not regular! Why? A finite automaton has limited memory. How can we

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs CSE : Foundations of Computing Lecture : Finite State Machine Minimization & NFAs State Minimization Many different FSMs (DFAs) for the same problem Take a given FSM and try to reduce its state set by

More information

arxiv: v1 [cs.ds] 15 Feb 2012

arxiv: v1 [cs.ds] 15 Feb 2012 Linear-Space Substring Range Counting over Polylogarithmic Alphabets Travis Gagie 1 and Pawe l Gawrychowski 2 1 Aalto University, Finland travis.gagie@aalto.fi 2 Max Planck Institute, Germany gawry@cs.uni.wroc.pl

More information

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three

More information

Kleene Algebras and Algebraic Path Problems

Kleene Algebras and Algebraic Path Problems Kleene Algebras and Algebraic Path Problems Davis Foote May 8, 015 1 Regular Languages 1.1 Deterministic Finite Automata A deterministic finite automaton (DFA) is a model of computation that can simulate

More information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata : Organization of Programming Languages Theory of Regular Expressions Finite Automata Previous Course Review {s s defined} means the set of string s such that s is chosen or defined as given s A means

More information

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata. CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

More information

Parameterized Regular Expressions and Their Languages

Parameterized Regular Expressions and Their Languages Parameterized Regular Expressions and Their Languages Pablo Barceló a, Juan Reutter b, Leonid Libkin b a Department of Computer Science, University of Chile b School of Informatics, University of Edinburgh

More information

EDUCATIONAL PEARL. Proof-directed debugging revisited for a first-order version

EDUCATIONAL PEARL. Proof-directed debugging revisited for a first-order version JFP 16 (6): 663 670, 2006. c 2006 Cambridge University Press doi:10.1017/s0956796806006149 First published online 14 September 2006 Printed in the United Kingdom 663 EDUCATIONAL PEARL Proof-directed debugging

More information

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata. Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a

More information

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

More information

Non-deterministic Finite Automata (NFAs)

Non-deterministic Finite Automata (NFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel

More information

CSC173 Workshop: 13 Sept. Notes

CSC173 Workshop: 13 Sept. Notes CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of

More information

arxiv: v3 [cs.fl] 2 Jul 2018

arxiv: v3 [cs.fl] 2 Jul 2018 COMPLEXITY OF PREIMAGE PROBLEMS FOR DETERMINISTIC FINITE AUTOMATA MIKHAIL V. BERLINKOV arxiv:1704.08233v3 [cs.fl] 2 Jul 2018 Institute of Natural Sciences and Mathematics, Ural Federal University, Ekaterinburg,

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

UNIT-III REGULAR LANGUAGES

UNIT-III REGULAR LANGUAGES Syllabus R9 Regulation REGULAR EXPRESSIONS UNIT-III REGULAR LANGUAGES Regular expressions are useful for representing certain sets of strings in an algebraic fashion. In arithmetic we can use the operations

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-VIII COMPUTABILITY THEORY CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the

More information

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Theory of Regular Expressions DFAs and NFAs Reminders Project 1 due Sep. 24 Homework 1 posted Exam 1 on Sep. 25 Exam topics list posted Practice homework

More information

Tasks of lexer. CISC 5920: Compiler Construction Chapter 2 Lexical Analysis. Tokens and lexemes. Buffering

Tasks of lexer. CISC 5920: Compiler Construction Chapter 2 Lexical Analysis. Tokens and lexemes. Buffering Tasks of lexer CISC 5920: Compiler Construction Chapter 2 Lexical Analysis Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Copyright Arthur G. Werschulz, 2017. All

More information

COMP4141 Theory of Computation

COMP4141 Theory of Computation COMP4141 Theory of Computation Lecture 4 Regular Languages cont. Ron van der Meyden CSE, UNSW Revision: 2013/03/14 (Credits: David Dill, Thomas Wilke, Kai Engelhardt, Peter Höfner, Rob van Glabbeek) Regular

More information

3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation. Regular languages 3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1) CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1) Definition 1 (Alphabet) A alphabet is a finite set of objects called symbols. Definition 2 (String)

More information

arxiv: v2 [cs.ds] 3 Oct 2017

arxiv: v2 [cs.ds] 3 Oct 2017 Orthogonal Vectors Indexing Isaac Goldstein 1, Moshe Lewenstein 1, and Ely Porat 1 1 Bar-Ilan University, Ramat Gan, Israel {goldshi,moshe,porately}@cs.biu.ac.il arxiv:1710.00586v2 [cs.ds] 3 Oct 2017 Abstract

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17 12.1 Introduction Today we re going to do a couple more examples of dynamic programming. While

More information

arxiv:cs/ v1 [cs.ds] 28 Jun 2006

arxiv:cs/ v1 [cs.ds] 28 Jun 2006 New Algorithms for Regular Expression Matching Philip Bille August 22, 2018 arxiv:cs/0606116v1 [cs.ds] 28 Jun 2006 Abstract In this paper we revisit the classical regular expression matching problem, namely,

More information

CS243, Logic and Computation Nondeterministic finite automata

CS243, Logic and Computation Nondeterministic finite automata CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333

More information

Uses of finite automata

Uses of finite automata Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.

More information

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA 1 CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA GUO-QIANG ZHANG, XIANGNAN ZHOU, ROBERT FRASER, LICONG CUI Department of Electrical Engineering and Computer Science, Case Western Reserve

More information

Non-Deterministic Finite Automata

Non-Deterministic Finite Automata Slides modified Yishay Mansour on modification by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 8 Non-Deterministic Finite Automata 0,1 0,1 0 0,ε q q 1 q 2 3 1 q 4 an NFA

More information

acs-04: Regular Languages Regular Languages Andreas Karwath & Malte Helmert Informatik Theorie II (A) WS2009/10

acs-04: Regular Languages Regular Languages Andreas Karwath & Malte Helmert Informatik Theorie II (A) WS2009/10 Regular Languages Andreas Karwath & Malte Helmert 1 Overview Deterministic finite automata Regular languages Nondeterministic finite automata Closure operations Regular expressions Nonregular languages

More information

Finite Automata. BİL405 - Automata Theory and Formal Languages 1

Finite Automata. BİL405 - Automata Theory and Formal Languages 1 Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states

More information

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet: Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings

More information

Applied Computer Science II Chapter 1 : Regular Languages

Applied Computer Science II Chapter 1 : Regular Languages Applied Computer Science II Chapter 1 : Regular Languages Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany Overview Deterministic finite automata Regular languages

More information

Finite Automata and Languages

Finite Automata and Languages CS62, IIT BOMBAY Finite Automata and Languages Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS62: New Trends in IT: Modeling and Verification of Cyber-Physical Systems (2

More information

Formal Languages. We ll use the English language as a running example.

Formal Languages. We ll use the English language as a running example. Formal Languages We ll use the English language as a running example. Definitions. A string is a finite set of symbols, where each symbol belongs to an alphabet denoted by Σ. Examples. The set of all strings

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri

More information

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

More information

Concatenation. The concatenation of two languages L 1 and L 2

Concatenation. The concatenation of two languages L 1 and L 2 Regular Expressions Problem Problem Set Set Four Four is is due due using using a late late period period in in the the box box up up front. front. Concatenation The concatenation of two languages L 1

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel

More information

Enhancing Active Automata Learning by a User Log Based Metric

Enhancing Active Automata Learning by a User Log Based Metric Master Thesis Computing Science Radboud University Enhancing Active Automata Learning by a User Log Based Metric Author Petra van den Bos First Supervisor prof. dr. Frits W. Vaandrager Second Supervisor

More information

CSE 105 Theory of Computation Professor Jeanne Ferrante

CSE 105 Theory of Computation   Professor Jeanne Ferrante CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Announcement & Reminders HW 2: Grades not available yet, will be soon Solutions posted, read even if you did well

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

Examples of Regular Expressions. Finite Automata vs. Regular Expressions. Example of Using flex. Application

Examples of Regular Expressions. Finite Automata vs. Regular Expressions. Example of Using flex. Application Examples of Regular Expressions 1. 0 10, L(0 10 ) = {w w contains exactly a single 1} 2. Σ 1Σ, L(Σ 1Σ ) = {w w contains at least one 1} 3. Σ 001Σ, L(Σ 001Σ ) = {w w contains the string 001 as a substring}

More information

Chapter 6. Properties of Regular Languages

Chapter 6. Properties of Regular Languages Chapter 6 Properties of Regular Languages Regular Sets and Languages Claim(1). The family of languages accepted by FSAs consists of precisely the regular sets over a given alphabet. Every regular set is

More information

Theory of Computation

Theory of Computation Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what

More information

Formal Languages. We ll use the English language as a running example.

Formal Languages. We ll use the English language as a running example. Formal Languages We ll use the English language as a running example. Definitions. A string is a finite set of symbols, where each symbol belongs to an alphabet denoted by. Examples. The set of all strings

More information

Automata and Languages

Automata and Languages Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Nondeterministic Finite Automata with empty moves (-NFA) Definition A nondeterministic finite automaton

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 1.1 Design an automaton that recognizes a given language. Specify each of

More information

1 More finite deterministic automata

1 More finite deterministic automata CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

More information

Computational Models Lecture 2 1

Computational Models Lecture 2 1 Computational Models Lecture 2 1 Handout Mode Iftach Haitner. Tel Aviv University. October 30, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice Herlihy, Brown University.

More information

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 154, Lecture 3: DFA NFA, Regular Expressions CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and

More information

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA) Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting

More information

Computational Models Lecture 2 1

Computational Models Lecture 2 1 Computational Models Lecture 2 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. March 16/18, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL)

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL) CS5371 Theory of Computation Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL) Objectives Introduce Pumping Lemma for CFL Apply Pumping Lemma to show that some languages are non-cfl Pumping Lemma

More information

CS 455/555: Mathematical preliminaries

CS 455/555: Mathematical preliminaries CS 455/555: Mathematical preliminaries Stefan D. Bruda Winter 2019 SETS AND RELATIONS Sets: Operations: intersection, union, difference, Cartesian product Big, powerset (2 A ) Partition (π 2 A, π, i j

More information

Lecture 17: Language Recognition

Lecture 17: Language Recognition Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

This lecture covers Chapter 7 of HMU: Properties of CFLs

This lecture covers Chapter 7 of HMU: Properties of CFLs This lecture covers Chapter 7 of HMU: Properties of CFLs Chomsky Normal Form Pumping Lemma for CFs Closure Properties of CFLs Decision Properties of CFLs Additional Reading: Chapter 7 of HMU. Chomsky Normal

More information

On the Sizes of Decision Diagrams Representing the Set of All Parse Trees of a Context-free Grammar

On the Sizes of Decision Diagrams Representing the Set of All Parse Trees of a Context-free Grammar Proceedings of Machine Learning Research vol 73:153-164, 2017 AMBN 2017 On the Sizes of Decision Diagrams Representing the Set of All Parse Trees of a Context-free Grammar Kei Amii Kyoto University Kyoto

More information

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa CS:4330 Theory of Computation Spring 2018 Regular Languages Finite Automata and Regular Expressions Haniel Barbosa Readings for this lecture Chapter 1 of [Sipser 1996], 3rd edition. Sections 1.1 and 1.3.

More information

Lecture 2: Connecting the Three Models

Lecture 2: Connecting the Three Models IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 2: Connecting the Three Models David Mix Barrington and Alexis Maciel July 18, 2000

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

The View Over The Horizon

The View Over The Horizon The View Over The Horizon enumerable decidable context free regular Context-Free Grammars An example of a context free grammar, G 1 : A 0A1 A B B # Terminology: Each line is a substitution rule or production.

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 4.1 Explain what it means for a problem to be decidable. Justify the use of encoding.

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 3 January 9, 2017 January 9, 2017 CS21 Lecture 3 1 Outline NFA, FA equivalence Regular Expressions FA and Regular Expressions January 9, 2017 CS21 Lecture 3 2

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

Before we show how languages can be proven not regular, first, how would we show a language is regular?

Before we show how languages can be proven not regular, first, how would we show a language is regular? CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation 1/19/2016 LECTURE 3 Last time: DFAs and NFAs Operations on languages Today: Nondeterminism Equivalence of NFAs and DFAs Closure properties of regular languages Sofya Raskhodnikova

More information

INF Introduction and Regular Languages. Daniel Lupp. 18th January University of Oslo. Department of Informatics. Universitetet i Oslo

INF Introduction and Regular Languages. Daniel Lupp. 18th January University of Oslo. Department of Informatics. Universitetet i Oslo INF28 1. Introduction and Regular Languages Daniel Lupp Universitetet i Oslo 18th January 218 Department of Informatics University of Oslo INF28 Lecture :: 18th January 1 / 33 Details on the Course consists

More information

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007. Proofs, Strings, and Finite Automata CS154 Chris Pollett Feb 5, 2007. Outline Proofs and Proof Strategies Strings Finding proofs Example: For every graph G, the sum of the degrees of all the nodes in G

More information

ECS 120 Lesson 23 The Class P

ECS 120 Lesson 23 The Class P ECS 120 Lesson 23 The Class P Oliver Kreylos Wednesday, May 23th, 2001 We saw last time how to analyze the time complexity of Turing Machines, and how to classify languages into complexity classes. We

More information

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.  ETH Zürich (D-ITET) September, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) September, 24 2015 Last week was all about Deterministic Finite Automaton We saw three main

More information

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41 More on Finite Automata and Regular Languages (NTU EE) Regular Languages Fall 2016 1 / 41 Pumping Lemma is not a Sufficient Condition Example 1 We know L = {b m c m m > 0} is not regular. Let us consider

More information