Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18
|
|
- Eustacia Austin
- 6 years ago
- Views:
Transcription
1 Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re onerned in determining the preserved genes, or more generlly, given two strings nd y, determine ll their possible miml mthes Globl lignment One possibility is to perform globl lignment of nd y with speil soring sheme (for instne +1, 0, 0) nd identify the miml positively soring hunks. Tkes O(mn) time Does not give ll ndidte mthes Might not give miml mthes Emple: = bbbbbb y =------bbb bbbbbb bbb missed non-miml, bbb is better
2 A simple wy: k-mers Another possibility is to find ommon k-mers. Here s one wy: Algorithm: Denote k-mer of by (w, 0, i) where w = i i+k-1 Denote k-mer of y by (z, 1, j) where z = y j y j+k-1 Sort them leiogrphilly Dedue ll k long mthes between nd y Emple: k-mers = bb, y = bbb s 3-mers: (b, 0, 1), (bb, 0, 2), (bb, 0, 3) y s 3-mers: (bb, 1, 1), (b, 1, 2), (b, 1, 3) sort them: (bb, 0, 2), (bb, 0, 3), (bb, 1, 1), (b, 1, 2), (b, 0, 1), (b, 1, 3) Identify mthes: (bb, 0, 3), (bb, 1, 1) nd (b, 0, 1), (b, 1, 3) Disdvntges Worst se running time still O(mn) e.g. O(m) k-mers in nd O(n) k-mers in y re identil. Thought: ren t we supposed to find these nywy nd, therefore, the O(mn) bound is not neessrily bd? No, they might be smll insignifint mthes, we re interested in miml mthes Mking k lrger redues the running time beuse it results in shortest list of mthes, but we might miss signifint mthes
3 A better solution Suffi tree We will use n effiient dt struture lled suffi tree tht stores ll suffies of string nd supports fst lookup Definition: A suffi tree T of string s of length m is rooted tree suh tht: It hs etly m leves numbered 1 to m Eh internl node other thn the root hs t lest two hildren Eh edge is lbeled by substring of s No two edge lbels out of node strt with the sme hrter For ny lef i, the ontention of the edge lbels on the pth from the root to i spells out the suffi i m s = b Emple of suffi tree 3 b b 5 b Eistene Does suffi tree of string s lwys eist? Consider s = b 3 b 6 If suffi is prefi of nother suffi, then the pth for the first suffi would not end t lef! Solution: lwys terminte string with speil hrter $ tht does not our nywhere. b b
4 Properties of suffi tree A suffi tree stisfies the following: E = V 1 (tree) Number of leves = m + 1 (now s = m + 1) Sine eh internl node hs t lest two hildren, the number of edges E = O( leves) = O(m) Any sub-tree with k leves stisfies E = O(k) Building suffi tree Here s simple lgorithm: given = 1 m insert speil hrter $ t the end of s initilize the tree T to one root for j = 1 to m + 1 find the longest mth of j m in T strting from the root nd following unique pth split the edge where the mth stops, dd new node w dd n edge (w,j) (j is the new lef) nd lbel it with the remining unmthed hrters of j m s = b Emple b$ 7 $ b $ b$ b b $ b$ 4 $ $ $ $ $ $ 5 $ 3 2 $ 6 1
5 Anlysis Running time: O(m 2 ) Eh suffi requires O(m) time to updte the tree But, there eists n O(m) time suffi tree lgorithm Spe: O(m) How? Eh lbel hs O(m) hrters nd we hve E = O(m) lbels! Solution: do not epliitly store lbels, but store the indies [i,j] of lbel Now wht? How n we use the suffi tree dt struture to identify ll miml mthes between two strings nd y? Consider first the following problem: given string, determine ll lotions where nother string y ours. This n be solved effiiently s desribed net. Find ll ourrenes of y in string mthing Algorithm build suffi tree T for Mth the hrters of y long the unique pth in T until (se 1) either y is ehusted or (se 2) no more mthes re possible if (se 2) y does not our in else the k leves in the sub-tree below the point of the lst mth give the k lotion of y in (trverse the tree in liner time) O(m) O(n) O(1) O(k)
6 Corretness Why is the string mthing lgorithm orret? If y ours in t position i, then the i th suffi of must strt with y Therefore, lef i must be rehed by the pth determined by y Finding miml mthes Given nd y, we would like to find ll miml mthes between nd y i i+l = y j y j+l Cnnot etend i i+l nd y j y j+l nd obtin mth We will find ll mthes strting t y j tht nnot be etended to the right Build suffi tree for (do this only one) Find the pth in T determined by the longest possible prefi of the suffi y j y n (it ould stop in the middle of n edge e in tht se e is prt of the pth) Let v k, k = 1 p be n internl node on this pth nd T k be the sub-tree rooted t v k tht eludes v k+1 Identify the leves in eh sub-tree root Illustrtion L 1 v 1 L 2 Lst point of mth v 2 T1 v p-1 L p v p m 1 leves T 2 T p-1 T p A lef i in T k gives the lotion in of mth between i i+ L1 + + Lk -1 nd y j y j+ L1 + + Lk -1 tht nnot be etended to the right Running time: O(m) {building T} + O(Σ L k + Σm k ) O(n + m)
7 Wht bout left? Given lef i, let left(i) be the hrter i-1 If left(i) y j-1, then i represents miml mth Therefore, we obtin ll miml mthes between nd y in O(mn) time by repeting the previous lgorithm for every suffi of y Algorithm Build suffi tree T for O(m) for j = 1 to n find the pth in T determined by the longest possible prefi of the suffi y j y n (it ould stop in the middle of n edge e in tht se e is prt of the pth) O(n) let v k, k = 1 p be n internl node on this pth nd T k be the sub-tree rooted t v k tht eludes v k+1 Let l(v k ) = length of mth up to node v k identify ll leves i in eh sub-tree suh tht left(i) y j-1 Suh lef i in sub-tree T k represents miml mth of length l(v k ) strting t position i in nd position j in y O(m) Generlized suffi tree for set of strings We n build suffi tree for set of strings s 1, s 2,, s n Append different end of string mrker to eh string in the set ontente ll the strings together build suffi tree for the ontented string The resulting suffi tree will hve lef for eh suffi of the ontented string nd is build in time proportionl to the sum of ll lengths The lef numbers n be esily onverted to two numbers, one identifying string s i nd the other strting position in s i
8 Emple s 1 = b, s 2 = bbb s = b$bbb 1,6 $bbb 2,7 bb 2,1 b 2,5 2,3 b $bbb 1,3 2,8 $bbb b b$bbb 2,4 $bbb b $bbb b 1,5 2,2 1,2 1,4 1,1 Fi lbels of lef edges One defet is tht the tree now represents suffies tht spn more thn one originl string Beuse eh string mrker ours only one, the unwnted suffies re removed by fiing the lbel on lef edges 1,6 $bbb 2,7 bb 2,1 b 2,5 2,3 b $bbb 1,3 2,8 $bbb b b$bbb 2,4 $bbb b $bbb b 1,5 2,2 1,2 1,4 1,1 Suffi tree for nd y Therefore, given two strings nd y, we n build suffi tree for both in O(m + n) (i.e. liner) time. Eh lef in the tree represents Either suffi from Or suffi from y Mrk eh internl node v with (y) if there is lef in the sub-tree of v representing suffi from (y). This n be done in liner time by bottom up trversl of the tree from leves to the root. Note tht if v is mrked (y), ll nestors of v re mrked (y).
9 Common substrings If αp is substring of nd αq is substring of y for p q, then α orresponds to n internl node v mrked with both nd y nd vie-vers. Proof: α ours in both nd y suh tht the hrter to the right of α in differs from the hrter to the right of α in y. α,y lef for lef for y onversely, every internl node mrked with both nd y hs to stisfy the sitution depited bove, then αp is substring of nd αq is substring of y for p q. Left diverse node An internl node v is left diverse iff it hs two hildren v 1 nd v 2 with lef i for in v 1 s sub-tree nd lef j for y in v 2 s sub-tree, suh tht left(i) left(j) (ssume 0 nd y 0 re different nd distint from ny other hrter) If uαp is substring of nd wαq is substring of y for u w nd p q, then α orresponds to left diverse node v nd vie-vers. Proof: similr to previous proof Cll suh n α miml ommon substring Compt representtion Therefore, we hve only O(m + n) miml ommon substrings for nd y (but eh miml ommon substring might pper in multiple lotions) If we identify left diverse nodes in liner time, we need only O(m + n) time nd spe to ome up with this ompt representtion of ll miml ommon substrings A miml mth n be represented s (p 1, p 2, l) where p 1 nd p 2 re the positions of miml ommon substring of length l in nd y respetively We n obtin ll miml mthes in O(m + n + k) where k is their number (we will not present the lgorithm)
10 Identifying left diverse nodes For eh node the lgorithm reords: the hrter (v): the left hrter of every lef for in v s sub-tree, or speil hrter ε if no lef for eists in v s sub-tree, or speil hrter & the hrter b(v): the left hrter of every lef for y in v s sub-tree, or speil hrter ε if no lef for y eists in v s sub-tree, or speil Computing (v) nd b(v) n be done in bottom up pproh in liner time Note tht v is left diverse iff it hs two hildren v 1 nd v 2 with: (v 1 ) b(v 2 ), (v 1 ) ε, b(v 2 ) ε or b(v 1 ) (v 2 ), b(v 1 ) ε, (v 2 ) ε It tkes O( Σ 2 ) time (onstnt) to find two suh hildren or none, where Σ is the lphbet (eh node hs t most Σ hildren)
Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh
Computtionl Biology Leture 8: Genome rerrngements, finding miml mthes Sd Mneimneh We hve seen how to rerrnge genome to otin nother one sed on reversls nd the knowledge of the preserved loks or genes. Now
More informationPrefix-Free Regular-Expression Matching
Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings
More information11/3/13. Indexing techniques. Short-read mapping software. Indexing a text (a genome, etc) Some terminologies. Hashing
I9 Introdution to Bioinformtis, 0 Indeing tehniques Yuzhen Ye (yye@indin.edu) Shool of Informtis & Computing, IUB Contents We hve seen indeing tehnique used in BLAST Applitions tht rely on n effiient indeing
More informationData Structures LECTURE 10. Huffman coding. Example. Coding: problem definition
Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt
More informationAlgorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:
Eidgenössishe Tehnishe Hohshule Zürih Eole polytehnique fédérle de Zurih Politenio federle di Zurigo Federl Institute of Tehnology t Zurih Deprtement of Computer Siene. Novemer 0 Mrkus Püshel, Dvid Steurer
More informationAutomata and Languages
Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive
More informationLecture 6: Coding theory
Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those
More informationCMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)
CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All
More informationFinite State Automata and Determinisation
Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions
More information, g. Exercise 1. Generator polynomials of a convolutional code, given in binary form, are g. Solution 1.
Exerise Genertor polynomils of onvolutionl ode, given in binry form, re g, g j g. ) Sketh the enoding iruit. b) Sketh the stte digrm. ) Find the trnsfer funtion T. d) Wht is the minimum free distne of
More informationOn-Line Construction. of Suffix Trees. Overview. Suffix Trees. Notations. goo. Suffix tries
On-Line Cnstrutin Overview Suffix tries f Suffix Trees E. Ukknen On-line nstrutin f suffix tries in qudrti time Suffix trees On-line nstrutin f suffix trees in liner time Applitins 1 2 Suffix Trees A suffix
More informationAlignment of Long Sequences. BMI/CS Spring 2016 Anthony Gitter
Alignment of Long Sequences BMI/CS 776 www.biostt.wisc.edu/bmi776/ Spring 2016 Anthony Gitter gitter@biostt.wisc.edu Gols for Lecture Key concepts how lrge-scle lignment differs from the simple cse the
More information22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:
22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)
More informationTechnische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution
Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:
More informationNON-DETERMINISTIC FSA
Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is
More informationThe Riemann-Stieltjes Integral
Chpter 6 The Riemnn-Stieltjes Integrl 6.1. Definition nd Eistene of the Integrl Definition 6.1. Let, b R nd < b. ( A prtition P of intervl [, b] is finite set of points P = { 0, 1,..., n } suh tht = 0
More information1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.
1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the
More informationTutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.
Mth 5 Tutoril Week 1 - Jnury 1 1 Nme Setion Tutoril Worksheet 1. Find ll solutions to the liner system by following the given steps x + y + z = x + y + z = 4. y + z = Step 1. Write down the rgumented mtrix
More informationCS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6
CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized
More informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More
More informationConvert the NFA into DFA
Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:
More informationCSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4
Am Blnk Leture 13 Winter 2016 CSE 332 CSE 332: Dt Astrtions Sorting Dt Astrtions QuikSort Cutoff 1 Where We Are 2 For smll n, the reursion is wste. The onstnts on quik/merge sort re higher thn the ones
More information6.5 Improper integrals
Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =
More informationThe Double Integral. The Riemann sum of a function f (x; y) over this partition of [a; b] [c; d] is. f (r j ; t k ) x j y k
The Double Integrl De nition of the Integrl Iterted integrls re used primrily s tool for omputing double integrls, where double integrl is n integrl of f (; y) over region : In this setion, we de ne double
More informationNon-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1
Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet
More informationArrow s Impossibility Theorem
Rep Voting Prdoxes Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Voting Prdoxes Properties Arrow s Theorem Leture Overview 1 Rep
More informationExercise sheet 6: Solutions
Eerise sheet 6: Solutions Cvet emptor: These re merel etended hints, rther thn omplete solutions. 1. If grph G hs hromti numer k > 1, prove tht its verte set n e prtitioned into two nonempt sets V 1 nd
More informationPart 4. Integration (with Proofs)
Prt 4. Integrtion (with Proofs) 4.1 Definition Definition A prtition P of [, b] is finite set of points {x 0, x 1,..., x n } with = x 0 < x 1
More information19 Optimal behavior: Game theory
Intro. to Artificil Intelligence: Dle Schuurmns, Relu Ptrscu 1 19 Optiml behvior: Gme theory Adversril stte dynmics hve to ccount for worst cse Compute policy π : S A tht mximizes minimum rewrd Let S (,
More informationPreview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms
Preview Greed Algorithms Greed Algorithms Coin Chnge Huffmn Code Greed lgorithms end to e simple nd strightforwrd. Are often used to solve optimiztion prolems. Alws mke the choice tht looks est t the moment,
More informationCounting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs
Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if
More informationChapter 4 State-Space Planning
Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different
More informationFast index for approximate string matching
Fst index for pproximte string mthing Dekel Tsur Astrt We present n index tht stores text of length n suh tht given pttern of length m, ll the sustrings of the text tht re within Hmming distne (or edit
More informationCommon intervals of genomes. Mathieu Raffinot CNRS LIAFA
Common intervls of genomes Mthieu Rffinot CNRS LIF Context: omprtive genomis. set of genomes prtilly/totlly nnotte Informtive group of genes or omins? Ex: COG tse Mny iffiulties! iology Wht re two similr
More informationCS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa
CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr
More informationp-adic Egyptian Fractions
p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction
More information(a) A partition P of [a, b] is a finite subset of [a, b] containing a and b. If Q is another partition and P Q, then Q is a refinement of P.
Chpter 7: The Riemnn Integrl When the derivtive is introdued, it is not hrd to see tht the it of the differene quotient should be equl to the slope of the tngent line, or when the horizontl xis is time
More informationCS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata
CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or
More informationSolutions to Assignment 1
MTHE 237 Fll 2015 Solutions to Assignment 1 Problem 1 Find the order of the differentil eqution: t d3 y dt 3 +t2 y = os(t. Is the differentil eqution liner? Is the eqution homogeneous? b Repet the bove
More informationConnectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example
Connetiit in Grphs CSH: Disrete Mthemtis Grph Theor II Instrtor: Işıl Dillig Tpil qestion: Is it possile to get from some noe to nother noe? Emple: Trin netork if there is pth from to, possile to tke trin
More informationIntroduction to Olympiad Inequalities
Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................
More informationA Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version
A Lower Bound for the Length of Prtil Trnsversl in Ltin Squre, Revised Version Pooy Htmi nd Peter W. Shor Deprtment of Mthemtil Sienes, Shrif University of Tehnology, P.O.Bo 11365-9415, Tehrn, Irn Deprtment
More informationArrow s Impossibility Theorem
Rep Fun Gme Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Fun Gme Properties Arrow s Theorem Leture Overview 1 Rep 2 Fun Gme 3 Properties
More informationThe First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).
The Fundmentl Theorems of Clculus Mth 4, Section 0, Spring 009 We now know enough bout definite integrls to give precise formultions of the Fundmentl Theorems of Clculus. We will lso look t some bsic emples
More informationQUADRATIC EQUATION. Contents
QUADRATIC EQUATION Contents Topi Pge No. Theory 0-04 Exerise - 05-09 Exerise - 09-3 Exerise - 3 4-5 Exerise - 4 6 Answer Key 7-8 Syllus Qudrti equtions with rel oeffiients, reltions etween roots nd oeffiients,
More informationNon Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51
Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices
More informationModule 9: Tries and String Matching
Module 9: Tries nd String Mtching CS 240 - Dt Structures nd Dt Mngement Sjed Hque Veronik Irvine Tylor Smith Bsed on lecture notes by mny previous cs240 instructors Dvid R. Cheriton School of Computer
More informationModule 9: Tries and String Matching
Module 9: Tries nd String Mtching CS 240 - Dt Structures nd Dt Mngement Sjed Hque Veronik Irvine Tylor Smith Bsed on lecture notes by mny previous cs240 instructors Dvid R. Cheriton School of Computer
More informationMath Lecture 23
Mth 8 - Lecture 3 Dyln Zwick Fll 3 In our lst lecture we delt with solutions to the system: x = Ax where A is n n n mtrix with n distinct eigenvlues. As promised, tody we will del with the question of
More informationCS 573 Automata Theory and Formal Languages
Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple
More informationLooking for All Palindromes in a String
Looking or All Plindromes in String Shih Jng Pn nd R C T Lee Deprtment o Computer Science nd Inormtion Engineering, Ntionl Chi-Nn University, Puli, Nntou Hsien,, Tiwn, ROC sjpn@lgdoccsiencnuedutw, rctlee@ncnuedutw
More informationCS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility)
CS5371 Theory of Computtion Lecture 20: Complexity V (Polynomil-Time Reducibility) Objectives Polynomil Time Reducibility Prove Cook-Levin Theorem Polynomil Time Reducibility Previously, we lernt tht if
More informationUniversitaireWiskundeCompetitie. Problem 2005/4-A We have k=1. Show that for every q Q satisfying 0 < q < 1, there exists a finite subset K N so that
Problemen/UWC NAW 5/7 nr juni 006 47 Problemen/UWC UniversitireWiskundeCompetitie Edition 005/4 For Session 005/4 we received submissions from Peter Vndendriessche, Vldislv Frnk, Arne Smeets, Jn vn de
More informationA-Level Mathematics Transition Task (compulsory for all maths students and all further maths student)
A-Level Mthemtics Trnsition Tsk (compulsory for ll mths students nd ll further mths student) Due: st Lesson of the yer. Length: - hours work (depending on prior knowledge) This trnsition tsk provides revision
More informationBIFURCATIONS IN ONE-DIMENSIONAL DISCRETE SYSTEMS
BIFRCATIONS IN ONE-DIMENSIONAL DISCRETE SYSTEMS FRANCESCA AICARDI In this lesson we will study the simplest dynmicl systems. We will see, however, tht even in this cse the scenrio of different possible
More informationIntroduction to Bioinformatics
Introdution to Bioinformtis Outline } Method without onsidering bkground distribution } Generl pproh onsidering bkground distribution } Wys to speed up the lgorithm Trnsription Ftor Binding Sites (TFBSs)
More informationEllipses. The second type of conic is called an ellipse.
Ellipses The seond type of oni is lled n ellipse. Definition of Ellipse An ellipse is the set of ll points (, y) in plne, the sum of whose distnes from two distint fied points (foi) is onstnt. (, y) d
More informationFirst Midterm Examination
24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet
More informationConnected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs
Prm University, Mth. Deprtment Summry of lecture 9 Algorithms nd Dt Structures Disjoint sets Summry of this lecture: (CLR.1-3) Dt Structures for Disjoint sets: Union opertion Find opertion Mrco Pellegrini
More informationCS241 Week 6 Tutorial Solutions
241 Week 6 Tutoril olutions Lnguges: nning & ontext-free Grmmrs Winter 2018 1 nning Exerises 1. 0x0x0xd HEXINT 0x0 I x0xd 2. 0xend--- HEXINT 0xe I nd ER -- MINU - 3. 1234-120x INT 1234 INT -120 I x 4.
More informationState space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies
Stte spce systems nlysis (continued) Stbility A. Definitions A system is sid to be Asymptoticlly Stble (AS) when it stisfies ut () = 0, t > 0 lim xt () 0. t A system is AS if nd only if the impulse response
More informationNondeterministic Automata vs Deterministic Automata
Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n
More information1. Extend QR downwards to meet the x-axis at U(6, 0). y
In the digrm, two stright lines re to be drwn through so tht the lines divide the figure OPQRST into pieces of equl re Find the sum of the slopes of the lines R(6, ) S(, ) T(, 0) Determine ll liner functions
More information1.4 Nonregular Languages
74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll
More informationCS375: Logic and Theory of Computing
CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks
More informationWhere did dynamic programming come from?
Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf
More information5.7 Improper Integrals
458 pplictions of definite integrls 5.7 Improper Integrls In Section 5.4, we computed the work required to lift pylod of mss m from the surfce of moon of mss nd rdius R to height H bove the surfce of the
More informationIntermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths
Intermedite Mth Cirles Wednesdy 17 Otoer 01 Geometry II: Side Lengths Lst week we disussed vrious ngle properties. As we progressed through the evening, we proved mny results. This week, we will look t
More informationPeriodic string comparison
Periodi string omprison Alexnder Tiskin Deprtment of Computer Siene University of Wrwik http://www.ds.wrwik..uk/~tiskin Alexnder Tiskin (Wrwik) Periodi string omprison 1 / 51 1 Introdution 2 Semi-lol string
More informationIs there an easy way to find examples of such triples? Why yes! Just look at an ordinary multiplication table to find them!
PUSHING PYTHAGORAS 009 Jmes Tnton A triple of integers ( bc,, ) is clled Pythgoren triple if exmple, some clssic triples re ( 3,4,5 ), ( 5,1,13 ), ( ) fond of ( 0,1,9 ) nd ( 119,10,169 ). + b = c. For
More informationStrong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation
Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32
More informationFaster Regular Expression Matching. Philip Bille Mikkel Thorup
Fster Regulr Expression Mtching Philip Bille Mikkel Thorup Outline Definition Applictions History tour of regulr expression mtching Thompson s lgorithm Myers lgorithm New lgorithm Results nd extensions
More informationApril 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then.
pril 8, 2017 Mth 9 Geometry Solving vetor prolems Prolem Prove tht if vetors nd stisfy, then Solution 1 onsider the vetor ddition prllelogrm shown in the Figure Sine its digonls hve equl length,, the prllelogrm
More informationLecture 1 - Introduction and Basic Facts about PDEs
* 18.15 - Introdution to PDEs, Fll 004 Prof. Gigliol Stffilni Leture 1 - Introdution nd Bsi Fts bout PDEs The Content of the Course Definition of Prtil Differentil Eqution (PDE) Liner PDEs VVVVVVVVVVVVVVVVVVVV
More informationNew Expansion and Infinite Series
Interntionl Mthemticl Forum, Vol. 9, 204, no. 22, 06-073 HIKARI Ltd, www.m-hikri.com http://dx.doi.org/0.2988/imf.204.4502 New Expnsion nd Infinite Series Diyun Zhng College of Computer Nnjing University
More informationAlgorithm Design and Analysis
Algorithm Design nd Anlysis LECTURE 5 Supplement Greedy Algorithms Cont d Minimizing lteness Ching (NOT overed in leture) Adm Smith 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov,
More information20 MATHEMATICS POLYNOMIALS
0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of
More informationFinite Automata-cont d
Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww
More informationDuality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.
Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we
More informationAQA Further Pure 2. Hyperbolic Functions. Section 2: The inverse hyperbolic functions
Hperbolic Functions Section : The inverse hperbolic functions Notes nd Emples These notes contin subsections on The inverse hperbolic functions Integrtion using the inverse hperbolic functions Logrithmic
More informationCSC 473 Automata, Grammars & Languages 11/9/10
CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is
More informationCH 9 INTRO TO EQUATIONS
CH 9 INTRO TO EQUATIONS INTRODUCTION I m thinking of number. If I dd 10 to the number, the result is 5. Wht number ws I thinking of? R emember this question from Chpter 1? Now we re redy to formlize the
More information(e) if x = y + z and a divides any two of the integers x, y, or z, then a divides the remaining integer
Divisibility In this note we introduce the notion of divisibility for two integers nd b then we discuss the division lgorithm. First we give forml definition nd note some properties of the division opertion.
More informationBisimulation, Games & Hennessy Milner logic
Bisimultion, Gmes & Hennessy Milner logi Leture 1 of Modelli Mtemtii dei Proessi Conorrenti Pweł Soboiński Univeristy of Southmpton, UK Bisimultion, Gmes & Hennessy Milner logi p.1/32 Clssil lnguge theory
More informationHW3, Math 307. CSUF. Spring 2007.
HW, Mth 7. CSUF. Spring 7. Nsser M. Abbsi Spring 7 Compiled on November 5, 8 t 8:8m public Contents Section.6, problem Section.6, problem Section.6, problem 5 Section.6, problem 7 6 5 Section.6, problem
More informationGreen s Theorem. (2x e y ) da. (2x e y ) dx dy. x 2 xe y. (1 e y ) dy. y=1. = y e y. y=0. = 2 e
Green s Theorem. Let be the boundry of the unit squre, y, oriented ounterlokwise, nd let F be the vetor field F, y e y +, 2 y. Find F d r. Solution. Let s write P, y e y + nd Q, y 2 y, so tht F P, Q. Let
More informationElectromagnetism Notes, NYU Spring 2018
Eletromgnetism Notes, NYU Spring 208 April 2, 208 Ation formultion of EM. Free field desription Let us first onsider the free EM field, i.e. in the bsene of ny hrges or urrents. To tret this s mehnil system
More informationCS 491G Combinatorial Optimization Lecture Notes
CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,
More informationHyers-Ulam stability of Pielou logistic difference equation
vilble online t wwwisr-publitionsom/jns J Nonliner Si ppl, 0 (207, 35 322 Reserh rtile Journl Homepge: wwwtjnsom - wwwisr-publitionsom/jns Hyers-Ulm stbility of Pielou logisti differene eqution Soon-Mo
More information1 From NFA to regular expression
Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work
More informationFor convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir
CSCI 2400 Models of Computtion, Section 3 Solutions to Homework 4 Problem 1. ll the solutions below refer to the Pumping Lemm of Theorem 4.8, pge 119. () L = f n b l k : k n + lg Let's ssume for contrdiction
More informationParse trees, ambiguity, and Chomsky normal form
Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs
More informationDATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018
DATA620006 魏忠钰 Serch I Mrch 7 th, 2018 Outline Serch Problems Uninformed Serch Depth-First Serch Bredth-First Serch Uniform-Cost Serch Rel world tsk - Pc-mn Serch problems A serch problem consists of:
More informationThe Islamic University of Gaza Faculty of Engineering Civil Engineering Department. Numerical Analysis ECIV Chapter 11
The Islmic University of Gz Fculty of Engineering Civil Engineering Deprtment Numericl Anlysis ECIV 6 Chpter Specil Mtrices nd Guss-Siedel Associte Prof Mzen Abultyef Civil Engineering Deprtment, The Islmic
More informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt
More informationFinite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh
Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is
More informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt
More informationFinite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh
Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions
More informationIntermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4
Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one
More information