Determining Single Connectivity in Directed Graphs

Size: px
Start display at page:

Download "Determining Single Connectivity in Directed Graphs"

Transcription

1 Determining Single Connectivity in Directed Grphs Adm L. Buchsbum 1 Mrtin C. Crlisle 2 Reserch Report CS-TR September 1992 Abstrct In this pper, we consider the problem of determining whether or not directed grph contins pir of vertices connected by two distinct simple pths; if it does not, we sy it is singly connected. A strightforwrd implementtion using n depth rst serches requires O(nm) time on n n-vertex, m-rc digrph; we obtin n O(n 2 ) time lgorithm by using contrction wherever possible. 1 Supported by Fnnie nd John Hertz Foundtion fellowship, Ntionl Science Foundtion Grnt No. CCR , nd the Center for Discrete Mthemtics nd Theoreticl Computer Science (DIMACS) under NSF-STC Supported by Ntionl Science Foundtion Grdute Fellowship nd the Fnnie nd John Hertz Foundtion.

2 1 Introduction Grph connectivity hs become widely studied component of grph theory. To dte, most of the work in this re hs delt with determining if n undirected grph contins t lest two, three, or more vertex- or edge-disjoint pths between every pir of vertices (see, e.g., [5, 7, 8, 11, 12, 14, 15, 17, 20, 21]) or if directed grph possesses nlogous properties (see, e.g., [5, 16]). This pper investigtes dierent sort of connectivity problem: determining if grph hs t most some number of distinct pths between every pir of vertices. In prticulr, we sy directed grph is singly connected if for ny pir of vertices, there exists t most one simple (no vertex repeted) pth connecting them; i.e., if there re two distinct (but not necessrily vertex- or rc-disjoint) simple pths connecting ny two vertices, the grph is not singly connected. Multiple pths vi cycles re llowed (in prticulr, grph which is merely one simple cycle is singly connected.) Note tht the undirected version of this problem is trivil: An undirected grph is singly connected if nd only if it is tree. The directed problem in some sense is equivlent to checking the grph to see if it contins ny redundnt pths. This problem originlly ppers in [4]. A simple lgorithm for solving this decision problem is to perform depth rst serch (DFS) strting from ech vertex, terminting the DFS fter it visits ll vertices rechble from the strt vertex. (We use depth rst serch terminology from [1, 4] in this pper.) If the sme vertex is encountered long two dierent simple pths from the initil vertex, we my conclude tht the grph is not singly connected. Similrly, if we do not nd such cse for ny initil vertex, then the grph is singly connected. The question thus reduces to determining whether or not there re ny forwrd or cross rcs in ny of the DFS trees. Given n n-vertex, m-rc directed grph, this nive lgorithm uses n occurrences of DFS, ech of which in the worst cse requires O(m) opertions, yielding totl cost of O(nm) time. The running time is therefore O(n 2 ) for sprse grphs nd O(n 3 ) for dense grphs. (We ssume the grphs re connected in the undirected sense.) An lterntive pproch performs one complete DFS strting from ny vertex, yielding DFS forest possibly with multiple tree roots. The problem is resolving the inter-tree cross rcs to determine if they produce forbidden multiple simple pths; gin this cn potentilly require O(nm) time. In the following sections, we give n O(n 2 ) lgorithm for the single connectivity decision problem for directed grphs. This lgorithm is optiml for dense grphs s in the worst cse we must consider every rc. However, it yields no symptotic improvement for sprse grphs. 1.1 Denitions We use stndrd grph terminology; see, e.g., [22]. In prticulr, given directed grph (digrph) G = (V; A) with n = jv j nd m = jaj, pth connecting two vertices u; v 2 V is sequence of nodes (u = u 0 ; u 1 ; : : :; u l = v) such tht (u i ; u i+1 ) 2 A; 0 i < l. A pth is simple pth if u i 6= u j ; 8i 6= j. Two pths (u 0 ; : : :; u k ) nd (v 0 ; : : :; v l ) re distinct if either (1) k 6= l, or (2) k = l nd u i 6= v i for some 0 i l. A cycle is pth (u 0 ; : : :; u l ) such tht u 0 = u l ; simple cycle is cycle (u 0 ; : : :; u l ) such tht u i 6= u j ; 0 i < j < l. Given some cycle, chord is pth of rcs, none of which is on the cycle, connecting two distinct nodes of the cycle. Note tht this diers from the stndrd denition of chord being n rc connecting two nondjcent nodes of cycle (see, e.g., [2, 13]); for single rc to be chord by our denition, however, it must in fct connect two nondjcent nodes of the cycle. 1

