Dynamic Programming 4/5/12. Dynamic programming. Fibonacci numbers. Fibonacci: a first attempt. David Kauchak cs302 Spring 2012
|
|
- Ralph Frank Scott
- 6 years ago
- Views:
Transcription
1 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 n terms of optmal solutons to sub-problems AND l the sub-problems are overlappng Fbonacc numbers Fbonacc: a frst attempt 1, 1, 2, 3, 5, 8, 13, 21, 34, What s the recurrence for the n th Fbonacc number? F(n) = F(n-1) + F(n-2) The soluton for n s defned wth respect to the soluton to smaller problems (n-1 and n-2) 1
2 Is t correct? Runnng tme F(n) = F(n-1) + F(n-2) l Each call creates two recursve calls l Each call reduces the sze of the problem by 1 or 2 l Creates a full bnary of depth n l O(2 n ) Can we do better? Fb(n) A lot of repeated work! Fb(n) Fb(n-1) Fb(n-2) Fb(n-1) Fb(n-2) Fb(n-2) Fb(n-3) Fb(n-3) Fb(n-4) Fb(n-2) Fb(n-3) Fb(n-3) Fb(n-4) Fb(n-3) Fb(n-4) Fb(n-4) Fb(n-5) Fb(n-4) Fb(n-5) Fb(n-5) Fb(n-6) Fb(n-3) Fb(n-4) Fb(n-4) Fb(n-5) Fb(n-4) Fb(n-5) Fb(n-5) Fb(n-6) 2
3 Identfyng a dynamc programmng problem The soluton can be defned wth respect to solutons to subproblems The subproblems created are overlappng, that s we see the same subproblems repeated Creatng a dynamc programmng soluton Step 1: Identfy a soluton to the problem wth respect to smaller subproblems l F(n) = F(n-1) + F(n-2) Step 2: bottom up - start wth solutons to the smallest problems and buld solutons to the larger problems use an array to store solutons to subproblems Is t correct? Runnng tme? F(n) = F(n-1) + F(n-2) Θ(n) 3
4 Countng bnary search trees l How many unque bnary search trees can be created usng the numbers 1 through n? Step 1: What s the subproblem? l Assume we have some black box solver (call t T) that can gve us the answer to smaller subproblems l How can we use the answer from ths to answer our queston? l How many optons for the root are there? n Subproblems Subproblems 1, 2,, -1 +1, +2,, +n How many trees have as the root?? 4
5 Subproblems Subproblems 1, 2,, -1 +1, +2,, +n T(-1) subproblem of sze -1? 1, 2,, -1 +1, +2,, +n T(-1) Number of trees for +1, +2,, +n s the same as the number of trees from 1, 2,, n- Subproblems Subproblems 1, 2,, -1 +1, +2,, +n T(-1) T(n-) 1, 2,, -1 +1, +2,, +n T(-1) T(n-) Gven solutons for T(-1) and T(n-) how many trees are there wth as the root? T() = T(-1) * T(n-) 5
6 Step 1: defne the answer wth respect to subproblems T() = T(-1) * T(n-) Is there a problem? T( n) = n = 1 T( 1)* T( n ) As wth Fbonacc, we re repeatng a lot of work Step 2: Generate a soluton from the bottom-up n 6
7 c[]*c[1] + c[1]*c[] n n c[]*c[1] + c[1]*c[] n n 7
8 1 2 3 c[]*c[2] + c[1]*c[1] + c[2]*c[] n n Runnng tme? n Θ(n 2 ) 8
9 Longest common subsequence (LCS) For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B ABA? Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B ABA Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B ACA? Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B ACA 9
10 Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B DCA? Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B DCA Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B AADAA? Longest common subsequence (LCS) l For a sequence X = x 1, x 2,, x n, a subsequence s a subset of the sequence defned by a set of ncreasng ndces ( 1, 2,, k ) where 1 1 < 2 < < k n X = A B A C D A B A B AADAA 1
11 LCS problem Gven two sequences X and Y, a common subsequence s a subsequence that occurs n both X and Y Gven two sequences X = x 1, x 2,, x n and Y = y 1, y 2,, y n, What s the longest common subsequence? X = A B C B D A B LCS problem l Gven two sequences X and Y, a common subsequence s a subsequence that occurs n both X and Y l Gven two sequences X = x 1, x 2,, x n and Y = y 1, y 2,, y n, What s the longest common subsequence? X = A B C B D A B Step 1: Defne the problem wth respect to subproblems X = A B C B D A B Step 1: Defne the problem wth respect to subproblems X = A B C B D A? Y = B D C A B? Is the last character part of the LCS? 11
12 Step 1: Defne the problem wth respect to subproblems Step 1: Defne the problem wth respect to subproblems X = A B C B D A? Y = B D C A B? X = A B C B D A A LCS The characters are part of the LCS What s the recursve relatonshp? Two cases: ether the characters are the same or they re dfferent If they re the same LCS + x ( X, Y) = LCS ( X1... n 1, Y1... m 1) n Step 1: Defne the problem wth respect to subproblems X = A B C B D A B LCS Step 1: Defne the problem wth respect to subproblems X = A B C B D A B LCS If they re dfferent LCS X, Y) = LCS ( X 1, Y) (... n 1 If they re dfferent LCS ( X, Y) = LCS ( X, Y1... m 1) 12
13 Step 1: Defne the problem wth respect to subproblems Step 1: Defne the problem wth respect to subproblems X = A B C B D A B X = A B C B D A B If they re dfferent? X = A B C B D A B X1... n 1, Y1... m 1) f xn = ym X, Y) X1... n 1, Y), X, Y1... m 1) otherwse (for now, let s ust worry about countng the length of the LCS) Step 2: Buld the soluton from the bottom up X1... n 1, Y1... m 1) f xn = ym X, Y) X1... n 1, Y), X, Y1... m 1) otherwse Step 2: Buld the soluton from the bottom up X1... n 1, Y1... m 1) f xn = ym X, Y) X1... n 1, Y), X, Y1... m 1) otherwse What types of subproblem solutons do we need to store? What types of subproblem solutons do we need to store? X 1, Y 1 k ) X 1, Y 1 k ) two dfferent ndces 1,, ] 1, ],, f otherwse 13
14 1,, ] 1, ],, f otherwse 1,, ] 1, ],, f otherwse y B D C A B A y B D C A B A x For Fbonacc and tree countng, we had to ntalze some entres n the array. Any here? x Need to ntalze values wthn 1 smaller n ether dmenson. 1,, ] 1, ],, f otherwse 1,, ] 1, ],, f otherwse y B D C A B A y B D C A B A x? A, B) x 14
15 1,, ] 1, ],, f otherwse 1,, ] 1, ],, f otherwse y B D C A B A y B D C A B A x? A, BDCA) x 1 A, BDCA) 1,, ] 1, ],, f otherwse 1,, ] 1, ],, f otherwse y B D C A B A y B D C A B A x ? ABCB, BDCAB) x ABCB, BDCAB) 15
16 1, f x = y, ] 1, ],, otherwse x y B D C A B A Where s the fnal answer? The algorthm The algorthm The algorthm Base case ntalzaton Fll n the matrx 16
17 The algorthm The algorthm The algorthm Runnng tme? Θ(nm) 17
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 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 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 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 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 informationExercises. 18 Algorithms
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)
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 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 informationPartha Sarathi Mandal
MA 252: Data Structures and Algorithms Lecture 32 http://www.iitg.ernet.in/psm/indexing_ma252/y12/index.html Partha Sarathi Mandal Dept. of Mathematics, IIT Guwahati The All-Pairs Shortest Paths Problem
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 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 informationOn the Repeating Group Finding Problem
The 9th Workshop on Combnatoral Mathematcs and Computaton Theory On the Repeatng Group Fndng Problem Bo-Ren Kung, Wen-Hsen Chen, R.C.T Lee Graduate Insttute of Informaton Technology and Management Takmng
More informationCS 770G - Parallel Algorithms in Scientific Computing
References CS 770G - Parallel Algorthms n Scentfc Computng Parallel Sortng Introducton to Parallel Computng Kumar, Grama, Gupta, Karyps, Benjamn Cummngs. A porton of the notes comes from Prof. J. Demmel
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 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 informationSingular Value Decomposition: Theory and Applications
Sngular Value Decomposton: Theory and Applcatons Danel Khashab Sprng 2015 Last Update: March 2, 2015 1 Introducton A = UDV where columns of U and V are orthonormal and matrx D s dagonal wth postve real
More informationQuadratic speedup for unstructured search - Grover s Al-
Quadratc speedup for unstructured search - Grover s Al- CS 94- gorthm /8/07 Sprng 007 Lecture 11 001 Unstructured Search Here s the problem: You are gven a boolean functon f : {1,,} {0,1}, and are promsed
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 informationMatrix Approximation via Sampling, Subspace Embedding. 1 Solving Linear Systems Using SVD
Matrx Approxmaton va Samplng, Subspace Embeddng Lecturer: Anup Rao Scrbe: Rashth Sharma, Peng Zhang 0/01/016 1 Solvng Lnear Systems Usng SVD Two applcatons of SVD have been covered so far. Today we loo
More informationPROBLEM SET 7 GENERAL EQUILIBRIUM
PROBLEM SET 7 GENERAL EQUILIBRIUM Queston a Defnton: An Arrow-Debreu Compettve Equlbrum s a vector of prces {p t } and allocatons {c t, c 2 t } whch satsfes ( Gven {p t }, c t maxmzes βt ln c t subject
More informationMMA and GCMMA two methods for nonlinear optimization
MMA and GCMMA two methods for nonlnear optmzaton Krster Svanberg Optmzaton and Systems Theory, KTH, Stockholm, Sweden. krlle@math.kth.se Ths note descrbes the algorthms used n the author s 2007 mplementatons
More informationECE 534: Elements of Information Theory. Solutions to Midterm Exam (Spring 2006)
ECE 534: Elements of Informaton Theory Solutons to Mdterm Eam (Sprng 6) Problem [ pts.] A dscrete memoryless source has an alphabet of three letters,, =,, 3, wth probabltes.4,.4, and., respectvely. (a)
More informationCHAPTER 17 Amortized Analysis
CHAPTER 7 Amortzed Analyss In an amortzed analyss, the tme requred to perform a sequence of data structure operatons s averaged over all the operatons performed. It can be used to show that the average
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 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 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 informationA 2D Bounded Linear Program (H,c) 2D Linear Programming
A 2D Bounded Lnear Program (H,c) h 3 v h 8 h 5 c h 4 h h 6 h 7 h 2 2D Lnear Programmng C s a polygonal regon, the ntersecton of n halfplanes. (H, c) s nfeasble, as C s empty. Feasble regon C s unbounded
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 informationAn Experiment/Some Intuition (Fall 2006): Lecture 18 The EM Algorithm heads coin 1 tails coin 2 Overview Maximum Likelihood Estimation
An Experment/Some Intuton I have three cons n my pocket, 6.864 (Fall 2006): Lecture 18 The EM Algorthm Con 0 has probablty λ of heads; Con 1 has probablty p 1 of heads; Con 2 has probablty p 2 of heads
More informationLecture 5 September 17, 2015
CS 229r: Algorthms for Bg Data Fall 205 Prof. Jelan Nelson Lecture 5 September 7, 205 Scrbe: Yakr Reshef Recap and overvew Last tme we dscussed the problem of norm estmaton for p-norms wth p > 2. We had
More informationSimultaneous Optimization of Berth Allocation, Quay Crane Assignment and Quay Crane Scheduling Problems in Container Terminals
Smultaneous Optmzaton of Berth Allocaton, Quay Crane Assgnment and Quay Crane Schedulng Problems n Contaner Termnals Necat Aras, Yavuz Türkoğulları, Z. Caner Taşkın, Kuban Altınel Abstract In ths work,
More informationClassification as a Regression Problem
Target varable y C C, C,, ; Classfcaton as a Regresson Problem { }, 3 L C K To treat classfcaton as a regresson problem we should transform the target y nto numercal values; The choce of numercal class
More informationAdditional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty
Addtonal Codes usng Fnte Dfference Method Benamn Moll 1 HJB Equaton for Consumpton-Savng Problem Wthout Uncertanty Before consderng the case wth stochastc ncome n http://www.prnceton.edu/~moll/ HACTproect/HACT_Numercal_Appendx.pdf,
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 informationIntroduction to Algorithms
Introducton to Algorthms 6.046J/8.40J LECTURE 6 Shortest Paths III All-pars shortest paths Matrx-multplcaton algorthm Floyd-Warshall algorthm Johnson s algorthm Prof. Charles E. Leserson Shortest paths
More informationIntroduction to Algorithms
Introducton to Algorthms 6.046J/8.40J/SMA5503 Lecture 9 Prof. Erk Demane Shortest paths Sngle-source shortest paths Nonnegate edge weghts Djkstra s algorthm: OE + V lg V General Bellman-Ford: OVE DAG One
More informationCOS 521: Advanced Algorithms Game Theory and Linear Programming
COS 521: Advanced Algorthms Game Theory and Lnear Programmng Moses Charkar February 27, 2013 In these notes, we ntroduce some basc concepts n game theory and lnear programmng (LP). We show a connecton
More informationCSC 411 / CSC D11 / CSC C11
18 Boostng s a general strategy for learnng classfers by combnng smpler ones. The dea of boostng s to take a weak classfer that s, any classfer that wll do at least slghtly better than chance and use t
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 informationThe Discretization Process
FMIA F Moukalled L Mangan M Darwsh An Advanced Introducton wth OpenFOAM and Matlab Ths textbook explores both the theoretcal foundaton of the Fnte Volume Method (FVM) and ts applcatons n Computatonal Flud
More informationTHE ARIMOTO-BLAHUT ALGORITHM FOR COMPUTATION OF CHANNEL CAPACITY. William A. Pearlman. References: S. Arimoto - IEEE Trans. Inform. Thy., Jan.
THE ARIMOTO-BLAHUT ALGORITHM FOR COMPUTATION OF CHANNEL CAPACITY Wllam A. Pearlman 2002 References: S. Armoto - IEEE Trans. Inform. Thy., Jan. 1972 R. Blahut - IEEE Trans. Inform. Thy., July 1972 Recall
More informationDeterminants Containing Powers of Generalized Fibonacci Numbers
1 2 3 47 6 23 11 Journal of Integer Sequences, Vol 19 (2016), Artcle 1671 Determnants Contanng Powers of Generalzed Fbonacc Numbers Aram Tangboonduangjt and Thotsaporn Thanatpanonda Mahdol Unversty Internatonal
More informationprinceton univ. F 13 cos 521: Advanced Algorithm Design Lecture 3: Large deviations bounds and applications Lecturer: Sanjeev Arora
prnceton unv. F 13 cos 521: Advanced Algorthm Desgn Lecture 3: Large devatons bounds and applcatons Lecturer: Sanjeev Arora Scrbe: Today s topc s devaton bounds: what s the probablty that a random varable
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 informationEnsemble Methods: Boosting
Ensemble Methods: Boostng Ncholas Ruozz Unversty of Texas at Dallas Based on the sldes of Vbhav Gogate and Rob Schapre Last Tme Varance reducton va baggng Generate new tranng data sets by samplng wth replacement
More informationSome modelling aspects for the Matlab implementation of MMA
Some modellng aspects for the Matlab mplementaton of MMA Krster Svanberg krlle@math.kth.se Optmzaton and Systems Theory Department of Mathematcs KTH, SE 10044 Stockholm September 2004 1. Consdered optmzaton
More informationFinding the Longest Similar Subsequence of Thumbprints for Intrusion Detection
Fndng the Longest Smlar Subsequence of Thumbprnts for Intruson Detecton Mng D. Wan, Shou-Hsuan Stephen Huang, and Janhua Yang Department of Computer Scence, Unversty of Houston Houston, Texas, 77204, USA
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 informationDynamic Programming. Lecture 13 (5/31/2017)
Dynamc Programmng Lecture 13 (5/31/2017) - A Forest Thnnng Example - Projected yeld (m3/ha) at age 20 as functon of acton taken at age 10 Age 10 Begnnng Volume Resdual Ten-year Volume volume thnned volume
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 informationSupplement: Proofs and Technical Details for The Solution Path of the Generalized Lasso
Supplement: Proofs and Techncal Detals for The Soluton Path of the Generalzed Lasso Ryan J. Tbshran Jonathan Taylor In ths document we gve supplementary detals to the paper The Soluton Path of the Generalzed
More informationSpecial Relativity and Riemannian Geometry. Department of Mathematical Sciences
Tutoral Letter 06//018 Specal Relatvty and Reannan Geoetry APM3713 Seester Departent of Matheatcal Scences IMPORTANT INFORMATION: Ths tutoral letter contans the solutons to Assgnent 06. BAR CODE Learn
More informationLecture Notes on Linear Regression
Lecture Notes on Lnear Regresson Feng L fl@sdueducn Shandong Unversty, Chna Lnear Regresson Problem In regresson problem, we am at predct a contnuous target value gven an nput feature vector We assume
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 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 informationLecture 3 January 31, 2017
CS 224: Advanced Algorthms Sprng 207 Prof. Jelan Nelson Lecture 3 January 3, 207 Scrbe: Saketh Rama Overvew In the last lecture we covered Y-fast tres and Fuson Trees. In ths lecture we start our dscusson
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 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 informationA FAST HEURISTIC FOR TASKS ASSIGNMENT IN MANYCORE SYSTEMS WITH VOLTAGE-FREQUENCY ISLANDS
Shervn Haamn A FAST HEURISTIC FOR TASKS ASSIGNMENT IN MANYCORE SYSTEMS WITH VOLTAGE-FREQUENCY ISLANDS INTRODUCTION Increasng computatons n applcatons has led to faster processng. o Use more cores n a chp
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 informationLow-Connectivity Network Design on Series-Parallel Graphs
Low-Connectvty Network Desgn on Seres-Parallel Graphs S. Raghavan The Robert H. Smth School of Busness, Van Munchng Hall, Unversty of Maryland, College Park, Maryland 20742 Network survvablty s a crtcal
More informationComputational issues surrounding the management of an ecological food web
Computatonal ssues surroundng the management of an ecologcal food web Wllam J M Probert, Eve McDonald-Madden, Nathale Peyrard, Régs Sabbadn AIGM 12, ECAI2012 Montpeller, France Ratonale Ecology has many
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 informationCollege of Computer & Information Science Fall 2009 Northeastern University 20 October 2009
College of Computer & Informaton Scence Fall 2009 Northeastern Unversty 20 October 2009 CS7880: Algorthmc Power Tools Scrbe: Jan Wen and Laura Poplawsk Lecture Outlne: Prmal-dual schema Network Desgn:
More informationHidden Markov Models
Hdden Markov Models Namrata Vaswan, Iowa State Unversty Aprl 24, 204 Hdden Markov Model Defntons and Examples Defntons:. A hdden Markov model (HMM) refers to a set of hdden states X 0, X,..., X t,...,
More informationAnnexes. EC.1. Cycle-base move illustration. EC.2. Problem Instances
ec Annexes Ths Annex frst llustrates a cycle-based move n the dynamc-block generaton tabu search. It then dsplays the characterstcs of the nstance sets, followed by detaled results of the parametercalbraton
More informationCSCE 790S Background Results
CSCE 790S Background Results Stephen A. Fenner September 8, 011 Abstract These results are background to the course CSCE 790S/CSCE 790B, Quantum Computaton and Informaton (Sprng 007 and Fall 011). Each
More informationGeneral theory of fuzzy connectedness segmentations: reconciliation of two tracks of FC theory
General theory of fuzzy connectedness segmentatons: reconclaton of two tracks of FC theory Krzysztof Chrs Ceselsk Department of Mathematcs, West Vrgna Unversty and MIPG, Department of Radology, Unversty
More informationSpectral Clustering. Shannon Quinn
Spectral Clusterng Shannon Qunn (wth thanks to Wllam Cohen of Carnege Mellon Unverst, and J. Leskovec, A. Raaraman, and J. Ullman of Stanford Unverst) Graph Parttonng Undrected graph B- parttonng task:
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 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 informationVQ widely used in coding speech, image, and video
at Scalar quantzers are specal cases of vector quantzers (VQ): they are constraned to look at one sample at a tme (memoryless) VQ does not have such constrant better RD perfomance expected Source codng
More informationFTCS Solution to the Heat Equation
FTCS Soluton to the Heat Equaton ME 448/548 Notes Gerald Recktenwald Portland State Unversty Department of Mechancal Engneerng gerry@pdx.edu ME 448/548: FTCS Soluton to the Heat Equaton Overvew 1. Use
More informationNP-Completeness : Proofs
NP-Completeness : Proofs Proof Methods A method to show a decson problem Π NP-complete s as follows. (1) Show Π NP. (2) Choose an NP-complete problem Π. (3) Show Π Π. A method to show an optmzaton problem
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 informationU.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 2/21/2008. Notes for Lecture 8
U.C. Berkeley CS278: Computatonal Complexty Handout N8 Professor Luca Trevsan 2/21/2008 Notes for Lecture 8 1 Undrected Connectvty In the undrected s t connectvty problem (abbrevated ST-UCONN) we are gven
More informationThe Minimum Universal Cost Flow in an Infeasible Flow Network
Journal of Scences, Islamc Republc of Iran 17(2): 175-180 (2006) Unversty of Tehran, ISSN 1016-1104 http://jscencesutacr The Mnmum Unversal Cost Flow n an Infeasble Flow Network H Saleh Fathabad * M Bagheran
More informationLecture 4. Instructor: Haipeng Luo
Lecture 4 Instructor: Hapeng Luo In the followng lectures, we focus on the expert problem and study more adaptve algorthms. Although Hedge s proven to be worst-case optmal, one may wonder how well t would
More informationAPPROXIMATE PRICES OF BASKET AND ASIAN OPTIONS DUPONT OLIVIER. Premia 14
APPROXIMAE PRICES OF BASKE AND ASIAN OPIONS DUPON OLIVIER Prema 14 Contents Introducton 1 1. Framewor 1 1.1. Baset optons 1.. Asan optons. Computng the prce 3. Lower bound 3.1. Closed formula for the prce
More informationAn Interactive Optimisation Tool for Allocation Problems
An Interactve Optmsaton ool for Allocaton Problems Fredr Bonäs, Joam Westerlund and apo Westerlund Process Desgn Laboratory, Faculty of echnology, Åbo Aadem Unversty, uru 20500, Fnland hs paper presents
More informationCME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 13
CME 30: NUMERICAL LINEAR ALGEBRA FALL 005/06 LECTURE 13 GENE H GOLUB 1 Iteratve Methods Very large problems (naturally sparse, from applcatons): teratve methods Structured matrces (even sometmes dense,
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 informationSuggested solutions for the exam in SF2863 Systems Engineering. June 12,
Suggested solutons for the exam n SF2863 Systems Engneerng. June 12, 2012 14.00 19.00 Examner: Per Enqvst, phone: 790 62 98 1. We can thnk of the farm as a Jackson network. The strawberry feld s modelled
More informationMACHINE APPLIED MACHINE LEARNING LEARNING. Gaussian Mixture Regression
11 MACHINE APPLIED MACHINE LEARNING LEARNING MACHINE LEARNING Gaussan Mture Regresson 22 MACHINE APPLIED MACHINE LEARNING LEARNING Bref summary of last week s lecture 33 MACHINE APPLIED MACHINE LEARNING
More informationEdge Isoperimetric Inequalities
November 7, 2005 Ross M. Rchardson Edge Isopermetrc Inequaltes 1 Four Questons Recall that n the last lecture we looked at the problem of sopermetrc nequaltes n the hypercube, Q n. Our noton of boundary
More informationWhich Separator? Spring 1
Whch Separator? 6.034 - Sprng 1 Whch Separator? Mamze the margn to closest ponts 6.034 - Sprng Whch Separator? Mamze the margn to closest ponts 6.034 - Sprng 3 Margn of a pont " # y (w $ + b) proportonal
More informationLecture 21: Numerical methods for pricing American type derivatives
Lecture 21: Numercal methods for prcng Amercan type dervatves Xaoguang Wang STAT 598W Aprl 10th, 2014 (STAT 598W) Lecture 21 1 / 26 Outlne 1 Fnte Dfference Method Explct Method Penalty Method (STAT 598W)
More informationProbability Theory (revisited)
Probablty Theory (revsted) Summary Probablty v.s. plausblty Random varables Smulaton of Random Experments Challenge The alarm of a shop rang. Soon afterwards, a man was seen runnng n the street, persecuted
More informationCIS526: Machine Learning Lecture 3 (Sept 16, 2003) Linear Regression. Preparation help: Xiaoying Huang. x 1 θ 1 output... θ M x M
CIS56: achne Learnng Lecture 3 (Sept 6, 003) Preparaton help: Xaoyng Huang Lnear Regresson Lnear regresson can be represented by a functonal form: f(; θ) = θ 0 0 +θ + + θ = θ = 0 ote: 0 s a dummy attrbute
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 informationHomework Notes Week 7
Homework Notes Week 7 Math 4 Sprng 4 #4 (a Complete the proof n example 5 that s an nner product (the Frobenus nner product on M n n (F In the example propertes (a and (d have already been verfed so we
More informationFitting a Graph to One-Dimensional Data. September 11, 2018
Fttng a Graph to One-Dmensonal Data Su-Wng Cheng 1 Otfred Cheong 2 Taegyoung Lee 2 September 11, 2018 arxv:1809.02948v1 [cs.cg] 9 Sep 2018 Abstract Gven n data ponts n R d, an approprate edge-weghted graph
More informationConsistency & Convergence
/9/007 CHE 374 Computatonal Methods n Engneerng Ordnary Dfferental Equatons Consstency, Convergence, Stablty, Stffness and Adaptve and Implct Methods ODE s n MATLAB, etc Consstency & Convergence Consstency
More information1 The Mistake Bound Model
5-850: Advanced Algorthms CMU, Sprng 07 Lecture #: Onlne Learnng and Multplcatve Weghts February 7, 07 Lecturer: Anupam Gupta Scrbe: Bryan Lee,Albert Gu, Eugene Cho he Mstake Bound Model Suppose there
More information2. PROBLEM STATEMENT AND SOLUTION STRATEGIES. L q. Suppose that we have a structure with known geometry (b, h, and L) and material properties (EA).
. PROBEM STATEMENT AND SOUTION STRATEGIES Problem statement P, Q h ρ ρ o EA, N b b Suppose that we have a structure wth known geometry (b, h, and ) and materal propertes (EA). Gven load (P), determne the
More informationNice plotting of proteins II
Nce plottng of protens II Fnal remark regardng effcency: It s possble to wrte the Newton representaton n a way that can be computed effcently, usng smlar bracketng that we made for the frst representaton
More informationModule 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur
Module 3 LOSSY IMAGE COMPRESSION SYSTEMS Verson ECE IIT, Kharagpur Lesson 6 Theory of Quantzaton Verson ECE IIT, Kharagpur Instructonal Objectves At the end of ths lesson, the students should be able to:
More informationFeature Selection: Part 1
CSE 546: Machne Learnng Lecture 5 Feature Selecton: Part 1 Instructor: Sham Kakade 1 Regresson n the hgh dmensonal settng How do we learn when the number of features d s greater than the sample sze n?
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 informationChapter 2 Transformations and Expectations. , and define f
Revew for the prevous lecture Defnton: support set of a ranom varable, the monotone functon; Theorem: How to obtan a cf, pf (or pmf) of functons of a ranom varable; Eamples: several eamples Chapter Transformatons
More information