The Structure of Forward, Reverse, and Transverse Path Graphs in The Pattern Recognition Algorithms of Sellers

Size: px
Start display at page:

Download "The Structure of Forward, Reverse, and Transverse Path Graphs in The Pattern Recognition Algorithms of Sellers"

Transcription

1 The Structure of Forwrd, Reverse, nd Trnsverse Pth Grhs in The Pttern Recognition Algorithms of Sellers Lewis Lsser Dertment of Mthemtics nd Comuter Science York College/CUNY Jmic, New York Louis D Alotto Dertment of Mthemtics nd Comuter Science York College/CUNY Jmic, New York dlotto@york.cuny.edu Abstrct In [3], [4], [5] Sellers develoes dynmic rogrmming ttern mtching lgorithm tht genertes forwrd, reverse, nd trnsverse th grhs tht determine the best resemblnce (lowest cost) of smller string ttern inside lrger. In this er we study the roerties nd structure of these grhs. We show tht these th grhs cn be decomosed into smll number of distinct block tyes, tht re used to nlyze grh structure. It is lso shown tht n exct ttern mtch results in disconnected trnsverse th grh. keywords: Pttern Recognition, Connected Grh, Pth Grh, Block Tye, Evolutionry Distnce. I. INTRODUCTION The ttern recognition roblem of finding n intervl i in lrge sequence, = n, tht best resembles smller sequence, b = b 1 b 2...b m, ws studied by Sellers, see [3], [4], [5]. In his work he described dynmic rogrmming ttern recognition lgorithm tht serches for best resemblence (lowest cost). String resembles ttern b if there is n intervl in tht is either equl to b or close enough to b. The term close enough deends on the choice of suitble metric. The nottion d(x, y), where x nd y re rbitrry strings, will be used to reresent such metric. The function d(x, y) is clled the evolutionry distnce. The evolutionry distnce is the length of the shortest th (lowest cost) of evolutionry stes between nd b. We ssume, s in [3], tht only certin tyes of evolutionry stes re llowed for strings (sequences) nd tht cost cn be ssocited with ech ste. We consider n evolutionry ste s n insertion, deletion, or muttion of single element in sequence. We ssign ech such ste cost of 1. More formlly, the evolutionry distnce d(, b) between ny two sequences is defined s { m+n } min d( i, b i ) i=1 Where the minimum is tken over ll irs of sequences n+m nd b 1 b 2...b n+m with m null symbols (-) inserted in sequence nd n null symbols inserted in sequence b. The null symbols reresent the deletion or insertion of term with which it is ligned in the other sequence. This roduces metric lignment of sequences nd b. Thus the evolutionry distnce is the lowest cost of evolutionry stes between nd b. The lgorithm of Sellers is described s follows. Given two finite sequences, = n nd b= b 1 b 2...b m, where n > m nd b is the secified string ttern being sought in. The lgorithm serches to identify intervls i in tht resemble b nd clcultes their evolutionry distnce from string b. We use the nottion i to sy tht i is n intervl in. Hence i= q, where 1 q n. D f = (e(i, j)) is clled the (n + 1) (m + 1) forwrd distnce mtrix nd is comuted inductively. To strt constructing the mtrix, the initil vlues of the first column re set to zero. Tht is, set e(i, 0) = 0 for i = 0, 1,..., n. Continuing, the vlues in the first row re set j e(0, j) = d(, b h ) h=1

2 for j = 1, 2,..., m. The rest of the forwrd mtrix vlues re comuted inductively by ssigning the smllest of these three vlues: (e(i 1, j) + d( i, )) (e(i 1, j 1) + d( i, b j )) (e(i, j 1) + d(, b j )) to e(i, j). These three vlues determine the forwrd neighborhood, see [1]. Note tht e(i, j) is the minimum totl cost of the muttions, insertions, nd deletions needed to trnsform the first string segment b 1 b 2...b j of b into ny intervl i of ny length tht ends t i. The reverse distnce mtrix D r = (f(k, j)) is constructed in similr mnner, however we strt with the lst terms of nd b nd end with the first. Here we note tht f(k, j) is the minimum totl cost of muttions, insertions, nd deletions necessry to convert the string segment b k b k+1...b m into n intervl i. The initil vlues of the mtrix entries in the lst column nd row re f(i, m + 1) = 0 for i = 1, 2,..., n + 1 nd f(n + 1, j) = m j h=0 d(, b m h ) for j = 1, 2,..., m. The rest of the reverse mtrix vlues re comuted inductively by setting f(i, j) equl to the smllest of these three vlues in the reverse neighborhood: nd (f(i + 1, j) + d( i, )) (f(i + 1, j + 1) + d( i, b j )) (f(i, j + 1) + d(, b j )) The lgorithm determines both globl nd locl resemblnces. The bove rocedure determines ll locl resemblnces. Looking only t the forwrd mtrix determines only globl resemblnces. Given the evolutionry distnce d, n intervl i in best resembles short sequence b globlly iff d(i,b) d(j,b) for ll intervls j in. Also, given n evolutionry distnce d, n intervl i in best resembles b loclly iff d(i,b) d(h,b) nd d(i,b) d(j,b) for ll h nd j, where h i j. The forwrd th grh is constructed directly from D f by connecting ech ir of mtrix entries, tht re connected by n inductive ste, with n edge nd relcing ech mtrix entry with vertex. Similrly, the reverse th grh is constructed from D r. The common th grh is the intersection of vertices nd edges from both grhs. The trnsverse th is succession of edges tht connects the first column nd the lst column of th grh. Globl resemblnces cn be distinguished from locl by exmining the vlues of the lst column in the mtrix ssocited with the vertices of the trnsverse th grh. A miniml vlue corresonds to globl resemblnce while ny lrger vlues corresond to locl resemblnces. If the trnsverse th grh is connected then ll vertices in the lst column of the ssocited mtrix must hve the sme vlue. Throughout this er we consider grh connected if there is exctly one connected comonent fter we disregrd vertices of degree zero. A locl mtch (resemblence) only occurs when vlue lrger thn the miniml vlue is encountered. If only one vlue exists ll mtches must be globl. Hence the grh roerty of being connected corresonds to ll mtches being globl. For i 1 nd j 1, the forwrd neighborhood of vertex e(i, j) is the set of three edges e(i 1, j), e(i 1, j 1) nd e(i, j 1). For i = 0 nd j 1 it consists of the single vertex e(0, j 1) while for j = 0 nd i 1 it is just e(i 1, 0). The vertex e(0, 0) hs emty neighborhood. The forwrd neighbors of vertex e(i, j) re those vertices in its forwrd neighborhood to which it is connected. For i n nd j m, the reverse neighborhood of vertex f(i, j) is the set of three edges f(i+1, j), f(i+1, j+1) nd f(i, j+1). For i = n+1 nd j m it consists of the single vertex f(n + 1, j + 1) while for j = m + 1 nd i n it is just f(i + 1, m + 1). The vertex f(n+1, m+1) hs emty neighborhood. The reverse neighbors of vertex f(i, j) re those vertices in its reverse neighborhood to which it is connected. The lemms nd theorems resented in this er demonstrte tht the forwrd, reverse, common, nd trnsverse th grhs cn be decomosed into vrious block tyes. It is further interesting to see, tht good ttern mtch results in disconnected trnsverse th grh. b will lwys refer to the secified string nd for the longer string in which we seek substrings loclly nd/or globlly similr to b. The set Σ will consist of ll of our symbols together with the secil null symbol. We use the evolutionry distnce d(x, y) = 0 if x = y nd 1 otherwise, for ll x, y Σ. The vlue of 0 imlies direct mtch, while the vlue (cost) of 1 corresonds to muttion, deletion, or insertion of single term in the sequence. If Σ then n will men string of n consecutive s. The interior of the forwrd grh/mtrix refers to ll but the first row nd column. For the reverse grh/mtrix, the interior is ll but the lst row nd column. The roofs of the results