3 Denition 1.1 A digrph G = (V; A) is singly connected if nd only if for ny two vertices u; v 2 V, there exists t most one simple pth connecting u nd v. We note tht cycles re permitted in the grph, nd tht there my in fct be more thn one pth between some pir of vertices in singly connected digrph. However, there cnnot be two or more distinct (but possibly not vertex- or rc-disjoint) simple pths between ny pir of vertices. For the reminder of this pper, ll grphs re ssumed to be directed nd connected in the undirected sense; therefore n 0 1 m n(n 0 1). 2 Algorithm for Determining Single Connectivity In this section, we rst prove certin spects of the nive lgorithm. Then, building on these, we show how we cn use contrction to improve the performnce of the lgorithm. First, we note tht the existence of forwrd or cross rcs within DFS tree implies tht the grph is not singly connected. This clerly follows since if there is forwrd rc (w; x) then there re two pths from w to x, nmely the tree pth nd the forwrd rc. Also, if there is cross rc (w; x), there re two pths from the root of the DFS tree to x, nmely the tree pth to x, nd the tree pth to w ctented with the rc (w; x). In the following lemm, we show this condition is not only sucient but lso necessry: Lemm 2.1 If G is not singly connected, then for some v 2 V, the DFS tree rooted t v hs forwrd or cross rc. Proof: Since G is not singly connected there exist v; x 2 V (G) such tht two distinct simple pths connect v to x. Consider the DFS tree T rooted t v. Let P = (v = t 0 ; : : :; t k = x) be the pth in T from v to x, nd let P 0 = (v = u 0 ; : : :; u l = x) be some pth in G distinct from P. Let i = mx n j < l j (u j ; u j+1 ) 6= (t k0(l0j) ; t k0(l0j)+1 )o. I.e., (u i+1 ; : : :; u l ) = (t k0(l0i)+1 ; : : :; t k ), but (u i ; : : :; u l ) 6= (t k0(l0i) ; : : :; t k ). Then (u i ; u i+1 ) is forwrd rc if u i = t j for some j nd cross rc otherwise. We now consider the eect of cycles on single connectivity. Intuitively, cycle would pper to be equivlent to single vertex, since ech vertex in the cycle is rechble from every other vertex by simple pth. Thus, idelly we would like to contrct ech cycle (i.e., ll the rcs forming ech cycle) to single vertex nd run the nive lgorithm on the reduced grph, checking only for forwrd or cross rcs. However, wheres contrcting cycle in digrph preserves connectivity, it does not lwys preserve single connectivity. For exmple, consider the digrph consisting only of cycle with chordl rc; the grph itself is not singly connected, but contrcting the cycle leves only single vertex which by denition is singly connected. In fct, chords ply decisive role in determining when cycle contrction is useful. Agin, note tht if grph hs chord, it is not singly connected (the chord from x to y nd the cycle pth from x to y re two distinct simple pths from x to y.) Now consider the strongly connected components of G. Let G 3 be the grph formed by contrcting ech strongly connected component of G into single vertex nd removing loop rcs, i.e., rcs from vertex to itself in G 3, formed by contrcting rcs joining two nodes in the sme strongly connected component of G. A multiple rc of G 3 is repeted rc between two distinct vertices in G 3, formed if more thn one rc connected two strongly connected 2

