Negative Selection Algorithms on Strings with Efficient Training and Linear-Time Classification

Size: px
Start display at page:

Download "Negative Selection Algorithms on Strings with Efficient Training and Linear-Time Classification"

Transcription

1 Negtive Selection Algorithms on Strings with Efficient Trining nd Liner-Time Clssifiction Michel Elerfeld, Johnnes Textor Institut für Theoretische Informtik, Universität zu Lüeck, Lüeck, Germny Astrct A string-sed negtive selection lgorithm is n immune-inspired clssifier tht infers iprtitioning of string spce Σ l from trining set S contining smples from only one of the prtitions. The lgorithm genertes set of ptterns, clled detectors, to cover regions of the string spce contining none of the trining smples. These ptterns re then used for clssifiction. A mjor prolem with ll existing implementtions of this pproch is tht the detector genertion step suffers from exponentil worst-cse time complexity. Hence, reserchers hve found negtive selection to e of limited use for rel-world prolems such s network intrusion detection. Here we show tht for the two most widely used kinds of detectors, the r-chunk nd r-contiguous detectors sed on prtil mtching to sustrings of length r, negtive selection cn e implemented efficiently y voiding generting detectors ltogether: For ech detector type, trining set S Σ l nd prmeter r l one cn construct n utomton with n cceptnce ehviour tht is equivlent to the lgorithm s clssifiction outcome. The resulting runtime is O( S lr Σ ) for constructing the utomton in the trining phse nd O(l) for clssifying string. Key words: negtive selection, r-chunk detectors, r-contiguous detectors, rtificil immune systems, nomly detection 1. Introduction The dptive immune system successfully protects verterte species, including us humn eings, from ecoming extinguished y pthogens. According to current textook immunology, the immune system ccomplishes this without ctully knowing wht pthogen is. Insted, it is trined during infncy to tolerte the tissues, cells nd molecules tht re norml components of its host orgnism the self nd to ttck everything else the nonself. While nonself includes potentilly dngerous things such s viruses, cteri nd fungi, this implies tht enign intruders such s donted kidney or liver re lso ttcked y the immune system. The prdigm of self-nonself-discrimintion is nturl source of inspirtion for computer security: Computer systems nd networks re lso continuously ttcked y worms nd other mlwre, nd computer progrm tht discrimintes with perfect ccurcy etween enign nd mlign softwre cnnot exist. Thus, cn we enefit from trnsferring the immune system s nice hck [17] to the computer security domin? A populr pproch to designing such computer immune systems is to mimic how the immune system s T cells re generted nd trined to detect nonself entities. This process is known s negtive selection [14, 15]: T cell receptors re generted y rndom ssemly of gene frgments. In n orgn clled the thymus, neworn T cells re exposed to proteins from self. Every cell whose receptor mtches self protein is destroyed. Only the cells tht survive negtive selection leve from the thymus nd strt to continuously circulte through the orgnism, screening for nonself entities. A negtive selection lgorithm is essentilly n strction of this process. The negtive selection lgorithms tht we consider in this pper re inry clssifiers operting on string spce Σ l. The clssifiction prolem is posed s follows (Figure 1): Σ l is ssumed to e pre-prtitioned in two pirwise disjoint susets S (self) nd N (nonself). The strings cn represent, for exmple, dt pckets in computer network Emil ddresses: elerfeld@tcs.uni-lueeck.de (Michel Elerfeld), textor@tcs.uni-lueeck.de (Johnnes Textor) Preprint sumitted to Theoreticl Computer Science - C August 24, 2010

2 true iprtitioning trining phse inferred iprtitioning S N nonself region self region detector d D strings mtched y d smple s S inferred nonself inferred self Figure 1: The clssifiction prolem solved y negtive selection lgorithm. The string universe Σ l is preprtitioned in two regions S (self) nd N (nonself). The clssifier is given trining set S S (lrge dots) nd genertes detector set D (smll dots) to cover regions of the universe contining none of the trining exmples (circles). This detector set induces clssifiction oundry tht pproximtes the prtitions S nd N. [3] or sequences of system clls from UNIX processes [13], where the self nd nonself prtitions would correspond to norml nd nomlous ehviour, respectively. The lgorithm is given smple S S of self strings, clled self-set, nd set M Σ l of strings to clssify, clled monitor set. It then genertes set D of ptterns clled detectors. In nlogy to the T cells in the immune system, this is typiclly done y generting the detectors rndomly nd discrding those tht mtch ny string in the self-set. Consequently, ech string m M is clssified y lelling m s non-self if it is mtched y ny detector, nd self otherwise. In prticulr, m is never leled non-self if it lso occurs in the self-set. From roder mchine lerning perspective, negtive selection is usully descried s n nomly detection technique [16, 6]. The following two importnt properties distinguish negtive selection from mny well-known clssifiers: (1) The trining dt consists of exmples from only one clss. Other techniques with this property include clssifiers sed on kernel density estimtion [4, 20] nd the one-clss support vector mchine [22]. (2) Clssifiction is sed on negtive representtion of trining dt, typiclly on short sustrings (r-grms) tht do not occur in the self-set. While positive representtions such s the r-grm frequency distriution used e.g. for identifiction of lnguge [11] nd text ctegoriztion [5] re more common in the mchine lerning domin, similr negtive representtions hve een studied in string theory. For exmple, certin sets of non-occurring sustrings (foridden words) cn e used to descrie the complexity of lnguge [8] Contriution of this pper This pper presents two lgorithms tht implement negtive selection with r-chunk nd r-contiguous detectors y generting compressed representtions of the respective detector sets, from which utomt re constructed tht simulte the clssifiction outcome through their cceptnce ehviour. Both lgorithms use time O( S lr Σ ) to construct n utomton for given self-set S nd prmeter r, which is equivlent to the trining phse of the simulted negtive selection lgorithm. Upon construction, the utomton clssifies ech string in liner time O(l). This improves upon the exponentil worst-cse complexity of existing lgorithms, nd thus removes one mjor ostcle for pplying negtive selection to rel-world prolems [28, 23, 27]. In comprison to our preliminry conference version [12], the lgorithms presented in this pper re sed on prefix trees insted of ptterns. This reduces the overll runtime significntly (Tle 1), generlizes to higher lphets, nd llows for simpler nd more concise presenttion. In ddition to the clssifiction itself, the utomt cn lso e used to efficiently count the detectors nd, if necessry, enumerte them explicitly. The r-chunk nd r-contiguous detectors considered here re mong the most common ones in the rtificil immune systems literture [16]: (1) An r-contiguous detector is string of length l nd mtches ll strings to which it is identicl in t lest r contiguous positions. (2) An r-chunk detector is string of length r (or r-grm) with position 2

