Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh

Size: px
Start display at page:

Download "Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh"

Transcription

1 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 we re onerned with determining those preserved genes. More generlly, given two strings nd y we would like to find ll the miml mthes etween them. Glol lignments One possiility is to perform glol lignment of the two strings nd y with speil soring sheme; for instne, + for mth, 0 for mismth, nd 0 for gp. Then we ould identify ll the miml positively soring hunks of the lignment. The disdvntges of this pproh is tht it requires O(mn) running time, might not otin ll ndidte mthes, nd otins mthes tht re not neessrily miml. Here s n emple: = y = Then n optiml lignment might e: The ove lignment find the mthes ([..], y[..]) = nd ([7..9], y[..]) =. While the first mth is miml (it nnot e etended to the left or to the right), the seond mth is not sine it n e etended to. Moreover, the lignment missed mny miml mthes mong whih the miml mth ([..], y[..]) =. k-mers Another possiility for identifying possile miml mthes etween nd y is to find their ommon k-mers. Rell tht k-mer is simply k long sustring. Here s n lgorithm: Denote k-mer of y (w, 0, i) where w = i... i+k Denote k-mer of y y (z,, j) where z = y j...y j+k Sort them leiogrphilly (i.e. ditionry order) Dedue ll k long mthes etween nd y Emple (k = ): = y = s -mers: (, 0, ), (, 0, ), (, 0, ) y s -mers: (,, ), (,, ), (,, ) sort them: (, 0, ), (, 0, ), (,, ), (,, ), (, 0, ), (,, ) Identify mthes: (, 0, ), (,, ) nd (, 0, ), (,, )

2 The worst se running time of this lgorithm is still O(mn) e.g. we n hve O(m) k-mers in nd O(n) k-mers in y tht re identil. However, it is etter thn ove euse it is tully O((m + n) log(m + n) + L), where L is the numer of mthes; wheres the running time of glol lignment is O(mn) regrdless of the numer of mthes. The disdvntge of this pproh is tht mthes re not neessrily miml nd, therefore, we spend O(L) time on finding short mthes tht we re not relly looking for. A possile solution would e to inrese k, whih redues L nd hene the runnig time, nd inreses our hnes of otining miml mthes. However, this would men tht we will miss the short (less thn k, ut signifint) miml mthes! So y setting vlue for k, we re mking ompromise mong the long nd short miml mthes nd the running time of the lgorithm. An et solution Here s solution tht will give ll miml mthes etween two strings nd y. Construt the mtri P suh tht P (i, j)= if i = y j, nd P (i, j) = 0 otherwise. Clerly mth of length k strting t i nd y j will orrespond to digonl in the mtri P (i, j), P (i +, j + ),..., P (i + k, j + k ). The mth is miml if P (i, j ) = 0 (or i = or j = ) nd P (i + k, j + k) = 0 (or i + k = m or j + k = n). Therefore, ll miml mthes n e otined in O(mn) time in the following wy: First onstrut the mtri P. Then in rowwise mnner, hek if P (i, j) is the strt of miml mth, i.e. if P (i, j ) = 0 (or does not eist). If P (i, j) is the strt of miml mth, follow the mth long the digonl P (i, j), P (i+, j +),..., P (i+k, j +k ) suh tht P (i + k, j + k) = 0 (or does not eist). Construting the mtri tkes O(mn) time. Cheking whether P (i, j) is the strt of mth tkes O() time for totl of O(mn) time for ll P (i, j) s. Eh digonl is investigted one nd ll digonls re disjoint (miml); therefore, finding the mthes tkes n dditionl O(mn) time. Below we desrie dt struture tht will llow us to otin ll miml mthes in O(m + n + k), where k is their numer. Suffi trees To find miml mthes etween nd y we will use n effiient dt struture lled suffi tree. A suffi tree for string s sores ll suffies of s nd supports fst lookup, e.g. it requires O(l) time to find whether string of length l is sustring of s. Definition: A suffi tree T for string s of length m is rooted tree suh tht: It hs etly m leves numered to m Eh internl node other thn the root hs t lest two hildren Eh edge is leled y sustring of s No two edge lels on outgoing edges of node strt with the sme hrter For ny lef i, the ontention of the edge lels on the pth from the root to i spells out the suffi i... m Below is n emple of suffi tree for s = : 6 Figure : Suffi tree for s = The definition of suffi tree ove does not gurntee the eistene of suffi tree for every string s. In ft, suffi tree stisfying ll of the ove onditions is not gurnteed to eist.