3 deend on the nlysis of the different block tyes of the forwrd nd reverse mtrices nd their corresonding grhs. Where no confusion rises, we will use the term block to reresent rectngulr ortions of the mtrices s well s the th grhs. In the illustrtions tht follow, it is frequently necessry to show the elements in either the long string or the short string b tht corresond to the ortion of the mtrix/grh being shown. These re indicted in one or more verticl lines long the extreme left mrgin (for the whole or the ortion of the long string) or in one or more horizontl lines long the extreme to (for the whole or the ortion of the short string). A str indictes n rbitrry symbol of the lhbet different from. The lgorithm ws imlemented to generte nd disly grhiclly the forwrd, reverse, common, nd trnsverse th grhs. The rogrm ws written in the C rogrmming lnguge nd run under Mc OS X nd Linux with the GD grhics librry instlled. II. THE STRUCTURE OF FORWARD AND REVERSE PATH GRAPHS There re eight fundmentl building blocks from which the forwrd nd reverse distnce mtrices nd their resective th grhs re constructed (four for the forwrd nd four for the reverse). The following lemms describe ech tye for the forwrd mtrix/grh cse. Ech hs counterrt for the reverse cse. Lemm 1: Suose the rectngulr ortion of the forwrd distnce mtrix between rows i 1 nd i 2 nd columns j 1 nd j 2 hs every entry in the first column equl to nd entries in the first row, from left to right, equl to, +1,..., +s, where s = j 2 j 1. Suose i = for i i i 2 nd b j for j j j 2. Then every entry in the lst column hs vlue +s nd the entries in the lst row, from left to right, re, + 1,..., + s. Furthermore every vertex in the interior of the corresonding rectngulr ortion of the forwrd th grh is connected to exctly two neighbors, the one to its left nd the one digonlly u nd left. Proof of Lemm 1: Figure 1 illustrtes this lemm for s = 4 nd i 2 i 1 = 8. The vlues in the mtrix re, s lwys, comuted in n itertive fshion. First the missing vlues in the second row, from left to right, re found. This rocedure is reeted for ech row, from to to bottom. When missing vlue e(i, j) is comuted we hve d( i, b j ) = 1 becuse i b j. Furthermore it is esily seen tht the vlues to its left nd digonlly u nd left re equl while the vlue bove is one greter. Consequently, due to Seller s construction, e(i, j) is one more thn the vlue to its left nd the forwrd th grh hs the indicted edges incident with the corresonding vertex Fig Block Tye 1 (BT1) Lemm 2: Suose the rectngulr ortion of the forwrd distnce mtrix between rows i 1 nd i 2 nd columns j 1 nd j 2 hs entries in the first column, from bottom to to, of, +1,..., +r, where r = i 2 i 1 nd entries in the first row, from left to right, equl to + r, + r + 1, + r + 2,..., + r + s, where s = j 2 j 1. Suose i = for i i i 2 nd b j for j j j 2. Then the entries in the lst row, from left to right, re, +1,..., +s nd the entries in the lst column, from bottom to to, re +s, +s+1, +s+2,..., +r+s. Furthermore every vertex in the interior of the corresonding rectngulr ortion of the forwrd th grh is connected only to the neighbor to its left. Proof of Lemm 2: Figure 2 illustrtes this lemm for r = s = 4. The roof is strightforwrd consequence of the construction Fig Block Tye 2 () Lemm 3: Suose the rectngulr ortion of the forwrd distnce mtrix between rows i 1 nd i 2 nd columns j 1 nd j 2 hs entries in the first column, from bottom to to, of, +1,..., +r, where r = i 2 i 1 nd entries in the first row, from left to right, equl to +r, +r+1, +r+2,..., +r+s, where s = j 2 j