3 index nd mtches ll strings in which the r-grm occurs t tht position. Figure 2 shows n exmple self-set S {, } 5 long with the complete sets of 3-chunk nd 3-contiguous detectors tht do not mtch ny string in S, s well s the prtitioning of {, } 5 induced y these detector sets. The r-contiguous detectors re directly sed on model of ntigen recognition y T cell receptors [21, 14], nd r-chunk detectors were lter introduced to chieve etter results on dt where different regions of the input strings hve highly different menings, such s network dt pckets [3]. (,1) (,1) (,2) (,2) (,3) (,3) (,1) (,2) (,2) (,3) self-set S 3-chunk detectors iprtitioning of {, } 5 3-contiguous detectors iprtitioning of {, } 5 Figure 2: An exmple self-set S {, } 5 long with ll 3-chunk detectors nd 3-contiguous detectors tht do not mtch ny string in S is shown. For oth detector types, the iprtitionings of the shpe spce {, } 5 re illustrted with strings tht re clssified s nonself hving gry ckground nd strings tht re clssified s self hving white ckground. Bold strings re memers of the self-set. The generliztion region of the negtive selection clssifier consists of the strings tht re clssified s self lthough they do not occur in the self-set. These strings re lso clled holes in the negtive selection literture [16, 25] Relted Work on String-Bsed Negtive Selection The question whether negtive selection with r-contiguous nd r-chunk detectors cn e implemented in polynomil worst-cse time ws open for severl yers. The complexity issues cused y the vertim strction of negtive selection s performed y the immune system re two-fold: On one hnd, if the self prtition is only smll frction of Σ l, then there is n exponentil numer of potentil detectors, nd it is uncler how mny of these hve to e generted to chieve n cceptle detection rte. The erly work of D heseleer nd others [10, 9] ddressed these prolems y proving lower ounds on the numer of required detectors, nd presenting lgorithms tht generte detectors y structured exhustive serch. However, these lgorithms still hve runtime exponentil in r. Similr lgorithms nd heuristics were lter proposed y Wierzchoń [30], Ayr et l. [2], nd Stior et l. [26]. In n effort to clrify the computtionl complexity of negtive selection, Stior nd coworkers studied the ssocited decision prolem [24, 25]: Given self-set S, cn n r-contiguous detector e generted tht does not mtch ny string in S? It ws recently suggested tht this decision prolem might e NP-complete [28], lthough completeness proof ws not shown. The ongoing difficulties led some in the field to conclude tht negtive selection is computtionlly too expensive for rel-world dtsets [23, 1]. This issue ws settled y the preliminry version of the present pper [12]. Most recently, Liśkiewicz nd Textor discussed the ide of negtive selection without explicit detector genertion from lerning theoreticl perspective [19] Orgniztion of This Pper We strt out y defining the forml underpinnings of our lgorithms in the upcoming section. Afterwrds, in Section 3, we sketch the construction of n utomton consisting of prefix trees nd filure links tht cn e used to simulte negtive selection with r-chunk detectors. This rther strightforwrd construction is used s sis for the more involved one in Section 4, where we trnsform the utomton into one tht llows liner-time clssifiction with respect to r-contiguous detectors. 2. Preliminries In this section, we define the forml ckground of our work. First we review some sic terms relted to strings nd pttern mtching techniques like utomt. Then we define r-chunk detectors, r-contiguous detectors, nd the corresponding clssifiction pproches. 3