3 Consider for instne the string s =, i.e. remove tht lst hrter from the ove emple. There must e pth from the root to lef numer tht spells. Also, there must e pth from the root to lef numer tht spells. Sine two edges t node nnot strt with the sme hrter, the portion of the pth tht spells must e shred y the two pths. Therefore, lef hs to e n internl node s well, whih nnot hppen! This prolem rises when suffi of s is prefi of nother suffi of s. Therefore, we n eliminte the prolem y terminting the string s with speil end mrker tht is gurnteed not to our nywhere in s. As result, suffi of s (now lwys ending in ) n never e prefi of nother suffi, nd this gurntees tht the suffi tree esits. Let us look t the properties of suffi tree T with set of nodes V nd set of edges E: E = V ( tree) Numer of leves is m (ssume s = m inluding the speil end mrker) Sine every internl node, other thn the root, hs t lest two hildren, E = O(leves) = O(m) More generlly, ny sutree S of T with k leves stisfies E S = O(k) Here s simple lgorithm for uilding suffi tree: Algorithm given s = s...s m insert speil end mrker t the end of s initilize the suffi tree T to one root for j = to m + do 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 lel it with the remining unmthed hrters of j... m It is esy to prove tht the ove lgorithm produes suffi tree for s y heking ll the onditions tht suffi tree hs to stisfy. We will leve the proof s simple eerise. Here s the sme emple of s = repeted, showing the ove lgorithm step y step. () () () 6 () () (6) 7 6 (7)

4 Let us now nlyze the time nd spe requirement of the ove lgorithm. The running time is O(m ) sine eh suffi requires n O(m) time (dominted y the mthing of suessive hrters) to updte the suffi tree. The spe required y the ove lgorithm is O(m ) s well euse eh edge stores n O(m) size lel nd we hve O(m) edges s desried erlier (look t the properties of suffi tree ove). This spe requirement n, however, e redued to only O(m) y not epliitly storing lel i... j, ut impliitly y storing [i, j], i.e. the indies mrking the strt nd end of the lel in s. Therefore, we hve n O(m ) time nd O(m) spe lgorithm for uilding suffi tree T for string s of length m. There eists n O(m) time lgorithm (hene O(m) spe s well) for uilding suffi tree. We re not going to desrie it here euse it is too omplited nd not so importnt y itself. So we will ssume the eistene of liner time nd spe lgorithm for uilding suffi tree. But now tht we hve suffi tree dt struture, how n we use it effiiently to find ll miml mthed etween two strings nd y. Well, let us look t simpler prolem first whih is very fmous prolem in omputer siene: the string mthing prolem. String Mthing: Given string nd string y, find ll lotions in where y ours. Here s n lgorithm for string mthing: Algorithm uild suffi tree T for mth the hrters of y long unique pth in T until (se ) either y is ehusted, or (se ) no more mthes re possile O(m) O(n) if (se ), y does not our in else the k leves in the su-tree elow the point of the lst mth give the k lotion of y in (trverse the tree in liner time) O(k) Why is the ove lgorithm orret? Simply euse if y ours in t position i, then the i th suffi of must strt with y. As result, lef i must e rehed in T from the root y pth strting with y; therefore, ll suh leves re in the sutree indentified y the lgorithm. The ove lgorithm runs in O(m + n + k) where m is the length of, n is the legnth of y, nd k is the numer of lotions where y ours in. Sine the input hs size O(m + n) nd the output hs size O(k), this is optiml! For otining the miml mthes of nd y, we re going to follow the sme spirit of string mthing y finding lotions of sustrings of y in. But if we do it for every sustring of y, then we spend O(n (m + n)) = O(n m) time, nd for eh mth we find we hve to further hek whether it is miml or not. We will e more intelligent nd hek only for the suffies of y hene spending O(n(m + n)) = O(mn) time. Here s wht we re going to do: we re interested in mthes of the form i... i+l = y j...y j+l suh tht i... i+l y j...y j+l (nnot e etended to the right) nd i... i+l y j...y j+l (nnot e etended to the left). For suffi of y, y j...y n, we will find ll mthes strting t y j tht nnot e etended to the right. Then we will find wy to drop ll those mthes mong them tht n e etended to the left. Finlly, doing this for ll suffies of y results in ll miml mthes of nd y. Here s how to find ll mthes strting t y j tht nnot e etended to the right: Build suffi tree for (we will do this only one) Find the pth in T determined y the longest possile 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 =..p e n internl node on this pth nd T k e the sutree rooted t v k tht eludes v k+ Identify the leves in eh sutree, eh lef orresponds to lotion of mth tht nnot e etended to the right The following figure illustrtes the ide:

