Generating Functions II

Similar documents
1 Generating functions for balls in boxes

Math 155 (Lecture 3)

Series: Infinite Sums

+ au n+1 + bu n = 0.)

Generating Functions. 1 Operations on generating functions

Math 475, Problem Set #12: Answers

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Worksheet on Generating Functions

Z ß cos x + si x R du We start with the substitutio u = si(x), so du = cos(x). The itegral becomes but +u we should chage the limits to go with the ew

Properties and Tests of Zeros of Polynomial Functions

Course : Algebraic Combinatorics

... and realizing that as n goes to infinity the two integrals should be equal. This yields the Wallis result-

MATH 304: MIDTERM EXAM SOLUTIONS

SNAP Centre Workshop. Basic Algebraic Manipulation

7 Sequences of real numbers

Once we have a sequence of numbers, the next thing to do is to sum them up. Given a sequence (a n ) n=1

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Bertrand s Postulate

Infinite Sequences and Series

Zeros of Polynomials

Complex Numbers Solutions

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST. First Round For all Colorado Students Grades 7-12 November 3, 2007

4. Partial Sums and the Central Limit Theorem

4.3 Growth Rates of Solutions to Recurrences

CSE 1400 Applied Discrete Mathematics Number Theory and Proofs

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

NAME: ALGEBRA 350 BLOCK 7. Simplifying Radicals Packet PART 1: ROOTS

Mathematics review for CSCI 303 Spring Department of Computer Science College of William & Mary Robert Michael Lewis

6.3 Testing Series With Positive Terms


What is Probability?

Ma 530 Introduction to Power Series

Part I: Covers Sequence through Series Comparison Tests

The Binomial Theorem

Algorithms and Data Structures 2014 Exercises and Solutions Week 13

NUMERICAL METHODS FOR SOLVING EQUATIONS

( ) GENERATING FUNCTIONS

[ 11 ] z of degree 2 as both degree 2 each. The degree of a polynomial in n variables is the maximum of the degrees of its terms.

Intermediate Math Circles November 4, 2009 Counting II

Application of Jordan Canonical Form

= 4 and 4 is the principal cube root of 64.

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics

Problem. Consider the sequence a j for j N defined by the recurrence a j+1 = 2a j + j for j > 0

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer.

MT5821 Advanced Combinatorics

Topic 1 2: Sequences and Series. A sequence is an ordered list of numbers, e.g. 1, 2, 4, 8, 16, or

PROBLEM SET 5 SOLUTIONS 126 = , 37 = , 15 = , 7 = 7 1.

The Binomial Theorem

Math 2412 Review 3(answers) kt

CSE 21 Mathematics for

COS 341 Discrete Mathematics. Exponential Generating Functions and Recurrence Relations

Combinatorially Thinking

1. By using truth tables prove that, for all statements P and Q, the statement

Signals & Systems Chapter3

Infinite Series. Definition. An infinite series is an expression of the form. Where the numbers u k are called the terms of the series.

Math 172 Spring 2010 Haiman Notes on ordinary generating functions

Homework 1 Solutions. The exercises are from Foundations of Mathematical Analysis by Richard Johnsonbaugh and W.E. Pfaffenberger.

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

P1 Chapter 8 :: Binomial Expansion

Review Problems 1. ICME and MS&E Refresher Course September 19, 2011 B = C = AB = A = A 2 = A 3... C 2 = C 3 = =

How to Maximize a Function without Really Trying

Northwest High School s Algebra 2/Honors Algebra 2 Summer Review Packet

Recurrence Relations

SEQUENCES AND SERIES

2.4 - Sequences and Series

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Additional Notes on Power Series

MATH 21 SECTION NOTES

Let us consider the following problem to warm up towards a more general statement.

10.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.

Section 6.4: Series. Section 6.4 Series 413

Convergence of random variables. (telegram style notes) P.J.C. Spreij

MAT 271 Project: Partial Fractions for certain rational functions

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

[ 47 ] then T ( m ) is true for all n a. 2. The greatest integer function : [ ] is defined by selling [ x]

Math 132, Fall 2009 Exam 2: Solutions

COMP26120: More on the Complexity of Recursive Programs (2018/19) Lucas Cordeiro

GAMALIEL CERDA-MORALES 1. Blanco Viel 596, Valparaíso, Chile. s: /

LESSON 2: SIMPLIFYING RADICALS

Definitions and Theorems. where x are the decision variables. c, b, and a are constant coefficients.

GG313 GEOLOGICAL DATA ANALYSIS

11.6 Absolute Convergence and the Ratio and Root Tests

SEQUENCE AND SERIES NCERT

Section 4.1. Properties of Exponents

PROPERTIES OF THE POSITIVE INTEGERS

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

1. n! = n. tion. For example, (n+1)! working with factorials. = (n+1) n (n 1) 2 1