4 r-chunk detector- symptotic runtime sed lgorithms trining phse clssifiction phse Stior et l. [26] (2 r + S )(l r + 1) D l Elerfeld, Textor [12] S (l r + 1)r 2 S l 2 r Present pper S lr l r-contiguous detector- symptotic runtime sed lgorithms trining phse clssifiction phse D heseleer et l. [10] (liner) (2 r + S )(l r) D l D heseleer et l. [10] (greedy) 2 r S (l r) D l Wierzchón [30] 2 r ( D (l r) + S ) D l Elerfeld, Textor [12] S 3 l 3 r 3 S 2 l 3 r 3 Present pper S lr l Tle 1: Comprison of our results with the runtimes of previously pulished lgorithms. All runtimes re given for inry lphet ( Σ = 2) since not ll lgorithms re pplicle to ritrry lphets. The prmeter D, the desired numer of detectors, is only pplicle to lgorithms tht generte detectors explicitly our lgorithms produce the results tht would e otined with the mximl numer of generted detectors Strings, Sustrings nd Lnguges An lphet Σ is nonempty nd finite set of symols. A string s Σ is sequence of symols from Σ, nd its length is denoted y s. Given n index i {1,..., s }, then s[i] is the symol t position i in s. Given two indices i nd j, whenever j i, then s[i... j] is the sustring of s with length j i + 1 tht strts t position i nd whenever j < i, then s[i... j] is the empty string. If i = 1, then s[i... j] is prefix of s nd, if j = s, then s[i... j] is suffix of s. Given string s Σ l nd nother string d Σ j with 1 j l nd n index i {1,..., l j + 1}, we sy tht d occurs in s t position i if s[i... i + j 1] = d. A set of strings S Σ is clled lnguge. For two indices i nd j, we define S [i... j] = {s[i... j] s S }. We sy tht S voids string d t position i if d occurs in no s S t position i. Alterntively, we sy tht S voids the tuple (d, i) Prefix Trees, Prefix DAGs, nd Automt A prefix tree T such s is rooted directed tree with edge lels from Σ where for ll σ Σ, every node hs t most one outgoing edge leled with σ. For string s, we write s T if there is pth (which my contin cycles) from the root of T to lef such tht s is the conctention of the lels on this pth. The lnguge L(T) descried y T is defined s the set of ll strings with prefix s T. For exmple, for T ove we hve L(T) since T nd L(T) since no prefix of lies in T. A prefix dg D such s is directed cyclic grph with edge lels from Σ, where gin for ll σ Σ, every node hs t most one outgoing edge leled with σ. In nlogy to prefix trees, we will use the terms root nd lef to refer to node without incoming nd outgoing edges, respectively. We write s D if there is root node n r nd lef node n l in D with pth from n r to n l tht is leled y s. Given n D, the lnguge L(D, n) contins ll strings tht hve prefix tht lels pth from n to some lef. For instnce, if D is the dg ove nd n is its upper left node, then L(D, n) consists of ll strings strting with. Moreover, we define L(D) = n is root of D L(D, n). We will construct finite utomt to decide the memership of strings in lnguges. Formlly, finite utomton is tuple M = (Q, q i, Q, Σ, ), where Q is set of sttes with distinguished initil stte q i Q, Q Q the set of ccepting sttes, Σ the lphet of M, nd Q Σ Q the trnsition reltion. Furthermore, we ssume tht the trnsition reltion is unmiguous: for every q Q nd every σ Σ there is t most one q Q with (q, σ, q ). It is common to represent the trnsition reltion s grph with nodes Q (with the initil stte nd the ccepting sttes highlighted properly) nd leled edges (with σ-leled edge from q to q if (q, σ, q ).) An utomton M is sid to ccept string s if its grph contins pth from q i to some q Q whose conctented edge lels equl s. The lnguge L(M) contins ll strings ccepted y M. Note tht every prefix dg D cn e turned into 4

5 finite utomton M with L(D) = L(M). For more detiled discussion of utomt-sed string processing, we refer to the textook of Crochemore, Hncrt nd Lecroq [7] Detectors nd Self-Nonself-Discrimintion We fix n lphet Σ, string length l, self-set S Σ l, nd mtching prmeter r {1,..., l}. Definition 2.1 (r-chunk detector). An r-chunk detector (d, i) is tuple of string d Σ r nd n index i {1,..., l r + 1}. It mtches string s if d occurs in s t position i. The set of r-chunk detectors for S, denoted y chunk(s, r), contins exctly the r-chunk detectors (d, i) tht do not mtch ny string in S. Let m Σ l. The string m is nonself with respect to S nd r-chunk detectors if m mtches n r-chunk detector from chunk(s, r) nd self, otherwise. The set chunk-nonself(s, r) contins exctly the strings of length l over Σ tht re nonself with respect to S nd r-chunk detectors. Definition 2.2 (r-contiguous detector). An r-contiguous detector is string d Σ l. It mtches string s Σ l if there is n index i {1,..., l r + 1} where d[i... i + r 1] occurs in s. Similrly to the chunk detector cse, we define the set of r-contiguous detectors for S nd r, cont(s, r), s the set of ll r-contiguous detectors tht do not mtch ny string in S. Let m Σ l. The string m is nonself with respect to S nd r-contiguous detectors if m mtches n r-contiguous detector from cont(s, r) nd self, otherwise. The set cont-nonself(s, r) contins exctly the strings tht re nonself with respect to S nd r-contiguous detectors. Figure 2 from the introduction shows n exmple of self-set S, the corresponding detector sets chunk(s, 3) nd cont(s, 3), nd the corresponding prtitions of the shpe spce into self nd nonself. 3. Negtive Selection with Chunk Detectors In this section, we discuss how to construct utomt for chunk-nonself(s, r). The construction is rther strightforwrd comintion of two stndrd string processing tools: prefix trees nd filure links. We present the construction here for ske of completeness nd ecuse we use it s uilding lock for the more intricte one in the next section. Theorem 3.1. There exists n lgorithm tht, given ny S Σ l nd r {1,..., l}, constructs finite utomton M with L(M) Σ l = chunk-nonself(s, r) in time O( S lr Σ ). Proof. By definition, string m Σ l lies in the set chunk-nonself(s, r) exctly if S voids (m[i... i + r 1], i) for some index i {1,..., l r + 1}. Therefore, to clssify m in time O(lr), it suffices to construct, for every position i {1,..., l r + 1} independently, prefix tree T i with L(T i ) Σ r = Σ r \ S [i,..., i + r 1]. The prefix tree T i cn e constructed s follows: Strt with n empty prefix tree nd insert every s S [i,..., i + r 1] into it. Next, for every non-lef node n nd every σ Σ where no edge with lel σ strts t n, crete new lef n nd n edge (n, n ) leled with σ. Finlly, delete every node from which none of the newly creted leves is rechle. For the resulting prefix tree we hve L(T i ) Σ r = Σ r \ S [i,..., i + r 1]. It is redily seen tht for every s T i, ll of its prefixes s with s < s occur in S t position i. To enle clssifiction in time O(l), we construct n utomton y inserting filure links etween the prefix trees of djcent levels, similr to the well-known lgorithm of Knuth, Morris nd Prtt [18]. Briefly, the ide of our filure link method is s follows: If mismtch occurs in prefix tree T i t position k, then we need not restrt from the root of tree T i+1, ut cn go directly to the node in T i+1 tht corresponds to the lst k 1 symols red. By inserting the filure links from right to left, turning the prefix trees into prefix dg, we cn inductively ensure tht either such node exists or there is no mtch t ll. We strt y letting D e the disjoint union of T 1,..., T l r+1. Then we process the levels from i = l r down to 1 itertively s follows: Consider every node n from T i nd every symol σ Σ where T i hs no outgoing edge with lel σ. Let s e the string on the pth from the root of T i to n. Let s = sσ nd let n e the end node of the pth from the root of T i+1 tht is leled y s [2... s ]. If this n exists, we insert n edge from n to n with lel σ. By induction one cn show tht fter every itertion i we hve L(T i ) Σ l i+1 = chunk-nonself(s [i,..., l], r). Finlly, we 5