5 root L v L Lst point of mth v T v p- L p v p m leves T T p- T p Figure : Finding mthes strting t y j tht nnot e etended to the right In the figure ove, every lef i in sutree T k gives the lotion i in of mth etween i... i+ L L k nd y j...y j+ L L k tht nnot e etended to the right. Given the suffi tree for, these n e found in O( L k + m k ) = O(n + m) time. A mth found ove is not neessrily miml sine it is possile tht we n etend it to the left. Therefore, for every lef i we find, we hve to hek whether it orresponds to miml mth or not. Given lef i, let left(i) e the hrter i (define 0 nd y 0 to e distint speil hrters). When uilding the suffi tree for, left(i) for every lef i n e stored t the lef. Now it is ovious tht if left(i) y j, then i represents miml mth, nd this is simple hek. Therefore, we otin ll miml mthes etween nd y y repeting the ove proess for every suffi of y, resulting in n O(mn) time lgorithm. Algorithm uild suffi tree T for O(m) for j = to n O(n) do O(m + n) find the pth in T determined y the longest possile 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 =..p e n internl node on this pth nd T k e the sutree rooted t v k tht eludes v k+ let l(v k ) = length of mth up to node v k identify ll leves i in eh sutree T k, k =..p, suh tht left(i) y j Suh lef i in sutree T k represents miml mth of length l(v k ) strting t position i in nd position j in y The running time of the lgorithm ove is O(mn), hene we find ll miml mthes of nd y in O(mn) time. We did not fulfill our promise for liner time lgoritm. As we mentioned efore, it is possile to find ll miml mthes of nd y in O(m + n + k) time, where k is the numer of those mthes. The following setion eplins how. Generlized sufi tree The min deffiieny using the O(mn) time ound for the lgorithm ove summrizes in tht we hve to repet the min mthing proess n times, one for every suffi of y. Wht if we ould inorporte ll suffies of s well s those of y in the sme single suffi tree?, nd do it one?, then we ould possily void the need to hek for every suffi of y; sine ll the informtion will e omptly ptured in one suffi tree. This is the min ide of this setion. A generlized suffi tree for strings s, s,..., s k is suffi tree tht stores ll suffies of s, ll sufies of s,..., ll suffies of s k.

6 Here s simple lgorithm to uild suh generlized suffi tree for set of strings sed on suffi tree lgorithm for single string. ppend different end mrker to eh string in the set {s,..., s k } ontente ll the strings together to form single string s = s...s k uild suffi tree for the ontented string s The resulting suffi tree will hve lef for eh suffi of the ontented string nd is uilt in O( s s k ) time, i.e. liner time in the size of ll k strings. The lef numers n e esily onverted to two numers, one identifying string s i nd the other strting position in s i. Figure shows the generlized suffi tree for s = nd s =. s =, s = s =,6,7,,,,,8,,,,,, Figure : Generlized suffi tree for s nd s As it might e ovious, defet of this lgorithm is tht the tree now represents suffies (of the ontented string) tht spn more thn one originl string. These syntheti suffies re not generlly of interest. However, euse end of string mrker is distint nd is not in ny of the originl strings, the lel on ny pth from the root to n internl node must e sustring of one of the originl strings. Hene y reduing the seond inde of the lel on lef edges only, ll unwnted syntheti suffies re removed. Figure illustrtes the ide.,7,6,,,,,,8,,,,, Figure : Fiing lels on lef edges only 6