GENERATING FUNCTIONS AND RANDOM WALKS

End-of-Year Contest. ERHS Math Club. May 5, 2009

MATH 324 Summer 2006 Elementary Number Theory Solutions to Assignment 2 Due: Thursday July 27, 2006

Average-Case Analysis of QuickSort

TEAM RELAYS MU ALPHA THETA STATE 2009 ROUND NAMES THETA

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

Created by T. Madas SERIES. Created by T. Madas

INEQUALITIES BJORN POONEN

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Mathematical Description of Discrete-Time Signals. 9/10/16 M. J. Roberts - All Rights Reserved 1

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

The Advantage Testing Foundation Solutions

UNIT #5. Lesson #2 Arithmetic and Geometric Sequences. Lesson #3 Summation Notation. Lesson #4 Arithmetic Series. Lesson #5 Geometric Series

Transcription:

Geeratig Fuctios II Misha Lavrov ARML Practice 5/4/2014

Warm-up problems 1. Solve the recursio a +1 = 2a, a 0 = 1 by usig commo sese. 2. Solve the recursio b +1 = 2b + 1, b 0 = 1 by usig commo sese ad trickery. 3. Solve the recursio c +1 = 2c +, c 0 = 1 by usig commo sese, trickery, ad persistece. 4. Solve the recursio d +2 = d + d +1 + 2, d 0 = d 1 = 1 by usig commo sese, trickery, persistece, ad a familiarity with the Fiboacci umbers.

Warm-up solutios 1. a = 2. 2. b = 2 +1 1. 3. c = 2 +1 1. 4. d = 2 F, where F is the th Fiboacci umber (with F 0 = 0 ad F 1 = 1).

Formal itroductio to geeratig fuctios If we have a sequece a 0, a 1, a 2, a 3,... that we like very much, we make a geeratig fuctio for it by computig the sum A(x) = a k x k. k=0 Ofte there is some ice expressio for what this sum is. For example, if the sequece is ( ( 0), ( 1), 2),..., we get the geeratig fuctio (1 + x).

Formal itroductio to geeratig fuctios If we have a sequece a 0, a 1, a 2, a 3,... that we like very much, we make a geeratig fuctio for it by computig the sum A(x) = a k x k. k=0 Ofte there is some ice expressio for what this sum is. For example, if the sequece is ( ( 0), ( 1), 2),..., we get the geeratig fuctio (1 + x). Reasos to use geeratig fuctios: We get short descriptios of complicated sequeces. We ca maipulate sequeces i useful ways with simple algebra.

Recurreces If you lack commo sese, trickery, ad persistece, you ca use geeratig fuctios to solve recurreces. For example, take the recurrece a +1 = 2a + 1 with a 0 = 1. a +1 = 2a + 1

Recurreces If you lack commo sese, trickery, ad persistece, you ca use geeratig fuctios to solve recurreces. For example, take the recurrece a +1 = 2a + 1 with a 0 = 1. a +1 = 2a + 1 a +1 x = 2a x + =0 =0 =0 x

Recurreces If you lack commo sese, trickery, ad persistece, you ca use geeratig fuctios to solve recurreces. For example, take the recurrece a +1 = 2a + 1 with a 0 = 1. a +1 = 2a + 1 a +1 x = 2a x + =0 A(x) a 0 x =0 =0 = 2A(x) + 1 1 x x

Recurreces If you lack commo sese, trickery, ad persistece, you ca use geeratig fuctios to solve recurreces. For example, take the recurrece a +1 = 2a + 1 with a 0 = 1. a +1 = 2a + 1 a +1 x = 2a x + =0 =0 =0 A(x) a 0 = 2A(x) + 1 x 1 x 1 A(x) = (1 x)(1 2x). x

Recurreces If you lack commo sese, trickery, ad persistece, you ca use geeratig fuctios to solve recurreces. For example, take the recurrece a +1 = 2a + 1 with a 0 = 1. a +1 = 2a + 1 a +1 x = 2a x + =0 =0 =0 A(x) a 0 = 2A(x) + 1 x 1 x 1 A(x) = (1 x)(1 2x). This splits up as A(x) = 2 1 2x 1 1 x, so a = 2 2 1. x

Addig up Fiboacci umbers The geeratig fuctio for the Fiboacci umbers is x F (x) =. Suppose we wat to compute 1 x x 2 S = F 0 + F 1 + F 2 + + F. How ca we do this usig geeratig fuctios?

Addig up Fiboacci umbers The geeratig fuctio for the Fiboacci umbers is x F (x) =. Suppose we wat to compute 1 x x 2 S = F 0 + F 1 + F 2 + + F. How ca we do this usig geeratig fuctios? Let S(x) = =0 S x. The: ( ) S(x) = F k x = = =0 k=0 k=0 =k = 1 1 x F k x = k=0 k=0 0 k F k x k 1 x F k x F k x k = 1 1 x F (x) = x (1 x)(1 x x 2 ).