6 q i,,,,,,, Figure 3: The constructed utomton M with L(M) {, } 5 = chunk-nonself(s, 3) where S is the self-set from Figure 2. The solid lines re from the prefix trees T i, the dshed lines re filure links. turn D into finite utomton with the climed property y mking ll leves ccepting sttes with self-loops for ll σ Σ nd setting the initil stte to the root of T 1. An exmple of this construction is shown in Figure 3. Ech prefix tree T i cn e constructed in time O( S r Σ ). The filure links etween ech pir of djcent levels i nd i + 1 cn e inserted in time S r Σ y simultneous recursive trversl of T i nd T i+1. Since the numer of levels is l r + 1, we otin the climed runtime. 4. Negtive Selection with Contiguous Detectors In this section, we show how to efficiently construct utomt for the lnguges cont(s, r) nd cont-nonself(s, r), respectively. We first discuss the construction of n utomton for cont(s, r), which will prove the following theorem: Theorem 4.1. There exists n lgorithm tht, given ny S Σ l nd r {1,..., l}, constructs finite utomton M with L(M) Σ l = cont(s, r) in time O( S lr Σ ). The construction in this section is more complex thn the one in the previous section since, in order to ccept cont(s, r), it does not suffice to determine non-occuring length-r sustrings for the levels independently. Insted, we need to determine non-occuring sustrings tht cn e extended y non-occuring sustrings from other levels to form strings of length l the r-contiguous detectors. Let S Σ l, d Σ l, r {1,..., l}, nd (d, i) Σ r {1,..., l r + 1}. The string d is n (S, r)-voiding rightcompletion of (d, i) if (1) d occurs in d t position i nd S voids (d, i), nd (2) for ll j {i + 1,..., l r + 1}, there is string d Σ r such tht d occurs in d t position j nd S voids (d, j). If property (2) is phrsed with j rnging from 1 to i 1, then d is n (S, r)-voiding left-completion of (d, i). With this definition we hve d cont(s, r) iff there exists (d, i) Σ r {1,..., l r + 1} such tht d is oth n (S, r)-voiding left-completion nd n (S, r)-voiding right-completion of (d, i). To prove Theorem 4.1, we first prove the following Lemm: Lemm 4.2. There exists n lgorithm tht, given ny S Σ l nd r {1,..., l}, constructs prefix dg D with roots ρ 1,..., ρ l r+1 such tht L(D, ρ i ) Σ l i+1 = cont(s, r)[i... l] for every i {1,..., l r + 1} in time O( S lr Σ ). Proof. The construction of D is done in four phses, presented nd discussed in the next four prgrphs. While the following proof text explins the sic ides nd their correctness, the detiled computtionl steps re shown y the pseudocode in Figure 4, which lso provides n implementtion lueprint. For ll i {1,..., l r + 1}, let T i e prefix trees with L(T i ) Σ r = Σ r \ S [i... i + r 1] from the proof of Theorem 3.1; y definition we know tht every r-contiguous detector contins string t position i tht occurs in T i. However, there re still strings in T i tht do not occur in ny r-contiguous detector t position i. Those re precisely the strings tht hve no (S, r)-voiding left-completion or no (S, r)-voiding right-completion. We trim the trees T 1,...,T l r+1 to otin new trees T1 R,...,T l r+1 R where every T i R contins exctly the strings from T i tht hve (S, r)-voiding right-completions. This holds directly for ll strings from the rightmost level, so Tl r+1 R = T l r+1. We trim the other trees in right-to-left pss from i = l r down to 1. Ech time we initilize Ti R to 6