7 Therefore, given two strings nd y of length m nd n respetively, we n uild suffi tree for oth in O(m + n) time. Eh lef in the tree represents either suffi for or suffi for y. A lef (, i) represents the i th suffi of nd lef (, j) represents the j th suffi of y. Now mrk eh internl node v with (y) if there is lef in the sutree of v representing suffi of (y). This n e done in liner time y ottom up trversl of the tree from leves to the root. Note tht if v is mrked (y), ll nestors of v re mrked (y). Lemm: If αp is sustring of nd αq is sustring of y for p q, then α orresponds to n internl node v mrked with oth nd y nd vie-vers. Proof: α ours in oth nd y suh tht the hrter to the right of α in differs from the hrter to the right of α in y. Therefore, there must e node in the suffi tree tht orresponds to pth leled α from whih there is n edge whose lel strts with p leding to lef for, nd n edge whose lel strts with q leding to lef for y. Hene, the node is n internl node mrked with oth nd y. Conversely, if we hve n internl node v leled oth nd y then let α e the ontention of lels on the pth from the root to v. There is pth from v to lef i for nd pth from v to lef j for y. If the two pths strt with distint edges e nd e, then we re done: let p e the first hrter of e s lel nd q e the first hrter of e lel, p q. Then αp is sustring of nd αq is sustring of y. So ssume e = e = e nd hene p = q. But sine v is rning node, there must e n edge f from v whose lel strts with w p. The edge f must led to either lef for or lef for y. If f leds to lef for, then e leds to lef j for y nd we re done. If f leds to lef for y, then f leds to lef i for nd we re done. Definition: An internl node v is left diverse iff it hs two hildren v nd v with lef i for in v s sutree nd lef j for y in v s sutree, suh tht left(i) left(j). Lemm: If uαp is sustring of nd wαq is sustring of y for u w nd p q, then α orresponds to left diverse node v nd vie-vers. Proof: similr to the previous proof. We ll suh n α miml ommon sustring. Therefore, we hve only O(m + n) miml ommon sustrings for nd y represented y the left diverse nodes of the suffi tree (ut eh miml ommon sustring 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 sustrings. A miml mth n e represented s (p, p, l) where p nd p re the lotions of miml ommon sustring of length l in nd y respetively. We n otin ll miml mthes in O(m + n + k) where k is their numer. We will not desrie the lgorithm in detil here ut you n refer to Gusfield D, Algorithms on Strings, Trees nd Sequenes pges -, 7, Prolem 7 pge 7. First we present n lgorithm for identifying left diverse nodes in liner time, then desrie riefly how to modify this lgorithm to otin ll miml mthes in O(m + n + k). The lgorithm for identifying left diverse nodes is s follows. For eh node v, the lgorithm reords two hrters (v) nd (v) suh tht the hrter (v) is: the left hrter of every lef for in v s sutree, or speil hrter ɛ if no lef for eists in v s sutree, or speil dinstint hrter The hrter (v) is defined similrly y repling ove with y. Computing (v) nd (v) n e done in uttom up pproh in liner time. Then it is ovious tht v is left diverse iff it hs two hildren v nd v suh tht: (v ) (v ), (v ) ɛ, (v ) ɛ, or (v ) (v ), (v ) ɛ, (v ) ɛ It tkes O( ) time (onstnt) to find two suh hildren or none, where is the lphet (eh node hs t most hildren). 7

8 To otin ll miml mthes we n mintin t eh node v nd for eh hrter of the lphet: list L v,, of leves for in v s sutree suh tht left(i) = for ll i L v,, list L v,y, of leves for y in v s sutree suh tht left(j) = for ll i L v,y, Clerly node v is left diverse iff if hs two hildren v nd v suh tht L v,, nd L v,y, nd. Then for every (left diverse) node v nd ll hrters, the rtesin produt of L v,, nd L v,y, for ll hildren v nd v of v gives the strting positions of ll miml mthes orresponding to node v. Building the lists t every node v n e done y merging ll lists of its hildren (opying is no good sine it will tke O(m + n) time t eh node). This of ourse will destroy the hildren s lists, ut lukily those lists re not needed one ll miml mthes orresponding to v hve een identified. Therefore, uilding the lists n e done in ottom up pproh nd tkes liner time (ssuming onstnt lphet size). Moreover, the time for performing the rtesin produt of lists is proportionl to the numer of miml mthes. Hene we hve n O(m + n + k) time lgorithm. Referenes Gusfield D., Algorithms on Strings, Trees, nd Sequenes, Chpters, 6, 7. 8

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18 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

More information

1 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. 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 information

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Algorithms & 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 information

NON-DETERMINISTIC FSA

NON-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 information

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix tries Definition of tri mtri is regulr rry of numers enlosed inside rkets SCHOOL OF ENGINEERING & UIL ENVIRONEN Emple he following re ll mtries: ), ) 9, themtis ), d) tries Definition of tri Size of tri

