6.2 SOLVING EASY RECURRENCES
|
|
- Junior Dawson
- 5 years ago
- Views:
Transcription
1 Section 6.2 Solving Easy Recurrences SOLVING EASY RECURRENCES We identify a type of recurrence that can be solved by special methods. def: A recurrence relation a n = f(a 0,..., a n 1 ) has degree k if the function f depends on the term a n k and if it depends on no terms of lower index. It is linear of degree k if it has the form a n = c 1 a n 1 + c 2 a n c k a n k + g(n) where each c k is a real function and c k 0. It is homogenous if g(n) = 0. Example 6.2.1: initial condition and recurrence relation The recurrence system with a 0 = 0 a n = a n 1 + 2n 1 is linear of degree one and non-homogeneous.
2 Chapter 6 ADVANCED COUNTING TECHNIQUES Remark: Similarly, the interest recursion and the Tower of Hanoi recursion are linear of degree one and non-homogeneous. Example 6.2.2: Fibonacci Numbers f 0 = 1 f 1 = 1 f n = f n 1 + f n 2 The Fibonacci recurrence is linear of degree two and homogeneous. Example 6.2.3: Catalan Recursion c 0 = 1 c n = c 0 c n 1 + c 1 c n c n 1 c 0 for n 1. The Catalan recusion is quadratic, homogeneous, and not of fixed degree. Remark: Solving the Catalan recursion is well beyond the level of this course.
3 Section 6.2 Solving Easy Recurrences SOLVING HOMOG LINEAR RR s with CONST COEFF S def: The special method for solving an homogeneous linear RR with constant coeff s a n is as follows: = c 1 a n 1 + c 2 a n c k a n k 1. Assume there exists a solution of the form a n = r n and substitute it into the recurrence: r n = c 1 r n 1 + c 2 r n c k r n k Cancelling the excess powers of r and normalizing yields what is called the characteristic equation: r k c 1 r k 1 c 2 r k 2 c k = 0 2. Find the roots r 1, r 2,..., r k of the char eq, which are called the characteristic roots. 3. Form the general solution a n = α 1 r n 1 + α 2 r n α k r n k 4. Use initial conditions to form k simultaneous linear equations in α 1,..., α k and solve for them.
4 Chapter 6 ADVANCED COUNTING TECHNIQUES DEGREE ONE, LINEAR HOMOGENEOUS Example 6.2.4: General RR of Degree 1 a 0 = d initial condition a n = ca n 1 recurrence char eq: r c = 0 has root r = c general solution: a n = α 1 c n simultaneous linear equations: d = α 1 c 0 = α 1 solution to simult lin eq: α 1 = d problem solution: a n = dc n Example 6.2.5: Compound Interest again Deposit $3 to be compounded annually at rate r. p 0 = 3 p n = (1 + r)p n 1 Solution: p n = 3(1 + r) n
5 Section 6.2 Solving Easy Recurrences DEGREE TWO, LINEAR HOMOGENEOUS Example 6.2.6: Easy degree two recurrence. a 0 = 1 a 1 = 4 initial conditions a n = 5a n 1 6a n 2 recurrence char eq: r 2 5r+6 = 0 has roots r 1 = 3 r 2 = 2. gen sol: a n = α 1 3 n + α 2 2 n simult lin eqns a 0 = 1 = α 1 + α 2 a 1 = 4 = 3α 1 + 2α 2 have solution: α 1 = 2 α 2 = 1. problem solution: a n = 2 3 n 2 n Consider changing the initial conditions to a 0 = 2 a 1 = 5. Then the simult lin eqns a 0 = 2 = α 1 + α 2 a 1 = 5 = 3α 1 + 2α 2 have solution: α 1 = 1 α 2 = 1. problem solution: a n = 3 n + 2 n
6 Chapter 6 ADVANCED COUNTING TECHNIQUES Example 6.2.7: Fibonacci Numbers again f 0 = 0 f 1 = 1 f n = f n 1 + f n 2 char eq: r 2 r 1 = 0 has roots and Etc. The complete solution is ( f n = 1 5 = 1 2 n 5 = 1 2 n n 2 j=0 e.g. f 5 = 1 16 = ) n ) n ( [(1 + 5) n (1 5) n] ( n ) 2j + 1 [( ) ( ) [ ] = = 5 ( ) ]
7 Section 6.2 Solving Easy Recurrences DEGREE THREE, LINEAR HOMOGENEOUS Example 6.2.8: a n = 6a n 1 11a n 2 + 6a n 3 init conds: a 0 = 2, a 1 = 5, a 2 = 15 char eq: 0 = r 3 6r r 6 = (r 1)(r 2)(r 3) char roots: r = 1, 2, 3 gen sol: a n = α 1 1 n + α 2 2 n + α 3 3 n simult lin eq: a 0 = 2 = α 1 + α 2 + α 3 a 1 = 5 = α 1 + α α 3 3 a 2 = 15 = α 1 + α α 3 9 coeff solns: α 1 = 1, α 2 = 1, α 3 = 2 unique sol: a n = 1 2 n n
8 Chapter 6 ADVANCED COUNTING TECHNIQUES NONHOMOGENEOUS LINEAR RECURRENCES We split the solution into a homogeneous part and a particular part. Example 6.2.9: Tower of Hanoi, again h 0 = 0 initial condition h n = 2h n recurrence assoc homog relation ĥn = 2ĥn 1 has homogeneous solution ĥn = α2 n assoc partic relation ḣn = 2ḣn has particular solution ḣn = 1 simult lin eqn: h 0 = 0 = ĥ0 + ḣ0 = α2 0 1 has solution α = 1 problem solution: h n = 2 n 1. Remark: The form of the particular solution usuallly resembles the function of n. In this case g(n) = 1 is a constant function. So we tried ḣn = K, and we solved the equation K = 2K +1, and obtained K = 1.
9 Section 6.2 Solving Easy Recurrences Example : a n = 3a n 1 + 2n init cond: a 1 = 3 homog soln: â n = α3 n partic rec rel: â n = 3â n 1 + 2n trial soln: â n = cn + d Then cn + d = 3[c(n 1) + d] + 2n, i.e., 0 = n(2c + 2) + (2d 3c) c = 1, d = 3/2 partic soln: â n = n 3/2 general soln: a n = α3 n n 3/2 simult eq: a 1 = 3 = α3 1 3/2 = 3α 5/2 coeff solns: α = 11/6 unique sol: a n = n n 3 2
10 Chapter 6 ADVANCED COUNTING TECHNIQUES REPEATED ROOTS Example : A recurrence system a 0 = 2 a 1 = 2 initial conditions a n = 4a n 1 4a n 2 recurrence char eq: r 2 4r + 4 = 0 has roots 2, 2. gen sol: a n = α 1 2 n + α 2 n2 n simult lin eqns a 0 = 2 = α 1 a 1 = 2 = 2α 1 + 2α 2 have solution: α 1 = 2 α 2 = 3. problem solution: a n = ( 2) 2 n + 3 n2 n
Advanced Counting Techniques. 7.1 Recurrence Relations
Chapter 7 Advanced Counting Techniques 71 Recurrence Relations We have seen that a recursive definition of a sequence specifies one or more initial terms and a rule for determining subsequent terms from
More informationLearning Objectives
Learning Objectives Learn about recurrence relations Learn the relationship between sequences and recurrence relations Explore how to solve recurrence relations by iteration Learn about linear homogeneous
More informationLinear Recurrence Relations
Linear Recurrence Relations Linear Homogeneous Recurrence Relations The Towers of Hanoi According to legend, there is a temple in Hanoi with three posts and 64 gold disks of different sizes. Each disk
More informationCSC2100B Data Structures Analysis
CSC2100B Data Structures Analysis Irwin King king@cse.cuhk.edu.hk http://www.cse.cuhk.edu.hk/~king Department of Computer Science & Engineering The Chinese University of Hong Kong Algorithm An algorithm
More informationCS 2210 Discrete Structures Advanced Counting. Fall 2017 Sukumar Ghosh
CS 2210 Discrete Structures Advanced Counting Fall 2017 Sukumar Ghosh Compound Interest A person deposits $10,000 in a savings account that yields 10% interest annually. How much will be there in the account
More informationRecurrence Relations
Recurrence Relations Recurrence Relations Reading (Epp s textbook) 5.6 5.8 1 Recurrence Relations A recurrence relation for a sequence aa 0, aa 1, aa 2, ({a n }) is a formula that relates each term a k
More informationDiscrete Mathematics -- Chapter 10: Recurrence Relations
Discrete Mathematics -- Chapter 10: Recurrence Relations Hung-Yu Kao ( 高宏宇 ) Department of Computer Science and Information Engineering, National Cheng Kung University First glance at recurrence F n+2
More informationRecurrence Relations
Recurrence Relations Winter 2017 Recurrence Relations Recurrence Relations A recurrence relation for the sequence {a n } is an equation that expresses a n in terms of one or more of the previous terms
More informationCSI2101-W08- Recurrence Relations
Motivation CSI2101-W08- Recurrence Relations where do they come from modeling program analysis Solving Recurrence Relations by iteration arithmetic/geometric sequences linear homogenous recurrence relations
More informationAlgorithm Analysis Recurrence Relation. Chung-Ang University, Jaesung Lee
Algorithm Analysis Recurrence Relation Chung-Ang University, Jaesung Lee Recursion 2 Recursion 3 Recursion in Real-world Fibonacci sequence = + Initial conditions: = 0 and = 1. = + = + = + 0, 1, 1, 2,
More informationMath.3336: Discrete Mathematics. Advanced Counting Techniques
Math.3336: Discrete Mathematics Advanced Counting Techniques Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu
More information1 (1 x) 4 by taking derivatives and rescaling appropriately. Conjecture what the general formula for the series for 1/(1 x) n.
Math 365 Wednesday 3/20/9 8.2 and 8.4 Exercise 35. Consider the recurrence relation a n =8a n 2 6a n 4 + F (n). (a) Write the associated homogeneous recursion relation and solve for its general solution
More informationAdvanced Counting Techniques. Chapter 8
Advanced Counting Techniques Chapter 8 Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence Relations Nonhomogeneous Recurrence Relations Divide-and-Conquer
More information1 Recursive Algorithms
400 lecture note #8 [ 5.6-5.8] Recurrence Relations 1 Recursive Algorithms A recursive algorithm is an algorithm which invokes itself. A recursive algorithm looks at a problem backward -- the solution
More informationAdvanced Counting Techniques
. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Advanced Counting
More informationCHAPTER 8 Advanced Counting Techniques
96 Chapter 8 Advanced Counting Techniques CHAPTER 8 Advanced Counting Techniques SECTION 8. Applications of Recurrence Relations 2. a) A permutation of a set with n elements consists of a choice of a first
More informationSection 5.2 Solving Recurrence Relations
Section 5.2 Solving Recurrence Relations If a g(n) = f (a g(0),a g(1),..., a g(n 1) ) find a closed form or an expression for a g(n). Recall: nth degree polynomials have n roots: a n x n + a n 1 x n 1
More informationSection 7.2 Solving Linear Recurrence Relations
Section 7.2 Solving Linear Recurrence Relations If a g(n) = f (a g(0),a g(1),..., a g(n 1) ) find a closed form or an expression for a g(n). Recall: nth degree polynomials have n roots: a n x n + a n 1
More informationJong C. Park Computer Science Division, KAIST
Jong C. Park Computer Science Division, KAIST Today s Topics Introduction Solving Recurrence Relations Discrete Mathematics, 2008 2 Computer Science Division, KAIST Definition A recurrence relation for
More informationLogic and Discrete Mathematics. Section 6.7 Recurrence Relations and Their Solution
Logic and Discrete Mathematics Section 6.7 Recurrence Relations and Their Solution Slides version: January 2015 Definition A recurrence relation for a sequence a 0, a 1, a 2,... is a formula giving a n
More informationPart III, Sequences and Series CS131 Mathematics for Computer Scientists II Note 16 RECURRENCES
CS131 Part III, Sequences and Series CS131 Mathematics for Computer Scientists II Note 16 RECURRENCES A recurrence is a rule which defines each term of a sequence using the preceding terms. The Fibonacci
More informationV. Adamchik 1. Recurrences. Victor Adamchik Fall of 2005
V. Adamchi Recurrences Victor Adamchi Fall of 00 Plan Multiple roots. More on multiple roots. Inhomogeneous equations 3. Divide-and-conquer recurrences In the previous lecture we have showed that if the
More informationApplications. More Counting Problems. Complexity of Algorithms
Recurrences Applications More Counting Problems Complexity of Algorithms Part I Recurrences and Binomial Coefficients Paths in a Triangle P(0, 0) P(1, 0) P(1,1) P(2, 0) P(2,1) P(2, 2) P(3, 0) P(3,1) P(3,
More informationDefinition: A sequence is a function from a subset of the integers (usually either the set
Math 3336 Section 2.4 Sequences and Summations Sequences Geometric Progression Arithmetic Progression Recurrence Relation Fibonacci Sequence Summations Definition: A sequence is a function from a subset
More informationEvery subset of {1, 2,...,n 1} can be extended to a subset of {1, 2, 3,...,n} by either adding or not adding the element n.
11 Recurrences A recurrence equation or recurrence counts things using recursion. 11.1 Recurrence Equations We start with an example. Example 11.1. Find a recurrence for S(n), the number of subsets of
More informationPartition of Integers into Distinct Summands with Upper Bounds. Partition of Integers into Even Summands. An Example
Partition of Integers into Even Summands We ask for the number of partitions of m Z + into positive even integers The desired number is the coefficient of x m in + x + x 4 + ) + x 4 + x 8 + ) + x 6 + x
More informationWorksheet 1. Difference
Worksheet Differences Remember: The difference of a sequence u n is: u n u n+ u n The falling factorial (power), n to the k falling, when k > 0, is: n k n(n )... (n k + ), Please complete the following
More informationSOLVING LINEAR RECURRENCE RELATIONS
SOLVING LINEAR RECURRENCE RELATIONS Schaum's outline Sec. 6.6 6.9 Rosen Sec. 8.1 8. November 9, 017 margarita.spitsakova@ttu.ee ICY0001: Lecture 8 November 9, 017 1 / 47 Contents 1 Motivation examples
More informationDivide and Conquer. Recurrence Relations
Divide and Conquer Recurrence Relations Divide-and-Conquer Strategy: Break up problem into parts. Solve each part recursively. Combine solutions to sub-problems into overall solution. 2 MergeSort Mergesort.
More informationPractical Session #3 - Recursions
Practical Session #3 - Recursions Substitution method Guess the form of the solution and prove it by induction Iteration Method Convert the recurrence into a summation and solve it Tightly bound a recurrence
More informationCS483 Design and Analysis of Algorithms
CS483 Design and Analysis of Algorithms Chapter 2 Divide and Conquer Algorithms Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: Room 5326, Engineering Building, Thursday 4:30pm -
More informationLecture 2. Fundamentals of the Analysis of Algorithm Efficiency
Lecture 2 Fundamentals of the Analysis of Algorithm Efficiency 1 Lecture Contents 1. Analysis Framework 2. Asymptotic Notations and Basic Efficiency Classes 3. Mathematical Analysis of Nonrecursive Algorithms
More informationDefn: A linear recurrence relation has constant coefficients if the a i s are constant. Ch 14: 1, 4, 5, 10, 13, 18, 22, 24, 25 and
7.4: linear homogeneous recurrence relation: Defn: A recurrence relation is linear if h n = a 1 (n)h n 1 + a (n)h n +... + a k (n)h n k + b(n) A recurrence relation has order k if a k 0 Ex: Derangement
More informationCOMP 555 Bioalgorithms. Fall Lecture 3: Algorithms and Complexity
COMP 555 Bioalgorithms Fall 2014 Lecture 3: Algorithms and Complexity Study Chapter 2.1-2.8 Topics Algorithms Correctness Complexity Some algorithm design strategies Exhaustive Greedy Recursion Asymptotic
More informationSolving Recurrences. 1. Express the running time (or use of some other resource) as a recurrence.
1 Recurrences and Recursive Code Solving Recurrences Many (perhaps most) recursive algorithms fall into one of two categories: tail recursion and divide-andconquer recursion. We would like to develop some
More informationMathematical Fundamentals
Mathematical Fundamentals Sets Factorials, Logarithms Recursion Summations, Recurrences Proof Techniques: By Contradiction, Induction Estimation Techniques Data Structures 1 Mathematical Fundamentals Sets
More informationChapter 8: Recursion. March 10, 2008
Chapter 8: Recursion March 10, 2008 Outline 1 8.1 Recursively Defined Sequences 2 8.2 Solving Recurrence Relations by Iteration 3 8.4 General Recursive Definitions Recursively Defined Sequences As mentioned
More informationDiscrete Mathematics. Kishore Kothapalli
Discrete Mathematics Kishore Kothapalli 2 Chapter 4 Advanced Counting Techniques In the previous chapter we studied various techniques for counting and enumeration. However, there are several interesting
More information12 Sequences and Recurrences
12 Sequences and Recurrences A sequence is just what you think it is. It is often given by a formula known as a recurrence equation. 12.1 Arithmetic and Geometric Progressions An arithmetic progression
More informationAnalysis of Algorithm Efficiency. Dr. Yingwu Zhu
Analysis of Algorithm Efficiency Dr. Yingwu Zhu Measure Algorithm Efficiency Time efficiency How fast the algorithm runs; amount of time required to accomplish the task Our focus! Space efficiency Amount
More informationBinomial Coefficient Identities/Complements
Binomial Coefficient Identities/Complements CSE21 Fall 2017, Day 4 Oct 6, 2017 https://sites.google.com/a/eng.ucsd.edu/cse21-fall-2017-miles-jones/ permutation P(n,r) = n(n-1) (n-2) (n-r+1) = Terminology
More information1 = k1 + k 2 2 = 3k 1 + 5k 2
8..4. (a) Find the specific solution of a n = a n 1 + 1a n with initial conditions a 0 = 1 and a 1 =. The characteristic polynomial of this recurrence relation is x x 1, which has roots 3 and, so the general
More informationSolving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 =
Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 = 0 a 1 = 2 0 + 1 = 1 a 2 = 2 1 + 1 = 3 a 3 = 2 3 + 1
More information5. Sequences & Recursion
5. Sequences & Recursion Terence Sim 1 / 42 A mathematician, like a painter or poet, is a maker of patterns. Reading Sections 5.1 5.4, 5.6 5.8 of Epp. Section 2.10 of Campbell. Godfrey Harold Hardy, 1877
More informationNamed numbres. Ngày 25 tháng 11 năm () Named numbres Ngày 25 tháng 11 năm / 7
Named numbres Ngày 25 tháng 11 năm 2011 () Named numbres Ngày 25 tháng 11 năm 2011 1 / 7 Fibonacci, Catalan, Stirling, Euler, Bernoulli Many sequences are famous. 1 1, 2, 3, 4,... the integers. () Named
More informationSolving Recurrences. 1. Express the running time (or use of some other resource) as a recurrence.
Solving Recurrences Recurrences and Recursive Code Many (perhaps most) recursive algorithms fall into one of two categories: tail recursion and divide-andconquer recursion. We would like to develop some
More informationcse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska
cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska LECTURE 1 INTRODUCTION Course Web Page www.cs.stonybrook.edu/ cse547 The webpage contains: detailed lectures notes slides; very detailed
More informationCS483 Design and Analysis of Algorithms
CS483 Design and Analysis of Algorithms Lecture 6-8 Divide and Conquer Algorithms Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: STII, Room 443, Friday 4:00pm - 6:00pm or by appointments
More informationAlgorithm efficiency analysis
Algorithm efficiency analysis Mădălina Răschip, Cristian Gaţu Faculty of Computer Science Alexandru Ioan Cuza University of Iaşi, Romania DS 2017/2018 Content Algorithm efficiency analysis Recursive function
More informationSecond Order Linear Equations
Second Order Linear Equations Linear Equations The most general linear ordinary differential equation of order two has the form, a t y t b t y t c t y t f t. 1 We call this a linear equation because the
More informationRecursion: Introduction and Correctness
Recursion: Introduction and Correctness CSE21 Winter 2017, Day 7 (B00), Day 4-5 (A00) January 25, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Today s Plan From last time: intersecting sorted lists and
More informationSection Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence
Section 2.4 Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations Introduction Sequences are ordered lists of elements.
More informationFourth Lecture: 11/4
Fourth Lecture: 11/4 Definition 4.1. A sequence a n ) n=1 of complex numbers is said to be defined recursively, or to satsify a recurrence relation, if there exists a fixed k N, called the degree of the
More informationSums. ITT9131 Konkreetne Matemaatika
Sums ITT9131 Konkreetne Matemaatika Chapter Two Notation Sums and Recurrences Manipulation of Sums Multiple Sums General Methods Finite and Innite Calculus Innite Sums Contents 1 Sequences 2 Notations
More informationCS Analysis of Recursive Algorithms and Brute Force
CS483-05 Analysis of Recursive Algorithms and Brute Force Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/
More informationRecursion and Induction
Recursion and Induction Themes Recursion Recurrence Definitions Recursive Relations Induction (prove properties of recursive programs and objects defined recursively) Examples Tower of Hanoi Gray Codes
More informationEnumerating Binary Strings
International Mathematical Forum, Vol. 7, 2012, no. 38, 1865-1876 Enumerating Binary Strings without r-runs of Ones M. A. Nyblom School of Mathematics and Geospatial Science RMIT University Melbourne,
More informationCS Non-recursive and Recursive Algorithm Analysis
CS483-04 Non-recursive and Recursive Algorithm Analysis Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/
More informationSection 3.4. Second Order Nonhomogeneous. The corresponding homogeneous equation
Section 3.4. Second Order Nonhomogeneous Equations y + p(x)y + q(x)y = f(x) (N) The corresponding homogeneous equation y + p(x)y + q(x)y = 0 (H) is called the reduced equation of (N). 1 General Results
More informationCS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin
CS311H Prof: Department of Computer Science The University of Texas at Austin Recurrences In how many ways can a 2 n rectangular checkerboard be tiled using 1 2 and 2 2 pieces? Good Morning, Colleagues
More informationThe Fibonacci Quilt Sequence
The Sequence Minerva Catral, Pari Ford*, Pamela Harris, Steven J. Miller, Dawn Nelson AMS Section Meeting Georgetown University March 7, 2015 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Fibonacci sequence Theorem (
More information(vi) xry iff x y 2 (see the previous exercise); (iii) xry iff xy 0;
Final: Practice problems Relations Properties Exercise: For the following relations on Z, investigate the four basic properties. (i) arb iff a = b ; (v) arb iff a = b+; (ii) arb iff a b; (vi) arb iff a
More informationSec$on Summary. Sequences. Recurrence Relations. Summations. Ex: Geometric Progression, Arithmetic Progression. Ex: Fibonacci Sequence
Section 2.4 Sec$on Summary Sequences Ex: Geometric Progression, Arithmetic Progression Recurrence Relations Ex: Fibonacci Sequence Summations 2 Introduc$on Sequences are ordered lists of elements. 1, 2,
More informationCSE 21 Mathematics for
CSE 21 Mathematics for Algorithm and System Analysis Motivating Create a recursive formula to specify how many ways to climb an n-stair staircase if each step covers either one or two stairsteps Summer,
More informationDifferential Equations Practice: 2nd Order Linear: Nonhomogeneous Equations: Undetermined Coefficients Page 1
Differential Equations Practice: 2nd Order Linear: Nonhomogeneous Equations: Undetermined Coefficients Page 1 Questions Example (3.5.3) Find a general solution of the differential equation y 2y 3y = 3te
More informationWhat we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency Asympt
Lecture 3 The Analysis of Recursive Algorithm Efficiency What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency
More informationData Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University
Data Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University U Kang 1 In This Lecture Set concepts and notation Logarithms Summations Recurrence Relations Recursion Induction Proofs
More informationThe Fundamental Theorem of Calculus: Suppose f continuous on [a, b]. 1.) If G(x) = x. f(t)dt = F (b) F (a) where F is any antiderivative
1 Calulus pre-requisites you must know. Derivative = slope of tangent line = rate. Integral = area between curve and x-axis (where area can be negative). The Fundamental Theorem of Calculus: Suppose f
More informationPage references correspond to locations of Extra Examples icons in the textbook.
Rosen, Discrete Mathematics and Its Applications, 7th edition Extra Examples Section 8. Recurrence Relations Page references correspond to locations of Extra Examples icons in the textbook. p.50, icon
More informationThe Method of Frobenius
The Method of Frobenius Department of Mathematics IIT Guwahati If either p(x) or q(x) in y + p(x)y + q(x)y = 0 is not analytic near x 0, power series solutions valid near x 0 may or may not exist. If either
More informationCMSC 132, Object-Oriented Programming II Summer Lecture 10:
CMSC 132, Object-Oriented Programming II Summer 2016 Lecturer: Anwar Mamat Lecture 10: Disclaimer: These notes may be distributed outside this class only with the permission of the Instructor. 10.1 RECURSION
More informationAlgorithms CMSC The Method of Reverse Inequalities: Evaluation of Recurrent Inequalities
Algorithms CMSC 37000 The Method of Reverse Inequalities: Evaluation of Recurrent Inequalities László Babai Updated 1-19-2014 In this handout, we discuss a typical situation in the analysis of algorithms:
More informationMI 4 Mathematical Induction Name. Mathematical Induction
Mathematical Induction It turns out that the most efficient solution to the Towers of Hanoi problem with n disks takes n 1 moves. If this isn t the formula you determined, make sure to check your data
More informationAnalysis of Algorithms
September 29, 2017 Analysis of Algorithms CS 141, Fall 2017 1 Analysis of Algorithms: Issues Correctness/Optimality Running time ( time complexity ) Memory requirements ( space complexity ) Power I/O utilization
More informationAdministrivia. COMP9020 Lecture 7 Session 2, 2017 Induction and Recursion. Lecture 6 recap. Lecture 6 recap
Administrivia COMP9020 Lecture 7 Session 2, 2017 Induction and Recursion Guidelines for good mathematical writing Assignment 1 Solutions now available; marks available soon Assignment 2 available on Saturday,
More informationUCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis
UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis Lecture 14 Class URL: http://vlsicad.ucsd.edu/courses/cse21-s14/ Lecture 14 Notes Goals for this week Big-O complexity
More informationComputational Complexity. This lecture. Notes. Lecture 02 - Basic Complexity Analysis. Tom Kelsey & Susmit Sarkar. Notes
Computational Complexity Lecture 02 - Basic Complexity Analysis Tom Kelsey & Susmit Sarkar School of Computer Science University of St Andrews http://www.cs.st-andrews.ac.uk/~tom/ twk@st-andrews.ac.uk
More information3. Generating Functions
ANALYTIC COMBINATORICS P A R T O N E 3. Generating Functions http://aofa.cs.princeton.edu ANALYTIC COMBINATORICS P A R T O N E 3. Generating Functions OF OGFs Solving recurrences Catalan numbers EGFs Counting
More informationPower Series Solutions We use power series to solve second order differential equations
Objectives Power Series Solutions We use power series to solve second order differential equations We use power series expansions to find solutions to second order, linear, variable coefficient equations
More informationChapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn
Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn Formulation of the D&C principle Divide-and-conquer method for solving a problem instance of size n: 1. Divide n c: Solve the problem
More informationAlgorithms. Adnan YAZICI Dept. of Computer Engineering Middle East Technical Univ. Ankara - TURKEY. Algorihms, A.Yazici, Fall 2007 CEng 315
Algorithms Adnan YAZICI Dept. of Computer Engineering Middle East Technical Univ. Ankara - TURKEY Algorihms, A.Yazici, Fall 2007 CEng 315 1 Design and Analysis of Algorithms Aspects of studying algorithms:
More informationHINT: Some of the solution methods involve highschool math as well as new methods from this class.
SOLUTIONS DISCRETE MATH 1 W3203 FINAL EXAM open book Your Name (2 pts for legibly PRINTING your name) Problem Points Score your name 2 1 23 2 20 3 25 4 25 5 30 6 30 7 20 8 25 Total 200 SUGGESTION: Do the
More informationMath 2602 Finite and Linear Math Fall 14. Homework 8: Core solutions
Math 2602 Finite and Linear Math Fall 14 Homework 8: Core solutions Review exercises for Chapter 5 page 183 problems 25, 26a-26b, 29. Section 8.1 on page 252 problems 8, 9, 10, 13. Section 8.2 on page
More informationUCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis
UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis Lecture 15 Class URL: http://vlsicad.ucsd.edu/courses/cse21-s14/ Lecture 15 Notes Goals for this week Big-O complexity
More informationIntermediate Math Circles March 11, 2009 Sequences and Series
1 University of Waterloo Faculty of Mathematics Centre for Education in Mathematics and Computing Intermediate Math Circles March 11, 009 Sequences and Series Tower of Hanoi The Tower of Hanoi is a game
More information8. Sequences, Series, and Probability 8.1. SEQUENCES AND SERIES
8. Sequences, Series, and Probability 8.1. SEQUENCES AND SERIES What You Should Learn Use sequence notation to write the terms of sequences. Use factorial notation. Use summation notation to write sums.
More informationSec. 7.4: Basic Theory of Systems of First Order Linear Equations
Sec. 7.4: Basic Theory of Systems of First Order Linear Equations MATH 351 California State University, Northridge April 2, 214 MATH 351 (Differential Equations) Sec. 7.4 April 2, 214 1 / 12 System of
More informationDiscrete Structures Lecture Sequences and Summations
Introduction Good morning. In this section we study sequences. A sequence is an ordered list of elements. Sequences are important to computing because of the iterative nature of computer programs. The
More informationSection Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional)
Section 2.4 Section Summary Sequences. o Examples: Geometric Progression, Arithmetic Progression Recurrence Relations o Example: Fibonacci Sequence Summations Special Integer Sequences (optional) Sequences
More informationCh 5.7: Series Solutions Near a Regular Singular Point, Part II
Ch 5.7: Series Solutions Near a Regular Singular Point, Part II! Recall from Section 5.6 (Part I): The point x 0 = 0 is a regular singular point of with and corresponding Euler Equation! We assume solutions
More informationMath 192r, Problem Set #3: Solutions
Math 192r Problem Set #3: Solutions 1. Let F n be the nth Fibonacci number as Wilf indexes them (with F 0 F 1 1 F 2 2 etc.). Give a simple homogeneous linear recurrence relation satisfied by the sequence
More informationFunctional Programming Laboratory 3
Functional Programming Laboratory 3 Define new functions, Recursion Isabela Drămnesc March 12, 2014 1 Concepts Bound and free variables Recursive functions Simple and double recursion 2 Questions from
More informationThe Trees of Hanoi. Joost Engelfriet
The Trees of Hanoi Joost Engelfriet Leiden Institute of Advanced Computer Science Leiden University, The Netherlands j.engelfriet@liacs.leidenuniv.nl Abstract The game of the Towers of Hanoi is generalized
More informationGeneral Comments Proofs by Mathematical Induction
CMSC351 Notes on Mathematical Induction Proofs These are examples of proofs used in cmsc250. These proofs tend to be very detailed. You can be a little looser. General Comments Proofs by Mathematical Induction
More informationTwo Identities Involving Generalized Fibonacci Numbers
Two Identities Involving Generalized Fibonacci Numbers Curtis Cooper Dept. of Math. & Comp. Sci. University of Central Missouri Warrensburg, MO 64093 U.S.A. email: cooper@ucmo.edu Abstract. Let r 2 be
More informationHandout 7: Recurrences (Cont d)
ENGG 2440B: Discrete Mathematics for Engineers Handout 7: Recurrences (Cont d) 2018 19 First Term Instructor: Anthony Man Cho So October 8, 2018 In the last handout, we studied techniques for solving linear
More informationDivide and Conquer Problem Solving Method
Divide and Conquer Problem Solving Method 1. Problem Instances Let P be a problem that is amenable to the divide and conquer algorithm design method and let P 0, P 1, P 2, be distinct instances of the
More informationOmega notation. Transitivity etc.
Omega notation Big-Omega: Lecture 2, Sept. 25, 2014 f () n (()) g n const cn, s.t. n n : cg() n f () n Small-omega: 0 0 0 f () n (()) g n const c, n s.t. n n : cg() n f () n 0 0 0 Intuition (works most
More information9.1 SEQUENCES AND SERIES
640 Chapter 9 Sequences, Series, and Probability 9. SEQUENCES AND SERIES What you should learn Use sequence notation to write the terms of sequences. Use factorial notation. Use summation notation to write
More informationWhat you learned in Math 28. Rosa C. Orellana
What you learned in Math 28 Rosa C. Orellana Chapter 1 - Basic Counting Techniques Sum Principle If we have a partition of a finite set S, then the size of S is the sum of the sizes of the blocks of the
More information