7 Procedure construct-detector-dg(s, r) 1 for i = 1 to l r + 1 do construct prefix trees 2 T i prefix tree with L(T i ) Σ r = Σ r \ S [i... i + r 1] 3 T R l r+1 T l r+1 trim the trees in right-to-left pss 4 for i = l r down to 1 do 5 T R i empty prefix tree 6 for ech string s T i do 7 if there exists s T R i+1 such tht s[2... s ] is prefix of s then insert s into T R i 8 T L 1 T R 1 trim the trees in left-to-right pss 9 for i = 2 to l r + 1 do 10 T L i empty prefix tree 11 for ech string s T R i do if there exists s Ti 1 L such tht s [2... s ] is prefix of s then insert s into Ti L D l r+1 Tl r+1 L weve the trees together into prefix dg 14 for i = l r down to 1 do 15 D i disjoint union of D i+1 nd Ti L; ρ i root of Ti L 16 for ech string s Ti L do 17 (n, n, σ) lst edge on the s-pth from ρ i in Ti L, nd its lel 18 n end node of the s[2... s ]-pth from ρ i+1 in D i+1 19 delete edge (n, n, σ) from D i nd insert edge (n, n, σ) 20 output D D 1 finl prefix dg with roots ρ 1,...,ρ l r+1 Figure 4: For given self-set S Σ l nd numer r {1,..., l}, this procedure constructs prefix dg D with roots ρ 1,..., ρ l r+1 such tht L(D, ρ i ) Σ l i+1 = cont(s, r)[i... l] for every i {1,..., l r + 1} in time O( S lr Σ ). Thus, in prticulr we hve L(D, ρ 1 ) Σ l = cont(s, r). e the empty tree. Then we consider every s T i nd insert it into Ti R if s[2... s ] is prefix of some s Ti+1 R. There re two potentil resons for string s T i not to e contined in Ti R : (1) It my e the cse tht lredy no string from T i+1 strts with s[2... s ], which, in turn, implies tht proper prefix of s[2... s ] lies in T i+1. Since s T i, ll of its proper prefixes occur in S t position i nd, thus, ll proper prefixes of s[2... s ] occur in S t position i + 1. This is contrdiction nd, thus, this cse cn never occur. (2) The second possiility is tht there is string tht strts with s[2... s ] in T i+1, ut not in Ti+1 R. By induction, one cn prove tht this is due to the fct tht (s[2... s ], i + 1) hs no (S, r)-voiding right-completion nd, therefore, lso (s, i) hs none. Next, we construct set of trees T1 L... T l r+1 L contining only the strings tht hve oth left- nd right-completions y n nlogous left-to-right pss. Thus, L(Ti L) Σr = cont(s, r)[i,..., i + r 1] holds. Finlly, we weve the trees together into prefix dg s follows: For the rightmost level i = l r + 1, we set D l r+1 = Tl r+1 L, since y construction L(T l r+1 L ) Σr = cont(s, r)[l r l]. Now we prove the lemm y decresing induction on i going from i = l r down to 1. For the induction step, suppose we hve prefix dg D i+1 with L(D i+1 ) Σ l i = cont(s, r)[i l]. For ll s Ti L, let n denote the corresponding lef in T i L. Let n denote the end node on the pth from the root of Ti+1 L with lel s, which exists y induction ssumption ecuse s[2... s ] is prefix of some d cont(s, r)[i l]. Crete new edge from the prent of n to n nd delete the lef n long with ll nodes nd edges from which only n cn e reched. After ll leves hve een iterted through, let D i e the resulting grph. Let d cont(s, r)[i... l]. Then d strts with prefix from Ti L nd, thus, d[2... d ] L(D i+1 ). Hence, d L (D i ) y construction. Conversely, let d L (D i ) with d = l i+1. Then d strts with nonempty prefix tht hs oth n (S, r)-voiding right-completion nd n (S, r)-voiding left-completion. Furthermore, d[2... d ] L (D i+1 ). Hence d cont(s, r)[i... l]. Now y setting D = D 1 we otin dg with the properties climed y the Lemm. The runtime of the construction cn e esily determined from the pseudocode given in Figure 4. As stted in Theorem 3.1, constructing the prefix trees in lines 1 nd 2 tkes time O( S lr Σ ). The inner loops in the right-to-left psses in lines 3 7 nd s well s in the left-to-right pss in lines 8 12 cn e implemented y simultneous recursion through the trees on djcent levels. This yields worst-cse runtime of O( S lr Σ ) for ech of the psses nd, hence, of the overll lgorithm. 7

8 Proof (Theorem 4.1). Let D with roots ρ 1,...,ρ l r+1 e the prefix dg from Lemm 4.2. We trnsform D into n utomton M = (Q, q i, Q, Σ, ) with L(M) Σ l = cont(s, r): For every lef n of D nd σ Σ we ppend self-loop with lel σ to n. Then Q nd re the set of nodes nd set of leled edges, respectively, Q contins ll former lefs, nd q = ρ 1. Figure 5 shows n exmple of such n utomton. q i, Figure 5: The constructed utomton M with L(M) {, } 5 = cont(s, 3) where S is the self-set from Figure 2. In ddition to descriing the lnguge cont(s, r), the prefix dg D cn lredy e used to clssify string m Σ l in time O(lr): Consider every position i {1,..., l r + 1} nd test whether m[i... i + r 1] L (D, ρ i ). If there exists position where this is true, then m is non-self nd self, otherwise. At the end of this section we will speed up the clssifiction to time O(l). But first let us show how to use the prefix dg D for counting the numer of detectors. Corollry 4.3. There exists n lgorithm tht, given S Σ l nd r {1,..., l}, outputs cont(s, r) in time O( S lr Σ ). Proof. Our tsk is simply to count the numer of strings of length l in L(D, ρ 1 ), where D is the prefix dg constructed in Lemm 4.2. First, for ech node n D, compute the numer of different pths leding from ρ 1 to n. Denote this quntity y P[n], nd let δ(ρ 1, n) denote the distnce etween ρ 1 nd n in D (note tht y construction, ll pths leding from ρ 1 to n in D hve the sme length). Then cont(s, r) = n is lef of D P[n] Σ l δ(ρ1,n). Since D is cyclic, computing P[n] cn e done y dynmic progrm tht trverses D in redth-first order from ρ 1. For the desired time ound note tht the numer of nodes nd edges in D is ounded y O( S lr Σ ). Finlly, let us discuss how to clssify single string in time O(l). Agin the solution is kin to filure links, however this time it is less simple thn in Section 3 since the set of potentil prtil mtches is no longer descried s set of prefix trees. Our pproch is to ugment the utomton constructed y Theorem 4.1 with edge outputs. The outputs will e numers nd their prtil sums will equl the lengths of mximl prtil mtches to r-contiguous detectors. Formlly, we use Mely utomt tht output numers nd define proper lnguge sed on these outputs. Definition 4.4. A Mely utomton is tuple M = (Q, q i, Q, Σ,, Ω, ω) where (Q, q i, Q, Σ, ) is finite utomton, Ω is the output lphet, nd ω : Ω is the output function. Let m Σ nd t 1,..., t m e the sequence of trnsitions mde y M for input m, then the output of M on input m is the string ω(m, m) = ω(t 1 )... ω(t m ) Ω. If Ω is set of numers, we define the r-threshold lnguge L(M, r) to e the set of strings m Σ where there exists n i m with i j=1 ω(m)[ j] r. Similr to finite utomton, Mely utomton cn e represented y grph where every edge lel represents oth the symol tht triggers the corresponding trnsition nd the output of the trnsition. For exmple, for the Mely utomton M = we hve L(M, 2) nd L(M, 1), ut L(M, 2) Theorem 4.5. There exists n lgorithm tht, given ny S Σ l nd r {1,..., l}, constructs Mely utomton M with output lphet Ω = { r,..., r} such tht L(M, r) Σ l = cont-nonself(s, r) in time O( S lr Σ ). Proof. Let M e the finite utomton constructed in the proof of Theorem 4.1 nd let ρ 1,..., ρ l r+1 e the roots of its underlying grph. We turn M into Mely utomton with output lphet Ω = { r,..., r} such tht L(M, r) Σ l = 8

