Lecture 7: Solving Recurrences
|
|
- Brianna Waters
- 5 years ago
- Views:
Transcription
1 Lecture 7: Solvig Recurreces CSE 7: Data Structures ad Algorithms CSE 7 19 WI KASEY CHAMPION 1
2 Warm Up Writig Recurreces CSE 7 19 WI KASEY CHAMPION 2
3 Admiistriva HW 2 Part 1 due Friday git ruers will get overloaded o Friday, pla accordigly No Kasey office hours Friday CSE 7 19 WI KASEY CHAMPION
4 Solvig Recurreces CSE 7 19 WI KASEY CHAMPION 4
5 Review: Modelig Recursio Write a mathematical model of the followig code public it factorial(it ) { } } if ( == 0 == 1) { retur 1; } else { +1 retur * factorial(1); +2 4 &h(" " = 0,1! " = $ 2 +! " 1 /0h(1&2( + What is the Big O? CSE 7 19 WI KASEY CHAMPION 5
6 Solvig Recurreces How do we go from code model to Big O? 1. Explore the recursive patter by tracig through the a few levels of recursio 2. Write a ew model of the rutime or work doe for the patter i terms of the level of recursio i. Use algebra (ad likely a summatio) to simplify the T recursive call out of your ew model 4. Use algebra to simplify dow to the closed form so you ca easily idetify the Big O CSE 7 19 WI KASEY CHAMPION 6
7 Urollig Method Walk through fuctio defiitio util you see a patter 4 &h(" " = 0,1! " = $ 2 +!("" 1) /0h(1&2( 4 &h(" " = 0,1! " =! " = $ 2 +! " 1 /0h(1&2(! " = !(" 1 1) i = 1 4 &h(" " = 0,1 1 +! " 1 /0h(1&2(! " = !(" 2)! " = $! " = !(" 2 1) i = 2! " = !(" )! " = $ 4 &h(" " = 0,1 1 +! " 1 /0h(1&2(! " = !(" 1) i =! " = ! 1 = i =? T(i) = T(1) whe i= 1 1 recursive cases 1 base case >?=! " = 4 + : 2 ;<= Summatio of a costat > : " = 4 + 2(" 1)! 4 = 2 +! 4 1 = ! 1 = ! 2 1 = = CSE 7 19 WI KASEY CHAMPION 7
8 Urollig Method 5 Miutes Walk through fuctio defiitio util you see a patter! " = 1 %h'" " = 0 2! " 1 + 1,h'.%/0' i = 1 = 2! " i = 2 = 2 2! " = 2 1! " i = = 2 1 2! " = 2! " i = 4 = 2 2! " = " i = i = 2 7! " / Fiite Geometric Series <85 : 7;6 = 7 = =< 1 = 1 = 2 < + 2< = 2< + 2 < 1 = 2 <> = 2 7! " / + :?;6 2? <85 <85 = 2 <! " " + : 2? = 2 < 1 + :?;6?;6 CSE 7 19 WI KASEY CHAMPION 2? 8
9 Solvig Recurreces How do we go from code model to Big O? 1. Explore the recursive patter 2. Write a ew model i terms of i. Use algebra simplify the T away 4. Use algebra to fid the closed form Usig urollig method 1. Plug defiitio ito itself to write out first few levels of recursio 2. Simplify away parethesis but leave separate terms to help idetify patter i terms of i. Plug i a value of i to solve for base case, write summatio represetig recursive work 4. Usig summatio idetities as appropriate reduced to closed form CSE 7 19 WI KASEY CHAMPION 9
10 Tree Method Draw out call stack, how much work does each call do? 1 )h+" " 1! " = ' 2! " 2 + ".h+/)01+! " " 2 + "! " 2 + " 1. Draw a overall root represetig the start of your family of recursive calls 2. How much work is doe by the top recursive level?. How much of that work is delegated to dowstream recursive calls? 4. How much work is doe by each of those child recursive calls? 5. How much of that work is delegated to dowstream recursive calls? What does the last row of the tree look like? 8. Sum up all the work!! " 4 +! " " 24 + " 2 2 "! "! " 4 4 4! "! 4 + "! " 4 + " 2 2 "! " "! " CSE 7 SP 18 KASEY CHAMPION 10
11 Tree Method & ' = 1 )h+' ' 1 2& ' 2 + './h+0)12+ How much work How may pieces of work at each level? doe by each piece? How much work across each level?
12 Tree Method Formulas O = = 1 )h"= = 1 2O = 2 + = *Hh"%)'&" How much work is doe by recursive levels (brach odes)? 1. How may recursive calls are o the ith level of the tree? umbernodesperlevel(i) = 2 i i = 0 is overall root level 2. At each level i, how may iputs does a sigle ode process? iputsperrecursivecall(i) = (/ 2 i ). How may recursive levels are there? brachcout = log 2 1 Based o the patter of how we get dow to base case :!"#$%&'(" )*%+ =./0 ;%<=#h?$@ ' ;%<=#ha*%+(') How much work is doe by the base case level (leaf odes)? 1. How much work is doe by a sigle leaf ode? 2. How may leaf odes are there? leafwork = 1 UVW X 4YZ O(= > 1) =./0 2. = 2. leafcout = 2 log 2 =?*=!"#$%&'(" )*%+ = D"<EA*%+ D"<EG*$=H = D"<EA*%+ ;%<=#h?$@ 49IJKLKMN O = 1 = 1 2 M8[ \4 = = H*H<D )*%+ = %"#$%&'(" )*%+ + =*=%"#$%&'(" )*%+ = UVW X 4YZ O = =./0 2. = 2. + = = = log \ = + = CSE 7 SP 18 KASEY CHAMPION 12
13 Tree Method Practice! ", 4 +! " 4 +! " 4 +,"! " = 4 %h'" " 1! " 4 +,"./h'0%12',,,! " 4,! " 4,,,,,,! " ,, Aswer the followig questios: 1. How may odes o each brach level? 2. How much work for each brach ode?. How much work per brach level? 4. How may brach levels? 5. How much work for each leaf ode? 6. How may leaf odes? EXAMPLE PROVIDED BY CS 1 JESSICA SU 1
14 Tree Method Practice 5 " = 4 7h9" " 1 5 " 4 +!"% <=h9>7?@9 5 Miutes 1. How may odes o each brach level? 0 Level (i) Number of Nodes Work per Node Work per Level 2. How much work for each brach ode?! " 4 0 % 0 1!" 2!" 2 1! " 4 %!"%. How much work per brach level? 0! " 4 0 % = 0!" % 2 9! " % 9 256!"% base +,. / ,. / 4. How may brach levels? log. " 1 Combiig it all together 5. How much work for each leaf ode? 4 +, D / EF 5 " = A 0BC 0!" % + 4" +,.G 6. How may leaf odes? +, D / power of a log H +, I J = K +, I L " +, D G CSE 7 SP 18 KASEY CHAMPION 14
15 Tree Method Practice ()* +,.! " = $ %&' % 2" + 4" ()* 67 factorig out a costat > > $ 2?(@) = 2 $?(@) ()* +,.! " = 2" $ %&' % + 4" ()* 67 %&= %&= fiite geometric series,. $ %&' A % = A, 1 A 1 Closed form: ()* +, 1! " = 2" + 4" ()*67 1 If we re tryig to prove upper boud! " = 2" $ B %&' % + 4" ()* 67 ifiite geometric series B $ %&' A % = 1 1 A whe 1 < x < 1! " = 2" 1! " :(" ) 1 + 4" ()* 67 CSE 7 SP 18 KASEY CHAMPION 15
16 Solvig Recurreces How do we go from code model to Big O? 1. Explore the recursive patter 2. Write a ew model i terms of i. Use algebra simplify the T away 4. Use algebra to fid the closed form Usig urollig method 1. Plug defiitio ito itself to write out first few levels of recursio 2. Simplify away parethesis but leave separate terms to help idetify patter i terms of i. Plug i a value of i to solve for base case, write summatio represetig recursive work 4. Usig summatio idetities as appropriate reduced to closed form Usig tree method 1. Plug defiitio ito itself to draw out first few levels of tree 2. Aswer questios about ature of tree to idetify work doe by recursive levels ad base case i terms of i. Combie aswers to questios to complete model i terms of i 4. Usig summatio idetities as appropriate reduced to closed form CSE 7 SP 18 KASEY CHAMPION
17 Is there a easier way? What if you do wat a exact closed form? Sorry, o If we wat to fid a big Θ Sometimes, yes! CSE 7 SP 18 KASEY CHAMPION 17
18 Master Theorem Give a recurrece of the followig form:! " = $ %h'" " = 1 )! " * + ",.h'/%01' The thaks to magical math brilliace we ca kow the followig: If log 7 ) < 9 the! " Θ ", If log 7 ) = 9 the! " Θ ", log : " If log 7 ) > 9 the! " Θ " CSE 7 SP 18 KASEY CHAMPION 18
19 Apply Master Theorem Give a recurrece of the form: 0 %h'" " = 1! " = 1! " 2 + " +,h'%./' If If log! " Θ " 7 1 < 8 the log 7 1 = 8! " Θ " log ; " the! " = 1 %h'" " 1 2! " 2 + " +,h'%./' a = 2 b = 2 c = 1 d = 1 If log 7 1 > 8 the! " Θ " A log 7 1 = 8 log ; 2 = 1! " Θ " log ; " Θ " D log ; " CSE 7 SP 18 KASEY CHAMPION 19
20 Reflectig o Master Theorem Give a recurrece of the form: The log 5 ) < 6! " = $ %h'" " = 1 )! " * + ",.h'/%01' case Recursive case coquers work more quickly tha it divides work Most work happes ear top of tree No recursive work i recursive case domiates growth, c term If If If log! " Θ ", 5 ) < 6 the log 5 ) = 6! " Θ ", log 9 " the log 5 ) > 6 the! " Θ " ;<= >? The case log 5 ) = 6 Work is equally distributed across call stack (throughout the tree ) Overall work is approximately work at top level x height h'0fh. log 5 ) */)"6hC/D ", log 5 ) A')BC/D $ " ;<= >? The log 5 ) > 6 case Recursive case divides work faster tha it coquers work Most work happes ear bottom of tree Leaf work domiates brach work CSE 7 SP 18 KASEY CHAMPION 20
Lecture 3: Asymptotic Analysis + Recurrences
Lecture 3: Asymptotic Aalysis + Recurreces Data Structures ad Algorithms CSE 373 SU 18 BEN JONES 1 Warmup Write a model ad fid Big-O for (it i = 0; i < ; i++) { for (it j = 0; j < i; j++) { System.out.pritl(
More informationAlgorithms and Data Structures Lecture IV
Algorithms ad Data Structures Lecture IV Simoas Šalteis Aalborg Uiversity simas@cs.auc.dk September 5, 00 1 This Lecture Aalyzig the ruig time of recursive algorithms (such as divide-ad-coquer) Writig
More informationThis Lecture. Divide and Conquer. Merge Sort: Algorithm. Merge Sort Algorithm. MergeSort (Example) - 1. MergeSort (Example) - 2
This Lecture Divide-ad-coquer techique for algorithm desig. Example the merge sort. Writig ad solvig recurreces Divide ad Coquer Divide-ad-coquer method for algorithm desig: Divide: If the iput size is
More informationCS583 Lecture 02. Jana Kosecka. some materials here are based on E. Demaine, D. Luebke slides
CS583 Lecture 02 Jaa Kosecka some materials here are based o E. Demaie, D. Luebke slides Previously Sample algorithms Exact ruig time, pseudo-code Approximate ruig time Worst case aalysis Best case aalysis
More informationFundamental Algorithms
Fudametal Algorithms Chapter 2b: Recurreces Michael Bader Witer 2014/15 Chapter 2b: Recurreces, Witer 2014/15 1 Recurreces Defiitio A recurrece is a (i-equality that defies (or characterizes a fuctio i
More informationCSE 332. Data Structures and Parallelism
Aam Blak Lecture 6a Witer 2017 CSE 332 Data Structures a Parallelism CSE 332: Data Structures a Parallelism More Recurreces T () T (/2) T (/2) T (/4) T (/4) T (/4) T (/4) P1 De-Brief 1 You i somethig substatial!
More informationis also known as the general term of the sequence
Lesso : Sequeces ad Series Outlie Objectives: I ca determie whether a sequece has a patter. I ca determie whether a sequece ca be geeralized to fid a formula for the geeral term i the sequece. I ca determie
More informationCS 332: Algorithms. Quicksort
CS 33: Aorithms Quicsort David Luebe //03 Homewor Assiged today, due ext Wedesday Will be o web page shortly after class Go over ow David Luebe //03 Review: Quicsort Sorts i place Sorts O( ) i the average
More informationCOMP26120: More on the Complexity of Recursive Programs (2018/19) Lucas Cordeiro
COMP26120: More o the Complexity of Recursive Programs (2018/19) Lucas Cordeiro lucas.cordeiro@machester.ac.uk Divide-ad-Coquer (Recurrece) Textbook: Algorithm Desig ad Applicatios, Goodrich, Michael T.
More informationCIS 121 Data Structures and Algorithms with Java Spring Code Snippets and Recurrences Monday, February 4/Tuesday, February 5
CIS 11 Data Structures ad Algorithms with Java Sprig 019 Code Sippets ad Recurreces Moday, February 4/Tuesday, February 5 Learig Goals Practice provig asymptotic bouds with code sippets Practice solvig
More informationUnit 6: Sequences and Series
AMHS Hoors Algebra 2 - Uit 6 Uit 6: Sequeces ad Series 26 Sequeces Defiitio: A sequece is a ordered list of umbers ad is formally defied as a fuctio whose domai is the set of positive itegers. It is commo
More informationRecursive Algorithms. Recurrences. Recursive Algorithms Analysis
Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects
More informationMatriculation number: You have 90 minutes to complete the exam of InformatikIIb. The following rules apply:
Departmet of Iformatics Prof. Dr. Michael Böhle Bizmühlestrasse 14 8050 Zurich Phoe: +41 44 635 4333 Email: boehle@ifi.uzh.ch AlgoDat Midterm1 Sprig 016 08.04.016 Name: Matriculatio umber: Advice You have
More informationDivide & Conquer. Divide-and-conquer algorithms. Conventional product of polynomials. Conventional product of polynomials.
Divide-ad-coquer algorithms Divide & Coquer Strategy: Divide the problem ito smaller subproblems of the same type of problem Solve the subproblems recursively Combie the aswers to solve the origial problem
More informationModel of Computation and Runtime Analysis
Model of Computatio ad Rutime Aalysis Model of Computatio Model of Computatio Specifies Set of operatios Cost of operatios (ot ecessarily time) Examples Turig Machie Radom Access Machie (RAM) PRAM Map
More informationA recurrence equation is just a recursive function definition. It defines a function at one input in terms of its value on smaller inputs.
CS23 Algorithms Hadout #6 Prof Ly Turbak September 8, 200 Wellesley College RECURRENCES This hadout summarizes highlights of CLRS Chapter 4 ad Appedix A (CLR Chapters 3 & 4) Two-Step Strategy for Aalyzig
More information4.3 Growth Rates of Solutions to Recurrences
4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.
More informationModel of Computation and Runtime Analysis
Model of Computatio ad Rutime Aalysis Model of Computatio Model of Computatio Specifies Set of operatios Cost of operatios (ot ecessarily time) Examples Turig Machie Radom Access Machie (RAM) PRAM Map
More informationCreated by T. Madas SERIES. Created by T. Madas
SERIES SUMMATIONS BY STANDARD RESULTS Questio (**) Use stadard results o summatios to fid the value of 48 ( r )( 3r ). 36 FP-B, 66638 Questio (**+) Fid, i fully simplified factorized form, a expressio
More informationPart I: Covers Sequence through Series Comparison Tests
Part I: Covers Sequece through Series Compariso Tests. Give a example of each of the followig: (a) A geometric sequece: (b) A alteratig sequece: (c) A sequece that is bouded, but ot coverget: (d) A sequece
More informationDesign and Analysis of Algorithms
Desig ad Aalysis of Algorithms CSE 53 Lecture 9 Media ad Order Statistics Juzhou Huag, Ph.D. Departmet of Computer Sciece ad Egieerig Dept. CSE, UT Arligto CSE53 Desig ad Aalysis of Algorithms Medias ad
More informationTest One (Answer Key)
CS395/Ma395 (Sprig 2005) Test Oe Name: Page 1 Test Oe (Aswer Key) CS395/Ma395: Aalysis of Algorithms This is a closed book, closed otes, 70 miute examiatio. It is worth 100 poits. There are twelve (12)
More informationPhysics 116A Solutions to Homework Set #1 Winter Boas, problem Use equation 1.8 to find a fraction describing
Physics 6A Solutios to Homework Set # Witer 0. Boas, problem. 8 Use equatio.8 to fid a fractio describig 0.694444444... Start with the formula S = a, ad otice that we ca remove ay umber of r fiite decimals
More informationMATH 31B: MIDTERM 2 REVIEW
MATH 3B: MIDTERM REVIEW JOE HUGHES. Evaluate x (x ) (x 3).. Partial Fractios Solutio: The umerator has degree less tha the deomiator, so we ca use partial fractios. Write x (x ) (x 3) = A x + A (x ) +
More informationClassification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc)
Classificatio of problem & problem solvig strategies classificatio of time complexities (liear, arithmic etc) Problem subdivisio Divide ad Coquer strategy. Asymptotic otatios, lower boud ad upper boud:
More informationCSE 4095/5095 Topics in Big Data Analytics Spring 2017; Homework 1 Solutions
CSE 09/09 Topics i ig Data Aalytics Sprig 2017; Homework 1 Solutios Note: Solutios to problems,, ad 6 are due to Marius Nicolae. 1. Cosider the followig algorithm: for i := 1 to α log e do Pick a radom
More informationSeries: Infinite Sums
Series: Ifiite Sums Series are a way to mae sese of certai types of ifiitely log sums. We will eed to be able to do this if we are to attai our goal of approximatig trascedetal fuctios by usig ifiite degree
More informationTheorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e.
Theorem: Let A be a square matrix The A has a iverse matrix if ad oly if its reduced row echelo form is the idetity I this case the algorithm illustrated o the previous page will always yield the iverse
More information(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:
Math 50-004 Tue Feb 4 Cotiue with sectio 36 Determiats The effective way to compute determiats for larger-sized matrices without lots of zeroes is to ot use the defiitio, but rather to use the followig
More informationsubcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016
subcaptiofot+=small,labelformat=pares,labelsep=space,skip=6pt,list=0,hypcap=0 subcaptio ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, /6/06. Self-cojugate Partitios Recall that, give a partitio λ, we may
More informationLecture 2.5: Sequences
Lecture.5: Sequeces CS 50, Discrete Structures, Fall 015 Nitesh Saxea Adopted from previous lectures by Zeph Gruschlag Course Admi HW posted Covers Chapter Due Oct 0 (Tue) Mid Term 1: Oct 15 (Thursday)
More informationSequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018
CSE 353 Discrete Computatioal Structures Sprig 08 Sequeces, Mathematical Iductio, ad Recursio (Chapter 5, Epp) Note: some course slides adopted from publisher-provided material Overview May mathematical
More informationRecurrence Relations
Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The
More information2.4 - Sequences and Series
2.4 - Sequeces ad Series Sequeces A sequece is a ordered list of elemets. Defiitio 1 A sequece is a fuctio from a subset of the set of itegers (usually either the set 80, 1, 2, 3,... < or the set 81, 2,
More informationORIE 633 Network Flows September 27, Lecture 8
ORIE 633 Network Flows September 7, 007 Lecturer: David P. Williamso Lecture 8 Scribe: Gema Plaza-Martíez 1 Global mi-cuts i udirected graphs 1.1 Radom cotractio Recall from last time we itroduced the
More informationAdditional Notes on Power Series
Additioal Notes o Power Series Mauela Girotti MATH 37-0 Advaced Calculus of oe variable Cotets Quick recall 2 Abel s Theorem 2 3 Differetiatio ad Itegratio of Power series 4 Quick recall We recall here
More informationQuiz No. 1. ln n n. 1. Define: an infinite sequence A function whose domain is N 2. Define: a convergent sequence A sequence that has a limit
Quiz No.. Defie: a ifiite sequece A fuctio whose domai is N 2. Defie: a coverget sequece A sequece that has a limit 3. Is this sequece coverget? Why or why ot? l Yes, it is coverget sice L=0 by LHR. INFINITE
More informationSymbolic computation 2: Linear recurrences
Bachelor of Ecole Polytechique Computatioal Mathematics, year 2, semester Lecturer: Lucas Geri (sed mail) (mailto:lucas.geri@polytechique.edu) Symbolic computatio 2: Liear recurreces Table of cotets Warm-up
More informationMath 25 Solutions to practice problems
Math 5: Advaced Calculus UC Davis, Sprig 0 Math 5 Solutios to practice problems Questio For = 0,,, 3,... ad 0 k defie umbers C k C k =! k!( k)! (for k = 0 ad k = we defie C 0 = C = ). by = ( )... ( k +
More informationDepartment of Informatics Prof. Dr. Michael Böhlen Binzmühlestrasse Zurich Phone:
Departmet of Iformatics Prof. Dr. Michael Böhle Bizmühlestrasse 14 8050 Zurich Phoe: +41 44 635 4333 Email: boehle@ifi.uzh.ch Iformatik II Midterm1 Sprig 018 3.03.018 Advice You have 90 miutes to complete
More informationQuiz 5 Answers MATH 141
Quiz 5 Aswers MATH 4 8 AM Questio so the series coverges. + ( + )! ( + )! ( + )! = ( + )( + ) = 0 < We ca rewrite this series as the geometric series (x) which coverges whe x < or whe x
More informationInfinite Sequences and Series
Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet
More informationSums, products and sequences
Sums, products ad sequeces How to write log sums, e.g., 1+2+ (-1)+ cocisely? i=1 Sum otatio ( sum from 1 to ): i 3 = 1 + 2 + + If =3, i=1 i = 1+2+3=6. The ame ii does ot matter. Could use aother letter
More informationContinuous Functions
Cotiuous Fuctios Q What does it mea for a fuctio to be cotiuous at a poit? Aswer- I mathematics, we have a defiitio that cosists of three cocepts that are liked i a special way Cosider the followig defiitio
More informationEssential Question How can you recognize an arithmetic sequence from its graph?
. Aalyzig Arithmetic Sequeces ad Series COMMON CORE Learig Stadards HSF-IF.A.3 HSF-BF.A. HSF-LE.A. Essetial Questio How ca you recogize a arithmetic sequece from its graph? I a arithmetic sequece, the
More informationCOMP285 Midterm Exam Department of Mathematics
COMP85 Midterm Exam Departmet of Mathematics Fall 010/011 - November 8, 010 Name: Studet Number: Please fiish withi 90 miutes. All poits above 100 are cosidered as bous poit. You ca reach maximal 1 poits.
More informationPRACTICE PROBLEMS FOR THE FINAL
PRACTICE PROBLEMS FOR THE FINAL Math 36Q Fall 25 Professor Hoh Below is a list of practice questios for the Fial Exam. I would suggest also goig over the practice problems ad exams for Exam ad Exam 2 to
More informationSequences, Sums, and Products
CSCE 222 Discrete Structures for Computig Sequeces, Sums, ad Products Dr. Philip C. Ritchey Sequeces A sequece is a fuctio from a subset of the itegers to a set S. A discrete structure used to represet
More informationCalculus 2 - D. Yuen Final Exam Review (Version 11/22/2017. Please report any possible typos.)
Calculus - D Yue Fial Eam Review (Versio //7 Please report ay possible typos) NOTE: The review otes are oly o topics ot covered o previous eams See previous review sheets for summary of previous topics
More informationYou may work in pairs or purely individually for this assignment.
CS 04 Problem Solvig i Computer Sciece OOC Assigmet 6: Recurreces You may work i pairs or purely idividually for this assigmet. Prepare your aswers to the followig questios i a plai ASCII text file or
More informationSection 6.4: Series. Section 6.4 Series 413
ectio 64 eries 4 ectio 64: eries A couple decides to start a college fud for their daughter They pla to ivest $50 i the fud each moth The fud pays 6% aual iterest, compouded mothly How much moey will they
More informationP.3 Polynomials and Special products
Precalc Fall 2016 Sectios P.3, 1.2, 1.3, P.4, 1.4, P.2 (radicals/ratioal expoets), 1.5, 1.6, 1.7, 1.8, 1.1, 2.1, 2.2 I Polyomial defiitio (p. 28) a x + a x +... + a x + a x 1 1 0 1 1 0 a x + a x +... +
More informationProperties and Tests of Zeros of Polynomial Functions
Properties ad Tests of Zeros of Polyomial Fuctios The Remaider ad Factor Theorems: Sythetic divisio ca be used to fid the values of polyomials i a sometimes easier way tha substitutio. This is show by
More informationAPPENDIX F Complex Numbers
APPENDIX F Complex Numbers Operatios with Complex Numbers Complex Solutios of Quadratic Equatios Polar Form of a Complex Number Powers ad Roots of Complex Numbers Operatios with Complex Numbers Some equatios
More informationCS 5150/6150: Assignment 1 Due: Sep 23, 2010
CS 5150/6150: Assigmet 1 Due: Sep 23, 2010 Wei Liu September 24, 2010 Q1: (1) Usig master theorem: a = 7, b = 4, f() = O(). Because f() = log b a ε holds whe ε = log b a = log 4 7, we ca apply the first
More informationCS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2
Geeral remarks Week 2 1 Divide ad First we cosider a importat tool for the aalysis of algorithms: Big-Oh. The we itroduce a importat algorithmic paradigm:. We coclude by presetig ad aalysig two examples.
More informationCombinatorics and Newton s theorem
INTRODUCTION TO MATHEMATICAL REASONING Key Ideas Worksheet 5 Combiatorics ad Newto s theorem This week we are goig to explore Newto s biomial expasio theorem. This is a very useful tool i aalysis, but
More informationReview for Test 3 Math 1552, Integral Calculus Sections 8.8,
Review for Test 3 Math 55, Itegral Calculus Sectios 8.8, 0.-0.5. Termiology review: complete the followig statemets. (a) A geometric series has the geeral form k=0 rk.theseriescovergeswhe r is less tha
More informationData Structures Lecture 9
Fall 2017 Fag Yu Software Security Lab. Dept. Maagemet Iformatio Systems, Natioal Chegchi Uiversity Data Structures Lecture 9 Midterm o Dec. 7 (9:10-12:00am, 106) Lec 1-9, TextBook Ch1-8, 11,12 How to
More informationSequences. A Sequence is a list of numbers written in order.
Sequeces A Sequece is a list of umbers writte i order. {a, a 2, a 3,... } The sequece may be ifiite. The th term of the sequece is the th umber o the list. O the list above a = st term, a 2 = 2 d term,
More informationECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations
ECE-S352 Itroductio to Digital Sigal Processig Lecture 3A Direct Solutio of Differece Equatios Discrete Time Systems Described by Differece Equatios Uit impulse (sample) respose h() of a DT system allows
More informationDivide and Conquer. 1 Overview. 2 Multiplying Bit Strings. COMPSCI 330: Design and Analysis of Algorithms 1/19/2016 and 1/21/2016
COMPSCI 330: Desig ad Aalysis of Algorithms 1/19/2016 ad 1/21/2016 Lecturer: Debmalya Paigrahi Divide ad Coquer Scribe: Tiaqi Sog 1 Overview I this lecture, a importat algorithm desig techique called divide-ad-coquer
More informationSimilar idea to multiplication in N, C. Divide and conquer approach provides unexpected improvements. Naïve matrix multiplication
Next. Covered bsics of simple desig techique (Divided-coquer) Ch. of the text.. Next, Strsse s lgorithm. Lter: more desig d coquer lgorithms: MergeSort. Solvig recurreces d the Mster Theorem. Similr ide
More informationSECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES
SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,
More information4.1 Sigma Notation and Riemann Sums
0 the itegral. Sigma Notatio ad Riema Sums Oe strategy for calculatig the area of a regio is to cut the regio ito simple shapes, calculate the area of each simple shape, ad the add these smaller areas
More informationCSI 5163 (95.573) ALGORITHM ANALYSIS AND DESIGN
CSI 5163 (95.573) ALGORITHM ANALYSIS AND DESIGN CSI 5163 (95.5703) ALGORITHM ANALYSIS AND DESIGN (3 cr.) (T) Topics of curret iterest i the desig ad aalysis of computer algorithms for graphtheoretical
More informationMath 113 Exam 3 Practice
Math Exam Practice Exam will cover.-.9. This sheet has three sectios. The first sectio will remid you about techiques ad formulas that you should kow. The secod gives a umber of practice questios for you
More informationMath 2784 (or 2794W) University of Connecticut
ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really
More information10.1 Sequences. n term. We will deal a. a n or a n n. ( 1) n ( 1) n 1 2 ( 1) a =, 0 0,,,,, ln n. n an 2. n term.
0. Sequeces A sequece is a list of umbers writte i a defiite order: a, a,, a, a is called the first term, a is the secod term, ad i geeral eclusively with ifiite sequeces ad so each term Notatio: the sequece
More informationCSE Introduction to Parallel Processing. Chapter 3. Parallel Algorithm Complexity
Dr. Izadi CSE-40533 Itroductio to Parallel Processig Chapter 3 Parallel Algorithm Complexity Review algorithm complexity ad various complexity classes Itroduce the otios of time ad time-cost optimality
More informationDiscrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 19
CS 70 Discrete Mathematics ad Probability Theory Sprig 2016 Rao ad Walrad Note 19 Some Importat Distributios Recall our basic probabilistic experimet of tossig a biased coi times. This is a very simple
More informationCHAPTER 10 INFINITE SEQUENCES AND SERIES
CHAPTER 10 INFINITE SEQUENCES AND SERIES 10.1 Sequeces 10.2 Ifiite Series 10.3 The Itegral Tests 10.4 Compariso Tests 10.5 The Ratio ad Root Tests 10.6 Alteratig Series: Absolute ad Coditioal Covergece
More informationEEO 401 Digital Signal Processing Prof. Mark Fowler
EEO 40 Digital Sigal Processig Prof. Mark Fowler Note Set #3 Covolutio & Impulse Respose Review Readig Assigmet: Sect. 2.3 of Proakis & Maolakis / Covolutio for LTI D-T systems We are tryig to fid y(t)
More informationReal Variables II Homework Set #5
Real Variables II Homework Set #5 Name: Due Friday /0 by 4pm (at GOS-4) Istructios: () Attach this page to the frot of your homework assigmet you tur i (or write each problem before your solutio). () Please
More informationRecurrences: Methods and Examples
Reurrees: Methods ad Examples CSE 30 Algorithms ad Data Strutures Alexadra Stefa Uiversity of exas at Arligto Updated: 308 Summatios Review Review slides o Summatios Reurrees Reursive algorithms It may
More informationMath 475, Problem Set #12: Answers
Math 475, Problem Set #12: Aswers A. Chapter 8, problem 12, parts (b) ad (d). (b) S # (, 2) = 2 2, sice, from amog the 2 ways of puttig elemets ito 2 distiguishable boxes, exactly 2 of them result i oe
More information(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:
Math 5-4 Tue Feb 4 Cotiue with sectio 36 Determiats The effective way to compute determiats for larger-sized matrices without lots of zeroes is to ot use the defiitio, but rather to use the followig facts,
More informationMath 120 Answers for Homework 23
Math 0 Aswers for Homewor. (a) The Taylor series for cos(x) aroud a 0 is cos(x) x! + x4 4! x6 6! + x8 8! x0 0! + ( ) ()! x ( ) π ( ) ad so the series ()! ()! (π) is just the series for cos(x) evaluated
More informationCh3. Asymptotic Notation
Ch. Asymptotic Notatio copyright 006 Preview of Chapters Chapter How to aalyze the space ad time complexities of program Chapter Review asymptotic otatios such as O, Ω, Θ, o for simplifyig the aalysis
More informationMATH 2411 Spring 2011 Practice Exam #1 Tuesday, March 1 st Sections: Sections ; 6.8; Instructions:
MATH 411 Sprig 011 Practice Exam #1 Tuesday, March 1 st Sectios: Sectios 6.1-6.6; 6.8; 7.1-7.4 Name: Score: = 100 Istructios: 1. You will have a total of 1 hour ad 50 miutes to complete this exam.. A No-Graphig
More informationChapter 2. Asymptotic Notation
Asyptotic Notatio 3 Chapter Asyptotic Notatio Goal : To siplify the aalysis of ruig tie by gettig rid of details which ay be affected by specific ipleetatio ad hardware. [1] The Big Oh (O-Notatio) : It
More informationInfinite Series and Improper Integrals
8 Special Fuctios Ifiite Series ad Improper Itegrals Ifiite series are importat i almost all areas of mathematics ad egieerig I additio to umerous other uses, they are used to defie certai fuctios ad to
More informationV. Adamchik 1. Recursions. Victor Adamchik Fall of x n1. x n 2. Here are a few first values of the above sequence (coded in Mathematica)
V. Adamchik Recursios Victor Adamchik Fall of 2005 Pla. Covergece of sequeces 2. Fractals 3. Coutig biary trees Covergece of Sequeces I the previous lecture we cosidered a cotiued fractio for 2 : 2 This
More informationMa 530 Introduction to Power Series
Ma 530 Itroductio to Power Series Please ote that there is material o power series at Visual Calculus. Some of this material was used as part of the presetatio of the topics that follow. What is a Power
More informationCSE 1400 Applied Discrete Mathematics Number Theory and Proofs
CSE 1400 Applied Discrete Mathematics Number Theory ad Proofs Departmet of Computer Scieces College of Egieerig Florida Tech Sprig 01 Problems for Number Theory Backgroud Number theory is the brach of
More informationSignals & Systems Chapter3
Sigals & Systems Chapter3 1.2 Discrete-Time (D-T) Sigals Electroic systems do most of the processig of a sigal usig a computer. A computer ca t directly process a C-T sigal but istead eeds a stream of
More informationRepresenting transformations by matrices
Teachig Further Mathematics FP Give each pair of studets a copy of the sheet below elarged oto A. Represetig trasformatios by matrices Studets have to multiply the matri by the positio vector of each verte
More informationWorksheet on Generating Functions
Worksheet o Geeratig Fuctios October 26, 205 This worksheet is adapted from otes/exercises by Nat Thiem. Derivatives of Geeratig Fuctios. If the sequece a 0, a, a 2,... has ordiary geeratig fuctio A(x,
More informationE. Incorrect! Plug n = 1, 2, 3, & 4 into the general term formula. n =, then the first four terms are found by
Calculus II - Problem Solvig Drill 8: Sequeces, Series, ad Covergece Questio No. of 0. Fid the first four terms of the sequece whose geeral term is give by a ( ) : Questio #0 (A) (B) (C) (D) (E) 8,,, 4
More informationCSE 5311 Notes 1: Mathematical Preliminaries
Chapter 1 - Algorithms Computig CSE 5311 Notes 1: Mathematical Prelimiaries Last updated 1/20/18 12:56 PM) Relatioship betwee complexity classes, eg log,, log, 2, 2, etc Chapter 2 - Gettig Started Loop
More informationCS161 Handout 05 Summer 2013 July 10, 2013 Mathematical Terms and Identities
CS161 Hadout 05 Summer 2013 July 10, 2013 Mathematical Terms ad Idetities Thaks to Ady Nguye ad Julie Tibshirai for their advice o this hadout. This hadout covers mathematical otatio ad idetities that
More informationHow to walk home drunk. Some Great Theoretical Ideas in Computer Science for. Probability Refresher. Probability Refresher.
15251 Some Great Theoretical Ideas i Computer Sciece for "My frieds keep askig me what 251 is like. I lik them to this video: http://youtube.com/watch?v=m275pjvwrli" Probability Refresher What s a Radom
More informationLecture 3: Catalan Numbers
CCS Discrete Math I Professor: Padraic Bartlett Lecture 3: Catala Numbers Week 3 UCSB 2014 I this week, we start studyig specific examples of commoly-occurrig sequeces of umbers (as opposed to the more
More informationSolving equations (incl. radical equations) involving these skills, but ultimately solvable by factoring/quadratic formula (no complex roots)
Evet A: Fuctios ad Algebraic Maipulatio Factorig Square of a sum: ( a + b) = a + ab + b Square of a differece: ( a b) = a ab + b Differece of squares: a b = ( a b )(a + b ) Differece of cubes: a 3 b 3
More information10.2 Infinite Series Contemporary Calculus 1
10. Ifiite Series Cotemporary Calculus 1 10. INFINITE SERIES Our goal i this sectio is to add together the umbers i a sequece. Sice it would take a very log time to add together the ifiite umber of umbers,
More informationAP CALCULUS - AB LECTURE NOTES MS. RUSSELL
AP CALCULUS - AB LECTURE NOTES MS. RUSSELL Sectio Number: 4. Topics: Area -Sigma Notatio Part: of Sigma Notatio Upper boud Recall ai = a+ a + a3 + L + a idex i= Lower boud Example : Evaluate each summatio.
More informationTaylor Series (BC Only)
Studet Study Sessio Taylor Series (BC Oly) Taylor series provide a way to fid a polyomial look-alike to a o-polyomial fuctio. This is doe by a specific formula show below (which should be memorized): Taylor
More informationIntroduction to Algorithms 6.046J/18.401J LECTURE 3 Divide and conquer Binary search Powering a number Fibonacci numbers Matrix multiplication
Itroductio to Algorithms 6.046J/8.40J LECTURE 3 Divide ad coquer Biary search Powerig a umber Fiboacci umbers Matrix multiplicatio Strasse s algorithm VLSI tree layout Prof. Charles E. Leiserso The divide-ad-coquer
More informationCS 332: Algorithms. Linear-Time Sorting. Order statistics. Slide credit: David Luebke (Virginia)
1 CS 332: Algorithms Liear-Time Sortig. Order statistics. Slide credit: David Luebke (Virgiia) Quicksort: Partitio I Words Partitio(A, p, r): Select a elemet to act as the pivot (which?) Grow two regios,
More information