CSE 21 Mathematics for

Similar documents
( ) GENERATING FUNCTIONS

Generating Functions. 1 Operations on generating functions

Section 5.1 The Basics of Counting

1 Generating functions for balls in boxes

Math 155 (Lecture 3)

Solutions to Final Exam

CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

Chapter 6. Advanced Counting Techniques

3sin A 1 2sin B. 3π x is a solution. 1. If A and B are acute positive angles satisfying the equation 3sin A 2sin B 1 and 3sin 2A 2sin 2B 0, then A 2B

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Introduction To Discrete Mathematics

Lecture 6 April 10. We now give two identities which are useful for simplifying sums of binomial coefficients.

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

Worksheet on Generating Functions

David Vella, Skidmore College.

x c the remainder is Pc ().

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

Permutations, Combinations, and the Binomial Theorem

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

Zeros of Polynomials

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

Generating Functions II

3.1 Counting Principles

CIS Spring 2018 (instructor Val Tannen)

4.1 Sigma Notation and Riemann Sums

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

Lecture 7: Properties of Random Samples

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

Injections, Surjections, and the Pigeonhole Principle

Bertrand s Postulate

Homework 3. = k 1. Let S be a set of n elements, and let a, b, c be distinct elements of S. The number of k-subsets of S is

MATH 304: MIDTERM EXAM SOLUTIONS

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

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

4.1 SIGMA NOTATION AND RIEMANN SUMS

Chapter 7 COMBINATIONS AND PERMUTATIONS. where we have the specific formula for the binomial coefficients:

IP Reference guide for integer programming formulations.

and each factor on the right is clearly greater than 1. which is a contradiction, so n must be prime.

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

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

Chapter 1 : Combinatorial Analysis

M A T H F A L L CORRECTION. Algebra I 1 4 / 1 0 / U N I V E R S I T Y O F T O R O N T O

1 Summary: Binary and Logic

,... are the terms of the sequence. If the domain consists of the first n positive integers only, the sequence is a finite sequence.

Complex Numbers Solutions

Intermediate Math Circles November 4, 2009 Counting II

The Binomial Theorem

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

Math 2784 (or 2794W) University of Connecticut

Math 61CM - Solutions to homework 3

6. Uniform distribution mod 1

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

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

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

A Combinatoric Proof and Generalization of Ferguson s Formula for k-generalized Fibonacci Numbers

Unit 4: Polynomial and Rational Functions

Lecture 10: Mathematical Preliminaries

HOMEWORK #10 SOLUTIONS

Properties and Tests of Zeros of Polynomial Functions

CALCULATION OF FIBONACCI VECTORS

Trial division, Pollard s p 1, Pollard s ρ, and Fermat s method. Christopher Koch 1. April 8, 2014

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

ARRANGEMENTS IN A CIRCLE

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

14 Classic Counting Problems in Combinatorics

MT5821 Advanced Combinatorics

Goodness-of-Fit Tests and Categorical Data Analysis (Devore Chapter Fourteen)

Introductions to PartitionsP

PERMUTATIONS AND COMBINATIONS

The Ratio Test. THEOREM 9.17 Ratio Test Let a n be a series with nonzero terms. 1. a. n converges absolutely if lim. n 1

Linear Regression Analysis. Analysis of paired data and using a given value of one variable to predict the value of the other

1. Hilbert s Grand Hotel. The Hilbert s Grand Hotel has infinite many rooms numbered 1, 2, 3, 4

05 - PERMUTATIONS AND COMBINATIONS Page 1 ( Answers at the end of all questions )

Lecture 2 Clustering Part II

Combinatorics II. Combinatorics. Product Rule. Sum Rule II. Theorem (Product Rule) Theorem (Sum Rule)

Final Review for MATH 3510

Permutations & Combinations. Dr Patrick Chan. Multiplication / Addition Principle Inclusion-Exclusion Principle Permutation / Combination

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

THE UNIVERSITY OF TORONTO UNDERGRADUATE MATHEMATICS COMPETITION. In Memory of Robert Barrington Leigh. March 9, 2014

MT5821 Advanced Combinatorics