4 components in G. The following two lemms relte the single connectivity of G to tht of G 3. Lemm 2.2 If G 3 hs multiple rc, then G is not singly connected. Proof: Let x nd y be two vertices in G 3 connected by multiple rcs (from x to y). Let X nd Y be, respectively, the strongly connected components of G tht contrct to x nd y in G 3. The multiple rcs in G 3 rise from two rcs (x 0 ; y 0 ) nd (x 00 ; y 00 ) in G such tht x 0 ; x 00 2 V (X) nd y 0 ; y 00 2 V (Y ). It my be the cse tht either x 0 = x 00 or y 0 = y 00, but both pirs cnnot be equl. Let P x be the pth in G from x 0 to x 00, nd let P y be the pth in G from y 0 to y 00 ; t most one of P x nd P y cn be the null pth. Now the pth formed by ctenting P x with the rc (x 00 ; y 00 ) nd the pth formed by ctenting the rc (x 0 ; y 0 ) with P y demonstrte two distinct simple pths joining x 0 to y 00 in G. Lemm 2.3 If G hs no chords nd G 3 hs no multiple rcs, then G is singly connected if nd only if G 3 is singly connected. Proof: Suppose G is not singly connected, nd let P 1 = (x = u 0 ; : : :; u l 1 = y) nd P 2 = (x = v 0 ; : : :; v l2 = y) be two distinct simple pths from x to y in G. We cn ssume without loss of generlity tht P 1 nd P 2 re vertex-disjoint. It must be tht x nd y re in dierent strongly connected components of G, or P 2 would yield chord of the cycle formed by ctenting pth from y to x with P 1. Let X (rsp. Y ) be the strongly connected component of G (nd its respective vertex in G 3 ) contining x (rsp. y). Let P 3 1 nd P 3 2 be the pths in G 3 from X to Y tht result from the contrction pplied to P 1 nd P 2. Since G 3 contins no multiple rcs, the rst rc of P 1 must dier from tht of P 2, nd thus P 1 nd P 2 re distinct simple pths in G 3. Suppose G 3 is not singly connected, nd let P 3 nd P be two simple pths connecting two vertices X nd Y in G. By replcing ech vertex in the two pths by n pproprite pth in the respective strongly connected component in G, these give rise to two simple pths connecting some x nd y in G. We cn use Lemms 2.2 nd 2.3 to reduce the grph G to n cyclic grph G 3 nd then run depth rst serch from ech vertex of G 3 to determine single connectivity. As we shll see, this reduces the complexity of the multiple DFS pproch by fctor of O(m=n). Postponing for now discussion of how to determine if G hs chord, our lgorithm for testing whether G is singly connected is simply stted: If G hs chord, then G is not singly connected. Otherwise, compute the strongly connected components (SCC's) of G. Contrct the SCC's nd throw wy loop rcs; let G 3 be the resulting grph. If G 3 hs multiple rc, then G is not strongly connected. Otherwise For every v 2 V (G 3 ) do Compute depth rst serch tree T rooted t v. If T hs forwrd or cross rc, G is not singly connected. If no T hd forwrd or cross rc, G is singly connected. Theorem 2.4 The lgorithm bove correctly determines whether or not digrph is singly connected. 3

5 Proof: As noted bove, terminting negtively if G hs chord is correct. Similrly, Lemm 2.2 demonstrtes tht terminting negtively if G 3 hs multiple rc is correct. If G hs no chord nd G 3 no multiple rc, then Lemm 2.3 proves tht G 3 is singly connected if nd only if G is. By the discussion t the beginning of Section 2 we know tht terminting negtively upon discovery of forwrd or cross rc in one of the T 's in the lgorithm is correct. Finlly, if no T hd forwrd or cross rc, Lemm 2.1 sttes tht it is correct to terminte positively. 3 Chord Testing nd Anlysis of Running Time We now show how to test whether or not G contins chord vi simple depth rst serch. We believe this fct is lredy known but cn nd no mention of it in the literture; rther we see works on relted topics such s testing grphs to see if every cycle contins chord (see, e.g., [13]). We therefore include it for completeness. Let F be DFS forest rooted t ny vertex of G, nd for ny v 2 V, let DF S(v) be v 0 s DFS number nd LOW (v) its low vlue in F. The computtion of these vlues is described in [1, 4]. We ssume there re no forwrd or intr-tree cross rcs in F (or we immeditely determine tht G is not singly connected). Lemm 3.1 If F hs no forwrd or intr-tree cross rcs, then G hs chord if nd only if there is some vertex v in F with two bck rcs in F, bck rc nd child x with LOW (x) < DF S(v) in F, or two distinct children x nd y with LOW (x) < DF S(v) nd LOW (y) < DF S(v) in F. Proof: (() Given ny of the conditions listed in the lemm, there exist two distinct simple pths P nd P 0 from v to its prent p(v) in F. P yields chord of the cycle formed by ctenting P 0 with the rc (p(v); v). ()) Let C = (c 0 ; : : :; c l ) be cycle nd D = (c i ; d 0 ; : : :; d k ; c j ) for some 0 i < j < l be chord of C. We cn ssume tht C is simple cycle, otherwise we cn derive from C nd D dierent simple cycle nd chord. By denition either (1) k 0 nd d s 6= c t for ll 0 s k nd 0 t < l, or (2) k = 01 nd j > i + 1. Therefore, D ctented with the pth (c j ; : : :; c l ; c 1 ; : : :; c i ) forms nother simple cycle C 0. Let T be the tree in F contining the vertices of C nd D. Since C is simple nd T hs no forwrd or cross rcs, C ppers in T s only tree rcs nd one bck rc. The sme cn be sid for C 0. Now note tht DF S(c i ) > DF S(c j ); i.e., c i is deeper thn c j in T. This follows from the proof of Lemm 2.1. Either c i is the deepest vertex of C in T, in which cse there is bck rc from c i to the highest vertex of C in T, or c i hs child x 2 V (C) in T with LOW (x) < DF S(c i ). By the sme resoning, c i hs bck rc ssocited with C 0 or child in T ssocited with C 0 with low vlue less thn DF S(c i ). In ll cses, since C nd C 0 re distinct, the bck rc(s) nd child(ren) rendered stisfy the lemm. We now turn to the nlysis of the running time of the lgorithm. The key to the O(m=n) fctor improvement over the nive lgorithm is tht contrcting the strongly connected components in G reduces the cost of performing ech of the depth rst serches in the lst stge of the lgorithm from O(m) to O(n). 4

6 Theorem 3.2 The lgorithm of Section 2 tkes O(n 2 ) time nd O(m) spce. Proof: Lemm 3.1 describes how to test to see if G hs chord in O(m) time vi one complete DFS of G. Note tht if we discover forwrd or intr-tree cross rc during the DFS, we immeditely terminte negtively. Computing the strongly connected components of G lso tkes O(m) time [1, 4]. Contrcting the strongly connected components cn be ccomplished in O(m) time s follows. Let S(v) denote the SCC contining vertex v in G. V (G 3 ) = S v2v (G) fs(v)g. For ech rc (x; y) in A(G) dd n rc (S(x); S(y)) to A(G 3 ) if S(x) 6= S(y) (if S(x) = S(y), this is loop rc nd cn be ignored.) The test for multiple rcs is esily done simultneously with the construction. Since G 3 is cyclic, there cn be no bck rcs in ny of the DFS trees rooted t vertices in G 3. Therefore, ech of the O(n) DFS's requires O(n) time. Ech step requires liner spce. The O(n) DFS's in the lst stge of the lgorithm cn reuse the constnt spce for DFS mrks in ech vertex. 4 Conclusion nd Open Problems The problem of determining whether or not digrph is singly connected ppers in [4]. To our knowledge, the lgorithm presented here is the rst to better the nive bound. Still, the O(n 2 ) time bound chieved leves much room for improvement. We note one spect of this problem tht distinguishes it from more trditionl connectivity problems. Problems such s k-vertex- nd k-edge-connectivity re monotonic in tht once grph is so connected, dding dditionl edges does not destroy the property. For singly connected digrphs, this chrcteristic is reversed: Adding rcs cn destroy the single connectivity of digrph, but removing rcs cn crete single connectivity, both ctions monotoniclly so. One cn consider digrph s network stisfying set of communiction requirements, i.e. pirs of vertices tht must be connected by some pth. Viewing the trnsitive closure of digrph s similr set of pirs, digrph stises the communictions requirements given s set C if nd only if its trnsitive closure T is such tht C T. Given digrph with trnsitive closure T, it is lwys possible to crete nother digrph with trnsitive closure T 0 T but with the property tht it is singly connected (it is not lwys possible to do this nd hve T 0 = T.) An open problem, then, is to construct eciently singly connected digrph stisfying some communictions requirements. One might lso wish to minimize (or minimlize) T nc. This type of problem is kin to trditionl connectivity ugmenttion problems; see, e.g., [3, 6, 9, 10, 18, 19, 23]. Finlly, we note tht the problems of k-connectivity in undirected grphs hve their limited connectivity nlogues: Given digrph, re there t most k distinct simple pths connecting ny pir of vertices? Further, these higher degree problems re no longer trivil in the undirected cse. 5 Acknowledgement We thnk Bob Trjn for insightful comments on n erlier drft of this pper which led to n improved presenttion of the lgorithm. 5

7 References [1] A. V. Aho, J. E. Hopcroft, nd J. D. Ullmn. The Design nd Anlysis of Computer Algorithms. Addison-Wesley Publishing Co., Reding, MA, [2] C. Berge. Grphs nd Hypergrphs. North-Hollnd Publishing Co., Amsterdm, [3] G.-R. Ci nd Y.-G. Sur. The minimum ugmenttion of ny grph to k-edgeconnected grph. Networks, 19(1):151{72, [4] T. H. Cormen, C. E. Leiserson, nd R. L. Rivest. Introduction to Algorithms. The MIT Electricl Engineering nd Computer Science Series. MIT Press, Cmbridge, MA, [5] A. H. Esfhnin nd S. L. Hkimi. On computing the connectivities of grphs nd digrphs. Networks, 14(2):355{66, [6] K. P. Eswrn nd R. E. Trjn. Augmenttion problems. SIAM Journl on Computing, 5(4):653{65, [7] S. Even. An lgorithm for determining whether the connectivity of grph is t lest k. SIAM Journl on Computing, 4(3):393{6, [8] S. Even nd R. E. Trjn. Network ow nd testing grph connectivity. SIAM Journl on Computing, 4(4):507{18, [9] A. Frnk. Augmenting grphs to meet edge-connectivity requirements. In Proc. 31st IEEE Symp. on Foundtions of Computer Science, pges 708{18, [10] H. N. Gbow. Applictions of poset representtion to edge connectivity nd grph rigidity. In Proc. 32nd IEEE Symp. on Foundtions of Computer Science, pges 812{ 21, [11] H. N. Gbow. A mtroid pproch to nding edge connectivity nd pcking rborescences. In Proc. 23rd ACM Symp. on Theory of Computing, pges 112{22, [12] Z. Glil. Finding the vertex connectivity of grphs. SIAM Journl on Computing, 9(1):197{9, [13] M. C. Golumbic. Algorithmic Grph Theory nd Perfect Grphs. Acdemic Press, New York, [14] J. Hopcroft nd R. E. Trjn. Dividing grph into triconnected components. SIAM Journl on Computing, 2(3):135{58, [15] A. Knevsky nd V. Rmchndrn. Improved lgorithms for grph four-connectivity. In Proc. 28th IEEE Symp. on Foundtions of Computer Science, pges 252{9, [16] Y. Mnsour nd B. Schieber. Finding the edge connectivity of directed grphs. Journl of Algorithms, 10(1):76{85, [17] D. W. Mtul. Determining edge connectivity in O(nm). In Proc. 28th IEEE Symp. on Foundtions of Computer Science, pges 249{51,

8 [18] D. Nor, D. Guseld, nd C. Mrtel. A fst lgorithm for optimlly incresing the edge-connectivity. In Proc. 31st IEEE Symp. on Foundtions of Computer Science, pges 698{707, [19] A. Rosenthl nd A. Goldner. Smllest ugmenttions to biconnect grph. SIAM Journl on Computing, 6(1):55{66, [20] C. P. Schnorr. Bottlenecks nd edge connectivity in unsymmetricl networks. SIAM Journl on Computing, 8(2):265{74, [21] R. E. Trjn. Depth-rst serch nd liner grph lgorithms. SIAM Journl on Computing, 1(2):146{59, [22] R. E. Trjn. Dt Structures nd Network Algorithms. CBMS-NSF Regionl Conference Series in Applied Mthemtics. Society for Industril nd Applied Mthemtics, Phildelphi, PA, [23] T. Wtnbe nd A. Nkmur. Edge-connectivity ugmenttion problems. Journl of Computer nd System Sciences, 35(1):96{144,

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

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

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

What are suffix trees?

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

More information

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

SOME EXAMPLES OF SUBDIVISION OF SMALL CATEGORIES

SOME EXAMPLES OF SUBDIVISION OF SMALL CATEGORIES SOME EXAMPLES OF SUBDIVISION OF SMALL CATEGORIES MARCELLO DELGADO Abstrct. The purpose of this pper is to build up the bsic conceptul frmework nd underlying motivtions tht will llow us to understnd ctegoricl

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

Presentation Martin Randers

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

More information

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

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

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

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

CS201 Discussion 10 DRAWTREE + TRIES

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

More information

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

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

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

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

More information

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

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

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

CS 221: Artificial Intelligence Fall 2011

CS 221: Artificial Intelligence Fall 2011 CS 221: Artificil Intelligence Fll 2011 Lecture 2: Serch (Slides from Dn Klein, with help from Sturt Russell, Andrew Moore, Teg Grenger, Peter Norvig) Problem types! Fully observble, deterministic! single-belief-stte

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

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

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

Better Hill-Climbing Searches for Parsimony

Better Hill-Climbing Searches for Parsimony Better Hill-Climbing Serches for Prsimony Gneshkumr Gnpthy, Vijy Rmchndrn, nd Tndy Wrnow Deprtment of Computer Sciences, University of Texs, Austin, TX 78712; gsgk, vlr, tndy @cs.utexs.edu Abstrct. The

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

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search. CS 88: Artificil Intelligence Fll 00 Lecture : A* Serch 9//00 A* Serch rph Serch Tody Heuristic Design Dn Klein UC Berkeley Multiple slides from Sturt Russell or Andrew Moore Recp: Serch Exmple: Pncke

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

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

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

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

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

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

More information

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

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

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

More information

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

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

More information

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

Available at ISSN: Vol. 4, Issue 2 (December 2009) pp (Previously Vol. 4, No.

Available at   ISSN: Vol. 4, Issue 2 (December 2009) pp (Previously Vol. 4, No. Avilble t http://pvmu.edu.edu/pges/398.sp ISSN: 93-9466 Vol. 4, Issue December 009 pp. 434 444 Previously Vol. 4, No. Applictions nd Applied Mthemtics: An Interntionl Journl AAM On -ry Subdivision for

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

CSEP 573 Artificial Intelligence Winter 2016

CSEP 573 Artificial Intelligence Winter 2016 CSEP 573 Artificil Intelligence Winter 2016 Luke Zettlemoyer Problem Spces nd Serch slides from Dn Klein, Sturt Russell, Andrew Moore, Dn Weld, Pieter Abbeel, Ali Frhdi Outline Agents tht Pln Ahed Serch

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

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

Tree Structured Symmetrical Systems of Linear Equations and their Graphical Solution

Tree Structured Symmetrical Systems of Linear Equations and their Graphical Solution Proceedings of the World Congress on Engineering nd Computer Science 4 Vol I WCECS 4, -4 October, 4, Sn Frncisco, USA Tree Structured Symmetricl Systems of Liner Equtions nd their Grphicl Solution Jime

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

Integration. September 28, 2017

Integration. September 28, 2017 Integrtion September 8, 7 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my

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

CSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe

CSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe CSCI 0 fel Ferreir d Silv rfsilv@isi.edu Slides dpted from: Mrk edekopp nd Dvid Kempe LOG STUCTUED MEGE TEES Series Summtion eview Let n = + + + + k $ = #%& #. Wht is n? n = k+ - Wht is log () + log ()

More information

A New Learning Algorithm for the MAXQ Hierarchical Reinforcement Learning Method

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

More information

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

Control-Flow Analysis and Loop Detection

Control-Flow Analysis and Loop Detection ! Control-Flow Anlysis nd Loop Detection!Lst time! PRE!Tody! Control-flow nlysis! Loops! Identifying loops using domintors! Reducibility! Using loop identifiction to identify induction vribles CS553 Lecture

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

Stack. A list whose end points are pointed by top and bottom

Stack. A list whose end points are pointed by top and bottom 4. Stck Stck A list whose end points re pointed by top nd bottom Insertion nd deletion tke plce t the top (cf: Wht is the difference between Stck nd Arry?) Bottom is constnt, but top grows nd shrinks!

More information

arxiv: v1 [math.co] 18 Sep 2015

arxiv: v1 [math.co] 18 Sep 2015 Improvements on the density o miml -plnr grphs rxiv:509.05548v [mth.co] 8 Sep 05 János Brát MTA-ELTE Geometric nd Algeric Comintorics Reserch Group rt@cs.elte.hu nd Géz Tóth Alréd Rényi Institute o Mthemtics,

More information

The Greedy Method. The Greedy Method

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

More information

From Indexing Data Structures to de Bruijn Graphs

From Indexing Data Structures to de Bruijn Graphs From Indexing Dt Structures to de Bruijn Grphs Bstien Czux, Thierry Lecroq, Eric Rivls LIRMM & IBC, Montpellier - LITIS Rouen June 1, 201 Czux, Lecroq, Rivls (LIRMM) Generlized Suffix Tree & DBG June 1,

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

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

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

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

CSCI 446: Artificial Intelligence

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

More information

Intermediate Information Structures

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

More information

A Fixed Point Approach of Quadratic Functional Equations

A Fixed Point Approach of Quadratic Functional Equations Int. Journl of Mth. Anlysis, Vol. 7, 03, no. 30, 47-477 HIKARI Ltd, www.m-hikri.com http://dx.doi.org/0.988/ijm.03.86 A Fixed Point Approch of Qudrtic Functionl Equtions Mudh Almhlebi Deprtment of Mthemtics,

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

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

Revisiting the notion of Origin-Destination Traffic Matrix of the Hosts that are attached to a Switched Local Area Network

Revisiting the notion of Origin-Destination Traffic Matrix of the Hosts that are attached to a Switched Local Area Network Interntionl Journl of Distributed nd Prllel Systems (IJDPS) Vol., No.6, November 0 Revisiting the notion of Origin-Destintion Trffic Mtrix of the Hosts tht re ttched to Switched Locl Are Network Mondy

More information

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

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

More information

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

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

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

More information

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

I/O Efficient Dynamic Data Structures for Longest Prefix Queries

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

More information

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem Announcements Project : erch It s live! Due 9/. trt erly nd sk questions. It s longer thn most! Need prtner? Come up fter clss or try Pizz ections: cn go to ny, ut hve priority in your own C 88: Artificil

More information

Algorithms for embedded graphs

Algorithms for embedded graphs Algorithms for embedded grphs Éric Colin de Verdière October 4, 2017 ALGORITHMS FOR EMBEDDED GRAPHS Foreword nd introduction Foreword This document is the overlpping union of some course notes tht the

More information

Suffix trees, suffix arrays, BWT

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

More information

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley AI Adjcent Fields Philosophy: Logic, methods of resoning Mind s physicl system Foundtions of lerning, lnguge, rtionlity Mthemtics Forml representtion nd proof Algorithms, computtion, (un)decidility, (in)trctility

More information

Integration. October 25, 2016

Integration. October 25, 2016 Integrtion October 5, 6 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my hve

More information

Orthogonal line segment intersection

Orthogonal line segment intersection Computtionl Geometry [csci 3250] Line segment intersection The prolem (wht) Computtionl Geometry [csci 3250] Orthogonl line segment intersection Applictions (why) Algorithms (how) A specil cse: Orthogonl

More information

Graphs with at most two trees in a forest building process

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

More information

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

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

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

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

More information

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining EECS150 - Digitl Design Lecture 23 - High-level Design nd Optimiztion 3, Prllelism nd Pipelining Nov 12, 2002 John Wwrzynek Fll 2002 EECS150 - Lec23-HL3 Pge 1 Prllelism Prllelism is the ct of doing more

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

Fall 2018 Midterm 2 November 15, 2018

Fall 2018 Midterm 2 November 15, 2018 Nme: 15-112 Fll 2018 Midterm 2 November 15, 2018 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

9.1 apply the distance and midpoint formulas

9.1 apply the distance and midpoint formulas 9.1 pply the distnce nd midpoint formuls DISTANCE FORMULA MIDPOINT FORMULA To find the midpoint between two points x, y nd x y 1 1,, we Exmple 1: Find the distnce between the two points. Then, find the

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

Midterm I Solutions CS164, Spring 2006

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

More information

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

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

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

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

cell 1 cell 2 cell 3 cell 4 a a

cell 1 cell 2 cell 3 cell 4 a a Frequency Assignment for Cellulr Mobile Systems Using Constrint Stisfction Techniques Mkoto Yokooy nd Ktsutoshi Hirymz y NTT Communiction Science Lbortories -4 Hikridi, Seik-cho, Sorku-gun, Kyoto 69-037

More information

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. General Tree Search. Uniform Cost. Lecture 3: A* Search 9/4/2007

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. General Tree Search. Uniform Cost. Lecture 3: A* Search 9/4/2007 CS 88: Artificil Intelligence Fll 2007 Lecture : A* Serch 9/4/2007 Dn Klein UC Berkeley Mny slides over the course dpted from either Sturt Russell or Andrew Moore Announcements Sections: New section 06:

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

Introduction. Chapter 4: Complex Integration. Introduction (Cont d)

Introduction. Chapter 4: Complex Integration. Introduction (Cont d) Introduction Chpter 4: Complex Integrtion Li, Yongzho Stte Key Lbortory of Integrted Services Networks, Xidin University October 10, 2010 The two-dimensionl nture of the complex plne required us to generlize

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

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

CS 321 Programming Languages and Compilers. Bottom Up Parsing

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

More information

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

Typing with Weird Keyboards Notes

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

More information

Journal of Graph Algorithms and Applications

Journal of Graph Algorithms and Applications Journl of Grph Algorithms nd Applictions http://www.cs.brown.edu/publictions/jg/ vol. 5, no. 5, pp. 17 38 (2001) New Bounds for Oblivious Mesh Routing Kzuo Iwm School of Informtics Kyoto University Kyoto

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

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