9 Procedure construct-nonself-mely-utomton(s, r) 1 M Finite utomton from Theorem 4.1 with output 1 for ll trnsitions 2 ρ 1,..., ρ l r+1 root nodes of M s grph 3 for i = l r down to 1 do insert filure links with outputs in right-to-left pss 4 for ech node n rechle from ρ i ut not from ρ i+1 do 5 for ech σ Σ where n hs no outgoing σ-edge do 6 p pth from ρ i to n ; s string on p ; s sσ 7 if there exists pth p for s [2... s ] from ρ i+1 then 8 w sum of outputs on p ; w sum of outputs on p ; n end node of p 9 crete trnsition (n, n, σ) with output w w 10 output M Figure 6: The procedure sketched in the proof of Theorem 4.5, which trnsforms the finite utomton M constructed y Theorem 4.1 into Mely utomton with L(M, r) Σ l = cont-nonself(s, r). Note tht the lnguge L(M, r), formlized in Definition 4.4, depends solely on the output of M, regrdless its ccepting sttes. q i , 1 Figure 7: The Mely utomton M with L(M, 3) = cont(s, 3) where S is the self-set from Figure 2. The solid stright edges re the ones tht remin from the initil prefix trees. The dshed lines re filure links, inserted to dmit liner time clssifiction of given string. Every edge is leled with oth the symol tht triggers the corresponding trnsition, nd the numer output of the trnsition. cont-nonself(s, r) holds. We descrie the min ides of the construction nd discuss its correctness. For presenttion of the detiled computtion steps, we refer to the pseudocode in Figure 6. An exmple of the constructed utomton is shown in Figure 7. We strt y ssigning to ll existing trnsitions of M the output 1. Our im is to trnsform M in right-to-left pss tht inductively ensures the following property: Let m Σ l nd let 1 i j l. Let k 0 denote the length of the longest suffix of m[i... j] tht is lso suffix of some d cont(s, r)[i... j]. If k r l + j, then there exists pth from ρ i for m[i... j], nd the sum of outputs on this pth is equl to k. Otherwise there is no such pth. Hence, if such pth exists nd we hve k r, then m cont-nonself(s, r); otherwise, k is the length of the longest prtil mtch etween m[i... j] nd some d cont(s, r)[i... j] tht cn still e extended to length r. The property lredy holds for i = l r + 1. For i decresing from l r to 1, we itertively trnsform the grph of M s follows: For every node n in M tht is rechle from ρ i, ut not from ρ i+1, consider ll σ Σ where n hs no outgoing edge leled with σ. Let s e the string on the pth p from ρ i to n, w e the totl weight on p, nd s = sσ. If there exists pth p leled with s [2... s ] from ρ i+1, let w denote the sum of weights on this pth. Crete n edge from n to the lst node of p nd lel it with w w. Now there is pth from ρ i leled with s with weight w, fulfilling the required property. Agin, the correctness of this procedure is esily proved y induction, nd we otin Mely utomton with the desired property. Similrly s in Lemm 4.2, the descried trnsformtion cn e implemented in time O( S lr Σ ) y simultneous recursion from ρ i nd ρ i+1. Assuming tht we cn compute the sum of integers in unit time, we cn compute the memership test for the r-threshold lnguge L(M, r) in time O(l) nd thus otin negtive selection lgorithm with time O( S lr Σ ) for the trining phse nd time O(l) for clssifying one string. However, it is possile to get rid of the unit cost ssumption 9