More information

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Technische 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 information

Finite State Automata and Determinisation

Finite 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

Lecture 6: Coding theory

Lecture 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 information

Prefix-Free Regular-Expression Matching

Prefix-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 information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting 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 information

Chapter 4 State-Space Planning

Chapter 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 information

1 Nondeterministic Finite Automata

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

More information

CS 573 Automata Theory and Formal Languages

CS 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 information

Arrow s Impossibility Theorem

Arrow 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 information

6.5 Improper integrals

6.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 information

Fast index for approximate string matching

Fast 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 information

Lecture Notes No. 10

Lecture Notes No. 10 2.6 System Identifition, Estimtion, nd Lerning Leture otes o. Mrh 3, 26 6 Model Struture of Liner ime Invrint Systems 6. Model Struture In representing dynmil system, the first step is to find n pproprite

More information

TOPIC: LINEAR ALGEBRA MATRICES

TOPIC: LINEAR ALGEBRA MATRICES Interntionl Blurete LECTUE NOTES for FUTHE MATHEMATICS Dr TOPIC: LINEA ALGEBA MATICES. DEFINITION OF A MATIX MATIX OPEATIONS.. THE DETEMINANT deta THE INVESE A -... SYSTEMS OF LINEA EQUATIONS. 8. THE AUGMENTED

More information

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

A 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 information

Introduction to Olympiad Inequalities

Introduction 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 information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Project 6: Minigoals Towards Simplifying and Rewriting Expressions MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: 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 information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 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 information

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Data 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 information

April 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then.

April 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 information

Algorithm Design and Analysis

Algorithm 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 information

CS 491G Combinatorial Optimization Lecture Notes

CS 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 information

12.4 Similarity in Right Triangles

12.4 Similarity in Right Triangles Nme lss Dte 12.4 Similrit in Right Tringles Essentil Question: How does the ltitude to the hpotenuse of right tringle help ou use similr right tringles to solve prolems? Eplore Identifing Similrit in Right

More information

Nondeterministic Automata vs Deterministic Automata

Nondeterministic 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 information

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals AP Clulus BC Chpter 8: Integrtion Tehniques, L Hopitl s Rule nd Improper Integrls 8. Bsi Integrtion Rules In this setion we will review vrious integrtion strtegies. Strtegies: I. Seprte the integrnd into

More information

Arrow s Impossibility Theorem

Arrow 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 information

Reference : Croft & Davison, Chapter 12, Blocks 1,2. A matrix ti is a rectangular array or block of numbers usually enclosed in brackets.