4 Suose i = for i i i 2 nd b j = for j 1 +1 j j 2. Then the entries in the lst row, from left to right, re, + 1,..., + s nd the entries in the lst column, from bottom to to, re +s, +s+1, + s + 2,..., + r + s. Furthermore every vertex in the interior of the corresonding rectngulr ortion of the forwrd th grh is connected to exctly two neighbors: the neighbor to its left nd digonlly u nd left. Proof of Lemm 3: Figure 3 illustrtes this lemm for r = s = 4. Agin, this is strightforwrd consequence of the wy in which the mtrix nd grh re constructed Fig Block Tye 3 () Lemm 4: Suose the rectngulr ortion of the forwrd distnce mtrix between rows i 1 nd i 2 nd columns j 1 nd j 2 hs every entry in the first column equl to nd entries in the first row, from left to right, equl to, + 1,..., + s, where s = j 2 j 1. Suose i = for i i i 2 nd b j = for j j j 2. Then every entry in the lst row hs vlue nd the entries in the lst column, from bottom to to, consist of r s vlues of followed by + 1, + 2,..., + s. The edges of vertex in the interior of the corresonding rectngulr ortion of the forwrd th grh deend on the reltive row nd column numbers. If j j 1 i i 1 then the vertex is connected to exctly two neighbors: the one to its left nd the one digonlly u nd left. Otherwise the vertex is connected to the neighbor digonlly u nd left. Proof of Lemm 4: Figure 4 illustrtes this lemm for r = 8 nd s = 4. Although more comlex thn lemms 1 through 3 it is roved in the sme fshion. For future reference we refer to both the ortion of the mtrix nd the ortion of the grh in lemms 1 through 4 s being of block tye one through four, resectively. For grhs of block tye four there is n re in the uer right corner tht is connected with number of disjoint ths running on digonls below. The vertex where the tringulr region intersects the lst column hs mtrix vlue of. We cll this vertex Fig. 4. Block Tye 4 (BT4) the trnsition vertex for grh of block tye four. All mtrix vlues below the trnsition vertex hve vlue nd those bove, from bottom to to, hve vlues + 1, + 2,..., + s. We now describe ll ossible reltions between the four block tyes tht cn occur in forwrd or reverse th grh. The next lemm shows tht to the right of every block tye one is block tye four. This is shown in Figure 5. Lemm 5: Suose ortion P 1 of the forwrd mtrix/grh is of block tye one. Suose the vlues of the mtrix in the first row, from left to right, re, + 1,..., + s nd tht this row of the mtrix extends to the right with vlues +s+1, +s+2,..., +s+t. Suose every element of the short sequence b bove these extended mtrix vlues is. Then there is ortion P 2 of the forwrd mtrix/grh of block tye four tht shres every mtrix-vlue/vertex of the rightmost column of P 1. Proof of Lemm 5: Since P 1 is of block tye one, the vlues in the mtrix for P 1 in the rightmost column, from bottom to to, re ll + s. We now hve ortion of the mtrix (to the right of P 1 ) whose first column contins only the vlue + s nd whose first row, from left to right, contins the vlues + s, +s+1,..., +s+t. Since ll elements of the short sequence s bove ll but the first column re equl to, lemm 4 identifies this ortion of the forwrd mtrix/grh to be of block tye four. The next lemm shows tht to the right of every block tye four re blocks of tye two nd one. This is shown in figure 6. Lemm 6: Suose ortion P 1 of the forwrd mtrix/grh is of block tye four. Suose the vlues of the mtrix in the first row, from left to right, re, + 1,..., + s nd tht this row of the mtrix

5 +s +s+t +s +s+t BT1 BT4 BT4 +t BT1 +s Fig. 5. BT1 with BT4 to its right Fig. 6. BT4 with nd BT1 to its right extends to the right with vlues + s + 1, + s + 2,..., + s + t. Suose every element of the short sequence b bove these extended mtrix vlues differs from. Then there is ortion P 2 of the forwrd mtrix/grh of block tye two tht shres the mtrixvlues/vertices of the rightmost column of P 1 from the first vertex down to n including the trnsition vertex of P 1 nd ortion P 3 of the forwrd mtrix/grh of block tye one tht shres the mtrix-vlues/vertices of the rightmost column of P 1 from the trnsition vertex of P 1 down to the lst vertex. Proof of Lemm 6: Lemm 5 rovides the vlues of the mtrix in the lst column of P 1. The trnsition vertex of P 1 divides these vlues u into two rts. The vlues on nd bove this vertex, together with those in the extended row yield ortion P 2 of block tye two. Lemm 2 rovides the vlues of the mtrix in the lst row of P 2. Similrly the vlues on nd below this vertex, together with those in the lst row of P 2 yield ortion P 3 block tye one. The next lemm shows tht to the right of every block tye two is block tye three. See figure 7. Lemm 7: Suose ortion P 1 of the forwrd mtrix/grh is of block tye two. Suose the vlues of the mtrix in the first row, from left to right, re +r, +r +1,..., +r+s nd tht this row of the mtrix extends to the right with vlues + r + s + 1, + r + s + 2,..., + r + s + t. (The vlues in the first column, from bottom to to, re, + 1,..., + r.) Suose every element of the short sequence s bove these extended mtrix vlues is. Then there is ortion P 2 of the forwrd mtrix/grh of block tye three tht shres every mtrix-vlue/vertex of the rightmost column of P 1. Proof of Lemm 7: This lemm is roved in wy similr to lemm 5. +r Fig. 7. +r+s +s with to its right +r+s+t The next lemm shows tht to the right of every block tye three is block tye two. See figure 8. Lemm 8: Suose ortion P 1 of the forwrd mtrix/grh is of block tye three. Suose the vlues of the mtrix in the first row, from left to right, re +r, +r +1,..., +r +s nd tht this row of the mtrix extends to the right with vlues + r + s + 1, + r + s + 2,..., + r + s + t. (The vlues in the first column, from bottom to to, re, + 1,..., + r.) Suose every element of the short sequence b bove these extended mtrix vlues differs from. Then there is ortion P 2 of the forwrd mtrix/grh of block tye two tht shres every mtrix-vlue/vertex of the rightmost column of P 1. Proof of Lemm 8: This roof is similr to lemm 5. The long sequence consists of n rbitrry but finite number of s. The short sequence b cn contin rbitrry chrcters. A rtition of sequence v is sequence of subsequences such tht every element of v lies in some subsequence, every subsequence consists