FLC Ch 8 & 9. Evaluate. Check work. a) b) c) d) e) f) g) h) i) j) k) l) m) n) o) 3. p) q) r) s) t) 3.

Math 172 Spring 2010 Haiman Notes on ordinary generating functions

CS / MCS 401 Homework 3 grader solutions

Math 475, Problem Set #12: Answers

PROBLEMS ON ABSTRACT ALGEBRA

Math 525: Lecture 5. January 18, 2018

As stated by Laplace, Probability is common sense reduced to calculation.

CS 171 Lecture Outline October 09, 2008

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j.

Basic Combinatorics. Math 40210, Section 01 Spring Homework 7 due Monday, March 26

AN ALMOST LINEAR RECURRENCE. Donald E. Knuth Calif. Institute of Technology, Pasadena, Calif.

Books Recommended for Further Reading

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

Optimally Sparse SVMs

3. One pencil costs 25 cents, and we have 5 pencils, so the cost is 25 5 = 125 cents. 60 =

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

This section is optional.

Stat 198 for 134 Instructor: Mike Leong

Course : Algebraic Combinatorics

Transcription:

CSE 2 Mathematics for Algorithm ad System Aalysis Summer, 2005 Outlie What a geeratig fuctio is How to create a geeratig fuctio to model a problem Fidig the desired coefficiet Partitios Expoetial geeratig fuctios Day 8 Geeratig Fuctios Istructor: Neil Rhodes 2 (Ordiary Geeratig Fuctios A differet way to solve problems ivolvig selectio ad arragemet problems with repetitio Ca easily support special costraits ot easy to do otherwise Fid the umber of ways to distribute 70 idetical objects ito 9 boxes with a odd umber betwee 3 ad 7 i the first box, a eve umber betwee 4 ad 20 i the secod box, ad at most 3 i the other boxes. Idea Create a geeratig fuctio g(x which models the problem of selectig r objects. The coefficiet of x r i g(x couts the umber of ways to select r objects g(x = a0 + ax + a2x 2 +...arx r +... + ax g(x = (+x models the umber of ways to select r objects from objects g(x = ( + x = x 0 + 0 x + + x r + + r x Let s look at the coefficiets of x 5 i (+x+x 2 4 Ways to create x 5 : x 0 x 2 x 2 x x x x x 2 etc. I geeral, x e x e 2 x e 3 x e 4 where 0 e, e2, e3, e4 2 Ca be looked at as the umber of iteger solutios to: e + e2 + e3 + e4 = 5 (where 0 e, e2, e3, e4 2 Which ca also be looked at as the umber of ways to place 5 balls i four boxes with at most 2 balls i each box Which ca also be looked at as the umber of ways to select 5 objects from a collectio of 4 differet types of objects (with two idetical objects of each type. g(x = (+x+x 2 4 is a geeratig fuctio for the above problems Actually, g(x is a geeratig fuctio for the problem with ay umber, r, of {balls, objects}, ot just 5 We always write a geeral geeratig fuctio for ay r 3 4

Fid a geeratig fuctio for ar, the umber of ways to select r balls from a pile of three gree, three white, three blue, ad three gold balls Same as umber of iteger solutios to: Fid a geeratig fuctio to model coutig all selectios of six objects chose from three types of objects with: repetitio of up to four objects of each type e + e2 + e3 + e4 = r 0 ei 3 ulimited repetitio 5 6 Fid a geeratig fuctio to model: the umber of ways to distribute r idetical objects ito five boxes with a eve umber of objects ot exceedig 0 i the first two boxes ad betwee 3 ad 5 i the other boxes. Fid a geeratig fuctio for ar, the umber of ways a roll of six distict dice ca show a sum of r if The first three dice are odd ad the secod three eve The ith die does ot show a value of i 7 8

Fidig the Desired Coefficiet Reduce complicated geeratig fuctio to simple fuctio or product of simple fuctios The simple fuctios: x m+ x = + x + x 2 + + x m x = + x + x2 + ( + x = 0 x 0 + x + + ( x m = x m + x r + + r x ( ( x 2m + + ( k 2 k x km + + x m If Product of Geeratig Fuctios f(x = a0 + ax + a2x 2 + g(x = b0 + bx + b2x 2 + ad h(x = f(xg(x the h(x = a0b0 + (a0b + ab0x + (a0b2 + ab + a2b0x 2 + + (a0br + abr- + + ar-b + arb0x r + ( x = + ( + x + ( 2 + 2 x 2 + + ( r + r x r + 9 0 Fid the coefficiet of x 6 i (x 2 + x 3 + x 4 + 5 Rewrite as product of simpler fuctios Fid the umber of ways to collect $5 from 20 distict people if each of the first 9 people ca give $0 or $ ad the 20th perso ca give either $0 or $ or $5 : g(x = Fial simplificatio: 2

How may ways to distribute 25 idetical balls ito seve distict boxes if the first box ca have o more tha 0 balls? How may ways are there to select 25 toys from seve types of toys with betwee two ad six of each type? 3 4 Defiitio Partitios A partitio of r idetical objects divides the group ito a collectio (uordered subsets of various sizes (Or, a group of positive itegers whose sum is r Partitios of 5 We ll be lookig at creatig geeratig fuctios for partitios Warig No easy way to calculate the coefficiets Geeratig Fuctio for Partitio for ar Wat to kow e: how may s e2: how may 2 s e + 2e2 + + rer = r Choose oes: ( + x + x 2 + x 3 + x + = /-x Choose twos ( + x 2 + x 4 + + x 2 + = /(-x 2 Choose threes ( + x 3 + x 6 + + x 3 + = /(-x 3 ad so o. g(x = product of all those = /(-x(-x 2 (-x 3 (-x r 5 6

Fid a geeratig fuctio for the umber of ways to express r as a sum of distict itegers Show with geeratig fuctios that every iteger ca be expressed as a uique sum of distict powers of 2 To show: g(x = + x + x 2 + x 3 + 7 8 Ferrers Diagram Graphically displays a partitio of r dots I a set of rows of decreasig size Show that the umber of partitios of a iteger r as a sum of m positive itegers is equal to the umber of partitios of r as a sum of positive itegers, the largest of which is m Cojugate: Rotate 90 degrees couter-clockwise 9 20

Expoetial Geeratig Fuctios Used to model problems ivolvig arragemets ad distributios of distict objects problem fid umber of differet arragemets of four letters, choosig from a s, b s, ad c s with at least two a s. Solutio Four letter combiatios: {a, a, a, a}: 4/400 {a,a,a,b}:4/30 {a,a,a,c}:4/30 {a,a,b,b}:4/220 {a,a,b,c}:4/2 {a,a,c,c}:4/20 Total is sum, so we wat that sum as the coefficiet of x 4 Ordiary geeratig fuctio ca solve umber of iteger solutios to: e + e2 + e3 = 4 e"2 e2, e3 "0 But, we wat each solutio to above problem to cotribute: (e+e2+e3/ee2e3 Expoetial Geeratig Fuctio Fuctio of form: g(x = a0 + ax + a2x 2 /2 + a3x 3 /3 + + arx r /r + g(x = (x 2 /2 + x 3 /3 + x 4 /4 + (+x+x 2 /2 + x 3 /3 + 2 Coefficiet of xr i g(x is equal to: e+e2+e3=r Coefficiet of xr/r i g(x is equal to: e+e2+e3=r e e 2 e 3 r e e 2 e 3 2 22 Fid the expoetial geeratig fuctio for ar, the umber of differet arragemets of r objects chose from four differet type of objects with each type of object appearig at least 2 ad o more tha 5 times Fid the umber of ways to place r (distict people ito three rooms with at least oe perso i each room 23 24

Useful idetities e x = + x + 2 x 2 Fidig Desired Coefficiets e x = + x + x2 2 + x3 xr + + 3 r + 2 + 3 x 3 3 + + r x r + r 2 (ex + e x = + x2 2 + x4 4 + x6 6 + + Fid the umber of differet r arragemets of objects chose from ulimited supplies of types of objects 2 (ex e x = x + x3 3 + x5 5 + x7 7 + + 25 26 Fid the umber of ways to place 25 people ito 3 rooms with at least oe perso i each room Fid the umber of r-digit quaterary sequeces (digits: 0,, 2, 3 with a eve umber of 0 s ad a odd umber of s 27 28