10 y using finite utomton whose sttes store the vlue of the prtil sums. For this construction, we would need to invest n dditionl runtime fctor r in the trining phse. Corollry 4.6. There exists n lgorithm tht, given ny S Σ l nd r {1,..., l}, constructs finite utomton M with L(M) Σ l = cont-nonself(s, r) in time O( S lr 2 Σ ). 5. Conclusions We hve shown how to construct utomt tht simulte the clssifiction results of negtive selection lgorithms with r-contiguous nd r-chunk detectors. The constructions tke time O( S lr Σ ) nd enle susequent clssifiction of ech string in liner time O(l). Tle 1 in the introduction compres the runtimes of previously pulished lgorithms with those from the present pper. As corollry, our result estlishes tht the question if ny r-contiguous detectors cn e generted for given self-set [28] cn e nswered in polynomil time. We leve it s n open prolem whether the symptotic time nd spce complexities of our constructions re optiml. It is conceivle, for exmple, tht y pplying techniques similr to those used in on-line construction of suffix trees [29] the runtime of the construction could e further improved. References [1] Uwe Aickelin. Specil issue on rtificil immune systems editoril. Evolutionry Intelligence, 1(2):83 84, [2] Modupe Ayr, Jon Timmis, Rogério de Lemos, Lendro N. de Cstro, nd Ross Duncn. Negtive selection: How to generte detectors. In Jon Timmis nd Peter J. Bentley, editors, 1st Interntionl Conference on Artificil Immune Systems, pges 89 98, University of Kent t Cnterury, Septemer Unversity of Kent t Cnterury Printing Unit. [3] Justin Blthrop, Fernndo Espond, Stephnie Forrest, nd Mtthew Glickmn. Coverge nd generliztion in n rtificil immune system. In Proceedings of the Genetic nd Evolutionry Computtion Conference (GECCO 2002), pges 3 10, [4] Christopher M. Bishop. Novelty detection nd neurl network vlidtion. IEE Proceedings on Vision nd Imge Signl Processing, 141: , [5] Willim Cvnr nd John M. Trenkle. N-grm-sed text ctegoriztion. In Proceedings of SDAIR-94, 3rd Annul Symposium on Document Anlysis nd Informtion Retrievl, pges , [6] Vrun Chndol, Arindm Bnerjee, nd Vipin Kumr. Anomly detection: A survey. ACM Computing Surveys, 41(3):1 58, [7] Mxime Crochemore, Christophe Hncrt, nd Thierry Lecroq. Algorithms on Strings. Cmridge University Press, 1 edition, April [8] Mxime Crochemore, Filippo Mignosi, nd Antonio Restivo. Automt nd foridden words. Informtion Processing Letters, 67: , [9] Ptrick D heseleer. An immunologicl pproch to chnge detection: Theoreticl results. In Proceedings of the 9th IEEE Computer Security Foundtions, pges IEEE Computer Society, [10] Ptrick D heseleer, Stephnie Forrest, nd Pul Helmn. An immunologicl pproch to chnge detection: Algorithms, nlysis, nd implictions. In Proceedings of the IEEE Symposium on Security nd Privcy, pges IEEE Computer Society, [11] Ted Dunning. Sttisticl identifiction of lnguge. Technicl report, New Mexico Stte University, [12] Michel Elerfeld nd Johnnes Textor. Efficient lgorithms for string-sed negtive selection. In Proceedings of the 8th Interntionl Conference on Artificil Immune Systems (ICARIS 2009), volume 5666 of Lecture Notes in Computer Science, pges Springer, [13] Stephnie Forrest, Steven A. Hofmeyr, Anil Somyji, nd Thoms A. Longstff. A sense of self for unix processes. In Proceedings of the IEEE Symposium on Security nd Privcy, pges , Wshington, DC, USA, IEEE Computer Society. [14] Stephnie Forrest, Aln S. Perelson, Lwrence Allen, nd Rjesh Cherukuri. Self-nonself discrimintion in computer. In Proceedings of the IEEE Symposium on Reserch in Security nd Privcy, pges IEEE Computer Society Press, [15] Chrles Jnewy, Pul Trvers, Mrk Wlport, nd Mrk Shlomchick. Immunoiology. Grlnd Science, [16] Zhou Ji nd Dipnkr Dsgupt. Revisiting negtive selection lgorithms. Evolutionry Computtion, 15(2): , [17] Jeffrey O. Kephrt. A iologiclly inspired immune system for computers. In Artificil Life IV: Proceedings of the Fourth Interntionl Workshop on the Synthesis nd Simultion of Living Systems, pges MIT Press, [18] Donld E. Knuth, Jr. Morris, nd Vughn R. Prtt. Fst pttern mtching in strings. SIAM Journl on Computing, 6(2): , [19] Mciej Liśkiewicz nd Johnnes Textor. Negtive selection lgorithms without generting detectors. In Proceedings of Genetic nd Evolutionry Computtion Conference (GECCO 10). ACM, [20] Emnuel Przen. On the estimtion of proility density function nd mode. Annls of Mthemticl Sttistics, 33: , [21] Jerome K. Percus, Or E. Percus, nd Aln S. Perelson. Predicting the size of the T-cell receptor nd ntiody comining region from considertion of efficient self-nonself discrimintion. Proceedings of the Ntionl Acdemy of Sciences of the United Sttes of Americ, 90(5): , Mrch [22] Bernhrd Schölkopf, John C. Pltt, John Shwe-Tylor, Alex J. Smol, nd Roert C. Willimson. Estimting the support of highdimensionl distriution. Neurl Computtion, 13(7): , [23] Thoms Stior. On the Appropriteness of Negtive Selection for Anomly Detection nd Network Intrusion Detection. PhD thesis, Drmstdt University of Technology,

11 [24] Thoms Stior. Phse trnsition nd the computtionl complexity of generting r-contiguous detectors. In Proceedings of the 6th Interntionl Conference on Artificil Immune Systems (ICARIS 2007), volume 4628 of Lecture Notes in Computer Science, pges Springer, [25] Thoms Stior. Foundtions of r-contiguous mtching in negtive selection for nomly detection. Nturl Computing, 8: , [26] Thoms Stior, Kptsch M. Byrou, nd Cludi Eckert. An investigtion of r-chunk detector genertion on higher lphets. In Proceedings of the Genetic nd Evolutionry Computtion Conference (GECCO 2004), volume 3102 of Lecture Notes in Computer Science, pges Springer, [27] Thoms Stior, Philipp Mohr, Jonthn Timmis, nd Cludi Eckert. Is negtive selection pproprite for nomly detection? In Proceedings of the Genetic And Evolutionry Computtion Conference (GECCO 2005), pges , [28] Jonthn Timmis, Andrew Hone, Thoms Stior, nd Edwrd Clrk. Theoreticl dvnces in rtificil immune systems. Theoreticl Computer Science, 403:11 32, [29] Esko Ukkonen. On-line construction of suffix-trees. Algorithmic, 14(3): , [30] Slwomir T. Wierzchoń. Generting optiml repertoire of ntiody strings in n rtificil immune system. In Intelligent Informtion Systems, Advnces in Soft Computing, pges Physic-Verlg,

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

The size of subsequence automaton

The size of subsequence automaton Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

Model Reduction of Finite State Machines by Contraction