6 +r Fig. 8. +r+s +s with to its right +r+s+t either entirely of s or entirely of symbols different from, nd ech subsequence is s long s ossible. If s is rtitioned into subsequences s i nd s 1 consists entirely of s then s i consists entirely of s for odd i nd entirely of symbols different from for i even. If the s i s re conctented in order from left to right then the originl sequence s is obtined. We now define the min digonl (min bnd) of mtrix/grh. The uer bound of this bnd consists of ll entries whose row number equls its column number. The lower bound is defined similrly, excet we strt t the element in the lst row nd column nd move u nd to the left long digonl. All elements on nd between these digonls constitute the min digonl. Theorem 1: The forwrd th grh cn be decomosed into rts ech of which is of one of the four block tyes. Proof of Theorem 1: It is imortnt to note tht the rts overl long their common borders. For exmle, if block tye two hs block tye three to its right then the entries in the lst column of the mtrix/grh of the block on the left re identicl to those in the first column of the block on the right. A decomosition in the sense of this theorem is not the sme s rtition. Prtition the short sequence b into subsequences s 1, s 2,...s z. It mkes no difference whether s 1 consists only of s or only of symbols different from. Without loss of generlity ssume the former, see Figure 9. The first column of the mtrix contins only zeros. The first row strts with zero nd increments by one until the lst column is reched. By lemm 4 there is block of tye four tht stretches verticlly the entire height of the mtrix/grh nd stretches horizontlly from the first column u to nd including the column corresonding to the lst symbol in s 1. We lso know the numericl vlues of the mtrix for this column by the lemm. Since s 1 contins only s, no symbol in s 2 is n. By lemm 6 we know the ortion of the mtrix/grh under s 2 strts with block tye two with block tye one below. Note tht we hve defined verticl stri within the mtrix/grh nd tht the block tye two hs height equl to its width while block tye one extends ll the wy to the bottom row. Since s 2 contins no s, s 3 contins only s. By lemm 7 we hve block tye three to the right of the block tye two in the second verticl stri. Similrly, by lemm 5 we hve block tye four to the right of the block tye one in the second verticl stri. The two blocks we hve just described form the third verticl stri. No element of s 4 is n. By lemm 8 there is block tye two to the right of the block tye three in verticl stri three. By lemm 6 we hve block tyes two nd one to the right of block tye four in verticl stri three. These three blocks (in order from to to bottom: two, two, nd one) define the fourth verticl stri. From the four verticl stris two fcts my be derived. First, for those s i s comosed only of s there cn only be block tyes three nd four. All block tye threes re bove the min digonl nd the single block tye four begins bove the min digonl nd continues until the lst row. Second, for the remining s i s there cn only be blocks tyes two nd one. All block tye twos re bove the min digonl nd the single block tye one begins bove the min digonl nd continues until the lst row. Due to the lternting nture of the s i s nd lemms 5 through 8 this ttern will continue for s long s there re s i s. For the forwrd distnce mtrix the vlues in the first column re set to zero nd those of the first row re, from left to right, 0, 1, 2,..., n, where n is the length of the short sequence b. Vlues in the interior of the mtrix re found by looking t vlues bove, to the left, nd digonlly u nd left from the current element. For the reverse distnce mtrix the vlues in the lst column re set to zero nd those of the lst row re, from right to left, 0, 1, 2,..., n. Vlues in the interior of the mtrix re found by looking t vlues below, to the right, nd digonlly down nd right from the current element. The rocedure to determine vlue in the interior of the mtrix is identicl in the forwrd nd reverse cses when these orienttion issues re tken into ccount. Consequently, everything we hve done so fr for the forwrd cse crries over to the reverse cse rovided orienttion issues re hndled roerly. Geometriclly, ech of the four block tyes must

7 - - BT4 Fig. 9. BT1 BT4 BT1 BT4 Block structure of forwrd mtrix/grh BT1 be rotted bout their centers by 180 degrees. If block tye i is trnsformed this wy we will refer to it s rotted block tye i. Lemms 1 through 8 cn now be rehrsed for the reverse cse. For exmle, lemm 6 stted tht to the right of every block tye four re blocks of tye two nd one (with tye two bove tye one nd tye one extending to the bottom of the mtrix/grh). Its counterrt sttes tht to the left of every rotted block tye four re rotted block tyes two nd one (with tye two below tye one nd tye one extending to the to of the mtrix/grh). With these conventions we hve the counterrt for theorem 1 for the cse of the reverse mtrix/grh. Theorem 2: The reverse th grh cn be decomosed into rts ech of which is of one of the four rotted block tyes. Proof of Theorem 2: Similr in nture to tht of Theorem 1, nd hence omitted. In the roof of Theorem 1 the blocks re orgnized into verticl stris. The blocks re lso orgnized into verticl stris for the reverse mtrix/grh. The lbeling of the vertices in the forwrd nd reverse mtrices nd grhs re shifts of one nother, i.e. the dsh ws moved to the other side of the short nd long sequences nd their symbols were shifted ccordingly. It is esy to see tht these shifts force the lignments of the verticl stris we hve defined for the forwrd nd reverse cses. (Although Sellers did not utilize such stris in his ers, the notion of lignments of this sort were used in his roofs tht the lgorithms for finding locl nd globl mtches were correct.) Since the stris re common to the forwrd nd reverse mtrices/grhs we my refer to them in the common nd trnsverse grhs s well. III. CONNECTEDNESS IN THE COMMON AND TRANSVERSE PATH GRAPHS Lemm 9: In ech verticl stri of the common grh for which the corresonding ortion of the short sequence b consists only of s, ech interior vertex is connected only to its neighbor u nd to the left. Proof of Lemm 9: Figure 10 illustrtes the structure of the verticl stri. We will refer to this s block tye five (BT5 for short). The common grh contins exctly those edges common to the forwrd nd reverse th grhs. In the forwrd th grh we will hve one or more block tye threes bove single block tye four tht extends downwrds for the reminder of the verticl height. In the reverse th grh we will hve one or more rotted block tye threes below single rotted block tye four tht extends uwrds for the reminder of the verticl height. Every one of these four block tyes hve ll ossible digonl edges. A block tye four will hve some horizontl edges but they re ll bove the min digonl. Similrly rotted block tye four will hve some horizontl edges s well but they re ll below the min digonl. Consequently no horizontl edge cn er in both the forwrd nd reverse th grhs, nd hence cn not er in the common grh. Since ll digonl edges er in both the forwrd nd reverse grhs they must er in the common grh. Fig. 10. Block Tye 5 (BT5) Lemm 10: Suose P is verticl stri of the Common Grh for which the corresonding ortion of the short sequence s contins no s. Then P cn be divided into three horizontl stris P 1, P 2, nd P 3, to be described below, where P 2 is lwys resent nd

