Generating Function October 21, 2014 Generating Functions Given an infinite sequence, its ordinary generating function is the power series: ‏G(x) = g.

Slides:



Advertisements
Similar presentations
Whats your favorite color? a pear a green pear.
Advertisements

f(x) = x 2 f(x) = 2x 2 Parameter ‘a’ increases from 1 to 2 Parabola stretches vertically.
Engineering Mathematics Class #15 Fourier Series, Integrals, and Transforms (Part 3) Sheng-Fang Huang.
Geometric Sequences A geometric sequence (or geometric progression) is a sequence in which each term after the first is obtained by multiplying the preceding.
9.1 Power Series.
Use of moment generating functions. Definition Let X denote a random variable with probability density function f(x) if continuous (probability mass function.
POLYNOMIALS POLYNOMIAL – A polynomial in one variable X is an algebraic expression in X of the form NOT A POLYNOMIAL – The expression like 1  x  1, 
Chapter 9 Generating functions Yen-Liang Chen Dept of Information Management National Central University.
4 6 Base Exponent The exponent is sometimes referred to as the power.
Descartes’s Rule of Signs & Bounds: Things that make your life easier TS: Making decisions after reflection and review.
Problem of the day Can you get sum of 99 by using all numbers (0-9) and only one mathematical symbols ?
Quadratic Functions A quadratic function is a function with a formula given by the standard form f(x) = ax2+bx+c, where a, b, c, are constants and Some.
X-box Factoring. Step 1: Set up X- Box Factor ax 2 + bx + c Product a  c Sum b.
Advanced Counting Techniques
Least Common Multiple.
April 30 th copyright2009merrydavidson Happy Birthday to: 4/25 Lauren Cooper.
Induction and recursion
Cyclic codes 1 CHAPTER 3: Cyclic and convolution codes Cyclic codes are of interest and importance because They posses rich algebraic structure that can.
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.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
Diophantine Equations Group 2: Michelle Levitsky, Kai Yin Lee, Stephanie Loo, Rouge Yang.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
4.6.2 Exponential generating functions
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
1 Chapter 7 Generating functions. 2 Summary Generating functions Recurrences and generating functions A geometry example Exponential generating functions.
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.
Chapter 7 Advance Counting Techniques. Content Recurrence relations Generating function The principle of inclusion-exclusion.
Chapter 3 Section 3.3 Real Zeros of Polynomial Functions.
5.5 Standard Form of a Linear Equation
Chapter 8 With Question/Answer Animations. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Generating Functions and Counting Trees. Today’s Plan 1.Generating functions for basic sequences 2.Operations on generating functions 3.Counting 4.Solve.
Analytic Hierarchy Process (AHP)
Rules of the game  You will work with your Unit 3 group  We will have 4 rounds of 6 questions each. Most are multiple choice; some are fill in the blank.
Discrete Structures Li Tak Sing ( 李德成 ) Lectures
Solving Quadratic Equations By Factoring Medina1.
3-2 The Derivative Thurs Sept 24 Find the slope of the tangent line to y = f(x) at x = a 1)x^2 -4, a = 2 2)2x^3, a = 0.
Solving Quadratic Equations. Factor: x² - 4x - 21 x² -21 a*c = -21 b = -4 x + = -21 = x 3x3x x 3 (GCF) x-7 (x – 7)(x + 3)
4.6 Generating functions Generating functions
The Fibonacci sequence occurs throughout nature. Where does the Fibonacci sequence occur on the human body and in animals?
Solving Polynomials.
Frank Cowell: Differentiation DIFFERENTIATION MICROECONOMICS Principles and Analysis Frank Cowell July
States on U.S. Postage Stamps (#1) by Don Fisher.
Lecture 16 Generating Functions. Basically, generating functions are a tool to solve a wide variety of counting problems and recurrence relations, find.
Patterns in Sequences. Number patterns Sequences of numbers can have interesting patterns. Here we list the most common patterns and how they are made.
Term 1 Week 8 Warm Ups. Warm Up 9/28/15 1.Graph the function and identify the number of zeros: 2x 3 – 5x 2 + 3x – 2 (Hit the y = ) 2.Identify the expressions.
Objectives Solve quadratic equations by factoring.
Chapter 9 Linear and Quadratic Inequalities
Derivative of an Exponential
Mastery - fractions Sam and Tom share the fruit equally. There 4 apples, 10 oranges, 6 pears and 1 banana. How many of each fruit do they receive? Fill.
Factorization by Cross-method
Generating Functions II
Analytic Hierarchy Process (AHP)
I Like… Yes, I do. No, I don’t.
3.11: Derivatives of Inverse Functions
Expressing functions as infinite series
Great Theoretical Ideas in Computer Science
Part (a) 1 1 ax ax ax 2 g(x) = e + f(x) g’(x) = e (ln e) (a) + f’(x)
Apply the Fundamental Theorem of Algebra
I. Finite Field Algebra.
3.6 Polynomial Functions Part 2
Selected Problems on Limits and Continuity
Representation of Functions by Power Series
Prof. Dr. Halil İbrahim Karakaş Başkent University
Exponential Functions
The Chain Rule Section 3.4.
Solving Equations by Factoring
2008 Multiple Choice.
Presentation transcript:

Generating Function October 21, 2014

Generating Functions Given an infinite sequence, its ordinary generating function is the power series: ‏G(x) = g 0 + g 1 x + g 2 x 2 + g 3 x 3 + … We will use a double-sided arrow to denote the correspondence between a sequence and its generating function. ‏  g 0 + g 1 x + g 2 x 2 + g 3 x 3 + …

Examples  0 + 0x + 0x 2 + … = 0  0 + 0x + 1x 2 + … = x 2  1 + 2x + 1x 2 + 0x 3 … = (1+x) 2  1 + x + x 2 + x 3 … = 1/(1-x)  1 - x + x 2 - x 3 … = 1/(1+x)  1 + ax + a 2 x 2 + a 3 x 3 … = 1/(1-ax)  1 + x 2 + x 4 … = 1/(1-x 2 )

Operations on Generation Functions Scaling: ‏Given  G(x) ‏Then,  c  G(x) Addition: ‏Given  G(x) ‏and  F(x) ‏Then,  G(x)+F(x)

Operations on Generation Functions Right Shift: ‏Given  G(x) ‏Then,  x k G(x) Differentiation: ‏Given  G(x) ‏Then,  G’(x) k zeroes

Class Discussion Give a closed form generating function for the sequence 1 + x + x 2 + x 3 + … = 1/(1-x) = f(x) 1 + 2x + 3x 2 + … = f’(x) x + 2x 2 + 3x 3 + … = xf’(x) = g(x) x x 2 + … = g’(x) x x x 3 + … = g’(x) But you need to work out g’(x).

Fibonacci Sequence Fibonacci numbers: ‏f 0 = 0 ‏f 1 = 1 ‏f n = f n-1 + f n-2 (n  2) What is the generating function of the Fibonacci sequence? Suppose: ‏  F(x)

Fibonacci Sequence  x  xF(x)  x 2 F(x) Then, ‏  x + xF(x) + x 2 F(x) Therefore, ‏F(x) = x + xF(x) + x 2 F(x) ‏F(x) = x / (1 - x - x 2 )

Fibonacci Numbers  x / (1 – x – x 2 ) We can get a closed form for the n th Fibonacci number by finding the coefficient of x n on the right hand side. We can show that: ‏F(x) = 1/5 0.5 (1/(1-  1 x) – 1/(1-  2 x)) ‏where  1 = 0.5( ) ‏and  2 = 0.5( )

Fibonacci Numbers The coefficient of x n in F(x) is: ‏1/5 0.5  1 n - 1/5 0.5  2 n Therefore,

Counting We can use generating function to count. Consider the following problem: ‏Suppose there are 4 types of fruits: apples, bananas, oranges and pears. In how many ways can we fill a bag with n fruits subject to the following constraints: The number of apples must be even. The number of bananas must be a multiple of 5. There can be at most 4 oranges. There can be at most 1 pear. Sources from Prof. Albert R. Meyer

Counting No. of apples must be even:  1/(1-x 2 ) No. of bananas must be a multiple of 5:  1/(1-x 5 ) At most four oranges:  (1-x 5 )/(1-x) At most one pear:  1 + x

Counting No. of ways to pick n fruits satisfying the constraints can be represented by the generating function: ‏1/(1-x 2 )  1/(1-x 5 )  (1-x 5 )/(1-x)  (1+x) ‏= 1/(1-x) 2 ‏= 1 + 2x + 3x 2 + 4x 3 + … ‏Therefore, no. of ways to pick n fruits satisfying all the constraints is n+1.

Counting Convolution Rule: ‏Let A(x) be the generating function for selecting items from set A, and let B(x) be the generating function for selecting items from set B. If A and B are disjoint, then the generating function for selecting items from the union A  B is the product A(x)  B(x). ‏In the previous example, A can be the set of apples and B the set of bananas.

Class Discussion A woman has a large supply of 1-, 2- and 3- cents stamps. Let a r denote the number of ways to make up a postage of r cents. Give a generating function for. How many ways can she pick the stamps so as to make up a postage of r cents? (1+x+x 2 +x 3 +…..) (1+x 2 +x 4 +…..) (1+x 3 +x 6 +…..) = (1-x) -1 (1-x 2 ) -1 (1-x 3 ) -1

Class Discussion The lifespan of a rabbit is 10 years. Suppose there are 2 newborn rabbits this year and the number of newborns each year is two times that in the previous year. Find the number of rabbits there are in the r th year.