Addig up Fiboacci umbers x (1 x)(1 x x 2 ). We ca use partial partial fractios o S(x) = Write: x (1 x)(1 x x 2 ) = A 1 x + Bx + C 1 x x 2.

Addig up Fiboacci umbers x (1 x)(1 x x 2 ). We ca use partial partial fractios o S(x) = Write: x (1 x)(1 x x 2 ) = A 1 x + Bx + C 1 x x 2. By settig x to a few trial values, we get: 0 = A + C (x = 0) 1 2 = 1 2A B + C (x = 1) 4 = 2A + 2B + 4C (x = 1 2 )

Addig up Fiboacci umbers x (1 x)(1 x x 2 ). We ca use partial partial fractios o S(x) = Write: x (1 x)(1 x x 2 ) = A 1 x + Bx + C 1 x x 2. By settig x to a few trial values, we get: 0 = A + C (x = 0) 1 2 = 1 2A B + C (x = 1) 4 = 2A + 2B + 4C (x = 1 2 ) We get A = 1, B = C = 1, so S(x) = x + 1 1 x x 2 1 1 x = F (x) + F (x) x Therefore S = F + F +1 1 = F +2 1. 1 1 x.

Covolutios, agai There is aother reaso why F (x) 1 x ca write this as: gave us the partial sums. We (F 0 + F 1 x + F 2 x 2 + F 3 x 3 + )(1 + x + x 2 + x 3 + ).

Covolutios, agai There is aother reaso why F (x) 1 x ca write this as: gave us the partial sums. We (F 0 + F 1 x + F 2 x 2 + F 3 x 3 + )(1 + x + x 2 + x 3 + ). Whe we multiply this out, we get the followig x terms: (F x ) 1 + (F 1 x 1 ) x + + (F 1 x) x 1 + F 0 x. The total coefficiet of x is F + F 1 + + F 1 + F 0.

Exercises 1. Fid the coefficiet of x 100 i (1+x)10 1 x. 2. Solve the recurrece a = a 0 + a 1 + + a 1, with a 0 = 1. 3. Compute the sum F 0 + F 2 + F 4 + + F 2 2 + F 2.

Exercises 1. The coefficiet of x 100 (ad ay x for 10) is 2 10 = 1024. 2. a = 2 1 for 1. The geeratig fuctio (if you took that approach) is A(x) = 1 x 1 2x = 1/2 1 2x + 1 2. 3. F 0 + F 2 + F 4 + + F 2 2 + F 2 = F 2+1 1. I geeratig fuctio laguage: F (x) 1 x 2 = F (x) 1 x 1 x 2. This also implies that F 1 + F 3 + F 5 + + F 2 1 = F 2.

Complete sums of geeratig fuctios 1. How ca we fid ( 0) + ( 1) + + ( ) usig geeratig fuctios?

Complete sums of geeratig fuctios 1. How ca we fid ( 0) + ( 1) + + ( ) usig geeratig fuctios? ( The fuctio f (x) = (1 + x) is the g.f. for the fiite sequece ) ( 0, ) ( 1,..., ). We ca fid the sum by settig x = 1, gettig (1 + 1) = 2.

Complete sums of geeratig fuctios 1. How ca we fid ( 0) + ( 1) + + ( ) usig geeratig fuctios? ( The fuctio f (x) = (1 + x) is the g.f. for the fiite sequece ) ( 0, ) ( 1,..., ). We ca fid the sum by settig x = 1, gettig (1 + 1) = 2. 2. How ca we fid ( ( 0) + ( 2) + ) ( 4 + + ( mod 2)) usig geeratig fuctios?

Complete sums of geeratig fuctios 1. How ca we fid ( 0) + ( 1) + + ( ) usig geeratig fuctios? ( The fuctio f (x) = (1 + x) is the g.f. for the fiite sequece ) ( 0, ) ( 1,..., ). We ca fid the sum by settig x = 1, gettig (1 + 1) = 2. 2. How ca we fid ( ( 0) + ( 2) + ) ( 4 + + ( mod 2)) usig geeratig fuctios? Settig x = 1 coverts ( ) k x k ito just ( k) for all k. But settig x = 1 coverts ( ) k x k ito ( ( k) for eve k, ad ) k for all k. f (1)+f ( 1) Therefore 2 will preserve the eve terms ad cacel the odd terms, givig us (1+1) +(1 1) 2 = 2 1.

Aother dice problem If you roll 10 stadard dice, what is the probability that the total is divisible by 5?

