Generating Functions II

Slides:



Advertisements
Similar presentations
Section 6.2 Calculating Coefficients Of Generating Functions
Advertisements

Generating Functions I Great Theoretical Ideas In Computer Science V. Adamchik D. Sleator CS Spring 2010 Lecture 6 Jan. 28, 2010 Carnegie Mellon.
Grade School Revisited: How To Multiply Two Numbers Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture.
Counting III: Pascal’s Triangle, Polynomials, and Vector Programs Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2003 Lecture.
Algebraic Structures: Group Theory II
Induction: One Step At A Time Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 4Jan 22, 2004Carnegie Mellon University.
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 9Feb 10,
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 3 Recurrence equations Formulating recurrence equations Solving recurrence equations.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 3 Recurrence equations Formulating recurrence equations Solving recurrence equations.
Grade School Revisited: How To Multiply Two Numbers Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 18March.
7.4 Generating Functions Definition 1: The generation function for the sequence a 0, a 1,...,a k,... of real numbers is the infinite series G(x) = a 0.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Great Theoretical Ideas in Computer Science.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
1 Section 5.5 Solving Recurrences Any recursively defined function ƒ with domain N that computes numbers is called a recurrence or recurrence relation.
Great Theoretical Ideas in Computer Science.
Counting III: Pascal’s Triangle, Polynomials, and Vector Programs Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2003 Lecture.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Chapter 8 With Question/Answer Animations. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Great Theoretical Ideas in Computer Science.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Generating Functions and Counting Trees. Today’s Plan 1.Generating functions for basic sequences 2.Operations on generating functions 3.Counting 4.Solve.
7.2 Solving Linear Recurrence Relations Some of these recurrence relations can be solved using iteration or some other ad hoc technique. However, one important.
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 9Feb 10,
Recurrences – II. Comp 122, Spring 2004.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science V. AdamchikCS Spring 2006 Lecture 6Feb 2, 2005Carnegie.
Recurrences, Phi and CF Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 13 Feb 28, 2006 Carnegie Mellon.
Lecture 16 Generating Functions. Basically, generating functions are a tool to solve a wide variety of counting problems and recurrence relations, find.
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 6Sept 15,
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
Counting III: Pigeonhole principal, Pascal’s Triangle and more Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006.
Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence.
Mathematical Analysis of Recursive Algorithm CSG3F3 Lecture 7.
CSG523/ Desain dan Analisis Algoritma
CSG523/ Desain dan Analisis Algoritma
CMSC Discrete Structures
Section 6.2 Calculating Coefficients Of Generating Functions
Copyright © Cengage Learning. All rights reserved.
Great Theoretical Ideas in Computer Science
Induction: One Step At A Time
3.4 Zeros of Polynomial Functions
Counting III: Pascal’s Triangle, Polynomials, and Vector Programs
Linear Differential Equations
Calculating Coefficients Of Generating Functions
The Fibonacci Numbers And An Unexpected Calculation
Polynomials, Secret Sharing, And Error-Correcting Codes
Counting I: Bijection and Choice Trees
Induction II: Inductive Pictures
Great Theoretical Ideas in Computer Science
Polynomials, Secret Sharing, And Error-Correcting Codes
Induction: One Step At A Time
Induction: One Step At A Time
5.1 Power Series Method Section 5.1 p1.
Sets, Sequences, and Summations
Great Theoretical Ideas in Computer Science
CMSC Discrete Structures
Counting III: Pascal’s Triangle, Polynomials, and Vector Programs
Counting II: Recurring Problems And Correspondences
Great Theoretical Ideas in Computer Science
Algebraic Structures: Group Theory
Discrete Mathematics for Computer Science
Lecture 29 Section 6.7 Thu, Mar 3, 2005
CMSC Discrete Structures
Algebraic Identities intro
Recurrence Relations Discrete Structures.
Chapter 7 Advanced Counting Techniques
Counting II: Recurring Problems And Correspondences
Induction: One Step At A Time
Counting I: Choice Trees and Correspondences
Presentation transcript:

Generating Functions II Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS 15-251 Spring 2006 Lecture 14 Mar 02, 2006 Carnegie Mellon University Generating Functions II

What is a closed form the Fibonacci power series? F0=0, F1=1, Fn=Fn-1+Fn-2 for n2 What is a closed form the Fibonacci power series?

T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0 Counting binary trees

Solving with Generating Functions ak = ak-1 + ak-2 , kr2 a0=0, a1=1 We assume that f(x) is a generating function

ak = ak-1 + ak-2 , kr2 What are the generating functions for sequences ak, ak-1, ak-2 when k = 2, 3, 4,… ?

What is the generating function for ak , k = 2,3, … ?

What is the generating function for ak-1, k = 2,3, … ?

What is the generating function for ak-2, k = 0, 1, 2, … ?

Solving with Generating Functions ak = ak-1 + ak-2 , k>1 a0=0, a1=1 In terms of generating functions

ak = ak-1 + ak-2

Simple Transformations If f(x) is a generating function for ak, then ak-1 -> x f(x) ak-2 -> x2 f(x)

Find a GF for a0=2, a1=4,a2=31 an=4an-1+3an-2-18an-3

T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0 Counting binary trees

T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0 Let f(x) be a generating function Then summing-up the above recurrence, yields

Power series multiplication Let us multiply formal power series p(x) = a0 + a1 x + a2 x2 + … q(x) = b0 + b1x + b2 x2 + … p(x)q(x) = a0b0 + (a0b1+a1b0) x + (a0b2+a1b1+a2b0) x2 +…

Power series multiplication If then

T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0

T0=1, T1=1, Tn = T0 Tn-1 + T1 Tn-2+…+Tn-1 T0

Counting Binary Trees

Applying some calculus… Catalan Numbers

Newton’s Binomial Theorem

Newton’s Binomial Theorem

Use generating functions to show that Proving Identities Use generating functions to show that

Consider the right hand side

Use the binomial theorem to obtain What is the coefficient by xn?

Study Bee Solving recurrences via GFs Power series manipulations Proving identities via GFs Study Bee