Traversal of a subtree is slow, which affects prefix and range queries.
|
|
- Marjorie Preston
- 5 years ago
- Views:
Transcription
1 Compac Tries Tries suffer from a large number nodes, Ω( R ) in he wors case. The space requiremen is large, since each node needs much more space han a single symbol. Traversal of a subree is slow, which affecs prefix and range queries. Compac ries reduce he number of nodes by replacing branchless pah segmens wih a single edge. Leaf pah compacion applies his o pah segmens leading o a leaf. The number of nodes is now O(dp(R)). Full pah compacion applies his o all pah segmens. Then every inernal node has a leas wo children. In such a ree, here is always more leaves han inernal nodes. Thus he number of nodes is O( R ). 41
2 Example 2.4: Compac ries for R = {po$, poao$, poery$, aoo$, empo$}. p o po $ aoo$ empo$ $ aoo$ empo$ ao$ ery$ ao$ ery$ The egde labels are facors of he inpu srings. Thus hey can be sored in consan space using poiners o he srings, which are sored separaely. In a fully compac rie, any subree can be raversed in linear ime in he number of leaves in he subree. Thus a prefix query for a sring S can be answered in O( S + r) ime, where r is he number of srings in he answer. 42
3 Ternary Tries The binary ree implemenaion of a rie suppors ordered alphabes bu awkwardly. Ternary rie is a simpler daa srucure based on symbol comparisons. Ternary rie is like a binary search ree excep: Each inernal node has hree children: smaller, equal and larger. The branching is based on a single symbol a a given posiion. The posiion is zero a he roo and increases along he middle branches. Ternary ries have varians similar o σ-ary ries: A basic ernary rie is a full represenaion of he srings. Compac ernary ries reduce space by compacing branchless pah segmens. 43
4 Example 2.5: Ternary ries for R = {po$, poao$, poery$, aoo$, empo$}. $ p o a o $ e r y a o o $ e m p o $ $ p o a o$ a oo$ ery$ empo$ $ p o a o$ a oo$ ery$ empo$ $ The sizes of ernary ries have he same asympoic bounds as he corresponding ries: O( R ), O(dp(R)) and O( R ). 44
5 A ernary rie is balanced if each lef and righ subree conains a mos half of he srings in is paren ree. The balance can be mainained by roaions similarly o binary search rees. b roaion d A B d b D E C D E A B C We can also ge reasonably close o balance by insering he srings in he ree in a random order. In a balanced ernary rie each sep down eiher moves he posiion forward (middle branch), or halves he number of srings remaining he he subree. Thus, in a balanced ernary rie soring n srings, any downward raversal following a sring S akes a mos O( S + log n) ime. 45
6 The ime complexiies of operaions in balanced ernary ries are he same as in he correspoding ries excep an addiional O(log n): Inserion, deleion, lookup and lcp query for a sring S akes O( S + log n) ime. Prefix query for a sring S akes O( S + log n + Q ) ime in an uncompac ernary rie and O( S + log n + Q ) ime in a compac ernary rie, where Q is he se of srings given as he resul of he query. In ries, where he child funcion is implemened using binary search ree, he ime complexiies could be O( S log σ), a muliplicaive facor insead of an addiive facor. 46
7 Sring Binary Search An ordered array is a simple saic daa srucure supporing queries in O(log n) ime using binary search. Algorihm 2.6: Binary search Inpu: Ordered se R = {k 1, k 2,..., k n }, query value x. Oupu: The number of elemens in R ha are smaller han x. (1) lef 0; righ n + 1 // final answer is in he range [lef..righ) (2) while righ lef > 1 do (3) mid lef + (righ lef)/2 (4) if k mid < x hen lef mid (5) else righ mid (6) reurn lef Wih srings as elemens, however, he query ime is O(m log n) in he wors case for a query sring of lengh m O(m + log n log σ n) on average for a random se of srings. 47
8 We can use he lcp comparison echnique o improve binary search for srings. The following is a key resul. Lemma 2.7: Le A B, B C be srings. Then lcp(b, B ) lcp(a, C). Proof. Le B min = min{b, B } and B max = max{b, B }. By Lemma 3.17, lcp(a, C) = min(lcp(a, B max ), lcp(b max, C)) lcp(a, B max ) = min(lcp(a, B min ), lcp(b min, B max )) lcp(b min, B max ) = lcp(b, B ) 48
9 During he binary search of P in {S 1, S 2,..., S n }, he basic siuaion is he following: We wan o compare P and S mid. We have already compared P agains S lef and S righ, and we know ha S lef P, S mid S righ. If we are using LcpCompare, we know lcp(s lef, P ) and lcp(p, S righ ). By Lemmas 1.18 and 2.7, lcp(p, S mid ) lcp(s lef, S righ ) = min{lcp(s lef, P ), lcp(p, S righ )} Thus we can skip min{lcp(s lef, P ), lcp(p, S righ )} firs characers when comparing P and S mid. 49
10 Algorihm 2.8: Sring binary search (wihou precompued lcps) Inpu: Ordered sring se R = {S 1, S 2,..., S n }, query sring P. Oupu: The number of srings in R ha are smaller han P. (1) lef 0; righ n + 1 (2) llcp 0; rlcp 0 (3) while righ lef > 1 do (4) mid lef + (righ lef)/2 (5) mlcp min{llcp, rlcp} (6) (x, mlcp) LcpCompare(S mid, P, mlcp) (7) if x = < hen lef mid; llcp mclp (8) else righ mid; rlcp mclp (9) reurn lef The average case query ime is now O(m + log n). The wors case query ime is sill O(m log n). 50
11 We can furher improve sring binary search using precompued informaion abou he lcp s beween he srings in R. Consider again he basic siuaion during sring binary search: We wan o compare P and S mid. We have already compared P agains S lef and S righ, and we know lcp(s lef, P ) and lcp(p, S righ ). The values lef and righ depend only on mid. In paricular, hey do no depend on P. Thus, we can precompue and sore he values LLCP [mid] = lcp(s lef, S mid ) RLCP [mid] = lcp(s mid, S righ ) 51
12 Now we know all lcp values beween P, S lef, S mid, S righ excep lcp(p, S mid ). The following lemma shows how o uilize his. Lemma 2.9: Le A B, B C be srings. (a) If lcp(a, B) > lcp(a, B ), hen B < B and lcp(b, B ) = lcp(a, B ). (b) If lcp(a, B) < lcp(a, B ), hen B > B and lcp(b, B ) = lcp(a, B). (c) If lcp(b, C) > lcp(b, C), hen B > B and lcp(b, B ) = lcp(b, C). (d) If lcp(b, C) < lcp(b, C), hen B < B and lcp(b, B ) = lcp(b, C). (e) If lcp(a, B) = lcp(a, B ) and lcp(b, C) = lcp(b, C), hen lcp(b, B ) max{lcp(a, B), lcp(b, C)}. Proof. Cases (a) (d) are symmerical, we show (a). B < B follows direcly from Lemma Then by Lemma 1.18, lcp(a, B ) = min{lcp(a, B), lcp(b, B )}. Since lcp(a, B ) < lcp(a, B), we mus have lcp(a, B ) = lcp(b, B ). In case (e), we use Lemma 1.18: lcp(b, B ) min{lcp(a, B), lcp(a, B )} = lcp(a, B) lcp(b, B ) min{lcp(b, C), lcp(b, C)} = lcp(b, C) Thus lcp(b, B ) max{lcp(a, B), lcp(b, C)}. 52
13 Algorihm 2.10: Sring binary search (wih precompued lcps) Inpu: Ordered sring se R = {S 1, S 2,..., S n }, arrays LLCP and RLCP, query sring P. Oupu: The number of srings in R ha are smaller han P. (1) lef 0; righ n + 1 (2) llcp 0; rlcp 0 (3) while righ lef > 1 do (4) mid lef + (righ lef)/2 (5) if LLCP [mid] > llcp hen lef mid (6) else if LLCP [mid] < llcp hen righ mid; rlcp LLCP [mid] (7) else if RLCP [mid] > rlcp hen righ mid (8) else if RLCP [mid] < rlcp hen lef mid; llcp RLCP [mid] (9) else (10) mlcp max{llcp, rlcp} (11) (x, mlcp) LcpCompare(S mid, P, mlcp) (12) if x = < hen lef mid; llcp mclp (13) else righ mid; rlcp mclp (14) reurn lef 53
14 Theorem 2.11: An ordered sring se R = {S 1, S 2,..., S n } can be preprocessed in O(dp(R)) ime and O(n) space so ha a binary search wih a query sring P can be execued in O( P + log n) ime. Proof. The values LLCP [mid] and RLCP [mid] can be compued in O(dp R (S mid )) ime. Thus he arrays LLCP and RLCP can be compued in O(dp(R)) ime and sored in O(n) space. The main while loop in Algorihm 2.10 is execued O(log n) imes and everyhing excep LcpCompare on line (11) needs consan ime. If a given LcpCompare call performs 1 + symbol comparisons, mclp increases by on line (11). Then on lines (12) (13), eiher llcp or rlcp increases by a leas, since mlcp was max{llcp, rlcp} before LcpCompare. Since llcp and rlcp never decrease and never grow larger han P, he oal number of exra symbol comparisons in LcpCompare during he binary search is O( P ). 54
15 Binary search can be seen as a search on an implici binary search ree, where he middle elemen is he roo, he middle elemens of he firs and second half are he children of he roo, ec.. The sring binary search echnique can be exended for arbirary binary search rees. Le S v be he sring sored a a node v in a binary search ree. Le S < and S > be he closes lexicographically smaller and larger srings sored a ancesors of v. The comparison of a query sring P and he sring S v is done he same way as he comparison of P and S mid in sring binary search. The roles of S lef and S righ are aken by S < and S >. If each node v sores he values lcp(s <, S v ) and lcp(s v, S > ), hen a search in a balanced search ree can be execued in O( P + log n) ime. Oher operaions including inserions and deleions ake O( P + log n) ime oo. 55
16 Auomaa Finie auomaa are a well known way of represening ses of srings. In his case, he se is ofen called a language. A rie is a special ype of an auomaon. Trie is generally no a minimal auomaon. Trie echniques including pah compacion and ernary branching can be applied o auomaa. Example 2.12: Compaced minimal auomaon for R = {po$, poao$, poery$, aoo$, empo$}. $ ery po ao a o $ emp 56
17 Auomaa are much more powerful han ries in represening languages: Infinie languages Nondeerminisic auomaa Even an acyclic, deerminisic auomaon can represen a language of exponenial size. Auomaa do no suppor all operaions of ries: Inserions and deleions Saellie daa, i.e., daa associaed o each sring. 57
18 3. Exac Sring Maching Le T = T [0..n) be he ex and P = P [0..m) he paern. We say ha P occurs in T a posiion j if T [j..j + m) = P. Example: P = aine occurs a posiion 6 in T = karjalainen. In his par, we will describe algorihms ha solve he following problem. Problem 3.1: Given ex T [0..n) and paern P [0..m), repor he firs posiion in T where P occurs, or n if P does no occur in T. The algorihms can be easily modified o solve he following problems oo. Is P a facor of T? Coun he number of occurrences of P in T. Repor all occurrences of P in T. 58
19 The naive, brue force algorihm compares P agains T [0..m), hen agains T [1..m + 1), hen agains T [2..m + 2) ec. unil an occurrence is found or he end of he ex is reached. Algorihm 3.2: Brue force Inpu: ex T = T [0... n), paern P = P [0... m) Oupu: posiion of he firs occurrence of P in T (1) i 0; j 0 (2) while i < m and j < n do (3) if P [i] = T [j] hen i i + 1; j j + 1 (4) else j j i + 1; i 0 (5) if i = m hen oupu j m else oupu n The wors case ime complexiy is O(mn). This happens, for example, when P = a m 1 b = aaa..ab and T = a n = aaaaaa..aa. 59
20 Knuh Morris Pra The Brue force algorihm forges everyhing when i moves o he nex ex posiion. The Morris Pra (MP) algorihm remembers maches. I never goes back o a ex characer ha already mached. The Knuh Morris Pra (KMP) algorihm remembers mismaches oo. Example 3.3: Brue force ainaisesi-ainainen ainai//nen (6 comp.) /ainainen (1) //ainainen (1) ai//nainen (3) /ainainen (1) //ainainen (1) Morris Pra ainaisesi-ainainen ainai//nen (6) ai//nainen (1) //ainainen (1) Knuh Morris Pra ainaisesi-ainainen ainai//nen (6) //ainainen (1) 60
21 MP and KMP algorihms never go backwards in he ex. When hey encouner a mismach, hey find anoher paern posiion o compare agains he same ex posiion. If he mismach occurs a paern posiion i, hen fail[i] is he nex paern posiion o compare. The only difference beween MP and KMP is how hey compue he failure funcion f ail. Algorihm 3.4: Knuh Morris Pra / Morris Pra Inpu: ex T = T [0... n), paern P = P [0... m) Oupu: posiion of he firs occurrence of P in T (1) compue f ail[0..m] (2) i 0; j 0 (3) while i < m and j < n do (4) if i = 1 or P [i] = T [j] hen i i + 1; j j + 1 (5) else i fail[i] (6) if i = m hen oupu j m else oupu n fail[i] = 1 means ha here is no more paern posiions o compare agains his ex posiions and we should move o he nex ex posiion. fail[m] is never needed here, bu if we waned o find all occurrences, i would ell how o coninue afer a full mach. 61
22 We will describe he MP failure funcion here. The KMP failure funcion is lef for he exercises. When he algorihm finds a mismach beween P [i] and T [j], we know ha P [0..i) = T [j i..j). Now we wan o find a new i < i such ha P [0..i ) = T [j i..j). Specifically, we wan he larges such i. This means ha P [0..i ) = T [j i..j) = P [i i..i). In oher words, P [0..i ) is he longes proper border of P [0..i). Example: ai is he longes proper border of ainai. Thus fail[i] is he lengh of he longes proper border of P [0..i). P [0..0) = ε has no proper border. We se fail[0] = 1. 62
23 Example 3.5: Le P = ainainen. i P [0..i) border f ail[i] 0 ε -1 1 a ε 0 2 ai ε 0 3 ain ε 0 4 aina a 1 5 ainai ai 2 6 ainain ain 3 7 ainaine ε 0 8 ainainen ε 0 The (K)MP algorihm operaes like an auomaon, since i never moves backwards in he ex. Indeed, i can be described by an auomaon ha has a special failure ransiion, which is an ε-ransiion ha can be aken only when here is no oher ransiion o ake. Σ a i n a i n e n
24 An efficien algorihm for compuing he failure funcion is very similar o he search algorihm iself! In he MP algorihm, when we find a mach P [i] = T [j], we know ha P [0..i] = T [j i..j]. More specifically, P [0..i] is he longes prefix of P ha maches a suffix of T [0..j]. Suppose T = #P [1..m), where # is a symbol ha does no occur in P. Finding a mach P [i] = T [j], we know ha P [0..i] is he longes prefix of P ha is a proper suffix of P [0..j]. Thus fail[j + 1] = i + 1. Algorihm 3.6: Morris Pra failure funcion compuaion Inpu: paern P = P [0... m) Oupu: array f ail[0..m] for P (1) i 1; j 0; fail[j] i (2) while j < m do (3) if i = 1 or P [i] = P [j] hen i i + 1; j j + 1; fail[j] i (4) else i fail[i] (5) oupu f ail When he algorihm reads fail[i] on line 4, fail[i] has already been compued. 64
25 Theorem 3.7: Algorihms MP and KMP preprocess a paern in ime O(m) and hen search he ex in ime O(n). Proof. I is sufficien o coun he number of comparisons ha he algorihms make. Afer each comparison P [i] = T [j] (or P [i] = P [j]), one of he wo condiional branches is execued: hen Here j is incremened. Since j never decreases, his branch can be aken a mos n + 1 (m + 1) imes. else Here i decreases since fail[i] < i. Since i only increases in he hen-branch, his branch canno be aken more ofen han he hen-branch. 65
Longest Common Prefixes
Longes Common Prefixes The sandard ordering for srings is he lexicographical order. I is induced by an order over he alphabe. We will use he same symbols (,
More information2. Exact String Matching
2. Exact String Matching Let T = T [0..n) be the text and P = P [0..m) the pattern. We say that P occurs in T at position j if T [j..j + m) = P. Example: P = aine occurs at position 6 in T = karjalainen.
More informationDynamic Programming 11/8/2009. Weighted Interval Scheduling. Weighted Interval Scheduling. Unweighted Interval Scheduling: Review
//9 Algorihms Dynamic Programming - Weighed Ineral Scheduling Dynamic Programming Weighed ineral scheduling problem. Insance A se of n jobs. Job j sars a s j, finishes a f j, and has weigh or alue j. Two
More informationInventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions
Muli-Period Sochasic Models: Opimali of (s, S) Polic for -Convex Objecive Funcions Consider a seing similar o he N-sage newsvendor problem excep ha now here is a fixed re-ordering cos (> 0) for each (re-)order.
More informationViterbi Algorithm: Background
Vierbi Algorihm: Background Jean Mark Gawron March 24, 2014 1 The Key propery of an HMM Wha is an HMM. Formally, i has he following ingrediens: 1. a se of saes: S 2. a se of final saes: F 3. an iniial
More informationChristos Papadimitriou & Luca Trevisan November 22, 2016
U.C. Bereley CS170: Algorihms Handou LN-11-22 Chrisos Papadimiriou & Luca Trevisan November 22, 2016 Sreaming algorihms In his lecure and he nex one we sudy memory-efficien algorihms ha process a sream
More informationLanguages That Are and Are Not Context-Free
Languages Tha re and re No Conex-Free Read K & S 3.5, 3.6, 3.7. Read Supplemenary Maerials: Conex-Free Languages and Pushdown uomaa: Closure Properies of Conex-Free Languages Read Supplemenary Maerials:
More informationEXERCISES FOR SECTION 1.5
1.5 Exisence and Uniqueness of Soluions 43 20. 1 v c 21. 1 v c 1 2 4 6 8 10 1 2 2 4 6 8 10 Graph of approximae soluion obained using Euler s mehod wih = 0.1. Graph of approximae soluion obained using Euler
More informationRandom Walk with Anti-Correlated Steps
Random Walk wih Ani-Correlaed Seps John Noga Dirk Wagner 2 Absrac We conjecure he expeced value of random walks wih ani-correlaed seps o be exacly. We suppor his conjecure wih 2 plausibiliy argumens and
More informationNotes for Lecture 17-18
U.C. Berkeley CS278: Compuaional Complexiy Handou N7-8 Professor Luca Trevisan April 3-8, 2008 Noes for Lecure 7-8 In hese wo lecures we prove he firs half of he PCP Theorem, he Amplificaion Lemma, up
More informationRemoving Useless Productions of a Context Free Grammar through Petri Net
Journal of Compuer Science 3 (7): 494-498, 2007 ISSN 1549-3636 2007 Science Publicaions Removing Useless Producions of a Conex Free Grammar hrough Peri Ne Mansoor Al-A'ali and Ali A Khan Deparmen of Compuer
More informationLecture 2-1 Kinematics in One Dimension Displacement, Velocity and Acceleration Everything in the world is moving. Nothing stays still.
Lecure - Kinemaics in One Dimension Displacemen, Velociy and Acceleraion Everyhing in he world is moving. Nohing says sill. Moion occurs a all scales of he universe, saring from he moion of elecrons in
More informationT L. t=1. Proof of Lemma 1. Using the marginal cost accounting in Equation(4) and standard arguments. t )+Π RB. t )+K 1(Q RB
Elecronic Companion EC.1. Proofs of Technical Lemmas and Theorems LEMMA 1. Le C(RB) be he oal cos incurred by he RB policy. Then we have, T L E[C(RB)] 3 E[Z RB ]. (EC.1) Proof of Lemma 1. Using he marginal
More informationChapter 2. First Order Scalar Equations
Chaper. Firs Order Scalar Equaions We sar our sudy of differenial equaions in he same way he pioneers in his field did. We show paricular echniques o solve paricular ypes of firs order differenial equaions.
More informationDesigning Information Devices and Systems I Spring 2019 Lecture Notes Note 17
EES 16A Designing Informaion Devices and Sysems I Spring 019 Lecure Noes Noe 17 17.1 apaciive ouchscreen In he las noe, we saw ha a capacior consiss of wo pieces on conducive maerial separaed by a nonconducive
More informationLi An-Ping. Beijing , P.R.China
A NEW TYPE OF CIPHER: DICING_CSB Li An-Ping Beijing 100085, P.R.China apli0001@sina.com Absrac: In his paper, we will propose a new ype of cipher named DICING_CSB, which come from our previous a synchronous
More informationSome Basic Information about M-S-D Systems
Some Basic Informaion abou M-S-D Sysems 1 Inroducion We wan o give some summary of he facs concerning unforced (homogeneous) and forced (non-homogeneous) models for linear oscillaors governed by second-order,
More information5.1 - Logarithms and Their Properties
Chaper 5 Logarihmic Funcions 5.1 - Logarihms and Their Properies Suppose ha a populaion grows according o he formula P 10, where P is he colony size a ime, in hours. When will he populaion be 2500? We
More informationLogic in computer science
Logic in compuer science Logic plays an imporan role in compuer science Logic is ofen called he calculus of compuer science Logic plays a similar role in compuer science o ha played by calculus in he physical
More informationTwo Popular Bayesian Estimators: Particle and Kalman Filters. McGill COMP 765 Sept 14 th, 2017
Two Popular Bayesian Esimaors: Paricle and Kalman Filers McGill COMP 765 Sep 14 h, 2017 1 1 1, dx x Bel x u x P x z P Recall: Bayes Filers,,,,,,, 1 1 1 1 u z u x P u z u x z P Bayes z = observaion u =
More informationBiol. 356 Lab 8. Mortality, Recruitment, and Migration Rates
Biol. 356 Lab 8. Moraliy, Recruimen, and Migraion Raes (modified from Cox, 00, General Ecology Lab Manual, McGraw Hill) Las week we esimaed populaion size hrough several mehods. One assumpion of all hese
More informationTimed Circuits. Asynchronous Circuit Design. Timing Relationships. A Simple Example. Timed States. Timing Sequences. ({r 6 },t6 = 1.
Timed Circuis Asynchronous Circui Design Chris J. Myers Lecure 7: Timed Circuis Chaper 7 Previous mehods only use limied knowledge of delays. Very robus sysems, bu exremely conservaive. Large funcional
More informationAn introduction to the theory of SDDP algorithm
An inroducion o he heory of SDDP algorihm V. Leclère (ENPC) Augus 1, 2014 V. Leclère Inroducion o SDDP Augus 1, 2014 1 / 21 Inroducion Large scale sochasic problem are hard o solve. Two ways of aacking
More informationSolutions from Chapter 9.1 and 9.2
Soluions from Chaper 9 and 92 Secion 9 Problem # This basically boils down o an exercise in he chain rule from calculus We are looking for soluions of he form: u( x) = f( k x c) where k x R 3 and k is
More information3.1.3 INTRODUCTION TO DYNAMIC OPTIMIZATION: DISCRETE TIME PROBLEMS. A. The Hamiltonian and First-Order Conditions in a Finite Time Horizon
3..3 INRODUCION O DYNAMIC OPIMIZAION: DISCREE IME PROBLEMS A. he Hamilonian and Firs-Order Condiions in a Finie ime Horizon Define a new funcion, he Hamilonian funcion, H. H he change in he oal value of
More information23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes
Represening Periodic Funcions by Fourier Series 3. Inroducion In his Secion we show how a periodic funcion can be expressed as a series of sines and cosines. We begin by obaining some sandard inegrals
More informationCSE Computer Architecture I
Single cycle Conrol Implemenaion CSE 332 Compuer Archiecure I l x I Lecure 7 - uli Cycle achines i i [ ] I I r l ichael Niemier Deparmen of Compuer Science and Engineering I ] i X.S. Hu 5- X.S. Hu 5-2
More information1 Review of Zero-Sum Games
COS 5: heoreical Machine Learning Lecurer: Rob Schapire Lecure #23 Scribe: Eugene Brevdo April 30, 2008 Review of Zero-Sum Games Las ime we inroduced a mahemaical model for wo player zero-sum games. Any
More informationLinear Time-invariant systems, Convolution, and Cross-correlation
Linear Time-invarian sysems, Convoluion, and Cross-correlaion (1) Linear Time-invarian (LTI) sysem A sysem akes in an inpu funcion and reurns an oupu funcion. x() T y() Inpu Sysem Oupu y() = T[x()] An
More informationRetrieval Models. Boolean and Vector Space Retrieval Models. Common Preprocessing Steps. Boolean Model. Boolean Retrieval Model
1 Boolean and Vecor Space Rerieval Models Many slides in his secion are adaped from Prof. Joydeep Ghosh (UT ECE) who in urn adaped hem from Prof. Dik Lee (Univ. of Science and Tech, Hong Kong) Rerieval
More informationCHAPTER 12 DIRECT CURRENT CIRCUITS
CHAPTER 12 DIRECT CURRENT CIUITS DIRECT CURRENT CIUITS 257 12.1 RESISTORS IN SERIES AND IN PARALLEL When wo resisors are conneced ogeher as shown in Figure 12.1 we said ha hey are conneced in series. As
More information16 Max-Flow Algorithms
A process canno be undersood by sopping i. Undersanding mus move wih he flow of he process, mus join i and flow wih i. The Firs Law of Mena, in Frank Herber s Dune (196) There s a difference beween knowing
More informationApproximate String Matching. Department of Computer Science. University of Chile. Blanco Encalada Santiago - Chile
Very Fas and Simple Approximae Sring Maching Gonzalo Navarro Ricardo Baeza-Yaes Deparmen of Compuer Science Universiy of Chile Blanco Encalada 2120 - Saniago - Chile fgnavarro,rbaezag@dcc.uchile.cl Absrac
More informationStationary Distribution. Design and Analysis of Algorithms Andrei Bulatov
Saionary Disribuion Design and Analysis of Algorihms Andrei Bulaov Algorihms Markov Chains 34-2 Classificaion of Saes k By P we denoe he (i,j)-enry of i, j Sae is accessible from sae if 0 for some k 0
More informationSome Ramsey results for the n-cube
Some Ramsey resuls for he n-cube Ron Graham Universiy of California, San Diego Jozsef Solymosi Universiy of Briish Columbia, Vancouver, Canada Absrac In his noe we esablish a Ramsey-ype resul for cerain
More informationLecture Notes 2. The Hilbert Space Approach to Time Series
Time Series Seven N. Durlauf Universiy of Wisconsin. Basic ideas Lecure Noes. The Hilber Space Approach o Time Series The Hilber space framework provides a very powerful language for discussing he relaionship
More informationSOLUTIONS TO ECE 3084
SOLUTIONS TO ECE 384 PROBLEM 2.. For each sysem below, specify wheher or no i is: (i) memoryless; (ii) causal; (iii) inverible; (iv) linear; (v) ime invarian; Explain your reasoning. If he propery is no
More informationLaplace transfom: t-translation rule , Haynes Miller and Jeremy Orloff
Laplace ransfom: -ranslaion rule 8.03, Haynes Miller and Jeremy Orloff Inroducory example Consider he sysem ẋ + 3x = f(, where f is he inpu and x he response. We know is uni impulse response is 0 for
More informationSection 4.4 Logarithmic Properties
Secion. Logarihmic Properies 59 Secion. Logarihmic Properies In he previous secion, we derived wo imporan properies of arihms, which allowed us o solve some asic eponenial and arihmic equaions. Properies
More informationZürich. ETH Master Course: L Autonomous Mobile Robots Localization II
Roland Siegwar Margaria Chli Paul Furgale Marco Huer Marin Rufli Davide Scaramuzza ETH Maser Course: 151-0854-00L Auonomous Mobile Robos Localizaion II ACT and SEE For all do, (predicion updae / ACT),
More informationEfficient Error-tolerant Query Autocompletion
Efficien Error-oleran Query Auocompleion Chuan Xiao Nagoya Universiy, Japan chuanx@nagoya-u.jp Yoshiharu Ishikawa Nagoya Universiy, Japan y-ishikawa@nagoya-u.jp Jianbin Qin UNSW, Ausralia jqin@cse.unsw.edu.au
More informationSection 4.4 Logarithmic Properties
Secion. Logarihmic Properies 5 Secion. Logarihmic Properies In he previous secion, we derived wo imporan properies of arihms, which allowed us o solve some asic eponenial and arihmic equaions. Properies
More informationHOMEWORK # 2: MATH 211, SPRING Note: This is the last solution set where I will describe the MATLAB I used to make my pictures.
HOMEWORK # 2: MATH 2, SPRING 25 TJ HITCHMAN Noe: This is he las soluion se where I will describe he MATLAB I used o make my picures.. Exercises from he ex.. Chaper 2.. Problem 6. We are o show ha y() =
More information4.1 - Logarithms and Their Properties
Chaper 4 Logarihmic Funcions 4.1 - Logarihms and Their Properies Wha is a Logarihm? We define he common logarihm funcion, simply he log funcion, wrien log 10 x log x, as follows: If x is a posiive number,
More informationNetwork Flow. Data Structures and Algorithms Andrei Bulatov
Nework Flow Daa Srucure and Algorihm Andrei Bulao Algorihm Nework Flow 24-2 Flow Nework Think of a graph a yem of pipe We ue hi yem o pump waer from he ource o ink Eery pipe/edge ha limied capaciy Flow
More informationFinal Spring 2007
.615 Final Spring 7 Overview The purpose of he final exam is o calculae he MHD β limi in a high-bea oroidal okamak agains he dangerous n = 1 exernal ballooning-kink mode. Effecively, his corresponds o
More informationThe Characterization of Data-Accumulating Algorithms
The Characerizaion of Daa-Accumulaing Algorihms Sefan D Bruda and Selim G Akl Deparmen of Compuing and Informaion Science Queen s Universiy Kingson, Onario, K7L 3N6 Canada fbruda,aklg@csqueensuca Absrac
More informationLearning a Class from Examples. Training set X. Class C 1. Class C of a family car. Output: Input representation: x 1 : price, x 2 : engine power
Alpaydin Chaper, Michell Chaper 7 Alpaydin slides are in urquoise. Ehem Alpaydin, copyrigh: The MIT Press, 010. alpaydin@boun.edu.r hp://www.cmpe.boun.edu.r/ ehem/imle All oher slides are based on Michell.
More informationLinear Response Theory: The connection between QFT and experiments
Phys540.nb 39 3 Linear Response Theory: The connecion beween QFT and experimens 3.1. Basic conceps and ideas Q: How do we measure he conduciviy of a meal? A: we firs inroduce a weak elecric field E, and
More informationKINEMATICS IN ONE DIMENSION
KINEMATICS IN ONE DIMENSION PREVIEW Kinemaics is he sudy of how hings move how far (disance and displacemen), how fas (speed and velociy), and how fas ha how fas changes (acceleraion). We say ha an objec
More informationSpring Ammar Abu-Hudrouss Islamic University Gaza
Chaper 7 Reed-Solomon Code Spring 9 Ammar Abu-Hudrouss Islamic Universiy Gaza ١ Inroducion A Reed Solomon code is a special case of a BCH code in which he lengh of he code is one less han he size of he
More information13.3 Term structure models
13.3 Term srucure models 13.3.1 Expecaions hypohesis model - Simples "model" a) shor rae b) expecaions o ge oher prices Resul: y () = 1 h +1 δ = φ( δ)+ε +1 f () = E (y +1) (1) =δ + φ( δ) f (3) = E (y +)
More informationt is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t...
Mah 228- Fri Mar 24 5.6 Marix exponenials and linear sysems: The analogy beween firs order sysems of linear differenial equaions (Chaper 5) and scalar linear differenial equaions (Chaper ) is much sronger
More information5. Stochastic processes (1)
Lec05.pp S-38.45 - Inroducion o Teleraffic Theory Spring 2005 Conens Basic conceps Poisson process 2 Sochasic processes () Consider some quaniy in a eleraffic (or any) sysem I ypically evolves in ime randomly
More informationDiebold, Chapter 7. Francis X. Diebold, Elements of Forecasting, 4th Edition (Mason, Ohio: Cengage Learning, 2006). Chapter 7. Characterizing Cycles
Diebold, Chaper 7 Francis X. Diebold, Elemens of Forecasing, 4h Ediion (Mason, Ohio: Cengage Learning, 006). Chaper 7. Characerizing Cycles Afer compleing his reading you should be able o: Define covariance
More informationAlgorithmic Discrete Mathematics 6. Exercise Sheet
Algorihmic Dicree Mahemaic. Exercie Shee Deparmen of Mahemaic SS 0 PD Dr. Ulf Lorenz 7. and 8. Juni 0 Dipl.-Mah. David Meffer Verion of June, 0 Groupwork Exercie G (Heap-Sor) Ue Heap-Sor wih a min-heap
More informationSeminar 4: Hotelling 2
Seminar 4: Hoelling 2 November 3, 211 1 Exercise Par 1 Iso-elasic demand A non renewable resource of a known sock S can be exraced a zero cos. Demand for he resource is of he form: D(p ) = p ε ε > A a
More informationReading from Young & Freedman: For this topic, read sections 25.4 & 25.5, the introduction to chapter 26 and sections 26.1 to 26.2 & 26.4.
PHY1 Elecriciy Topic 7 (Lecures 1 & 11) Elecric Circuis n his opic, we will cover: 1) Elecromoive Force (EMF) ) Series and parallel resisor combinaions 3) Kirchhoff s rules for circuis 4) Time dependence
More informationRC, RL and RLC circuits
Name Dae Time o Complee h m Parner Course/ Secion / Grade RC, RL and RLC circuis Inroducion In his experimen we will invesigae he behavior of circuis conaining combinaions of resisors, capaciors, and inducors.
More informationThe field of mathematics has made tremendous impact on the study of
A Populaion Firing Rae Model of Reverberaory Aciviy in Neuronal Neworks Zofia Koscielniak Carnegie Mellon Universiy Menor: Dr. G. Bard Ermenrou Universiy of Pisburgh Inroducion: The field of mahemaics
More informationMore Digital Logic. t p output. Low-to-high and high-to-low transitions could have different t p. V in (t)
EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 More igial Logic Gae delay and signal propagaion Clocked circui elemens (flip-flop) Wriing a word o memory Simplifying digial circuis: Karnaugh maps
More informationHybrid Control and Switched Systems. Lecture #3 What can go wrong? Trajectories of hybrid systems
Hybrid Conrol and Swiched Sysems Lecure #3 Wha can go wrong? Trajecories of hybrid sysems João P. Hespanha Universiy of California a Sana Barbara Summary 1. Trajecories of hybrid sysems: Soluion o a hybrid
More informationRL Lecture 7: Eligibility Traces. R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1
RL Lecure 7: Eligibiliy Traces R. S. Suon and A. G. Baro: Reinforcemen Learning: An Inroducion 1 N-sep TD Predicion Idea: Look farher ino he fuure when you do TD backup (1, 2, 3,, n seps) R. S. Suon and
More informationOf all of the intellectual hurdles which the human mind has confronted and has overcome in the last fifteen hundred years, the one which seems to me
Of all of he inellecual hurdles which he human mind has confroned and has overcome in he las fifeen hundred years, he one which seems o me o have been he mos amazing in characer and he mos supendous in
More informationLearning a Class from Examples. Training set X. Class C 1. Class C of a family car. Output: Input representation: x 1 : price, x 2 : engine power
Alpaydin Chaper, Michell Chaper 7 Alpaydin slides are in urquoise. Ehem Alpaydin, copyrigh: The MIT Press, 010. alpaydin@boun.edu.r hp://www.cmpe.boun.edu.r/ ehem/imle All oher slides are based on Michell.
More informationThe Residual Graph. 12 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm
Augmening Pah Algorihm Greedy-algorihm: ar wih f (e) = everywhere find an - pah wih f (e) < c(e) on every edge augmen flow along he pah repea a long a poible The Reidual Graph From he graph G = (V, E,
More informationDeep Learning: Theory, Techniques & Applications - Recurrent Neural Networks -
Deep Learning: Theory, Techniques & Applicaions - Recurren Neural Neworks - Prof. Maeo Maeucci maeo.maeucci@polimi.i Deparmen of Elecronics, Informaion and Bioengineering Arificial Inelligence and Roboics
More informationPhys 221 Fall Chapter 2. Motion in One Dimension. 2014, 2005 A. Dzyubenko Brooks/Cole
Phys 221 Fall 2014 Chaper 2 Moion in One Dimension 2014, 2005 A. Dzyubenko 2004 Brooks/Cole 1 Kinemaics Kinemaics, a par of classical mechanics: Describes moion in erms of space and ime Ignores he agen
More information0.1 MAXIMUM LIKELIHOOD ESTIMATION EXPLAINED
0.1 MAXIMUM LIKELIHOOD ESTIMATIO EXPLAIED Maximum likelihood esimaion is a bes-fi saisical mehod for he esimaion of he values of he parameers of a sysem, based on a se of observaions of a random variable
More informationPolylogarithmic Concurrent Data Structures from Monotone Circuits
Polylogarihmic Concurren Daa Srucures from Monoone Circuis JAMES ASPNES, Yale Universiy HAGIT ATTIYA, Technion KEREN CENSOR-HILLEL, MIT 2 This aricle presens consrucions of useful concurren daa srucures,
More informationRobotics I. April 11, The kinematics of a 3R spatial robot is specified by the Denavit-Hartenberg parameters in Tab. 1.
Roboics I April 11, 017 Exercise 1 he kinemaics of a 3R spaial robo is specified by he Denavi-Harenberg parameers in ab 1 i α i d i a i θ i 1 π/ L 1 0 1 0 0 L 3 0 0 L 3 3 able 1: able of DH parameers of
More informationAnalyze patterns and relationships. 3. Generate two numerical patterns using AC
envision ah 2.0 5h Grade ah Curriculum Quarer 1 Quarer 2 Quarer 3 Quarer 4 andards: =ajor =upporing =Addiional Firs 30 Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 andards: Operaions and Algebraic Thinking
More information2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes
Some common engineering funcions 2.7 Inroducion This secion provides a caalogue of some common funcions ofen used in Science and Engineering. These include polynomials, raional funcions, he modulus funcion
More information(b) (a) (d) (c) (e) Figure 10-N1. (f) Solution:
Example: The inpu o each of he circuis shown in Figure 10-N1 is he volage source volage. The oupu of each circui is he curren i( ). Deermine he oupu of each of he circuis. (a) (b) (c) (d) (e) Figure 10-N1
More informationd 1 = c 1 b 2 - b 1 c 2 d 2 = c 1 b 3 - b 1 c 3
and d = c b - b c c d = c b - b c c This process is coninued unil he nh row has been compleed. The complee array of coefficiens is riangular. Noe ha in developing he array an enire row may be divided or
More informationThe Residual Graph. 11 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm
Augmening Pah Algorihm Greedy-algorihm: ar wih f (e) = everywhere find an - pah wih f (e) < c(e) on every edge augmen flow along he pah repea a long a poible The Reidual Graph From he graph G = (V, E,
More informationKriging Models Predicting Atrazine Concentrations in Surface Water Draining Agricultural Watersheds
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Kriging Models Predicing Arazine Concenraions in Surface Waer Draining Agriculural Waersheds Paul L. Mosquin, Jeremy Aldworh, Wenlin Chen Supplemenal Maerial Number
More informationLab 10: RC, RL, and RLC Circuits
Lab 10: RC, RL, and RLC Circuis In his experimen, we will invesigae he behavior of circuis conaining combinaions of resisors, capaciors, and inducors. We will sudy he way volages and currens change in
More informationContinuous Time. Time-Domain System Analysis. Impulse Response. Impulse Response. Impulse Response. Impulse Response. ( t) + b 0.
Time-Domain Sysem Analysis Coninuous Time. J. Robers - All Righs Reserved. Edied by Dr. Rober Akl 1. J. Robers - All Righs Reserved. Edied by Dr. Rober Akl 2 Le a sysem be described by a 2 y ( ) + a 1
More informationSolutions for Assignment 2
Faculy of rs and Science Universiy of Torono CSC 358 - Inroducion o Compuer Neworks, Winer 218 Soluions for ssignmen 2 Quesion 1 (2 Poins): Go-ack n RQ In his quesion, we review how Go-ack n RQ can be
More informationEfficient Matching for State-Persistent Publish/Subscribe Systems
Efficien Maching for Sae-Persisen Publish/Subscribe Sysems Absrac Huber Ka Yau Leung IBM Torono Lab hkyleung@ca.ibm.com Conen-based publish/subscribe sysems allow informaion disseminaion and fine-grained
More informationPhysical Limitations of Logic Gates Week 10a
Physical Limiaions of Logic Gaes Week 10a In a compuer we ll have circuis of logic gaes o perform specific funcions Compuer Daapah: Boolean algebraic funcions using binary variables Symbolic represenaion
More information10. State Space Methods
. Sae Space Mehods. Inroducion Sae space modelling was briefly inroduced in chaper. Here more coverage is provided of sae space mehods before some of heir uses in conrol sysem design are covered in he
More informationMachine Learning 4771
ony Jebara, Columbia Universiy achine Learning 4771 Insrucor: ony Jebara ony Jebara, Columbia Universiy opic 20 Hs wih Evidence H Collec H Evaluae H Disribue H Decode H Parameer Learning via JA & E ony
More informationFrom Particles to Rigid Bodies
Rigid Body Dynamics From Paricles o Rigid Bodies Paricles No roaions Linear velociy v only Rigid bodies Body roaions Linear velociy v Angular velociy ω Rigid Bodies Rigid bodies have boh a posiion and
More informationA First Course on Kinetics and Reaction Engineering. Class 19 on Unit 18
A Firs ourse on Kineics and Reacion Engineering lass 19 on Uni 18 Par I - hemical Reacions Par II - hemical Reacion Kineics Where We re Going Par III - hemical Reacion Engineering A. Ideal Reacors B. Perfecly
More informationHomework sheet Exercises done during the lecture of March 12, 2014
EXERCISE SESSION 2A FOR THE COURSE GÉOMÉTRIE EUCLIDIENNE, NON EUCLIDIENNE ET PROJECTIVE MATTEO TOMMASINI Homework shee 3-4 - Exercises done during he lecure of March 2, 204 Exercise 2 Is i rue ha he parameerized
More informationWe just finished the Erdős-Stone Theorem, and ex(n, F ) (1 1/(χ(F ) 1)) ( n
Lecure 3 - Kövari-Sós-Turán Theorem Jacques Versraëe jacques@ucsd.edu We jus finished he Erdős-Sone Theorem, and ex(n, F ) ( /(χ(f ) )) ( n 2). So we have asympoics when χ(f ) 3 bu no when χ(f ) = 2 i.e.
More informationMATHEMATICAL DESCRIPTION OF THEORETICAL METHODS OF RESERVE ECONOMY OF CONSIGNMENT STORES
MAHEMAICAL DESCIPION OF HEOEICAL MEHODS OF ESEVE ECONOMY OF CONSIGNMEN SOES Péer elek, József Cselényi, György Demeer Universiy of Miskolc, Deparmen of Maerials Handling and Logisics Absrac: Opimizaion
More informationLearning Objectives: Practice designing and simulating digital circuits including flip flops Experience state machine design procedure
Lab 4: Synchronous Sae Machine Design Summary: Design and implemen synchronous sae machine circuis and es hem wih simulaions in Cadence Viruoso. Learning Objecives: Pracice designing and simulaing digial
More informationTom Heskes and Onno Zoeter. Presented by Mark Buller
Tom Heskes and Onno Zoeer Presened by Mark Buller Dynamic Bayesian Neworks Direced graphical models of sochasic processes Represen hidden and observed variables wih differen dependencies Generalize Hidden
More informationChapter 2 The Derivative Applied Calculus 107. We ll need a rule for finding the derivative of a product so we don t have to multiply everything out.
Chaper The Derivaive Applie Calculus 107 Secion 4: Prouc an Quoien Rules The basic rules will le us ackle simple funcions. Bu wha happens if we nee he erivaive of a combinaion of hese funcions? Eample
More information( ) ( ) if t = t. It must satisfy the identity. So, bulkiness of the unit impulse (hyper)function is equal to 1. The defining characteristic is
UNIT IMPULSE RESPONSE, UNIT STEP RESPONSE, STABILITY. Uni impulse funcion (Dirac dela funcion, dela funcion) rigorously defined is no sricly a funcion, bu disribuion (or measure), precise reamen requires
More informationAn random variable is a quantity that assumes different values with certain probabilities.
Probabiliy The probabiliy PrA) of an even A is a number in [, ] ha represens how likely A is o occur. The larger he value of PrA), he more likely he even is o occur. PrA) means he even mus occur. PrA)
More informationMath 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:
Mah 4 Eam Review Problems Problem. Calculae he 3rd Taylor polynomial for arcsin a =. Soluion. Le f() = arcsin. For his problem, we use he formula f() + f () + f ()! + f () 3! for he 3rd Taylor polynomial
More informationSTATE-SPACE MODELLING. A mass balance across the tank gives:
B. Lennox and N.F. Thornhill, 9, Sae Space Modelling, IChemE Process Managemen and Conrol Subjec Group Newsleer STE-SPACE MODELLING Inroducion: Over he pas decade or so here has been an ever increasing
More informationExtending the Four Russian Algorithm to Compute the Edit Script in Linear Space. Abstract
Exing he Four Russian Algorihm o Compue he Edi Scrip in Linear Space Vamsi Kundei (vamsik@engr.uconn.edu) CSE Deparmen Universiy of Connecicu Sorrs,CT Sanguhevar Rajasekaran (rajasek@engr.uconn.edu) CSE
More informationTHE UNIVERSITY OF TEXAS AT AUSTIN McCombs School of Business
THE UNIVERITY OF TEXA AT AUTIN McCombs chool of Business TA 7.5 Tom hively CLAICAL EAONAL DECOMPOITION - MULTIPLICATIVE MODEL Examples of easonaliy 8000 Quarerly sales for Wal-Mar for quarers a l e s 6000
More informationAsymptotic Equipartition Property - Seminar 3, part 1
Asympoic Equipariion Propery - Seminar 3, par 1 Ocober 22, 2013 Problem 1 (Calculaion of ypical se) To clarify he noion of a ypical se A (n) ε and he smalles se of high probabiliy B (n), we will calculae
More informationOnline Convex Optimization Example And Follow-The-Leader
CSE599s, Spring 2014, Online Learning Lecure 2-04/03/2014 Online Convex Opimizaion Example And Follow-The-Leader Lecurer: Brendan McMahan Scribe: Sephen Joe Jonany 1 Review of Online Convex Opimizaion
More information