8 P 1 nd P 3 my or my not be resent. Ech vertex in P 1, excet for those in the first column, is connected only to its neighbor to the left. The sme holds for P 3. Ech vertex in P 2, excet for those in the first row or first column, is connected to exctly two vertices: tht to the left nd the one digonlly u nd to the left. Proof of Lemm 10: Figure 11 illustrtes the structure of the verticl stri. We will refer to this s block tye six, or BT6. The roof is done in the sme wy s in Lemm 9, by intersecting BT1 s nd s in the forwrd th grh nd rotted BT1 nd of the reverse th grh. Fig. 11. Block Tye 6 (BT6) Theorem 3: The common grh cn be decomosed into n lternting series of block tyes five nd six. Proof of Theorem 3: As usul, rtition the short sequence b into subsequences s i. Ech subsequence contining only s give rise to block tye five. Otherwise we hve block tye six. Since the s i s lternte by definition, the block tyes must lternte. We now stte nd rove our min result. Theorem 4: Suose the long sequence contins only the symbol nd the short sequence b is rbitrry. The trnsverse grh is connected if nd only if b contins t lest one symbol different from. Proof of Theorem 4: We need only eliminte from the common grh ny edges tht do not lie on some th beginning t the first column nd ending t the lst column. Every block tye five contins every ossible digonl th. Every block tye six contins every ossible horizontl th (s well s some digonl edges, which we will ignore for now). These block tyes lternte. If we were to choose n rbitrry digonl edge in block tye five or n rbitrry horizontl edge in block tye six, then this edge will be rt of th of mximl length formed by combining edges from the vrious verticl stris. Suose s contins t lest one symbol different from. Then there will be t lest one block tye six. Choose n rbitrry horizontl edge from block tye six tht is common to the blocks P 1 nd P 2 from the sttement of lemm 10. If no such edge exists then P 1 does not exist nd we choose ny edge in the first row of P 2. In either cse we hve n edge which will belong to some th s described in the revious rgrh. Cll this th the uer criticl th. We cn define lower criticl th by choosing n edge between P 2 nd P 3, if one exists, or n edge from the lst row of P 2 otherwise. Any th bove the criticl th will fil to rech the first column. Similrly ny th below the criticl th will fil to rech the lst column. Now consider the digonl edges of block tyes six tht we hve ignored until now. These edges will link the two criticl ths nd ny ths between them nd will not link ny th bove the uer criticl th nor ny th below the lower criticl th. Consequently ll ths bove the uer criticl th nd ll ths below the lower criticl th will fil to rech either the first or lst column nd will hve no edges connecting them to the centrl region tht reches both the first nd lst column. These ths will be bsent from the trnsverse grh. The remining ths, together with the digonl edges of block tyes six, will form single comonent tht will be resent in the trnsverse grh. Hence the trnsverse grh will be connected. We now consider the cse when b is mde u of only s. In this cse there re no block tyes six. In fct, the entire grh is single block tye five nd the Common Grh consists only of ths like those in Figure 10. It is cler tht the Trnsverse Grh contins t lest two ths tht re connected by ny dditionl edges, i.e. we hve t lest two comonents. Hence the trnsverse grh will be disconnected. REFERENCES [1] D Alotto, L., Lsser, L., Disconnectedness in Forwrd nd Reverse Pth Grhs for Pttern Mtching, Proceedings of the Interntionl Conference on Artificil Intelligence, Vol. I, , Ls Vegs, NV, (2004). [2] Snkoff, D., Kruskl, J., Time Wrs, String Edits, nd Mcromolecules, The Theory nd Prctice of Sequence Comrison, CSLI Publictions, (1999). [3] Sellers, P. H., The Theory nd Comuttion of Evolutionry Distnces; Pttern Recognition, J. Algorithms 1, , (1980). [4] Sellers, P. H., Pttern recognition in genetic sequences, Proc. Ntl. Acd. Sci. USA 76, 3041, (1979). [5] Sellers, P. H., On the Theory nd Comuttion of Evolutionry Distnces, SIAM J. Al. Mth. 26, , (1974). [6] West, D. B., Introduction to Grh Theory, 2nd ed.. Prentice Hll, NJ (2001).

Section 10.4 Hyperbolas

Section 10.4 Hyperbolas 66 Section 10.4 Hyperbols Objective : Definition of hyperbol & hyperbols centered t (0, 0). The third type of conic we will study is the hyperbol. It is defined in the sme mnner tht we defined the prbol

More information

9 Graph Cutting Procedures

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

More information

MATH 25 CLASS 5 NOTES, SEP

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

More information

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

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

More information

Definition of Regular Expression

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

More information

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1 Mth 33 Volume Stewrt 5.2 Geometry of integrls. In this section, we will lern how to compute volumes using integrls defined by slice nlysis. First, we recll from Clculus I how to compute res. Given the

More information

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

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

More information

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

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

More information

Class-XI Mathematics Conic Sections Chapter-11 Chapter Notes Key Concepts

Class-XI Mathematics Conic Sections Chapter-11 Chapter Notes Key Concepts Clss-XI Mthemtics Conic Sections Chpter-11 Chpter Notes Key Concepts 1. Let be fixed verticl line nd m be nother line intersecting it t fixed point V nd inclined to it t nd ngle On rotting the line m round

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

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

More information

Complete Coverage Path Planning of Mobile Robot Based on Dynamic Programming Algorithm Peng Zhou, Zhong-min Wang, Zhen-nan Li, Yang Li

Complete Coverage Path Planning of Mobile Robot Based on Dynamic Programming Algorithm Peng Zhou, Zhong-min Wang, Zhen-nan Li, Yang Li 2nd Interntionl Conference on Electronic & Mechnicl Engineering nd Informtion Technology (EMEIT-212) Complete Coverge Pth Plnning of Mobile Robot Bsed on Dynmic Progrmming Algorithm Peng Zhou, Zhong-min

