Strings. String Processing. Periodicity. Strings. Typical applications:

Size: px
Start display at page:

Download "Strings. String Processing. Periodicity. Strings. Typical applications:"

Transcription

1 String Processing Typicl pplictions: pttern mtching/recognition moleculr biology, comprtive genomics, informtion retrievl dt/text mining dt/text compression, coding, encryption string processing in lrge dtbses 25/02/2011 Applied Algorithmics - week3 1 Strings A string is sequence of symbols drwn from some well defined set cll the lphbet. Exmples of lphbets include: ASCII code, Unicode binry lphbet {0,1} System of DNA bse-pirs {A,C,G,T} Ltin, Greek, Chinese lphbet Exmples of strings Jv/C/ADA progrms, HTML/XML documents, DNA sequences, imge/video/udio files 25/02/2011 Applied Algorithmics - week3 2 Strings Bsic definitions: Let A be n lphbet. We sy tht A + contins ll nonempty strings bsed on symbols from A, nd A * =A + {ε}, { where ε is n empty string. Let w be string of length n. We sy tht w=w[0..n-1]. Any initil frgment w[0..i] is clled prefix of w. Any finl frgment w[j..n-1] is clled suffix of w. Any frgment of form w[i..j] is clled substring of w. Periodicity We sy tht w=w[0..n-1] hs period p iff w[i]=w[i+p], for ll 0 i n-p-1, see below w b p w b p p+1 p+2 b For exmple string w=bbbb hs period 3 n-1 n-p-1 n-1 25/02/2011 Applied Algorithmics - week3 3 25/02/2011 Applied Algorithmics - week3 4

2 Periodicity Lemm But w=bbbb hs lso periods 6, 9 nd 11 Lemm: p is the shortest period in w=w[0..n-1] iff w[0..n-p-1] is the longest prefix of w which is lso suffix w[p..n-1], see figure on previous slide Periodicty Lemm: If string w=w[0..n-1] hs periods p nd q such tht p+q n then w hs lso period gcd(p,q), where gcd(,) stnds for the gretest common divisor of two integers. 25/02/2011 Applied Algorithmics - week3 5 Periodicity Lemm Proof: The min observtion is bsed on the fct tht if string w hs two periods p q then it lso hs period p-q. p p-q The thesis of the periodicity lemm follows from the observtion (Euclid s Algorithm) tht for ny positive integers >b, gcd(,b)=gcd(b,-b). 25/02/2011 Applied Algorithmics - week3 6 q String pttern mtching Input: given two strings: P=P[0..m-1] clled the pttern nd T=T[0..n-1] clled the text. Tsk: is to find ll occurrences of P in T using s smll number s possible text symbol comprisons, where n occurrence of P t position i in T is defined s P[j]=T[i+j] for ll 0 j m-1, see exmple below T P b i b 0 i+m-1 25/02/2011 Applied Algorithmics - week3 7 m-1 Brute-Force Algorithm The brute-force lgorithm tests nively (vi consecutive symbols comprison) whether pttern P occurs t ny permissible position 0 i n-m-1 in text T. The test t ech position cn cost s much s m, for exmple when T=.. nd P= possible scenrio in imges, unlikely in nturl lnguges, codes Thus the time complexity of brute force lgorithms is bounded by (n-m) m=o(n m) 25/02/2011 Applied Algorithmics - week3 8

3 Brute-force lgorithm - code Algorithm Brute-Force-First-Mtch(T,P): integer; for i 0 to n-m-1 do j 0; while (j<m) nd (T[i+j]=P[j]) do j j +1; if (j=m) then return (i); return (-1); 25/02/2011 Applied Algorithmics - week3 9 More efficient pttern mtching Cn we perform pttern mtching in time O(m+n) in ny, even the worst cse, scenrio? The nswer is yes, nd the solution is bsed on proper use of periodicity of strings. But wht is the cuse of high complexity nywy? It must be multiple comprisons of text symbols. Cn we do something bout it? Indeed, we cn, t lest on most of the occsions. 25/02/2011 Applied Algorithmics - week3 10 Principle of Knuth-Morris-Prtt KMP Algorithm In Brute-force solution, when the lgorithm moves from position i to i+1 it forgets ll text symbols tht hve been recognized previously KMP lgorithm similrly to Brute-force solution serches consecutive text positions storing t ny time the longest currently recognized prefix π of P But when the mismtch between P nd T is found KMP moves by the length of the smllest period of π remembering ll recognized text symbols 25/02/2011 Applied Algorithmics - week3 11 Principle of Knuth-Morris-Prtt KMP Algorithm shortest period of π clled shift s no occurrence of P in rnge (i..i+s-1) prefix π 0 i s i+s longest prefix/suffix of π? pttern P pttern P mismtch b text T If shorter thn s shift ws fesible s would not be the shortest period of π. b 25/02/2011 Applied Algorithmics - week3 12

4 KMP Filure Function The KMP lgorithm works in two stges: pttern preprocessing nd ctul text serch. During pttern preprocessing we: compute the longest proper prefix/suffix of ech prefix P[0..i] nd store its length in n rry F[1..m] t position i+1. Vector F clled the KMP filure function. During the text serch we: trverse consecutive text positions looking for pttern occurrences nd voiding redundnt positive tests with help of the filure function F[1 m]. 25/02/2011 Applied Algorithmics - week3 13 KMP filure function - exmple Let P[0..5] = bb Then the KMP filure function looks s follows F[0] is not defined F[1] = 0 (string hs no proper prefix/suffix) F[2] = 0 (string b hs no proper prefix/suffix) F[3] = 1 (the longest prefix/suffix in b is ) F[4] = 1 (the longest prefix/suffix in b is ) F[5] = 2 (the longest prefix/suffix in bb is b) F[6] = 3 (the longest prefix/suffix in bb is b) 25/02/2011 Applied Algorithmics - week3 14 KMP lgorithm - text serch Algorithm KMP-First-Mtch(T,P): integer; i j 0; while (j<m) nd (T[i+j]=P[j]) { //test next text symbol// j j +1; if (j=m) { then return (i); // return the first occurrence of P // else if (j>0) { then { i i +(j-f[j]); j F[j]; } // shift bsed on F // else i+1; // shift bsed on empty prefix // } } if (i>n-m) return (-1); // end of the text, no pttern occurrences // } 25/02/2011 Applied Algorithmics - week3 15 KMP text serch complexity New symbol is mtched New symbol cuses mismtch left end moves b right end moves Since either left end of the recognized pttern prefix or its right end lwys move the time complexity (number of symbol comprisons) is bounded by 2n. 25/02/2011 Applied Algorithmics - week3 16

5 KMP lgorithm - preprocessing Algorithm Brute-Force-KMP-Mtch(P): integer; F[1] 0; i 1; j F[1]; while (i m-1) do if (P[j]=P[i]) then F[i+1] j+1; j F[i+1]; i i+1; else if (j=0) then F[i+1] 0; j F[i+1]; i i+1; else j F[j]; 25/02/2011 Applied Algorithmics - week3 17 KMP complexity Using similr rgument to the one used in the text serch one cn prove tht the preprocessing requires t most 2 m comprisons. Theorem: The totl time (number of comprisons) complexity of KMP pttern mtching lgorithm is bounded by 2 m+2 n =O(m+n) nd the extr spce required for filure function is of size O(m). We show lter tht one cn obtin similr time bounds hving only O(1) spce. 25/02/2011 Applied Algorithmics - week3 18 Other string mtching lgorithms Boyer-Moore (BM) lgorithm symbols in pttern P re tested ginst the text symbols from right to left, i.e., the lgorithm is bsed on suffix recognition this pproch llows to perform text serch in time c n, for constnt c<1 on verge (in rndom nd nturl texts), but the method works in time O(n m) in the worst cse. It is possible to improve the worst time complexity of BM lgorithm O(n) if we keep in the memory informtion bout the lst recognized suffix of the pttern Other string mtching lgorithms Boyer-Moore lgorithm long shift pttern P text T 25/02/2011 Applied Algorithmics - week3 19 smll number of comprisons 25/02/2011 Applied Algorithmics - week3 20

6 Other string mtching lgorithms Krp-Rbin lgorithm is bsed on the use of reltively simple hsh function f() ech symbol in the lphbet A hs unique integer score s(), e.g., ll symbols cn be enumerted from 1 to A or using nother (ASCII, Unicode) encoding the score is extendble from symbols to strings with the help of hsh function f(), s.t., for,b A nd strings s, s 1 = s, nd s 2 =s b the score f(s) is esily computble from f(s 1 ) nd s(), s well s the score f(s 2 ) is esily computble from f(s) nd s(b) 25/02/2011 Applied Algorithmics - week3 21 Other string mtching lgorithms Krp-Rbin lgorithm the lgorithm computes initilly the score f(p) in the serch stge it compres the score of consecutive text substrings f(t[i..i+m-1]), for ll i 1,..,n-m-1 for every position i, s.t., f(t[i..i+m-1])=f(p) we test the pproprite text nd pttern symbols nively The lgorithm works in time O(n) on verge (in rndom nd nturl texts) but in time O(n m) in the worst cse 25/02/2011 Applied Algorithmics - week3 22 Other string mtching lgorithms Krp-Rbin lgorithm shift of size 1 is f(p)=f(sb)? pttern P is f(p)=f(s)? text T s = P[i+1..i+m-1] b Other string mtching lgorithms There exists n lgorithm tht uses O(n log(m)/m) symbol comprisons in rndom texts fter O(m) time preprocessing; this is the best result possible in this model. There exists text serch lgorithm bsed on n+o(n/m) symbol comprisons in the worst cse fter O(m 2 ) time preprocessing; this is the best result possible in this model For extr informtion on string mtching see: 25/02/2011 Applied Algorithmics - week /02/2011 Applied Algorithmics - week3 24

One Minute To Learn Programming: Finite Automata

One Minute To Learn Programming: Finite Automata Gret Theoreticl Ides In Computer Science Steven Rudich CS 15-251 Spring 2005 Lecture 9 Fe 8 2005 Crnegie Mellon University One Minute To Lern Progrmming: Finite Automt Let me tech you progrmming lnguge

More information

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( ) Polynomil Functions Polynomil functions in one vrible cn be written in expnded form s n n 1 n 2 2 f x = x + x + x + + x + x+ n n 1 n 2 2 1 0 Exmples of polynomils in expnded form re nd 3 8 7 4 = 5 4 +

More information

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers. 2 Rtionl Numbers Integers such s 5 were importnt when solving the eqution x+5 = 0. In similr wy, frctions re importnt for solving equtions like 2x = 1. Wht bout equtions like 2x + 1 = 0? Equtions of this

More information

Regular Sets and Expressions

Regular Sets and Expressions Regulr Sets nd Expressions Finite utomt re importnt in science, mthemtics, nd engineering. Engineers like them ecuse they re super models for circuits (And, since the dvent of VLSI systems sometimes finite

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

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES DAVID WEBB CONTENTS Liner trnsformtions 2 The representing mtrix of liner trnsformtion 3 3 An ppliction: reflections in the plne 6 4 The lgebr of

More information

Binary Representation of Numbers Autar Kaw

Binary Representation of Numbers Autar Kaw Binry Representtion of Numbers Autr Kw After reding this chpter, you should be ble to: 1. convert bse- rel number to its binry representtion,. convert binry number to n equivlent bse- number. In everydy

More information

Algebra Review. How well do you remember your algebra?

Algebra Review. How well do you remember your algebra? Algebr Review How well do you remember your lgebr? 1 The Order of Opertions Wht do we men when we write + 4? If we multiply we get 6 nd dding 4 gives 10. But, if we dd + 4 = 7 first, then multiply by then

More information

Operations with Polynomials

Operations with Polynomials 38 Chpter P Prerequisites P.4 Opertions with Polynomils Wht you should lern: Write polynomils in stndrd form nd identify the leding coefficients nd degrees of polynomils Add nd subtrct polynomils Multiply

More information

Math 135 Circles and Completing the Square Examples

Math 135 Circles and Completing the Square Examples Mth 135 Circles nd Completing the Squre Exmples A perfect squre is number such tht = b 2 for some rel number b. Some exmples of perfect squres re 4 = 2 2, 16 = 4 2, 169 = 13 2. We wish to hve method for

More information

Integration by Substitution

Integration by Substitution Integrtion by Substitution Dr. Philippe B. Lvl Kennesw Stte University August, 8 Abstrct This hndout contins mteril on very importnt integrtion method clled integrtion by substitution. Substitution is

More information

Lecture 5. Inner Product

Lecture 5. Inner Product Lecture 5 Inner Product Let us strt with the following problem. Given point P R nd line L R, how cn we find the point on the line closest to P? Answer: Drw line segment from P meeting the line in right

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

4.11 Inner Product Spaces

4.11 Inner Product Spaces 314 CHAPTER 4 Vector Spces 9. A mtrix of the form 0 0 b c 0 d 0 0 e 0 f g 0 h 0 cnnot be invertible. 10. A mtrix of the form bc d e f ghi such tht e bd = 0 cnnot be invertible. 4.11 Inner Product Spces

More information

Reasoning to Solve Equations and Inequalities

Reasoning to Solve Equations and Inequalities Lesson4 Resoning to Solve Equtions nd Inequlities In erlier work in this unit, you modeled situtions with severl vriles nd equtions. For exmple, suppose you were given usiness plns for concert showing

More information

Basic Analysis of Autarky and Free Trade Models

Basic Analysis of Autarky and Free Trade Models Bsic Anlysis of Autrky nd Free Trde Models AUTARKY Autrky condition in prticulr commodity mrket refers to sitution in which country does not engge in ny trde in tht commodity with other countries. Consequently

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Treatment Spring Late Summer Fall 0.10 5.56 3.85 0.61 6.97 3.01 1.91 3.01 2.13 2.99 5.33 2.50 1.06 3.53 6.10 Mean = 1.33 Mean = 4.88 Mean = 3.

Treatment Spring Late Summer Fall 0.10 5.56 3.85 0.61 6.97 3.01 1.91 3.01 2.13 2.99 5.33 2.50 1.06 3.53 6.10 Mean = 1.33 Mean = 4.88 Mean = 3. The nlysis of vrince (ANOVA) Although the t-test is one of the most commonly used sttisticl hypothesis tests, it hs limittions. The mjor limittion is tht the t-test cn be used to compre the mens of only

More information

Distributions. (corresponding to the cumulative distribution function for the discrete case).

Distributions. (corresponding to the cumulative distribution function for the discrete case). Distributions Recll tht n integrble function f : R [,] such tht R f()d = is clled probbility density function (pdf). The distribution function for the pdf is given by F() = (corresponding to the cumultive

More information

Helicopter Theme and Variations

Helicopter Theme and Variations Helicopter Theme nd Vritions Or, Some Experimentl Designs Employing Pper Helicopters Some possible explntory vribles re: Who drops the helicopter The length of the rotor bldes The height from which the

More information

CHAPTER 11 Numerical Differentiation and Integration

CHAPTER 11 Numerical Differentiation and Integration CHAPTER 11 Numericl Differentition nd Integrtion Differentition nd integrtion re bsic mthemticl opertions with wide rnge of pplictions in mny res of science. It is therefore importnt to hve good methods

More information

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

and thus, they are similar. If k = 3 then the Jordan form of both matrices is Homework ssignment 11 Section 7. pp. 249-25 Exercise 1. Let N 1 nd N 2 be nilpotent mtrices over the field F. Prove tht N 1 nd N 2 re similr if nd only if they hve the sme miniml polynomil. Solution: If

More information

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100 hsn.uk.net Higher Mthemtics UNIT 3 OUTCOME 1 Vectors Contents Vectors 18 1 Vectors nd Sclrs 18 Components 18 3 Mgnitude 130 4 Equl Vectors 131 5 Addition nd Subtrction of Vectors 13 6 Multipliction by

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one. 5.2. LINE INTEGRALS 265 5.2 Line Integrls 5.2.1 Introduction Let us quickly review the kind of integrls we hve studied so fr before we introduce new one. 1. Definite integrl. Given continuous rel-vlued

More information

Factoring Polynomials

Factoring Polynomials Fctoring Polynomils Some definitions (not necessrily ll for secondry school mthemtics): A polynomil is the sum of one or more terms, in which ech term consists of product of constnt nd one or more vribles

More information

SPECIAL PRODUCTS AND FACTORIZATION

SPECIAL PRODUCTS AND FACTORIZATION MODULE - Specil Products nd Fctoriztion 4 SPECIAL PRODUCTS AND FACTORIZATION In n erlier lesson you hve lernt multipliction of lgebric epressions, prticulrly polynomils. In the study of lgebr, we come

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata N Lecture Notes on Regulr Lnguges nd Finite Automt for Prt IA of the Computer Science Tripos Mrcelo Fiore Cmbridge University Computer Lbortory First Edition 1998. Revised 1999, 2000, 2001, 2002, 2003,

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Brillouin Zones. Physics 3P41 Chris Wiebe

Brillouin Zones. Physics 3P41 Chris Wiebe Brillouin Zones Physics 3P41 Chris Wiebe Direct spce to reciprocl spce * = 2 i j πδ ij Rel (direct) spce Reciprocl spce Note: The rel spce nd reciprocl spce vectors re not necessrily in the sme direction

More information

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS 3343 -- Spring 2009

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS 3343 -- Spring 2009 CS 4 -- Spring 2009 Sorting Crol Wenk Slides courtesy of Chrles Leiserson with smll chnges by Crol Wenk CS 4 Anlysis of Algorithms 1 How fst cn we sort? All the sorting lgorithms we hve seen so fr re comprison

More information

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS Known for over 500 yers is the fct tht the sum of the squres of the legs of right tringle equls the squre of the hypotenuse. Tht is +b c. A simple proof is

More information

1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall 2011 - Final Exam

1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall 2011 - Final Exam 1./1.1 Introduction to Computers nd Engineering Problem Solving Fll 211 - Finl Exm Nme: MIT Emil: TA: Section: You hve 3 hours to complete this exm. In ll questions, you should ssume tht ll necessry pckges

More information

MODULE 3. 0, y = 0 for all y

MODULE 3. 0, y = 0 for all y Topics: Inner products MOULE 3 The inner product of two vectors: The inner product of two vectors x, y V, denoted by x, y is (in generl) complex vlued function which hs the following four properties: i)

More information

Review guide for the final exam in Math 233

Review guide for the final exam in Math 233 Review guide for the finl exm in Mth 33 1 Bsic mteril. This review includes the reminder of the mteril for mth 33. The finl exm will be cumultive exm with mny of the problems coming from the mteril covered

More information

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity Bbylonin Method of Computing the Squre Root: Justifictions Bsed on Fuzzy Techniques nd on Computtionl Complexity Olg Koshelev Deprtment of Mthemtics Eduction University of Texs t El Pso 500 W. University

More information

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes The Sclr Product 9.3 Introduction There re two kinds of multipliction involving vectors. The first is known s the sclr product or dot product. This is so-clled becuse when the sclr product of two vectors

More information

Experiment 6: Friction

Experiment 6: Friction Experiment 6: Friction In previous lbs we studied Newton s lws in n idel setting, tht is, one where friction nd ir resistnce were ignored. However, from our everydy experience with motion, we know tht

More information

How To Network A Smll Business

How To Network A Smll Business Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Section 5-4 Trigonometric Functions

Section 5-4 Trigonometric Functions 5- Trigonometric Functions Section 5- Trigonometric Functions Definition of the Trigonometric Functions Clcultor Evlution of Trigonometric Functions Definition of the Trigonometric Functions Alternte Form

More information

Data Compression. Lossless And Lossy Compression

Data Compression. Lossless And Lossy Compression Dt Compression Reduce the size of dt. ƒ Reduces storge spce nd hence storge cost. Compression rtio = originl dt size/compressed dt size ƒ Reduces time to retrieve nd trnsmit dt. Lossless And Lossy Compression

More information

Lecture 3 Gaussian Probability Distribution

Lecture 3 Gaussian Probability Distribution Lecture 3 Gussin Probbility Distribution Introduction l Gussin probbility distribution is perhps the most used distribution in ll of science. u lso clled bell shped curve or norml distribution l Unlike

More information

Graphs on Logarithmic and Semilogarithmic Paper

Graphs on Logarithmic and Semilogarithmic Paper 0CH_PHClter_TMSETE_ 3//00 :3 PM Pge Grphs on Logrithmic nd Semilogrithmic Pper OBJECTIVES When ou hve completed this chpter, ou should be ble to: Mke grphs on logrithmic nd semilogrithmic pper. Grph empiricl

More information

Cypress Creek High School IB Physics SL/AP Physics B 2012 2013 MP2 Test 1 Newton s Laws. Name: SOLUTIONS Date: Period:

Cypress Creek High School IB Physics SL/AP Physics B 2012 2013 MP2 Test 1 Newton s Laws. Name: SOLUTIONS Date: Period: Nme: SOLUTIONS Dte: Period: Directions: Solve ny 5 problems. You my ttempt dditionl problems for extr credit. 1. Two blocks re sliding to the right cross horizontl surfce, s the drwing shows. In Cse A

More information

19. The Fermat-Euler Prime Number Theorem

19. The Fermat-Euler Prime Number Theorem 19. The Fermt-Euler Prime Number Theorem Every prime number of the form 4n 1 cn be written s sum of two squres in only one wy (side from the order of the summnds). This fmous theorem ws discovered bout

More information

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY MAT 0630 INTERNET RESOURCES, REVIEW OF CONCEPTS AND COMMON MISTAKES PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY Contents 1. ACT Compss Prctice Tests 1 2. Common Mistkes 2 3. Distributive

More information

2005-06 Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration

2005-06 Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration Source: http://www.mth.cuhk.edu.hk/~mt26/mt26b/notes/notes3.pdf 25-6 Second Term MAT26B 1 Supplementry Notes 3 Interchnge of Differentition nd Integrtion The theme of this course is bout vrious limiting

More information

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Or more simply put, when adding or subtracting quantities, their uncertainties add. Propgtion of Uncertint through Mthemticl Opertions Since the untit of interest in n eperiment is rrel otined mesuring tht untit directl, we must understnd how error propgtes when mthemticl opertions re

More information

Unambiguous Recognizable Two-dimensional Languages

Unambiguous Recognizable Two-dimensional Languages Unmbiguous Recognizble Two-dimensionl Lnguges Mrcell Anselmo, Dor Gimmrresi, Mri Mdoni, Antonio Restivo (Univ. of Slerno, Univ. Rom Tor Vergt, Univ. of Ctni, Univ. of Plermo) W2DL, My 26 REC fmily I REC

More information

Solving the String Statistics Problem in Time O(n log n)

Solving the String Statistics Problem in Time O(n log n) Solving the String Sttistics Prolem in Time O(n log n) Gerth Stølting Brodl 1,,, Rune B. Lyngsø 3, Ann Östlin1,, nd Christin N. S. Pedersen 1,2, 1 BRICS, Deprtment of Computer Science, University of Arhus,

More information

Integration. 148 Chapter 7 Integration

Integration. 148 Chapter 7 Integration 48 Chpter 7 Integrtion 7 Integrtion t ech, by supposing tht during ech tenth of second the object is going t constnt speed Since the object initilly hs speed, we gin suppose it mintins this speed, but

More information

9 CONTINUOUS DISTRIBUTIONS

9 CONTINUOUS DISTRIBUTIONS 9 CONTINUOUS DISTIBUTIONS A rndom vrible whose vlue my fll nywhere in rnge of vlues is continuous rndom vrible nd will be ssocited with some continuous distribution. Continuous distributions re to discrete

More information

Basic Research in Computer Science BRICS RS-02-13 Brodal et al.: Solving the String Statistics Problem in Time O(n log n)

Basic Research in Computer Science BRICS RS-02-13 Brodal et al.: Solving the String Statistics Problem in Time O(n log n) BRICS Bsic Reserch in Computer Science BRICS RS-02-13 Brodl et l.: Solving the String Sttistics Prolem in Time O(n log n) Solving the String Sttistics Prolem in Time O(n log n) Gerth Stølting Brodl Rune

More information

EQUATIONS OF LINES AND PLANES

EQUATIONS OF LINES AND PLANES EQUATIONS OF LINES AND PLANES MATH 195, SECTION 59 (VIPUL NAIK) Corresponding mteril in the ook: Section 12.5. Wht students should definitely get: Prmetric eqution of line given in point-direction nd twopoint

More information

Decision Rule Extraction from Trained Neural Networks Using Rough Sets

Decision Rule Extraction from Trained Neural Networks Using Rough Sets Decision Rule Extrction from Trined Neurl Networks Using Rough Sets Alin Lzr nd Ishwr K. Sethi Vision nd Neurl Networks Lbortory Deprtment of Computer Science Wyne Stte University Detroit, MI 48 ABSTRACT

More information

6.2 Volumes of Revolution: The Disk Method

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

More information

Data replication in mobile computing

Data replication in mobile computing Technicl Report, My 2010 Dt repliction in mobile computing Bchelor s Thesis in Electricl Engineering Rodrigo Christovm Pmplon HALMSTAD UNIVERSITY, IDE SCHOOL OF INFORMATION SCIENCE, COMPUTER AND ELECTRICAL

More information

How To Set Up A Network For Your Business

How To Set Up A Network For Your Business Why Network is n Essentil Productivity Tool for Any Smll Business TechAdvisory.org SME Reports sponsored by Effective technology is essentil for smll businesses looking to increse their productivity. Computer

More information

Physics 43 Homework Set 9 Chapter 40 Key

Physics 43 Homework Set 9 Chapter 40 Key Physics 43 Homework Set 9 Chpter 4 Key. The wve function for n electron tht is confined to x nm is. Find the normliztion constnt. b. Wht is the probbility of finding the electron in. nm-wide region t x

More information

Section 7-4 Translation of Axes

Section 7-4 Translation of Axes 62 7 ADDITIONAL TOPICS IN ANALYTIC GEOMETRY Section 7-4 Trnsltion of Aes Trnsltion of Aes Stndrd Equtions of Trnslted Conics Grphing Equtions of the Form A 2 C 2 D E F 0 Finding Equtions of Conics In the

More information

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials MEI Mthemtics in Ection nd Instry Topic : Proof MEI Structured Mthemtics Mole Summry Sheets C, Methods for Anced Mthemtics (Version B reference to new book) Topic : Nturl Logrithms nd Eponentils Topic

More information

Rotating DC Motors Part II

Rotating DC Motors Part II Rotting Motors rt II II.1 Motor Equivlent Circuit The next step in our consiertion of motors is to evelop n equivlent circuit which cn be use to better unerstn motor opertion. The rmtures in rel motors

More information

Learning Workflow Petri Nets

Learning Workflow Petri Nets Lerning Workflow Petri Nets Jvier Esprz, Mrtin Leucker, nd Mximilin Schlund Technische Universität München, Boltzmnnstr. 3, 85748 Grching, Germny {esprz,leucker,schlund}@in.tum.de Abstrct. Workflow mining

More information

A.7.1 Trigonometric interpretation of dot product... 324. A.7.2 Geometric interpretation of dot product... 324

A.7.1 Trigonometric interpretation of dot product... 324. A.7.2 Geometric interpretation of dot product... 324 A P P E N D I X A Vectors CONTENTS A.1 Scling vector................................................ 321 A.2 Unit or Direction vectors...................................... 321 A.3 Vector ddition.................................................

More information

Bypassing Space Explosion in Regular Expression Matching for Network Intrusion Detection and Prevention Systems

Bypassing Space Explosion in Regular Expression Matching for Network Intrusion Detection and Prevention Systems Bypssing Spce Explosion in Regulr Expression Mtching for Network Intrusion Detection n Prevention Systems Jignesh Ptel, Alex Liu n Eric Torng Dept. of Computer Science n Engineering Michign Stte University

More information

String Searching. String Search. Spam Filtering. String Search

String Searching. String Search. Spam Filtering. String Search String Serch String Serching String serch: given pttern string p, find first mtch in text t. Model : cn't fford to preprocess the text. Krp-Rin Knuth-Morris-Prtt Boyer-Moore N = # chrcters in text M =

More information

APPLICATION NOTE Revision 3.0 MTD/PS-0534 August 13, 2008 KODAK IMAGE SENDORS COLOR CORRECTION FOR IMAGE SENSORS

APPLICATION NOTE Revision 3.0 MTD/PS-0534 August 13, 2008 KODAK IMAGE SENDORS COLOR CORRECTION FOR IMAGE SENSORS APPLICATION NOTE Revision 3.0 MTD/PS-0534 August 13, 2008 KODAK IMAGE SENDORS COLOR CORRECTION FOR IMAGE SENSORS TABLE OF FIGURES Figure 1: Spectrl Response of CMOS Imge Sensor...3 Figure 2: Byer CFA Ptterns...4

More information

MATH 150 HOMEWORK 4 SOLUTIONS

MATH 150 HOMEWORK 4 SOLUTIONS MATH 150 HOMEWORK 4 SOLUTIONS Section 1.8 Show tht the product of two of the numbers 65 1000 8 2001 + 3 177, 79 1212 9 2399 + 2 2001, nd 24 4493 5 8192 + 7 1777 is nonnegtive. Is your proof constructive

More information

The remaining two sides of the right triangle are called the legs of the right triangle.

The remaining two sides of the right triangle are called the legs of the right triangle. 10 MODULE 6. RADICAL EXPRESSIONS 6 Pythgoren Theorem The Pythgoren Theorem An ngle tht mesures 90 degrees is lled right ngle. If one of the ngles of tringle is right ngle, then the tringle is lled right

More information

Econ 4721 Money and Banking Problem Set 2 Answer Key

Econ 4721 Money and Banking Problem Set 2 Answer Key Econ 472 Money nd Bnking Problem Set 2 Answer Key Problem (35 points) Consider n overlpping genertions model in which consumers live for two periods. The number of people born in ech genertion grows in

More information

5 a LAN 6 a gateway 7 a modem

5 a LAN 6 a gateway 7 a modem STARTER With the help of this digrm, try to descrie the function of these components of typicl network system: 1 file server 2 ridge 3 router 4 ckone 5 LAN 6 gtewy 7 modem Another Novell LAN Router Internet

More information

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom Byesin Updting with Continuous Priors Clss 3, 8.05, Spring 04 Jeremy Orloff nd Jonthn Bloom Lerning Gols. Understnd prmeterized fmily of distriutions s representing continuous rnge of hypotheses for the

More information

DlNBVRGH + Sickness Absence Monitoring Report. Executive of the Council. Purpose of report

DlNBVRGH + Sickness Absence Monitoring Report. Executive of the Council. Purpose of report DlNBVRGH + + THE CITY OF EDINBURGH COUNCIL Sickness Absence Monitoring Report Executive of the Council 8fh My 4 I.I...3 Purpose of report This report quntifies the mount of working time lost s result of

More information

I calculate the unemployment rate as (In Labor Force Employed)/In Labor Force

I calculate the unemployment rate as (In Labor Force Employed)/In Labor Force Introduction to the Prctice of Sttistics Fifth Edition Moore, McCbe Section 4.5 Homework Answers to 98, 99, 100,102, 103,105, 107, 109,110, 111, 112, 113 Working. In the lnguge of government sttistics,

More information

PHY 140A: Solid State Physics. Solution to Homework #2

PHY 140A: Solid State Physics. Solution to Homework #2 PHY 140A: Solid Stte Physics Solution to Homework # TA: Xun Ji 1 October 14, 006 1 Emil: jixun@physics.ucl.edu Problem #1 Prove tht the reciprocl lttice for the reciprocl lttice is the originl lttice.

More information

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur Module Anlysis of Stticlly Indeterminte Structures by the Mtrix Force Method Version CE IIT, Khrgpur esson 9 The Force Method of Anlysis: Bems (Continued) Version CE IIT, Khrgpur Instructionl Objectives

More information

Network Configuration Independence Mechanism

Network Configuration Independence Mechanism 3GPP TSG SA WG3 Security S3#19 S3-010323 3-6 July, 2001 Newbury, UK Source: Title: Document for: AT&T Wireless Network Configurtion Independence Mechnism Approvl 1 Introduction During the lst S3 meeting

More information

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation FUNCTIONS AND EQUATIONS. SETS AND SUBSETS.. Definition of set. A set is ny collection of objects which re clled its elements. If x is n element of the set S, we sy tht x belongs to S nd write If y does

More information

Neighborhood Based Fast Graph Search in Large Networks

Neighborhood Based Fast Graph Search in Large Networks Neighborhood Bsed Fst Grph Serch in Lrge Networks Arijit Khn Dept. of Computer Science University of Cliforni Snt Brbr, CA 9306 rijitkhn@cs.ucsb.edu Ziyu Gun Dept. of Computer Science University of Cliforni

More information

AREA OF A SURFACE OF REVOLUTION

AREA OF A SURFACE OF REVOLUTION AREA OF A SURFACE OF REVOLUTION h cut r πr h A surfce of revolution is formed when curve is rotted bout line. Such surfce is the lterl boundr of solid of revolution of the tpe discussed in Sections 7.

More information

Java CUP. Java CUP Specifications. User Code Additions You may define Java code to be included within the generated parser:

Java CUP. Java CUP Specifications. User Code Additions You may define Java code to be included within the generated parser: Jv CUP Jv CUP is prser-genertion tool, similr to Ycc. CUP uilds Jv prser for LALR(1) grmmrs from production rules nd ssocited Jv code frgments. When prticulr production is recognized, its ssocited code

More information

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding 1 Exmple A rectngulr box without lid is to be mde from squre crdbord of sides 18 cm by cutting equl squres from ech corner nd then folding up the sides. 1 Exmple A rectngulr box without lid is to be mde

More information

NOTES. Cohasset Associates, Inc. 2015 Managing Electronic Records Conference 8.1

NOTES. Cohasset Associates, Inc. 2015 Managing Electronic Records Conference 8.1 Cohsset Assocites, Inc. Expnding Your Skill Set: How to Apply the Right Serch Methods to Your Big Dt Problems Juli L. Brickell H5 Generl Counsel MER Conference My 18, 2015 H5 POWERING YOUR DISCOVERY GLOBALLY

More information

Fast string matching

Fast string matching Fast string matching This exposition is based on earlier versions of this lecture and the following sources, which are all recommended reading: Shift-And/Shift-Or 1. Flexible Pattern Matching in Strings,

More information

GFI MilArchiver 6 vs C2C Archive One Policy Mnger GFI Softwre www.gfi.com GFI MilArchiver 6 vs C2C Archive One Policy Mnger GFI MilArchiver 6 C2C Archive One Policy Mnger Who we re Generl fetures Supports

More information

baby on the way, quit today

baby on the way, quit today for mums-to-be bby on the wy, quit tody WHAT YOU NEED TO KNOW bout smoking nd pregnncy uitting smoking is the best thing you cn do for your bby We know tht it cn be difficult to quit smoking. But we lso

More information

Gene Expression Programming: A New Adaptive Algorithm for Solving Problems

Gene Expression Programming: A New Adaptive Algorithm for Solving Problems Gene Expression Progrmming: A New Adptive Algorithm for Solving Prolems Cândid Ferreir Deprtmento de Ciêncis Agráris Universidde dos Açores 9701-851 Terr-Chã Angr do Heroísmo, Portugl Complex Systems,

More information

Unit 6: Exponents and Radicals

Unit 6: Exponents and Radicals Eponents nd Rdicls -: The Rel Numer Sstem Unit : Eponents nd Rdicls Pure Mth 0 Notes Nturl Numers (N): - counting numers. {,,,,, } Whole Numers (W): - counting numers with 0. {0,,,,,, } Integers (I): -

More information

Deployment Strategy for Mobile Robots with Energy and Timing Constraints

Deployment Strategy for Mobile Robots with Energy and Timing Constraints Proceedings of the 2005 IEEE Interntionl Conference on Robotics nd Automtion Brcelon, Spin, April 2005 Deployment Strtegy for Mobile Robots with Energy nd Timing Constrints Yongguo Mei, Yung-Hsing Lu,

More information

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered: Appendi D: Completing the Squre nd the Qudrtic Formul Fctoring qudrtic epressions such s: + 6 + 8 ws one of the topics introduced in Appendi C. Fctoring qudrtic epressions is useful skill tht cn help you

More information

body.allow-sidebar OR.no-sidebar.home-page (if this is the home page).has-custom-banner OR.nocustom-banner .IR OR.no-IR

body.allow-sidebar OR.no-sidebar.home-page (if this is the home page).has-custom-banner OR.nocustom-banner .IR OR.no-IR body.llow-sidebr OR.no-sidebr.home-pge (if this is the home pge).hs-custom-bnner OR.nocustom-bnner.IR OR.no-IR #IDENTIFIER_FOR_THIS_SITE div#pge-continer.depends_on_page_ty PE llow-sidebr mens tht there

More information

Vectors 2. 1. Recap of vectors

Vectors 2. 1. Recap of vectors Vectors 2. Recp of vectors Vectors re directed line segments - they cn be represented in component form or by direction nd mgnitude. We cn use trigonometry nd Pythgors theorem to switch between the forms

More information

Quick Reference Guide: One-time Account Update

Quick Reference Guide: One-time Account Update Quick Reference Guide: One-time Account Updte How to complete The Quick Reference Guide shows wht existing SingPss users need to do when logging in to the enhnced SingPss service for the first time. 1)

More information

Small Business Cloud Services

Small Business Cloud Services Smll Business Cloud Services Summry. We re thick in the midst of historic se-chnge in computing. Like the emergence of personl computers, grphicl user interfces, nd mobile devices, the cloud is lredy profoundly

More information

Efficient load-balancing routing for wireless mesh networks

Efficient load-balancing routing for wireless mesh networks Computer Networks 51 (007) 50 66 www.elsevier.com/locte/comnet Efficient lod-blncing routing for wireless mesh networks Yigl Bejerno, Seung-Je Hn b, *,1, Amit Kumr c Bell Lbortories, Lucent Technologies,

More information

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

Geometry 7-1 Geometric Mean and the Pythagorean Theorem Geometry 7-1 Geometric Men nd the Pythgoren Theorem. Geometric Men 1. Def: The geometric men etween two positive numers nd is the positive numer x where: = x. x Ex 1: Find the geometric men etween the

More information

A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW)

A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW) Journal of Computer Science 4 (5): 393-401, 2008 ISSN 1549-3636 2008 Science Publications A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW) Amjad Hudaib, Rola Al-Khalid, Dima Suleiman, Mariam

More information

Logical or physical organisation and data independence

Logical or physical organisation and data independence Four FILE STRUCTURES Introduction This chpter is minly concerned with the wy in which file structures re used in document retrievl. Most surveys of file structures ddress themselves to pplictions in dt

More information

Unit 29: Inference for Two-Way Tables

Unit 29: Inference for Two-Way Tables Unit 29: Inference for Two-Wy Tbles Prerequisites Unit 13, Two-Wy Tbles is prerequisite for this unit. In ddition, students need some bckground in significnce tests, which ws introduced in Unit 25. Additionl

More information

COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE. Skandza, Stockholm ABSTRACT

COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE. Skandza, Stockholm ABSTRACT COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE Skndz, Stockholm ABSTRACT Three methods for fitting multiplictive models to observed, cross-clssified

More information