Exercises. 18 Algorithms
|
|
- Mercy Flowers
- 6 years ago
- Views:
Transcription
1 18 Algorthms Exercses 0.1. In each of the followng stuatons, ndcate whether f = O(g), or f = Ω(g), or both (n whch case f = Θ(g)). f(n) g(n) (a) n 100 n 200 (b) n 1/2 n 2/3 (c) 100n + log n n + (log n) 2 (d) n log n 10n log 10n (e) log 2n log 3n (f) 10 log n log(n 2 ) (g) n 1.01 n log 2 n (h) n 2 / log n n(log n) 2 () n 0.1 (log n) 10 (j) (log n) log n n/ log n (k) n (log n) 3 (l) n 1/2 5 log 2 n (m) n2 n 3 n (n) 2 n 2 n+1 (o) n! 2 n (p) (log n) log n 2 (log 2 n)2 (q) n =1 k n k Show that, f c s a postve real number, then g(n) = 1 + c + c c n s: (a) Θ(1) f c < 1. (b) Θ(n) f c = 1. (c) Θ(c n ) f c > 1. The moral: n bg-θ terms, the sum of a geometrc seres s smply the frst term f the seres s strctly decreasng, the last term f the seres s strctly ncreasng, or the number of terms f the seres s unchangng The Fbonacc numbers F 0, F 1, F 2,..., are defned by the rule F 0 = 0, F 1 = 1, F n = F n 1 + F n 2. In ths problem we wll confrm that ths sequence grows exponentally fast and obtan some bounds on ts growth. (a) Use nducton to prove that F n 2 0.5n for n 6. (b) Fnd a constant c < 1 such that F n 2 cn for all n 0. Show that your answer s correct. (c) What s the largest c you can fnd for whch F n = Ω(2 cn )? 0.4. Is there a faster way to compute the nth Fbonacc number than by fb2 (page 13)? One dea nvolves matrces. We start by wrtng the equatons F 1 = F 1 and F 2 = F 0 + F 1 n matrx notaton: ( ) ( ) ( ) F1 0 1 F0 =. F F 1
2 S. Dasgupta, C.H. Papadmtrou, and U.V. Vazran 83 Exercses 2.1. Use the dvde-and-conquer nteger multplcaton algorthm to multply the two bnary ntegers and Show that for any postve ntegers n and any base b, there must some power of b lyng n the range [n, bn] Secton 2.2 descrbes a method for solvng recurrence relatons whch s based on analyzng the recurson tree and dervng a formula for the work done at each level. Another (closely related) method s to expand out the recurrence a few tmes, untl a pattern emerges. For nstance, let s start wth the famlar T (n) = 2T (n/2) + O(n). Thnk of O(n) as beng cn for some constant c, so: T (n) 2T (n/2) + cn. By repeatedly applyng ths rule, we can bound T (n) n terms of T (n/2), then T (n/4), then T (n/8), and so on, at each step gettng closer to the value of T ( ) we do know, namely T (1) = O(1). T (n) 2T (n/2) + cn A pattern s emergng... the general term s 2[2T (n/4) + cn/2] + cn = 4T (n/4) + 2cn 4[2T (n/8) + cn/4] + 2cn = 8T (n/8) + 3cn 8[2T (n/16) + cn/8] + 3cn = 16T (n/16) + 4cn. T (n) 2 k T (n/2 k ) + kcn. Pluggng n k = log 2 n, we get T (n) nt (1) + cn log 2 n = O(n log n). (a) Do the same thng for the recurrence T (n) = 3T (n/2) + O(n). What s the general kth term n ths case? And what value of k should be plugged n to get the answer? (b) Now try the recurrence T (n) = T (n 1) + O(1), a case whch s not covered by the master theorem. Can you solve ths too? 2.4. Suppose you are choosng between the followng three algorthms: Algorthm A solves problems by dvdng them nto fve subproblems of half the sze, recursvely solvng each subproblem, and then combnng the solutons n lnear tme. Algorthm B solves problems of sze n by recursvely solvng two subproblems of sze n 1 and then combnng the solutons n constant tme. Algorthm C solves problems of sze n by dvdng them nto nne subproblems of sze n/3, recursvely solvng each subproblem, and then combnng the solutons n O(n 2 ) tme. What are the runnng tmes of each of these algorthms (n bg-o notaton), and whch would you choose? 2.5. Solve the followng recurrence relatons and gve a Θ bound for each of them. (a) T (n) = 2T (n/3) + 1 (b) T (n) = 5T (n/4) + n
3 84 Algorthms (c) T (n) = 7T (n/7) + n (d) T (n) = 9T (n/3) + n 2 (e) T (n) = 8T (n/2) + n 3 (f) T (n) = 49T (n/25) + n 3/2 log n (g) T (n) = T (n 1) + 2 (h) T (n) = T (n 1) + n c, where c 1 s a constant () T (n) = T (n 1) + c n, where c > 1 s some constant (j) T (n) = 2T (n 1) + 1 (k) T (n) = T ( n) A lnear, tme-nvarant system has the followng mpulse response: b(t) 1/t 0 t 0 t (a) Descrbe n words the effect of ths system. (b) What s the correspondng polynomal? 2.7. What s the sum of the nth roots of unty? What s ther product f n s odd? If n s even? 2.8. Practce wth the fast Fourer transform. (a) What s the FFT of (1, 0, 0, 0)? What s the approprate value of ω n ths case? And of whch sequence s (1, 0, 0, 0) the FFT? (b) Repeat for (1, 0, 1, 1) Practce wth polynomal multplcaton by FFT. (a) Suppose that you want to multply the two polynomals x + 1 and x usng the FFT. Choose an approprate power of two, fnd the FFT of the two sequences, multply the results componentwse, and compute the nverse FFT to get the fnal result. (b) Repeat for the par of polynomals 1 + x + 2x 2 and 2 + 3x Fnd the unque polynomal of degree 4 that takes on values p(1) = 2, p(2) = 1, p(3) = 0, p(4) = 4, and p(5) = 0. Wrte your answer n the coeffcent representaton In justfyng our matrx multplcaton algorthm (Secton 2.5), we clamed the followng blockwse property: f X and Y are n n matrces, and [ ] [ ] A B E F X =, Y =. C D G H
4 S. Dasgupta, C.H. Papadmtrou, and U.V. Vazran 85 where A, B, C, D, E, F, G, and H are n/2 n/2 submatrces, then the product XY can be expressed n terms of these blocks: [ ] [ ] [ ] A B E F AE + BG AF + BH XY = = C D G H CE + DG CF + DH Prove ths property How many lnes, as a functon of n (n Θ( ) form), does the followng program prnt? Wrte a recurrence and solve t. You may assume n s a power of 2. functon f(n) f n > 1: prnt_lne( stll gong ) f(n/2) f(n/2) A bnary tree s full f all of ts vertces have ether zero or two chldren. Let B n denote the number of full bnary trees wth n vertces. (a) By drawng out all full bnary trees wth 3, 5, or 7 vertces, determne the exact values of B 3, B 5, and B 7. Why have we left out even numbers of vertces, lke B 4? (b) For general n, derve a recurrence relaton for B n. (c) Show by nducton that B n s Ω(2 n ) You are gven an array of n elements, and you notce that some of the elements are duplcates; that s, they appear more than once n the array. Show how to remove all duplcates from the array n tme O(n log n) In our medan-fndng algorthm (Secton 2.4), a basc prmtve s the splt operaton, whch takes as nput an array S and a value v and then dvdes S nto three sets: the elements less than v, the elements equal to v, and the elements greater than v. Show how to mplement ths splt operaton n place, that s, wthout allocatng new memory You are gven an nfnte array A[ ] n whch the frst n cells contan ntegers n sorted order and the rest of the cells are flled wth. You are not gven the value of n. Descrbe an algorthm that takes an nteger x as nput and fnds a poston n the array contanng x, f such a poston exsts, n O(log n) tme. (If you are dsturbed by the fact that the array A has nfnte length, assume nstead that t s of length n, but that you don t know ths length, and that the mplementaton of the array data type n your programmng language returns the error message whenever elements A[] wth > n are accessed.) Gven a sorted array of dstnct ntegers A[1,..., n], you want to fnd out whether there s an ndex for whch A[] =. Gve a dvde-and-conquer algorthm that runs n tme O(log n) Consder the task of searchng a sorted array A[1... n] for a gven element x: a task we usually perform by bnary search n tme O(log n). Show that any algorthm that accesses the array only va comparsons (that s, by askng questons of the form s A[] z? ), must take Ω(log n) steps A k-way merge operaton. Suppose you have k sorted arrays, each wth n elements, and you want to combne them nto a sngle sorted array of kn elements.
5 86 Algorthms (a) Here s one strategy: Usng the merge procedure from Secton 2.3, merge the frst two arrays, then merge n the thrd, then merge n the fourth, and so on. What s the tme complexty of ths algorthm, n terms of k and n? (b) Gve a more effcent soluton to ths problem, usng dvde-and-conquer Show that any array of ntegers x[1... n] can be sorted n O(n + M) tme, where M = max x mn x. For small M, ths s lnear tme: why doesn t the Ω(n log n) lower bound apply n ths case? Mean and medan. One of the most basc tasks n statstcs s to summarze a set of observatons {x 1, x 2,..., x n } R by a sngle number. Two popular choces for ths summary statstc are: The medan, whch we ll call µ 1 The mean, whch we ll call µ 2 (a) Show that the medan s the value of µ that mnmzes the functon x µ. You can assume for smplcty that n s odd. (Hnt: Show that for any µ µ 1, the functon decreases f you move µ ether slghtly to the left or slghtly to the rght.) (b) Show that the mean s the value of µ that mnmzes the functon (x µ) 2. One way to do ths s by calculus. Another method s to prove that for any µ R, (x µ) 2 = (x µ 2 ) 2 + n(µ µ 2 ) 2. Notce how the functon for µ 2 penalzes ponts that are far from µ much more heavly than the functon for µ 1. Thus µ 2 tres much harder to be close to all the observatons. Ths mght sound lke a good thng at some level, but t s statstcally undesrable because just a few outlers can severely throw off the estmate of µ 2. It s therefore sometmes sad that µ 1 s a more robust estmator than µ 2. Worse than ether of them, however, s µ, the value of µ that mnmzes the functon max x µ. (c) Show that µ can be computed n O(n) tme (assumng the numbers x are small enough that basc arthmetc operatons on them take unt tme) You are gven two sorted lsts of sze m and n. Gve an O(log m + log n) tme algorthm for computng the kth smallest element n the unon of the two lsts An array A[1... n] s sad to have a majorty element f more than half of ts entres are the same. Gven an array, the task s to desgn an effcent algorthm to tell whether the array has a majorty element, and, f so, to fnd that element. The elements of the array are not necessarly from some ordered doman lke the ntegers, and so there can be no comparsons of the form s A[] > A[j]?. (Thnk of the array elements as GIF fles, say.) However you can answer questons of the form: s A[] = A[j]? n constant tme.
6 88 Algorthms Professor F. Lake tells hs class that t s asymptotcally faster to square an n-bt nteger than to multply two n-bt ntegers. Should they beleve hm? The square of a matrx A s ts product wth tself, AA. (a) Show that fve multplcatons are suffcent to compute the square of a 2 2 matrx. (b) What s wrong wth the followng algorthm for computng the square of an n n matrx? Use a dvde-and-conquer approach as n Strassen s algorthm, except that nstead of gettng 7 subproblems of sze n/2, we now get 5 subproblems of sze n/2 thanks to part (a). Usng the same analyss as n Strassen s algorthm, we can conclude that the algorthm runs n tme O(n log 2 5 ). (c) In fact, squarng matrces s no easer than matrx multplcaton. In ths part, you wll show that f n n matrces can be squared n tme S(n) = O(n c ), then any two n n matrces can be multpled n tme O(n c ).. Gven two n n matrces A and B, show that the matrx AB + BA can be computed n tme 3S(n) + O(n 2 ).. Gven two n n matrces X and Y, defne the 2n 2n matrces A and B as follows: A = [ X ] and B = [ 0 Y 0 0 What s AB + BA, n terms of X and Y?. Usng () and (), argue that the product XY can be computed n tme 3S(2n) + O(n 2 ). Conclude that matrx multplcaton takes tme O(n c ) The Hadamard matrces H 0, H 1, H 2,... are defned as follows: H 0 s the 1 1 matrx [ 1 ] For k > 0, H k s the 2 k 2 k matrx [ ] Hk 1 H H k = k 1 H k 1 H k 1 Show that f v s a column vector of length n = 2 k, then the matrx-vector product H k v can be calculated usng O(n log n) operatons. Assume that all the numbers nvolved are small enough that basc arthmetc operatons lke addton and multplcaton take unt tme Suppose we want to evaluate the polynomal p(x) = a 0 + a 1 x + a 2 x a n x n at pont x. (a) Show that the followng smple routne, known as Horner s rule, does the job and leaves the answer n z. z = a n for = n 1 downto 0: z = zx + a (b) How many addtons and multplcatons does ths routne use, as a functon of n? Can you fnd a polynomal for whch an alternatve method s substantally better? Ths problem llustrates how to do the Fourer Transform (FT) n modular arthmetc, for example, modulo 7. ].
Dynamic Programming. Preview. Dynamic Programming. Dynamic Programming. Dynamic Programming (Example: Fibonacci Sequence)
/24/27 Prevew Fbonacc Sequence Longest Common Subsequence Dynamc programmng s a method for solvng complex problems by breakng them down nto smpler sub-problems. It s applcable to problems exhbtng the propertes
More informationSection 8.3 Polar Form of Complex Numbers
80 Chapter 8 Secton 8 Polar Form of Complex Numbers From prevous classes, you may have encountered magnary numbers the square roots of negatve numbers and, more generally, complex numbers whch are the
More informationTHE CHINESE REMAINDER THEOREM. We should thank the Chinese for their wonderful remainder theorem. Glenn Stevens
THE CHINESE REMAINDER THEOREM KEITH CONRAD We should thank the Chnese for ther wonderful remander theorem. Glenn Stevens 1. Introducton The Chnese remander theorem says we can unquely solve any par of
More informationStructure and Drive Paul A. Jensen Copyright July 20, 2003
Structure and Drve Paul A. Jensen Copyrght July 20, 2003 A system s made up of several operatons wth flow passng between them. The structure of the system descrbes the flow paths from nputs to outputs.
More informationProblem Set 9 Solutions
Desgn and Analyss of Algorthms May 4, 2015 Massachusetts Insttute of Technology 6.046J/18.410J Profs. Erk Demane, Srn Devadas, and Nancy Lynch Problem Set 9 Solutons Problem Set 9 Solutons Ths problem
More informationOutline and Reading. Dynamic Programming. Dynamic Programming revealed. Computing Fibonacci. The General Dynamic Programming Technique
Outlne and Readng Dynamc Programmng The General Technque ( 5.3.2) -1 Knapsac Problem ( 5.3.3) Matrx Chan-Product ( 5.3.1) Dynamc Programmng verson 1.4 1 Dynamc Programmng verson 1.4 2 Dynamc Programmng
More informationMath Review. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University
Math Revew CptS 223 dvanced Data Structures Larry Holder School of Electrcal Engneerng and Computer Scence Washngton State Unversty 1 Why do we need math n a data structures course? nalyzng data structures
More informationAPPENDIX A Some Linear Algebra
APPENDIX A Some Lnear Algebra The collecton of m, n matrces A.1 Matrces a 1,1,..., a 1,n A = a m,1,..., a m,n wth real elements a,j s denoted by R m,n. If n = 1 then A s called a column vector. Smlarly,
More informationLinear Feature Engineering 11
Lnear Feature Engneerng 11 2 Least-Squares 2.1 Smple least-squares Consder the followng dataset. We have a bunch of nputs x and correspondng outputs y. The partcular values n ths dataset are x y 0.23 0.19
More informationLectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix
Lectures - Week 4 Matrx norms, Condtonng, Vector Spaces, Lnear Independence, Spannng sets and Bass, Null space and Range of a Matrx Matrx Norms Now we turn to assocatng a number to each matrx. We could
More information= z 20 z n. (k 20) + 4 z k = 4
Problem Set #7 solutons 7.2.. (a Fnd the coeffcent of z k n (z + z 5 + z 6 + z 7 + 5, k 20. We use the known seres expanson ( n+l ( z l l z n below: (z + z 5 + z 6 + z 7 + 5 (z 5 ( + z + z 2 + z + 5 5
More information1 Matrix representations of canonical matrices
1 Matrx representatons of canoncal matrces 2-d rotaton around the orgn: ( ) cos θ sn θ R 0 = sn θ cos θ 3-d rotaton around the x-axs: R x = 1 0 0 0 cos θ sn θ 0 sn θ cos θ 3-d rotaton around the y-axs:
More informationU.C. Berkeley CS294: Spectral Methods and Expanders Handout 8 Luca Trevisan February 17, 2016
U.C. Berkeley CS94: Spectral Methods and Expanders Handout 8 Luca Trevsan February 7, 06 Lecture 8: Spectral Algorthms Wrap-up In whch we talk about even more generalzatons of Cheeger s nequaltes, and
More informationFoundations of Arithmetic
Foundatons of Arthmetc Notaton We shall denote the sum and product of numbers n the usual notaton as a 2 + a 2 + a 3 + + a = a, a 1 a 2 a 3 a = a The notaton a b means a dvdes b,.e. ac = b where c s an
More informationStanford University CS359G: Graph Partitioning and Expanders Handout 4 Luca Trevisan January 13, 2011
Stanford Unversty CS359G: Graph Parttonng and Expanders Handout 4 Luca Trevsan January 3, 0 Lecture 4 In whch we prove the dffcult drecton of Cheeger s nequalty. As n the past lectures, consder an undrected
More informationCOMPLEX NUMBERS AND QUADRATIC EQUATIONS
COMPLEX NUMBERS AND QUADRATIC EQUATIONS INTRODUCTION We know that x 0 for all x R e the square of a real number (whether postve, negatve or ero) s non-negatve Hence the equatons x, x, x + 7 0 etc are not
More informationExample: (13320, 22140) =? Solution #1: The divisors of are 1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 27, 30, 36, 41,
The greatest common dvsor of two ntegers a and b (not both zero) s the largest nteger whch s a common factor of both a and b. We denote ths number by gcd(a, b), or smply (a, b) when there s no confuson
More informationMin Cut, Fast Cut, Polynomial Identities
Randomzed Algorthms, Summer 016 Mn Cut, Fast Cut, Polynomal Identtes Instructor: Thomas Kesselhem and Kurt Mehlhorn 1 Mn Cuts n Graphs Lecture (5 pages) Throughout ths secton, G = (V, E) s a mult-graph.
More informationChapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems
Numercal Analyss by Dr. Anta Pal Assstant Professor Department of Mathematcs Natonal Insttute of Technology Durgapur Durgapur-713209 emal: anta.bue@gmal.com 1 . Chapter 5 Soluton of System of Lnear Equatons
More informationC/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1
C/CS/Phy9 Problem Set 3 Solutons Out: Oct, 8 Suppose you have two qubts n some arbtrary entangled state ψ You apply the teleportaton protocol to each of the qubts separately What s the resultng state obtaned
More informationFormulas for the Determinant
page 224 224 CHAPTER 3 Determnants e t te t e 2t 38 A = e t 2te t e 2t e t te t 2e 2t 39 If 123 A = 345, 456 compute the matrx product A adj(a) What can you conclude about det(a)? For Problems 40 43, use
More informationWeek 5: Neural Networks
Week 5: Neural Networks Instructor: Sergey Levne Neural Networks Summary In the prevous lecture, we saw how we can construct neural networks by extendng logstc regresson. Neural networks consst of multple
More informationFirst day August 1, Problems and Solutions
FOURTH INTERNATIONAL COMPETITION FOR UNIVERSITY STUDENTS IN MATHEMATICS July 30 August 4, 997, Plovdv, BULGARIA Frst day August, 997 Problems and Solutons Problem. Let {ε n } n= be a sequence of postve
More informationLecture 5 Decoding Binary BCH Codes
Lecture 5 Decodng Bnary BCH Codes In ths class, we wll ntroduce dfferent methods for decodng BCH codes 51 Decodng the [15, 7, 5] 2 -BCH Code Consder the [15, 7, 5] 2 -code C we ntroduced n the last lecture
More informationa b a In case b 0, a being divisible by b is the same as to say that
Secton 6.2 Dvsblty among the ntegers An nteger a ε s dvsble by b ε f there s an nteger c ε such that a = bc. Note that s dvsble by any nteger b, snce = b. On the other hand, a s dvsble by only f a = :
More informationReview of Taylor Series. Read Section 1.2
Revew of Taylor Seres Read Secton 1.2 1 Power Seres A power seres about c s an nfnte seres of the form k = 0 k a ( x c) = a + a ( x c) + a ( x c) + a ( x c) k 2 3 0 1 2 3 + In many cases, c = 0, and the
More informationDigital Signal Processing
Dgtal Sgnal Processng Dscrete-tme System Analyss Manar Mohasen Offce: F8 Emal: manar.subh@ut.ac.r School of IT Engneerng Revew of Precedent Class Contnuous Sgnal The value of the sgnal s avalable over
More informationKernel Methods and SVMs Extension
Kernel Methods and SVMs Extenson The purpose of ths document s to revew materal covered n Machne Learnng 1 Supervsed Learnng regardng support vector machnes (SVMs). Ths document also provdes a general
More informationTHE SUMMATION NOTATION Ʃ
Sngle Subscrpt otaton THE SUMMATIO OTATIO Ʃ Most of the calculatons we perform n statstcs are repettve operatons on lsts of numbers. For example, we compute the sum of a set of numbers, or the sum of the
More informationCSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography
CSc 6974 and ECSE 6966 Math. Tech. for Vson, Graphcs and Robotcs Lecture 21, Aprl 17, 2006 Estmatng A Plane Homography Overvew We contnue wth a dscusson of the major ssues, usng estmaton of plane projectve
More informationCS 331 DESIGN AND ANALYSIS OF ALGORITHMS DYNAMIC PROGRAMMING. Dr. Daisy Tang
CS DESIGN ND NLYSIS OF LGORITHMS DYNMIC PROGRMMING Dr. Dasy Tang Dynamc Programmng Idea: Problems can be dvded nto stages Soluton s a sequence o decsons and the decson at the current stage s based on the
More information18.781: Solution to Practice Questions for Final Exam
18.781: Soluton to Practce Questons for Fnal Exam 1. Fnd three solutons n postve ntegers of x 6y = 1 by frst calculatng the contnued fracton expanson of 6. Soluton: We have 1 6=[, ] 6 6+ =[, ] 1 =[,, ]=[,,
More information1 Generating functions, continued
Generatng functons, contnued. Generatng functons and parttons We can make use of generatng functons to answer some questons a bt more restrctve than we ve done so far: Queston : Fnd a generatng functon
More informationErrors for Linear Systems
Errors for Lnear Systems When we solve a lnear system Ax b we often do not know A and b exactly, but have only approxmatons  and ˆb avalable. Then the best thng we can do s to solve ˆx ˆb exactly whch
More information5 The Rational Canonical Form
5 The Ratonal Canoncal Form Here p s a monc rreducble factor of the mnmum polynomal m T and s not necessarly of degree one Let F p denote the feld constructed earler n the course, consstng of all matrces
More informationU.C. Berkeley CS294: Beyond Worst-Case Analysis Luca Trevisan September 5, 2017
U.C. Berkeley CS94: Beyond Worst-Case Analyss Handout 4s Luca Trevsan September 5, 07 Summary of Lecture 4 In whch we ntroduce semdefnte programmng and apply t to Max Cut. Semdefnte Programmng Recall that
More informationDifference Equations
Dfference Equatons c Jan Vrbk 1 Bascs Suppose a sequence of numbers, say a 0,a 1,a,a 3,... s defned by a certan general relatonshp between, say, three consecutve values of the sequence, e.g. a + +3a +1
More informationMath 261 Exercise sheet 2
Math 261 Exercse sheet 2 http://staff.aub.edu.lb/~nm116/teachng/2017/math261/ndex.html Verson: September 25, 2017 Answers are due for Monday 25 September, 11AM. The use of calculators s allowed. Exercse
More informationAn efficient algorithm for multivariate Maclaurin Newton transformation
Annales UMCS Informatca AI VIII, 2 2008) 5 14 DOI: 10.2478/v10065-008-0020-6 An effcent algorthm for multvarate Maclaurn Newton transformaton Joanna Kapusta Insttute of Mathematcs and Computer Scence,
More informationComplex Numbers Alpha, Round 1 Test #123
Complex Numbers Alpha, Round Test #3. Wrte your 6-dgt ID# n the I.D. NUMBER grd, left-justfed, and bubble. Check that each column has only one number darkened.. In the EXAM NO. grd, wrte the 3-dgt Test
More informationLecture 4: Universal Hash Functions/Streaming Cont d
CSE 5: Desgn and Analyss of Algorthms I Sprng 06 Lecture 4: Unversal Hash Functons/Streamng Cont d Lecturer: Shayan Oves Gharan Aprl 6th Scrbe: Jacob Schreber Dsclamer: These notes have not been subjected
More informationExpected Value and Variance
MATH 38 Expected Value and Varance Dr. Neal, WKU We now shall dscuss how to fnd the average and standard devaton of a random varable X. Expected Value Defnton. The expected value (or average value, or
More informationEEE 241: Linear Systems
EEE : Lnear Systems Summary #: Backpropagaton BACKPROPAGATION The perceptron rule as well as the Wdrow Hoff learnng were desgned to tran sngle layer networks. They suffer from the same dsadvantage: they
More informationNUMERICAL DIFFERENTIATION
NUMERICAL DIFFERENTIATION 1 Introducton Dfferentaton s a method to compute the rate at whch a dependent output y changes wth respect to the change n the ndependent nput x. Ths rate of change s called the
More information8.6 The Complex Number System
8.6 The Complex Number System Earler n the chapter, we mentoned that we cannot have a negatve under a square root, snce the square of any postve or negatve number s always postve. In ths secton we want
More informationFor now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.
Neural Networks : Dervaton compled by Alvn Wan from Professor Jtendra Malk s lecture Ths type of computaton s called deep learnng and s the most popular method for many problems, such as computer vson
More informationComplex Numbers. x = B B 2 4AC 2A. or x = x = 2 ± 4 4 (1) (5) 2 (1)
Complex Numbers If you have not yet encountered complex numbers, you wll soon do so n the process of solvng quadratc equatons. The general quadratc equaton Ax + Bx + C 0 has solutons x B + B 4AC A For
More informationSection 3.6 Complex Zeros
04 Chapter Secton 6 Comple Zeros When fndng the zeros of polynomals, at some pont you're faced wth the problem Whle there are clearly no real numbers that are solutons to ths equaton, leavng thngs there
More informationBézier curves. Michael S. Floater. September 10, These notes provide an introduction to Bézier curves. i=0
Bézer curves Mchael S. Floater September 1, 215 These notes provde an ntroducton to Bézer curves. 1 Bernsten polynomals Recall that a real polynomal of a real varable x R, wth degree n, s a functon of
More information10-701/ Machine Learning, Fall 2005 Homework 3
10-701/15-781 Machne Learnng, Fall 2005 Homework 3 Out: 10/20/05 Due: begnnng of the class 11/01/05 Instructons Contact questons-10701@autonlaborg for queston Problem 1 Regresson and Cross-valdaton [40
More informationProblem Solving in Math (Math 43900) Fall 2013
Problem Solvng n Math (Math 43900) Fall 2013 Week four (September 17) solutons Instructor: Davd Galvn 1. Let a and b be two nteger for whch a b s dvsble by 3. Prove that a 3 b 3 s dvsble by 9. Soluton:
More information1 GSW Iterative Techniques for y = Ax
1 for y = A I m gong to cheat here. here are a lot of teratve technques that can be used to solve the general case of a set of smultaneous equatons (wrtten n the matr form as y = A), but ths chapter sn
More information= = = (a) Use the MATLAB command rref to solve the system. (b) Let A be the coefficient matrix and B be the right-hand side of the system.
Chapter Matlab Exercses Chapter Matlab Exercses. Consder the lnear system of Example n Secton.. x x x y z y y z (a) Use the MATLAB command rref to solve the system. (b) Let A be the coeffcent matrx and
More informationPolynomials. 1 More properties of polynomials
Polynomals 1 More propertes of polynomals Recall that, for R a commutatve rng wth unty (as wth all rngs n ths course unless otherwse noted), we defne R[x] to be the set of expressons n =0 a x, where a
More informationCase A. P k = Ni ( 2L i k 1 ) + (# big cells) 10d 2 P k.
THE CELLULAR METHOD In ths lecture, we ntroduce the cellular method as an approach to ncdence geometry theorems lke the Szemeréd-Trotter theorem. The method was ntroduced n the paper Combnatoral complexty
More informationfind (x): given element x, return the canonical element of the set containing x;
COS 43 Sprng, 009 Dsjont Set Unon Problem: Mantan a collecton of dsjont sets. Two operatons: fnd the set contanng a gven element; unte two sets nto one (destructvely). Approach: Canoncal element method:
More informationGrover s Algorithm + Quantum Zeno Effect + Vaidman
Grover s Algorthm + Quantum Zeno Effect + Vadman CS 294-2 Bomb 10/12/04 Fall 2004 Lecture 11 Grover s algorthm Recall that Grover s algorthm for searchng over a space of sze wors as follows: consder the
More informationWeek 2. This week, we covered operations on sets and cardinality.
Week 2 Ths week, we covered operatons on sets and cardnalty. Defnton 0.1 (Correspondence). A correspondence between two sets A and B s a set S contaned n A B = {(a, b) a A, b B}. A correspondence from
More informationHMMT February 2016 February 20, 2016
HMMT February 016 February 0, 016 Combnatorcs 1. For postve ntegers n, let S n be the set of ntegers x such that n dstnct lnes, no three concurrent, can dvde a plane nto x regons (for example, S = {3,
More information2.3 Nilpotent endomorphisms
s a block dagonal matrx, wth A Mat dm U (C) In fact, we can assume that B = B 1 B k, wth B an ordered bass of U, and that A = [f U ] B, where f U : U U s the restrcton of f to U 40 23 Nlpotent endomorphsms
More informationDesign and Analysis of Algorithms
Desgn and Analyss of Algorthms CSE 53 Lecture 4 Dynamc Programmng Junzhou Huang, Ph.D. Department of Computer Scence and Engneerng CSE53 Desgn and Analyss of Algorthms The General Dynamc Programmng Technque
More informationNotes on Frequency Estimation in Data Streams
Notes on Frequency Estmaton n Data Streams In (one of) the data streamng model(s), the data s a sequence of arrvals a 1, a 2,..., a m of the form a j = (, v) where s the dentty of the tem and belongs to
More information8.4 COMPLEX VECTOR SPACES AND INNER PRODUCTS
SECTION 8.4 COMPLEX VECTOR SPACES AND INNER PRODUCTS 493 8.4 COMPLEX VECTOR SPACES AND INNER PRODUCTS All the vector spaces you have studed thus far n the text are real vector spaces because the scalars
More informationInner Product. Euclidean Space. Orthonormal Basis. Orthogonal
Inner Product Defnton 1 () A Eucldean space s a fnte-dmensonal vector space over the reals R, wth an nner product,. Defnton 2 (Inner Product) An nner product, on a real vector space X s a symmetrc, blnear,
More informationCommon loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:
15-745 Lecture 6 Data Dependence n Loops Copyrght Seth Goldsten, 2008 Based on sldes from Allen&Kennedy Lecture 6 15-745 2005-8 1 Common loop optmzatons Hostng of loop-nvarant computatons pre-compute before
More information332600_08_1.qxp 4/17/08 11:29 AM Page 481
336_8_.qxp 4/7/8 :9 AM Page 48 8 Complex Vector Spaces 8. Complex Numbers 8. Conjugates and Dvson of Complex Numbers 8.3 Polar Form and DeMovre s Theorem 8.4 Complex Vector Spaces and Inner Products 8.5
More informationSome Consequences. Example of Extended Euclidean Algorithm. The Fundamental Theorem of Arithmetic, II. Characterizing the GCD and LCM
Example of Extended Eucldean Algorthm Recall that gcd(84, 33) = gcd(33, 18) = gcd(18, 15) = gcd(15, 3) = gcd(3, 0) = 3 We work backwards to wrte 3 as a lnear combnaton of 84 and 33: 3 = 18 15 [Now 3 s
More informationFinding Dense Subgraphs in G(n, 1/2)
Fndng Dense Subgraphs n Gn, 1/ Atsh Das Sarma 1, Amt Deshpande, and Rav Kannan 1 Georga Insttute of Technology,atsh@cc.gatech.edu Mcrosoft Research-Bangalore,amtdesh,annan@mcrosoft.com Abstract. Fndng
More informationGeneralized Linear Methods
Generalzed Lnear Methods 1 Introducton In the Ensemble Methods the general dea s that usng a combnaton of several weak learner one could make a better learner. More formally, assume that we have a set
More informationNON-LINEAR CONVOLUTION: A NEW APPROACH FOR THE AURALIZATION OF DISTORTING SYSTEMS
NON-LINEAR CONVOLUTION: A NEW APPROAC FOR TE AURALIZATION OF DISTORTING SYSTEMS Angelo Farna, Alberto Belln and Enrco Armellon Industral Engneerng Dept., Unversty of Parma, Va delle Scenze 8/A Parma, 00
More informationIntroduction to Algorithms
Introducton to Algorthms 6.046J/8.40J Lecture 7 Prof. Potr Indyk Data Structures Role of data structures: Encapsulate data Support certan operatons (e.g., INSERT, DELETE, SEARCH) Our focus: effcency of
More informationLECTURE 9 CANONICAL CORRELATION ANALYSIS
LECURE 9 CANONICAL CORRELAION ANALYSIS Introducton he concept of canoncal correlaton arses when we want to quantfy the assocatons between two sets of varables. For example, suppose that the frst set of
More informationAffine transformations and convexity
Affne transformatons and convexty The purpose of ths document s to prove some basc propertes of affne transformatons nvolvng convex sets. Here are a few onlne references for background nformaton: http://math.ucr.edu/
More informationDynamic Programming! CSE 417: Algorithms and Computational Complexity!
Dynamc Programmng CSE 417: Algorthms and Computatonal Complexty Wnter 2009 W. L. Ruzzo Dynamc Programmng, I:" Fbonacc & Stamps Outlne: General Prncples Easy Examples Fbonacc, Lckng Stamps Meater examples
More informationn α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0
MODULE 2 Topcs: Lnear ndependence, bass and dmenson We have seen that f n a set of vectors one vector s a lnear combnaton of the remanng vectors n the set then the span of the set s unchanged f that vector
More informationLecture 10 Support Vector Machines II
Lecture 10 Support Vector Machnes II 22 February 2016 Taylor B. Arnold Yale Statstcs STAT 365/665 1/28 Notes: Problem 3 s posted and due ths upcomng Frday There was an early bug n the fake-test data; fxed
More informationQuantum Mechanics I - Session 4
Quantum Mechancs I - Sesson 4 Aprl 3, 05 Contents Operators Change of Bass 4 3 Egenvectors and Egenvalues 5 3. Denton....................................... 5 3. Rotaton n D....................................
More informationDynamic Programming 4/5/12. Dynamic programming. Fibonacci numbers. Fibonacci: a first attempt. David Kauchak cs302 Spring 2012
Dynamc Programmng Davd Kauchak cs32 Sprng 212 Dynamc programmng l One of the most mportant algorthm tools! l Very common ntervew queston l Method for solvng problems where optmal solutons can be defned
More informationBezier curves. Michael S. Floater. August 25, These notes provide an introduction to Bezier curves. i=0
Bezer curves Mchael S. Floater August 25, 211 These notes provde an ntroducton to Bezer curves. 1 Bernsten polynomals Recall that a real polynomal of a real varable x R, wth degree n, s a functon of the
More informationMath1110 (Spring 2009) Prelim 3 - Solutions
Math 1110 (Sprng 2009) Solutons to Prelm 3 (04/21/2009) 1 Queston 1. (16 ponts) Short answer. Math1110 (Sprng 2009) Prelm 3 - Solutons x a 1 (a) (4 ponts) Please evaluate lm, where a and b are postve numbers.
More informationMultilayer Perceptron (MLP)
Multlayer Perceptron (MLP) Seungjn Cho Department of Computer Scence and Engneerng Pohang Unversty of Scence and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjn@postech.ac.kr 1 / 20 Outlne
More informationG = G 1 + G 2 + G 3 G 2 +G 3 G1 G2 G3. Network (a) Network (b) Network (c) Network (d)
Massachusetts Insttute of Technology Department of Electrcal Engneerng and Computer Scence 6.002 í Electronc Crcuts Homework 2 Soluton Handout F98023 Exercse 21: Determne the conductance of each network
More information11 Tail Inequalities Markov s Inequality. Lecture 11: Tail Inequalities [Fa 13]
Algorthms Lecture 11: Tal Inequaltes [Fa 13] If you hold a cat by the tal you learn thngs you cannot learn any other way. Mark Twan 11 Tal Inequaltes The smple recursve structure of skp lsts made t relatvely
More informationMEM 255 Introduction to Control Systems Review: Basics of Linear Algebra
MEM 255 Introducton to Control Systems Revew: Bascs of Lnear Algebra Harry G. Kwatny Department of Mechancal Engneerng & Mechancs Drexel Unversty Outlne Vectors Matrces MATLAB Advanced Topcs Vectors A
More informationAdvanced Algebraic Algorithms on Integers and Polynomials
Advanced Algebrac Algorthms on Integers and Polynomals Analyss of Algorthms Prepared by John Ref, Ph.D. Integer and Polynomal Computatons a) Newton Iteraton: applcaton to dvson b) Evaluaton and Interpolaton
More informationPolynomials. 1 What is a polynomial? John Stalker
Polynomals John Stalker What s a polynomal? If you thnk you already know what a polynomal s then skp ths secton. Just be aware that I consstently wrte thngs lke p = c z j =0 nstead of p(z) = c z. =0 You
More informationTracking with Kalman Filter
Trackng wth Kalman Flter Scott T. Acton Vrgna Image and Vdeo Analyss (VIVA), Charles L. Brown Department of Electrcal and Computer Engneerng Department of Bomedcal Engneerng Unversty of Vrgna, Charlottesvlle,
More informationVapnik-Chervonenkis theory
Vapnk-Chervonenks theory Rs Kondor June 13, 2008 For the purposes of ths lecture, we restrct ourselves to the bnary supervsed batch learnng settng. We assume that we have an nput space X, and an unknown
More informationProblem Set 6: Trees Spring 2018
Problem Set 6: Trees 1-29 Sprng 2018 A Average dstance Gven a tree, calculate the average dstance between two vertces n the tree. For example, the average dstance between two vertces n the followng tree
More informationDISCRIMINANTS AND RAMIFIED PRIMES. 1. Introduction A prime number p is said to be ramified in a number field K if the prime ideal factorization
DISCRIMINANTS AND RAMIFIED PRIMES KEITH CONRAD 1. Introducton A prme number p s sad to be ramfed n a number feld K f the prme deal factorzaton (1.1) (p) = po K = p e 1 1 peg g has some e greater than 1.
More informationCalculation of time complexity (3%)
Problem 1. (30%) Calculaton of tme complexty (3%) Gven n ctes, usng exhaust search to see every result takes O(n!). Calculaton of tme needed to solve the problem (2%) 40 ctes:40! dfferent tours 40 add
More informationAS-Level Maths: Statistics 1 for Edexcel
1 of 6 AS-Level Maths: Statstcs 1 for Edecel S1. Calculatng means and standard devatons Ths con ndcates the slde contans actvtes created n Flash. These actvtes are not edtable. For more detaled nstructons,
More informationLecture 12: Discrete Laplacian
Lecture 12: Dscrete Laplacan Scrbe: Tanye Lu Our goal s to come up wth a dscrete verson of Laplacan operator for trangulated surfaces, so that we can use t n practce to solve related problems We are mostly
More informationSolutions Homework 4 March 5, 2018
1 Solutons Homework 4 March 5, 018 Soluton to Exercse 5.1.8: Let a IR be a translaton and c > 0 be a re-scalng. ˆb1 (cx + a) cx n + a (cx 1 + a) c x n x 1 cˆb 1 (x), whch shows ˆb 1 s locaton nvarant and
More informationModule 9. Lecture 6. Duality in Assignment Problems
Module 9 1 Lecture 6 Dualty n Assgnment Problems In ths lecture we attempt to answer few other mportant questons posed n earler lecture for (AP) and see how some of them can be explaned through the concept
More informationChapter 7 Generalized and Weighted Least Squares Estimation. In this method, the deviation between the observed and expected values of
Chapter 7 Generalzed and Weghted Least Squares Estmaton The usual lnear regresson model assumes that all the random error components are dentcally and ndependently dstrbuted wth constant varance. When
More informationHomework 9 Solutions. 1. (Exercises from the book, 6 th edition, 6.6, 1-3.) Determine the number of distinct orderings of the letters given:
Homework 9 Solutons PROBLEM ONE 1 (Exercses from the book, th edton,, 1-) Determne the number of dstnct orderngs of the letters gven: (a) GUIDE Soluton: 5! (b) SCHOOL Soluton:! (c) SALESPERSONS Soluton:
More informationA combinatorial problem associated with nonograms
A combnatoral problem assocated wth nonograms Jessca Benton Ron Snow Nolan Wallach March 21, 2005 1 Introducton. Ths work was motvated by a queston posed by the second named author to the frst named author
More informationarxiv: v1 [math.ho] 18 May 2008
Recurrence Formulas for Fbonacc Sums Adlson J. V. Brandão, João L. Martns 2 arxv:0805.2707v [math.ho] 8 May 2008 Abstract. In ths artcle we present a new recurrence formula for a fnte sum nvolvng the Fbonacc
More informationPRIMES 2015 reading project: Problem set #3
PRIMES 2015 readng project: Problem set #3 page 1 PRIMES 2015 readng project: Problem set #3 posted 31 May 2015, to be submtted around 15 June 2015 Darj Grnberg The purpose of ths problem set s to replace
More information