More information

COMP 423 lecture 11 Jan. 28, 2008

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

More information

A dual of the rectangle-segmentation problem for binary matrices

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

More information

An Efficient Divide and Conquer Algorithm for Exact Hazard Free Logic Minimization

An Efficient Divide and Conquer Algorithm for Exact Hazard Free Logic Minimization An Efficient Divide nd Conquer Algorithm for Exct Hzrd Free Logic Minimiztion J.W.J.M. Rutten, M.R.C.M. Berkelr, C.A.J. vn Eijk, M.A.J. Kolsteren Eindhoven University of Technology Informtion nd Communiction

More information

Alignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey

Alignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey Alignment of Long Sequences BMI/CS 776 www.biostt.wisc.edu/bmi776/ Spring 2012 Colin Dewey cdewey@biostt.wisc.edu Gols for Lecture the key concepts to understnd re the following how lrge-scle lignment

More information

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

such that the S i cover S, or equivalently S

such that the S i cover S, or equivalently S MATH 55 Triple Integrls Fll 16 1. Definition Given solid in spce, prtition of consists of finite set of solis = { 1,, n } such tht the i cover, or equivlently n i. Furthermore, for ech i, intersects i

More information

On String Matching in Chunked Texts

On String Matching in Chunked Texts On String Mtching in Chunked Texts Hnnu Peltol nd Jorm Trhio {hpeltol, trhio}@cs.hut.fi Deprtment of Computer Science nd Engineering Helsinki University of Technology P.O. Box 5400, FI-02015 HUT, Finlnd

More information

Fig.25: the Role of LEX

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

More information

CS481: Bioinformatics Algorithms

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

More information

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

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

More information

Rank-Maximal Matchings

Rank-Maximal Matchings Rnk-Mximl Mtchings Robert W. Irving Telikelli Kvith Kurt Mehlhorn Dimitrios Michil Ktrzyn Pluch Abstrct Suose tht ech member of set A of licnts rnks subset of set P of osts in n order of reference, ossibly

More information

MTH 146 Conics Supplement

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

More information

ZZ - Advanced Math Review 2017

ZZ - Advanced Math Review 2017 ZZ - Advnced Mth Review Mtrix Multipliction Given! nd! find the sum of the elements of the product BA First, rewrite the mtrices in the correct order to multiply The product is BA hs order x since B is

More information

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

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

More information

1 The Definite Integral

1 The Definite Integral The Definite Integrl Definition. Let f be function defined on the intervl [, b] where

More information

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

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

More information

MATH 2530: WORKSHEET 7. x 2 y dz dy dx =

MATH 2530: WORKSHEET 7. x 2 y dz dy dx = MATH 253: WORKSHT 7 () Wrm-up: () Review: polr coordintes, integrls involving polr coordintes, triple Riemnn sums, triple integrls, the pplictions of triple integrls (especilly to volume), nd cylindricl

More information

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES)

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) Numbers nd Opertions, Algebr, nd Functions 45. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) In sequence of terms involving eponentil growth, which the testing service lso clls geometric

More information

Phylogeny and Molecular Evolution

Phylogeny and Molecular Evolution Phylogeny nd Moleculr Evolution Chrcter Bsed Phylogeny 1/50 Credit Ron Shmir s lecture notes Notes by Nir Friedmn Dn Geiger, Shlomo Morn, Sgi Snir nd Ron Shmir Durbin et l. Jones nd Pevzner s presenttion

More information

50 AMC LECTURES Lecture 2 Analytic Geometry Distance and Lines. can be calculated by the following formula:

50 AMC LECTURES Lecture 2 Analytic Geometry Distance and Lines. can be calculated by the following formula: 5 AMC LECTURES Lecture Anlytic Geometry Distnce nd Lines BASIC KNOWLEDGE. Distnce formul The distnce (d) between two points P ( x, y) nd P ( x, y) cn be clculted by the following formul: d ( x y () x )

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

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

More information

Midterm 2 Sample solution

Midterm 2 Sample solution Nme: Instructions Midterm 2 Smple solution CMSC 430 Introduction to Compilers Fll 2012 November 28, 2012 This exm contins 9 pges, including this one. Mke sure you hve ll the pges. Write your nme on the

More information

Pointwise convergence need not behave well with respect to standard properties such as continuity.

Pointwise convergence need not behave well with respect to standard properties such as continuity. Chpter 3 Uniform Convergence Lecture 9 Sequences of functions re of gret importnce in mny res of pure nd pplied mthemtics, nd their properties cn often be studied in the context of metric spces, s in Exmples

More information

COMBINATORIAL PATTERN MATCHING

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

More information

Misrepresentation of Preferences

Misrepresentation of Preferences Misrepresenttion of Preferences Gicomo Bonnno Deprtment of Economics, University of Cliforni, Dvis, USA gfbonnno@ucdvis.edu Socil choice functions Arrow s theorem sys tht it is not possible to extrct from

More information

2014 Haskell January Test Regular Expressions and Finite Automata

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

More information

a(e, x) = x. Diagrammatically, this is encoded as the following commutative diagrams / X

a(e, x) = x. Diagrammatically, this is encoded as the following commutative diagrams / X 4. Mon, Sept. 30 Lst time, we defined the quotient topology coming from continuous surjection q : X! Y. Recll tht q is quotient mp (nd Y hs the quotient topology) if V Y is open precisely when q (V ) X

More information

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

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

More information

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1.

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1. Answer on Question #5692, Physics, Optics Stte slient fetures of single slit Frunhofer diffrction pttern. The slit is verticl nd illuminted by point source. Also, obtin n expression for intensity distribution

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

CHAPTER III IMAGE DEWARPING (CALIBRATION) PROCEDURE

CHAPTER III IMAGE DEWARPING (CALIBRATION) PROCEDURE CHAPTER III IMAGE DEWARPING (CALIBRATION) PROCEDURE 3.1 Scheimpflug Configurtion nd Perspective Distortion Scheimpflug criterion were found out to be the best lyout configurtion for Stereoscopic PIV, becuse

More information

Dr. D.M. Akbar Hussain

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