Reference : Croft & Davison, Chapter 12, Blocks 1,2. A matrix ti is a rectangular array or block of numbers usually enclosed in brackets. I MATRIX ALGEBRA INTRODUCTION TO MATRICES Referene : Croft & Dvison, Chpter, Blos, A mtri ti is retngulr rr or lo of numers usull enlosed in rets. A m n mtri hs m rows nd n olumns. Mtri Alger Pge If the

More information

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

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Siene Deprtment Compiler Design Spring 7 Lexil Anlysis Smple Exerises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sienes Institute 47 Admirlty Wy, Suite

More information

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

Tutorial 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 information

Exercise sheet 6: Solutions

Exercise 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 information

Part 4. Integration (with Proofs)

Part 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 information

5. Every rational number have either terminating or repeating (recurring) decimal representation.

5. Every rational number have either terminating or repeating (recurring) decimal representation. CHAPTER NUMBER SYSTEMS Points to Rememer :. Numer used for ounting,,,,... re known s Nturl numers.. All nturl numers together with zero i.e. 0,,,,,... re known s whole numers.. All nturl numers, zero nd

More information

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Common 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 information

Suffix Trays and Suffix Trists: Structures for Faster Text Indexing

Suffix Trays and Suffix Trists: Structures for Faster Text Indexing Suffix Trys nd Suffix Trists: Strutures for Fster Text Indexing Rihrd Cole Tsvi Kopelowitz Moshe Lewenstein rxiv:1311.1762v1 [s.ds] 7 Nov 2013 Astrt Suffix trees nd suffix rrys re two of the most widely

More information

p-adic Egyptian Fractions

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

More information

Parse trees, ambiguity, and Chomsky normal form

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

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 8 Mx. lteness ont d Optiml Ching Adm Smith 9/12/2008 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne Sheduling to Minimizing Lteness Minimizing

More information

Section 1.3 Triangles

Section 1.3 Triangles Se 1.3 Tringles 21 Setion 1.3 Tringles LELING TRINGLE The line segments tht form tringle re lled the sides of the tringle. Eh pir of sides forms n ngle, lled n interior ngle, nd eh tringle hs three interior

More information

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point GCSE C Emple 7 Work out 9 Give your nswer in its simplest form Numers n inies Reiprote mens invert or turn upsie own The reiprol of is 9 9 Mke sure you only invert the frtion you re iviing y 7 You multiply

More information

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms

Preview 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 information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

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

More information

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS The University of ottinghm SCHOOL OF COMPUTR SCIC A LVL 2 MODUL, SPRIG SMSTR 2015 2016 MACHIS AD THIR LAGUAGS ASWRS Time llowed TWO hours Cndidtes my omplete the front over of their nswer ook nd sign their

More information

1 From NFA to regular expression

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

More information