Model Reduction of Finite State Machines by Contraction Model Reduction of Finite Stte Mchines y Contrction Alessndro Giu Dip. di Ingegneri Elettric ed Elettronic, Università di Cgliri, Pizz d Armi, 09123 Cgliri, Itly Phone: +39-070-675-5892 Fx: +39-070-675-5900

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Converting Regular Expressions to Discrete Finite Automata: A Tutorial Converting Regulr Expressions to Discrete Finite Automt: A Tutoril Dvid Christinsen 2013-01-03 This is tutoril on how to convert regulr expressions to nondeterministic finite utomt (NFA) nd how to convert

More information

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

Java II Finite Automata I

Java II Finite Automata I Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression

More information

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary Outline Genetic Progrmming Evolutionry strtegies Genetic progrmming Summry Bsed on the mteril provided y Professor Michel Negnevitsky Evolutionry Strtegies An pproch simulting nturl evolution ws proposed

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Where did dynamic programming come from?

Where did dynamic programming come from? Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Tutorial Automata and formal Languages

Tutorial Automata and formal Languages Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

CM10196 Topic 4: Functions and Relations

CM10196 Topic 4: Functions and Relations CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

Bayesian Networks: Approximate Inference

Bayesian Networks: Approximate Inference pproches to inference yesin Networks: pproximte Inference xct inference Vrillimintion Join tree lgorithm pproximte inference Simplify the structure of the network to mkxct inferencfficient (vritionl methods,

More information

On Suffix Tree Breadth

On Suffix Tree Breadth On Suffix Tree Bredth Golnz Bdkoeh 1,, Juh Kärkkäinen 2, Simon J. Puglisi 2,, nd Bell Zhukov 2, 1 Deprtment of Computer Science University of Wrwick Conventry, United Kingdom g.dkoeh@wrwick.c.uk 2 Helsinki

More information

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

More information

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

More information

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t

More information

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms The Minimum Lel Spnning Tree Prolem: Illustrting the Utility of Genetic Algorithms Yupei Xiong, Univ. of Mrylnd Bruce Golden, Univ. of Mrylnd Edwrd Wsil, Americn Univ. Presented t BAE Systems Distinguished

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,

More information

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information

Fast Frequent Free Tree Mining in Graph Databases

Fast Frequent Free Tree Mining in Graph Databases The Chinese University of Hong Kong Fst Frequent Free Tree Mining in Grph Dtses Peixing Zho Jeffrey Xu Yu The Chinese University of Hong Kong Decemer 18 th, 2006 ICDM Workshop MCD06 Synopsis Introduction

More information

Hamiltonian Cycle in Complete Multipartite Graphs

Hamiltonian Cycle in Complete Multipartite Graphs Annls of Pure nd Applied Mthemtics Vol 13, No 2, 2017, 223-228 ISSN: 2279-087X (P), 2279-0888(online) Pulished on 18 April 2017 wwwreserchmthsciorg DOI: http://dxdoiorg/1022457/pmv13n28 Annls of Hmiltonin

More information

Lexical Analysis Part III

Lexical Analysis Part III Lexicl Anlysis Prt III Chpter 3: Finite Automt Slides dpted from : Roert vn Engelen, Florid Stte University Alex Aiken, Stnford University Design of Lexicl Anlyzer Genertor Trnslte regulr expressions to

More information

GNFA GNFA GNFA GNFA GNFA

GNFA GNFA GNFA GNFA GNFA DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

Module 9: Tries and String Matching

Module 9: Tries and String Matching Module 9: Tries nd String Mtching CS 240 - Dt Structures nd Dt Mngement Sjed Hque Veronik Irvine Tylor Smith Bsed on lecture notes by mny previous cs240 instructors Dvid R. Cheriton School of Computer

More information

Module 9: Tries and String Matching

Module 9: Tries and String Matching Module 9: Tries nd String Mtching CS 240 - Dt Structures nd Dt Mngement Sjed Hque Veronik Irvine Tylor Smith Bsed on lecture notes by mny previous cs240 instructors Dvid R. Cheriton School of Computer

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

ɛ-closure, Kleene s Theorem,

ɛ-closure, Kleene s Theorem, DEGefW5wiGH2XgYMEzUKjEmtCDUsRQ4d 1 A nice pper relevnt to this course is titled The Glory of the Pst 2 NICTA Resercher, Adjunct t the Austrlin Ntionl University nd Griffith University ɛ-closure, Kleene

More information

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

More information

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy: Scnner Specifying ptterns source code tokens scnner prser IR A scnner must recognize the units of syntx Some prts re esy: errors mps chrcters into tokens the sic unit of syntx x = x + y; ecomes

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

1 Structural induction, finite automata, regular expressions

1 Structural induction, finite automata, regular expressions Discrete Structures Prelim 2 smple uestions s CS2800 Questions selected for spring 2017 1 Structurl induction, finite utomt, regulr expressions 1. We define set S of functions from Z to Z inductively s

More information

13 Learning with Queries

13 Learning with Queries 13 Lerning with Queries Among the more interesting remining theoreticl questions re: inference in the presence of noise, generl strtegies for interctive presenttion nd the inference of systems with semntics.

More information

Random subgroups of a free group

Random subgroups of a free group Rndom sugroups of free group Frédérique Bssino LIPN - Lortoire d Informtique de Pris Nord, Université Pris 13 - CNRS Joint work with Armndo Mrtino, Cyril Nicud, Enric Ventur et Pscl Weil LIX My, 2015 Introduction

More information

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

Finite-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

More information

Finite Automata Approach to Computing All Seeds of Strings with the Smallest Hamming Distance

Finite Automata Approach to Computing All Seeds of Strings with the Smallest Hamming Distance IAENG Interntionl Journl of Computer Science, 36:2, IJCS_36_2_05 Finite Automt Approch to Computing All Seeds of Strings with the Smllest Hmming istnce Ondřej Guth, Bořivoj Melichr Astrct Seed is type

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information