More information

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers?

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers? 1.1 TEXAS ESSENTIAL KNOWLEDGE AND SKILLS Prepring for 2A.6.K, 2A.7.I Intervl Nottion nd Set Nottion Essentil Question When is it convenient to use set-uilder nottion to represent set of numers? A collection

More information

Section 3.1: Sequences and Series

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

More information

Topic 2: Lexing and Flexing

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

More information

10.5 Graphing Quadratic Functions

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

More information

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

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

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

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

More information

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html

More information

Improper Integrals. October 4, 2017

Improper Integrals. October 4, 2017 Improper Integrls October 4, 7 Introduction We hve seen how to clculte definite integrl when the it is rel number. However, there re times when we re interested to compute the integrl sy for emple 3. Here

More information

12-B FRACTIONS AND DECIMALS

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

More information

1 Quad-Edge Construction Operators

1 Quad-Edge Construction Operators CS48: Computer Grphics Hndout # Geometric Modeling Originl Hndout #5 Stnford University Tuesdy, 8 December 99 Originl Lecture #5: 9 November 99 Topics: Mnipultions with Qud-Edge Dt Structures Scribe: Mike

More information

CSCI1950 Z Computa4onal Methods for Biology Lecture 2. Ben Raphael January 26, hhp://cs.brown.edu/courses/csci1950 z/ Outline

CSCI1950 Z Computa4onal Methods for Biology Lecture 2. Ben Raphael January 26, hhp://cs.brown.edu/courses/csci1950 z/ Outline CSCI1950 Z Comput4onl Methods for Biology Lecture 2 Ben Rphel Jnury 26, 2009 hhp://cs.brown.edu/courses/csci1950 z/ Outline Review of trees. Coun4ng fetures. Chrcter bsed phylogeny Mximum prsimony Mximum

More information

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

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

More information

6.2 Volumes of Revolution: The Disk Method

6.2 Volumes of Revolution: The Disk Method mth ppliction: volumes by disks: volume prt ii 6 6 Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem 6) nd the ccumultion process is to determine so-clled volumes

More information

Math 464 Fall 2012 Notes on Marginal and Conditional Densities October 18, 2012