(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.

(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 information

11/3/13. Indexing techniques. Short-read mapping software. Indexing a text (a genome, etc) Some terminologies. Hashing

11/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 information

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

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

More information

Linear Algebra Introduction

Linear Algebra Introduction Introdution Wht is Liner Alger out? Liner Alger is rnh of mthemtis whih emerged yers k nd ws one of the pioneer rnhes of mthemtis Though, initilly it strted with solving of the simple liner eqution x +

More information

CS241 Week 6 Tutorial Solutions

CS241 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 information

QUADRATIC EQUATION. Contents

QUADRATIC 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 information

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b CS 294-2 9/11/04 Quntum Ciruit Model, Solovy-Kitev Theorem, BQP Fll 2004 Leture 4 1 Quntum Ciruit Model 1.1 Clssil Ciruits - Universl Gte Sets A lssil iruit implements multi-output oolen funtion f : {0,1}

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

Periodic string comparison

Periodic 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 information

Regular languages refresher

Regular languages refresher Regulr lnguges refresher 1 Regulr lnguges refresher Forml lnguges Alphet = finite set of letters Word = sequene of letter Lnguge = set of words Regulr lnguges defined equivlently y Regulr expressions Finite-stte

More information

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

CSE 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 information

CS 275 Automata and Formal Language Theory

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

More information

Designing finite automata II

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

More information

Symmetrical Components 1

Symmetrical Components 1 Symmetril Components. Introdution These notes should e red together with Setion. of your text. When performing stedy-stte nlysis of high voltge trnsmission systems, we mke use of the per-phse equivlent

More information

Homework 3 Solutions

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

More information

September 13 Homework Solutions

September 13 Homework Solutions College of Engineering nd Computer Science Mechnicl Engineering Deprtment Mechnicl Engineering 5A Seminr in Engineering Anlysis Fll Ticket: 5966 Instructor: Lrry Cretto Septemer Homework Solutions. Are

More information

Convert the NFA into DFA

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

More information

2.4 Theoretical Foundations

2.4 Theoretical Foundations 2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level

More information

The Riemann-Stieltjes Integral

The 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 information

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

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

More information

8 THREE PHASE A.C. CIRCUITS

8 THREE PHASE A.C. CIRCUITS 8 THREE PHSE.. IRUITS The signls in hpter 7 were sinusoidl lternting voltges nd urrents of the so-lled single se type. n emf of suh type n e esily generted y rotting single loop of ondutor (or single winding),

More information

AVL Trees. D Oisín Kidney. August 2, 2018

AVL Trees. D Oisín Kidney. August 2, 2018 AVL Trees D Oisín Kidne August 2, 2018 Astrt This is verified implementtion of AVL trees in Agd, tking ides primril from Conor MBride s pper How to Keep Your Neighours in Order [2] nd the Agd stndrd lirr

More information

CHENG Chun Chor Litwin The Hong Kong Institute of Education

CHENG Chun Chor Litwin The Hong Kong Institute of Education PE-hing Mi terntionl onferene IV: novtion of Mthemtis Tehing nd Lerning through Lesson Study- onnetion etween ssessment nd Sujet Mtter HENG hun hor Litwin The Hong Kong stitute of Edution Report on using

More information

GM1 Consolidation Worksheet

GM1 Consolidation Worksheet Cmridge Essentils Mthemtis Core 8 GM1 Consolidtion Worksheet GM1 Consolidtion Worksheet 1 Clulte the size of eh ngle mrked y letter. Give resons for your nswers. or exmple, ngles on stright line dd up

More information

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique? XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

More information

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

More information

Maintaining Mathematical Proficiency

Maintaining Mathematical Proficiency Nme Dte hpter 9 Mintining Mthemtil Profiieny Simplify the epression. 1. 500. 189 3. 5 4. 4 3 5. 11 5 6. 8 Solve the proportion. 9 3 14 7. = 8. = 9. 1 7 5 4 = 4 10. 0 6 = 11. 7 4 10 = 1. 5 9 15 3 = 5 +

More information

Activities. 4.1 Pythagoras' Theorem 4.2 Spirals 4.3 Clinometers 4.4 Radar 4.5 Posting Parcels 4.6 Interlocking Pipes 4.7 Sine Rule Notes and Solutions

Activities. 4.1 Pythagoras' Theorem 4.2 Spirals 4.3 Clinometers 4.4 Radar 4.5 Posting Parcels 4.6 Interlocking Pipes 4.7 Sine Rule Notes and Solutions MEP: Demonstrtion Projet UNIT 4: Trigonometry UNIT 4 Trigonometry tivities tivities 4. Pythgors' Theorem 4.2 Spirls 4.3 linometers 4.4 Rdr 4.5 Posting Prels 4.6 Interloking Pipes 4.7 Sine Rule Notes nd

More information

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem.

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem. 27 Lesson 2: The Pythgoren Theorem nd Similr Tringles A Brief Review of the Pythgoren Theorem. Rell tht n ngle whih mesures 90º is lled right ngle. If one of the ngles of tringle is right ngle, then we

More information

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

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

More information

Homework Solution - Set 5 Due: Friday 10/03/08

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

More information

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

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

More information

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL:

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL: PYTHAGORAS THEOREM 1 WHAT S IN CHAPTER 1? 1 01 Squres, squre roots nd surds 1 02 Pythgors theorem 1 03 Finding the hypotenuse 1 04 Finding shorter side 1 05 Mixed prolems 1 06 Testing for right-ngled tringles

More information

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic Chpter 3 Vetor Spes In Chpter 2, we sw tht the set of imges possessed numer of onvenient properties. It turns out tht ny set tht possesses similr onvenient properties n e nlyzed in similr wy. In liner

More information

= state, a = reading and q j

= state, a = reading and q j 4 Finite Automt CHAPTER 2 Finite Automt (FA) (i) Derterministi Finite Automt (DFA) A DFA, M Q, q,, F, Where, Q = set of sttes (finite) q Q = the strt/initil stte = input lphet (finite) (use only those

More information

Connected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs

Connected-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 information

15-451/651: Design & Analysis of Algorithms December 3, 2013 Lecture #28 last changed: November 28, 2013

15-451/651: Design & Analysis of Algorithms December 3, 2013 Lecture #28 last changed: November 28, 2013 15-451/651: Design & nlysis of lgorithms Deemer 3, 2013 Leture #28 lst hnged: Novemer 28, 2013 Lst time we strted tlking out mehnism design: how to llote n item to the person who hs the mximum vlue for

More information

Logic Synthesis and Verification

Logic Synthesis and Verification Logi Synthesis nd Verifition SOPs nd Inompletely Speified Funtions Jie-Hong Rolnd Jing 江介宏 Deprtment of Eletril Engineering Ntionl Tiwn University Fll 2010 Reding: Logi Synthesis in Nutshell Setion 2 most

More information

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

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

More information

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points. Prole 3: Crnot Cyle of n Idel Gs In this prole, the strting pressure P nd volue of n idel gs in stte, re given he rtio R = / > of the volues of the sttes nd is given Finlly onstnt γ = 5/3 is given You

More information

The Word Problem in Quandles

The Word Problem in Quandles The Word Prolem in Qundles Benjmin Fish Advisor: Ren Levitt April 5, 2013 1 1 Introdution A word over n lger A is finite sequene of elements of A, prentheses, nd opertions of A defined reursively: Given

More information

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 ) Neessry n suient onitions for some two vrile orthogonl esigns in orer 44 C. Koukouvinos, M. Mitrouli y, n Jennifer Seerry z Deite to Professor Anne Penfol Street Astrt We give new lgorithm whih llows us

More information

System Validation (IN4387) November 2, 2012, 14:00-17:00

System Validation (IN4387) November 2, 2012, 14:00-17:00 System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise

More information

CSE 401 Compilers. Today s Agenda

CSE 401 Compilers. Today s Agenda CSE 401 Compilers Leture 3: Regulr Expressions & Snning, on?nued Mihel Ringenurg Tody s Agend Lst?me we reviewed lnguges nd grmmrs, nd riefly strted disussing regulr expressions. Tody I ll restrt the regulr

More information

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then Slrs-7.2-ADV-.7 Improper Definite Integrls 27.. D.dox Pge of Improper Definite Integrls Before we strt the min topi we present relevnt lger nd it review. See Appendix J for more lger review. Inequlities:

More information

Spacetime and the Quantum World Questions Fall 2010

Spacetime and the Quantum World Questions Fall 2010 Spetime nd the Quntum World Questions Fll 2010 1. Cliker Questions from Clss: (1) In toss of two die, wht is the proility tht the sum of the outomes is 6? () P (x 1 + x 2 = 6) = 1 36 - out 3% () P (x 1

More information

, g. Exercise 1. Generator polynomials of a convolutional code, given in binary form, are g. Solution 1.

, 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 information

Coalgebra, Lecture 15: Equations for Deterministic Automata

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

More information

Review of Gaussian Quadrature method

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

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

Figure 1. The left-handed and right-handed trefoils

Figure 1. The left-handed and right-handed trefoils The Knot Group A knot is n emedding of the irle into R 3 (or S 3 ), k : S 1 R 3. We shll ssume our knots re tme, mening the emedding n e extended to solid torus, K : S 1 D 2 R 3. The imge is lled tuulr

More information