Aother dice problem If you roll 10 stadard dice, what is the probability that the total is divisible by 5? We ca solve this i a similar way. Let ω = e 2πi/5 : a complex umber satisfyig ω 5 = 1. Sice x 5 1 factors as (x 1)(x 4 + x 3 + x 2 + x + 1), ad ω 1, we also have 1 + ω + ω 2 + ω 3 + ω 4 = 0. Let f (x) be a geeratig fuctio. What is f (1)+f (ω)+ +f (ω4 ) 5?

Aother dice problem If you roll 10 stadard dice, what is the probability that the total is divisible by 5? We ca solve this i a similar way. Let ω = e 2πi/5 : a complex umber satisfyig ω 5 = 1. Sice x 5 1 factors as (x 1)(x 4 + x 3 + x 2 + x + 1), ad ω 1, we also have 1 + ω + ω 2 + ω 3 + ω 4 = 0. Let f (x) be a geeratig fuctio. What is f (1)+f (ω)+ +f (ω4 ) 5? Each x becomes 1+ω +ω 2 +ω 3 +ω 4 5. If is a multiple of 5, this becomes 1+1+1+1+1 5 = 1. Otherwise, the umerator is a permutatio of 1 + ω + ω 2 + ω 3 + ω 4 = 0. If we do this for the probability geeratig fuctio of rollig 10 dice, we get the aswer we wat.

Aother dice problem: Solutio The probability geeratig fuctio of oe die roll is x+x 2 +x 3 +x 4 +x 5 +x 6 6. So the p.g.f. for rollig 10 dice is ( x + x 2 + x 3 + x 4 + x 5 + x 6 ) 10 f (x) =. 6

Aother dice problem: Solutio The probability geeratig fuctio of oe die roll is x+x 2 +x 3 +x 4 +x 5 +x 6 6. So the p.g.f. for rollig 10 dice is ( x + x 2 + x 3 + x 4 + x 5 + x 6 ) 10 f (x) =. 6 Next, we compute f (1), f (ω), f (ω 2 ), f (ω 3 ), ad f (ω 4 ). The first is easy: f (1) = 1. We ca simplify ω + ω 2 + ω 3 + ω 4 + ω 5 + ω 6 to just ω + ω 2 (1 + ω + ω 2 + ω 3 + ω 4 ) = ω. So f (ω) = ( ) ω 10 6 = 1. The 6 10 same thig happes for ω 2, ω 3, ad ω 4.

Aother dice problem: Solutio The probability geeratig fuctio of oe die roll is x+x 2 +x 3 +x 4 +x 5 +x 6 6. So the p.g.f. for rollig 10 dice is ( x + x 2 + x 3 + x 4 + x 5 + x 6 ) 10 f (x) =. 6 Next, we compute f (1), f (ω), f (ω 2 ), f (ω 3 ), ad f (ω 4 ). The first is easy: f (1) = 1. We ca simplify ω + ω 2 + ω 3 + ω 4 + ω 5 + ω 6 to just ω + ω 2 (1 + ω + ω 2 + ω 3 + ω 4 ) = ω. So f (ω) = ( ) ω 10 6 = 1. The 6 10 same thig happes for ω 2, ω 3, ad ω 4. Therefore the probability we wat is 1 + 1 6 10 + 1 6 10 + 1 6 10 + 1 6 10 5 = 1 5 + 4 5 6 10.

Exercises 1. Compute ( ) ( 99 0 + 99 ) ( 3 + 99 ) ( 6 + + 99). 2. Compute ( ) ( 99 1 + 99 ) ( 4 + 99 ) ( 7 + + 99 97). 3. Usig the g.f. 1 (1 x) 2 = 1 + 2x + 3x 2 + 4x 3 +, fid the sum =0 2.

Solutios 1. Let f (x) = (1 + x) 99. The we take f (1)+f (e 2πi/3 )+f (e 4πi/3 ) 3 = 299 2 3. 2. Here, we do the same thig to f (x) = x 2 (1 + x) 99, ad get 2 99 +1 3. 1 3. Takig gives us 4, but this is actually the sum (1 1 )2 2 =0 +1 2. So we subtract off =0 1 2 = 2, ad get a total of 2.

Bous problem Let T be the umber of triagles you ca make with iteger sides ad perimeter. Fid the geeratig fuctio T (x) = =0 T x.

Bous problem Let T be the umber of triagles you ca make with iteger sides ad perimeter. Fid the geeratig fuctio T (x) = =0 T x. This amouts to choosig a, b, c such that a b c ad c < a + b. But that is equivalet to choosig p = b a, q = c b, ad r = a + b c such that p 0, q 0, ad r > 0. This yields the geeratig fuctio T (u, v, w) = 1 1 u 1 1 v w 1 w. Give p, q, r, the perimeter is 2p + 4q + 3r = 2(b a) + 4(c b) + 3(a + b c) = a + b + c. So we substitute u = x 2, v = x 4, w = x 3 to get T (x) = x 3 (1 x 2 )(1 x 3 )(1 x 4 ).