Math 464 Fall 2012 Notes on Marginal and Conditional Densities October 18, 2012 Mth 464 Fll 2012 Notes on Mrginl nd Conditionl Densities klin@mth.rizon.edu October 18, 2012 Mrginl densities. Suppose you hve 3 continuous rndom vribles X, Y, nd Z, with joint density f(x,y,z. The mrginl

More information

Matrices and Systems of Equations

Matrices and Systems of Equations Mtrices Mtrices nd Sstems of Equtions A mtri is rectngulr rr of rel numbers. CHAT Pre-Clculus Section 8. m m m............ n n n mn We will use the double subscript nottion for ech element of the mtri.

More information

Theory of Computation CSE 105

Theory of Computation CSE 105 $ $ $ Theory of Computtion CSE 105 Regulr Lnguges Study Guide nd Homework I Homework I: Solutions to the following problems should be turned in clss on July 1, 1999. Instructions: Write your nswers clerly

More information

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

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

More information

High Priority Traffic in HCF on Wireless Networks

High Priority Traffic in HCF on Wireless Networks High Priority Trffic in HC on Wireless Networks Mo Add, Amnd Pert, Gordon Erly School of Comuting, University of Portsmouth, Lion Terrce, Portsmouth, UK {mo.dd, mnd.ert, gordon.erly }@ort.c.uk Abstrct

More information

Solutions to Math 41 Final Exam December 12, 2011

Solutions to Math 41 Final Exam December 12, 2011 Solutions to Mth Finl Em December,. ( points) Find ech of the following its, with justifiction. If there is n infinite it, then eplin whether it is or. ( ) / ln() () (5 points) First we compute the it:

More information

arxiv:cs.cg/ v1 18 Oct 2005

arxiv:cs.cg/ v1 18 Oct 2005 A Pir of Trees without Simultneous Geometric Embedding in the Plne rxiv:cs.cg/0510053 v1 18 Oct 2005 Mrtin Kutz Mx-Plnck-Institut für Informtik, Srbrücken, Germny mkutz@mpi-inf.mpg.de October 19, 2005

More information

Notes for Graph Theory

Notes for Graph Theory Notes for Grph Theory These re notes I wrote up for my grph theory clss in 06. They contin most of the topics typiclly found in grph theory course. There re proofs of lot of the results, ut not of everything.

More information

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers

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

More information

1.5 Extrema and the Mean Value Theorem

1.5 Extrema and the Mean Value Theorem .5 Extrem nd the Men Vlue Theorem.5. Mximum nd Minimum Vlues Definition.5. (Glol Mximum). Let f : D! R e function with domin D. Then f hs n glol mximum vlue t point c, iff(c) f(x) for ll x D. The vlue

More information

Ma/CS 6b Class 1: Graph Recap

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

More information

The Fundamental Theorem of Calculus

The Fundamental Theorem of Calculus MATH 6 The Fundmentl Theorem of Clculus The Fundmentl Theorem of Clculus (FTC) gives method of finding the signed re etween the grph of f nd the x-xis on the intervl [, ]. The theorem is: FTC: If f is

More information

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course L. Yroslvsky. Fundmentls of Digitl Imge Processing. Course 0555.330 Lecture. Imge enhncement.. Imge enhncement s n imge processing tsk. Clssifiction of imge enhncement methods Imge enhncement is processing

More information

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an Scnner Termintion A scnner reds input chrcters nd prtitions them into tokens. Wht hppens when the end of the input file is reched? It my be useful to crete n Eof pseudo-chrcter when this occurs. In Jv,

More information

Algorithm Design (5) Text Search

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

More information

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

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

More information

Lecture T4: Pattern Matching

Lecture T4: Pattern Matching Introduction to Theoreticl CS Lecture T4: Pttern Mtching Two fundmentl questions. Wht cn computer do? How fst cn it do it? Generl pproch. Don t tlk bout specific mchines or problems. Consider miniml bstrct

More information

Introduction to Integration

Introduction to Integration Introduction to Integrtion Definite integrls of piecewise constnt functions A constnt function is function of the form Integrtion is two things t the sme time: A form of summtion. The opposite of differentition.

More information

A Transportation Problem Analysed by a New Ranking Method

A Transportation Problem Analysed by a New Ranking Method (IJIRSE) Interntionl Journl of Innovtive Reserch in Science & Engineering ISSN (Online) 7-07 A Trnsporttion Problem Anlysed by New Rnking Method Dr. A. Shy Sudh P. Chinthiy Associte Professor PG Scholr

More information

arxiv: v1 [cs.cg] 9 Dec 2016

arxiv: v1 [cs.cg] 9 Dec 2016 Some Counterexmples for Comptible Tringultions rxiv:62.0486v [cs.cg] 9 Dec 206 Cody Brnson Dwn Chndler 2 Qio Chen 3 Christin Chung 4 Andrew Coccimiglio 5 Sen L 6 Lily Li 7 Aïn Linn 8 Ann Lubiw 9 Clre Lyle

More information

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

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

More information

Ma/CS 6b Class 1: Graph Recap

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

More information

On the Detection of Step Edges in Algorithms Based on Gradient Vector Analysis

On the Detection of Step Edges in Algorithms Based on Gradient Vector Analysis On the Detection of Step Edges in Algorithms Bsed on Grdient Vector Anlysis A. Lrr6, E. Montseny Computer Engineering Dept. Universitt Rovir i Virgili Crreter de Slou sin 43006 Trrgon, Spin Emil: lrre@etse.urv.es

More information

Uninformed Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 31 Jan 2012

Uninformed Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 31 Jan 2012 1 Hl Dumé III (me@hl3.nme) Uninformed Serch Hl Dumé III Comuter Science University of Mrylnd me@hl3.nme CS 421: Introduction to Artificil Intelligence 31 Jn 2012 Mny slides courtesy of Dn Klein, Sturt

More information

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

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

More information

Properties of Tree Convex Constraints 1,2

Properties of Tree Convex Constraints 1,2 Properties of Tree Convex Constrints 1,2 Yunlin Zhng, Eugene C Freuder b Deprtment of Computer Science, Texs Tech University, Lubbock, USA b Cork Constrint Computtion Center, University College Cork, Irelnd

More information

If f(x, y) is a surface that lies above r(t), we can think about the area between the surface and the curve.

If f(x, y) is a surface that lies above r(t), we can think about the area between the surface and the curve. Line Integrls The ide of line integrl is very similr to tht of single integrls. If the function f(x) is bove the x-xis on the intervl [, b], then the integrl of f(x) over [, b] is the re under f over the

More information

Chapter 2 Sensitivity Analysis: Differential Calculus of Models

Chapter 2 Sensitivity Analysis: Differential Calculus of Models Chpter 2 Sensitivity Anlysis: Differentil Clculus of Models Abstrct Models in remote sensing nd in science nd engineering, in generl re, essentilly, functions of discrete model input prmeters, nd/or functionls

More information

Lists in Lisp and Scheme

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

More information

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

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

More information

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

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

More information

Position Heaps: A Simple and Dynamic Text Indexing Data Structure

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

More information

UNIT 11. Query Optimization

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

More information

Union-Find Problem. Using Arrays And Chains. A Set As A Tree. Result Of A Find Operation

Union-Find Problem. Using Arrays And Chains. A Set As A Tree. Result Of A Find Operation Union-Find Problem Given set {,,, n} of n elements. Initilly ech element is in different set. ƒ {}, {},, {n} An intermixed sequence of union nd find opertions is performed. A union opertion combines two

More information

Research Announcement: MAXIMAL CONNECTED HAUSDORFF TOPOLOGIES

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

More information

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it. 6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3-dimensionl oject with two regulr fces seprted

More information

LECT-10, S-1 FP2P08, Javed I.

LECT-10, S-1 FP2P08, Javed I. A Course on Foundtions of Peer-to-Peer Systems & Applictions LECT-10, S-1 CS /799 Foundtion of Peer-to-Peer Applictions & Systems Kent Stte University Dept. of Computer Science www.cs.kent.edu/~jved/clss-p2p08

More information

MENSURATION-IV

MENSURATION-IV MENSURATION-IV Theory: A solid is figure bounded by one or more surfce. Hence solid hs length, bredth nd height. The plne surfces tht bind solid re clled its fces. The fundmentl difference between plne

More information

In Search of the Fractional Four Color Theorem. Ari Nieh Gregory Levin, Advisor

In Search of the Fractional Four Color Theorem. Ari Nieh Gregory Levin, Advisor In Serch of the Frctionl Four Color Theorem by Ari Nieh Gregory Levin, Advisor Advisor: Second Reder: (Arthur Benjmin) My 2001 Deprtment of Mthemtics Abstrct In Serch of the Frctionl Four Color Theorem

More information

3.5.1 Single slit diffraction

3.5.1 Single slit diffraction 3.5.1 Single slit diffrction Wves pssing through single slit will lso diffrct nd produce n interference pttern. The reson for this is to do with the finite width of the slit. We will consider this lter.

More information

Regular Expression Matching with Multi-Strings and Intervals. Philip Bille Mikkel Thorup

Regular Expression Matching with Multi-Strings and Intervals. Philip Bille Mikkel Thorup Regulr Expression Mtching with Multi-Strings nd Intervls Philip Bille Mikkel Thorup Outline Definition Applictions Previous work Two new problems: Multi-strings nd chrcter clss intervls Algorithms Thompson

More information

USING HOUGH TRANSFORM IN LINE EXTRACTION

USING HOUGH TRANSFORM IN LINE EXTRACTION Stylinidis, Efstrtios USING HOUGH TRANSFORM IN LINE EXTRACTION Efstrtios STYLIANIDIS, Petros PATIAS The Aristotle University of Thessloniki, Deprtment of Cdstre Photogrmmetry nd Crtogrphy Univ. Box 473,

More information

Hyperbolas. Definition of Hyperbola

Hyperbolas. Definition of Hyperbola CHAT Pre-Clculus Hyperols The third type of conic is clled hyperol. For n ellipse, the sum of the distnces from the foci nd point on the ellipse is fixed numer. For hyperol, the difference of the distnces

More information

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

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

More information