Math 55: Discrete Mathematics



Similar documents
Discrete Mathematics: Homework 7 solution. Due:

Math 55: Discrete Mathematics

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

mod 10 = mod 10 = 49 mod 10 = 9.

Sample Induction Proofs

Assignment 5 - Due Friday March 6

4/1/2017. PS. Sequences and Series FROM 9.2 AND 9.3 IN THE BOOK AS WELL AS FROM OTHER SOURCES. TODAY IS NATIONAL MANATEE APPRECIATION DAY

Mathematical Induction. Lecture 10-11

Zeros of Polynomial Functions

Vieta s Formulas and the Identity Theorem

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

Solving Rational Equations

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

1.2. Successive Differences

Practice Problems for Homework #8. Markov Chains. Read Sections Solve the practice problems below.

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

Zero: If P is a polynomial and if c is a number such that P (c) = 0 then c is a zero of P.

Real Roots of Univariate Polynomials with Real Coefficients

Equations, Inequalities & Partial Fractions

3.1. Solving linear equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

H/wk 13, Solutions to selected problems

Factoring Cubic Polynomials

Reading 13 : Finite State Automata and Regular Expressions

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Integer roots of quadratic and cubic polynomials with integer coefficients

Sequences. A sequence is a list of numbers, or a pattern, which obeys a rule.

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4)

Introduction. Appendix D Mathematical Induction D1

Continued Fractions and the Euclidean Algorithm

Section IV.1: Recursive Algorithms and Recursion Trees

Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

5.1 Radical Notation and Rational Exponents

Indiana State Core Curriculum Standards updated 2009 Algebra I

Math Workshop October 2010 Fractions and Repeating Decimals

k, then n = p2α 1 1 pα k

Fibonacci Numbers and Greatest Common Divisors. The Finonacci numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

Taylor and Maclaurin Series

CONTRIBUTIONS TO ZERO SUM PROBLEMS

Polynomials. Dr. philippe B. laval Kennesaw State University. April 3, 2005

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

9.2 Summation Notation

0.8 Rational Expressions and Equations

3.3. Solving Polynomial Equations. Introduction. Prerequisites. Learning Outcomes

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: b + 90c = c + 10b

Factoring Polynomials

Rolle s Theorem. q( x) = 1

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

SOLVING POLYNOMIAL EQUATIONS

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

Continued Fractions. Darren C. Collins

3. Mathematical Induction

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

5 Numerical Differentiation

Lecture 1: Course overview, circuits, and formulas

Math 115 Spring 2011 Written Homework 5 Solutions

Second Order Linear Nonhomogeneous Differential Equations; Method of Undetermined Coefficients. y + p(t) y + q(t) y = g(t), g(t) 0.

Collatz Sequence. Fibbonacci Sequence. n is even; Recurrence Relation: a n+1 = a n + a n 1.

Full and Complete Binary Trees

Homework until Test #2

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

Notes on Determinant

1 Inner Products and Norms on Real Vector Spaces

Stanford Math Circle: Sunday, May 9, 2010 Square-Triangular Numbers, Pell s Equation, and Continued Fractions

MATH 289 PROBLEM SET 4: NUMBER THEORY

Homework # 3 Solutions

TAKE-AWAY GAMES. ALLEN J. SCHWENK California Institute of Technology, Pasadena, California INTRODUCTION

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

The Heat Equation. Lectures INF2320 p. 1/88

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

LEARNING OBJECTIVES FOR THIS CHAPTER

Lecture 13 - Basic Number Theory.

Math 319 Problem Set #3 Solution 21 February 2002

BX in ( u, v) basis in two ways. On the one hand, AN = u+

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80)

2.5 Zeros of a Polynomial Functions

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Properties of sequences Since a sequence is a special kind of function it has analogous properties to functions:

THE DYING FIBONACCI TREE. 1. Introduction. Consider a tree with two types of nodes, say A and B, and the following properties:

Generating Functions Count

POLYNOMIAL FUNCTIONS

6.3 Conditional Probability and Independence

ON FIBONACCI NUMBERS WITH FEW PRIME DIVISORS

Row Echelon Form and Reduced Row Echelon Form

minimal polyonomial Example

Zeros of Polynomial Functions

4.5 Chebyshev Polynomials

n k=1 k=0 1/k! = e. Example 6.4. The series 1/k 2 converges in R. Indeed, if s n = n then k=1 1/k, then s 2n s n = 1 n

Math 181 Handout 16. Rich Schwartz. March 9, 2010

SECTION 10-2 Mathematical Induction

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the school year.

Examples of Functions

The Characteristic Polynomial

Lecture Notes on Polynomials

Transcription:

Math 55: Discrete Mathematics UC Berkeley, Spring 2012 Homework # 9, due Wednesday, April 11 8.1.5 How many ways are there to pay a bill of 17 pesos using a currency with coins of values of 1 peso, 2 pesos, 5 pesos, and 10 pesos, and with bills with values of 5 pesos and 10 pesos? Let a n denote the number of ways to pay a bill of n pesos. Then a n = 0 for n < 0, and a 0 = 1, and we have the recurrence relation a n = a n 1 + a n 2 + 2 a n 5 + 2 a n 10 for n 1. This recurrence relation gives the following sequence: n 1 2 4 5 6 7 8 a n 1 2 5 10 17 1 54 8 9 10 11 12 1 14 15 16 17 54 95 171 02 59 955 1694 011 54 9494 Hence there are 9494 ways to pay a bill of 17 pesos. 8.1.8 a) Find a recurrence relation for the number of bit strings of length n that contain three consecutive 0s. b) What are initial conditions? c) How many bit strings of length seven contain three consecutive 0s? Let a n denote the number of such strings of length n. a) Consider a string of length n that contains three consecutive 0s. Such a string either ends with 1, or with 10, or with 100, or with 000. In the first case, there are a n 1 possibilities. In the second case, there are a n 2 possibilities. In the third case, there are a n possibilities. And, in the fourth case, there are 2 n possibilities. Hence the recurrence relation is a n = a n 1 + a n 2 + a n + 2 n for n. 1

b) The initial conditions are a 0 = a 1 = a 2 = 0. Note that a = 1. c) The recurrence gives the sequence of positive integers 0, 0, 0, 1,, 8, 20, 47, 107, 28, 520, 1121, 291,.... Hence there are a 7 = 47 bit strings of length seven that contain three consecutive 0s. 8.1.12 a) Find a recurrence relation for the number of ways to climb n stairs if the person climbing the stairs can take one stair or two stairs at a time. b) What are the initial conditions? c) In how many ways can this person climb a flight of eight stairs? Let S n denote the number of ways of climbing the stairs. a) Let n. The last step either was a single step, for which there are S n 1 possibilities, or a double step, for which there are S n 2 possibilities. The recurrence is S n = S n 1 + S n 2 for n. b) We have S 1 = 1 and S 2 = 2. You can take two stairs either directly or by taking stair at a time. c) The recurrence gives the Fibonacci sequence 1, 2,, 5, 8, 1, 21, 4, 55,.... Hence there are S 8 = 4 ways to climb a flight of eight stairs. 8.1.20 A bus driver pays all tolls, using only nickels and dimes, by throwing one coin at a time into the mechanical toll collector. a) Find the recurrence relation for the number of different ways the bus driver can pay a toll of n cents (where the order in which the coins are used matters). b) In how many ways can the driver pay a toll of 45 cents? Let c n denote the number of ways of paying n cents. a) Consider the coin that was paid last. That coin either is a nickel, for which there are c n 5 possibilities, or it is a dime, for which there are c n 10 possibilities. Hence the recurrence relation is c n = c n 5 + c n 10 for n 11. Also, the initial conditions are c 1 = c 2 = c = c 4 = c 6 = c 7 = c 8 = c 9 = 0, c 5 = 1, and c 10 = 2. 2

b) This recurrence generates the interspersed Fibonacci sequence 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0,, 0, 0, 0, 0, 5, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 21, 0, 0, 0, 0, 4, 0, 0, 0, 0, 55,... Hence there are c 45 = 55 ways for the bus driver to pay toll. 8.1.0 a) Write out all the ways the product x 0 x 1 x 2 x x 4 can be parenthesized to determine the order of multiplication. b) Use the recurrence relation developed in Example 5 to calculate C n, the number of ways to parenthesize the product of five numbers. Verify that you listed the correct number of ways in part (a). c) Check your result in part (b) by finding C 4, using the closed formula for C n in the solution of Example 5. a) There are 14 ways to parenthesize a product of five factors: (((x 0 x 1 ) x 2 ) x ) x 4, ((x 0 (x 1 x 2 )) x ) x 4, ((x 0 x 1 ) (x 2 x )) x 4, (x 0 ((x 1 x 2 ) x )) x 4, (x 0 (x 1 (x 2 x ))) x 4, (x 0 x 1 x 2 ) (x x 4 ), (x 0 x 1 x 2 ) (x x 4 ), (x 0 x 1 ) ((x 2 x ) x 4 ), (x 0 x 1 ) (x 2 (x x 4 )), x 0 (((x 1 x 2 ) x ) x 4 ), x 0 ((x 1 (x 2 x )) x 4 ), x 0 ((x 1 x 2 ) (x x 4 )), x 0 (x 1 ((x 2 x ) x 4 )), x 0 (x 1 (x 2 (x x 4 ))). b) From the recurrence on page 507 we get C 4 = C 0 C +C 1 C 2 +C 2 C 1 +C C 0 = 1 5+1 2+2 1+5 1 = 14. c) The closed formula for the Catalan numbers is C n = ( 2n n ) /(n+1). Substituting n = 4, we confirm C 4 ( 8 4) /5 = 70/5 = 14. 8.2.2 Determine which of these are linear homogeneous recurrence relations with constant coefficients. Also, find the degree of those that are. a) a n = a n 2 b) a n = c) a n = a 2 n 1 d) a n = a n 1 + a n e) a n = a n 1 /n

f) a n = a n 1 + a n 2 + n + g) a n = 4a n 2 + 5a n 4 + 9a n 7 a) This is a linear homogeneous recurrence relation with constant coefficients of degree 2. b) This recurrence is not homogeneous. c) This recurrence is not linear. d) This is a linear homogeneous recurrence relation with constant coefficients of degree. e) This recurrence does not have constant coefficients. f) This recurrence is not homogeneous. g) This is a linear homogeneous recurrence relation with constant coefficients of degree 7. 8.2.8 A model for the number of lobsters caught per year is based on the assumption that the number of lobsters caught in a year is the average of the number caught in the previous two years. a) Find a recurrence relation for {L n } where L n is the number of lobsters caught in year n, under the assumption of this model. b) Find L n if 100, 000 lobsters were caught in year 1 and 200, 000 lobsters were caught in year 2. a) Since L n is the average of L n 1 and L n 2, the recurrence is L n = 1 2 L n 1 + 1 2 L n 2. b) The characteristic polynomial x 2 x/2 1/2 = 1 2 (2x + 1)(x 1) has the roots 1 and 1/2. Hence there exist real constants c 1 and c 2 such that L n = γ 1 + γ 2 ( 1/2) n. The initial conditions imply the linear relations γ 1 +γ 2 = 100000 and γ 1 γ 2 /2 = 200000. The solution is γ 1 = 500000/ and γ 2 = 200000/, and we conclude c n = 500000 + 200000 ( 1/2)n. The second term converges to zero. Thus, the steady state scenario is that 166, 667 lobsters will be caught every year. 4

8.2.11 The Lucas numbers satisfy the recurrence relation L n = L n 1 + L n 2, and the initial conditions L 0 = 2 and L 1 = 1. a) Show that L n = f n 1 + f n+1 for n = 2,,..., where f n is the nth Fibonacci number. b) Find an explicit formula for the Lucas numbers. a) We define a new sequence {M n } by setting M 0 = 2 and M n = f n 1 + f n+1 for n 1. Then M 1 = f 0 + f 2 = 1 and M 2 = f 1 + f = 1 + 2 =. The two sequences {M n } and {L n } satisfy the same recurrence, and they satisfy the same initial conditions. Therefore they must be equal. b) The roots of the characteristic polynomial are given by the golden ratio, and we find L n = ( ) 1 + 5 n + 2 ( ) 1 5 n for n = 0, 1, 2,,.... 2 8.2.18 Solve the recurrence relation a n = 6a n 1 12a n 2 + 8a n with a 0 = 5, a 1 = 4 and a 2 = 88. The characteristic polynomial equals x 6x 2 +12x 8 = (x 2). We know from Theorem 4 on page 519 that a n = γ 1 2 n + γ 2 n2 n + γ n 2 2 n for some constants γ 1, γ 2, γ. By substituting n = 0, 1, 2 into this equation, we obtain the linear system γ 1 = 5, 2γ 1 + 2γ 2 + 2γ = 4 and 4γ 1 + 8γ 2 + 16γ = 88. The solution is γ 1 = 5, c 2 = 1/2, c = 1/2, and therefore a n = 5 2 n + n 2 n 1 + 1 n 2 2 n 1 for n = 0, 1, 2,,.... 8.2.46 Suppose that there are two goats on an island initially. The number of goats on the island doubles every year by natural reproduction, and some goats are either added or removed each year. a) Construct a recurrence relation for number of goats on the island at the start of the nth year, assuming that during each year an extra 100 goats are put on the island. 5

b) Solve the recurrence relation from part (a) to find the number of goats on the island at the start of the nth year. c) Construct a recurrence relation for number of goats on the island at the start of the nth year, assuming that n goats are removed during the nth year for each n. d) Solve the recurrence relation in part (c) to find the number of goats on the island at the start of the nth year. a) Let G n denote the number of goats on the island at the start of the nth year. The recurrence is G n = 2G n 1 + 100 for n = 1, 2,.... b) A particular solution to his inhomogenous linear recurrence is 100 (2 n 1). By Theorem 5 on page 521, the solution must have the form G n = 100(2 n 1) + γ2 n. Since G 0 = 2, we see that γ = 2, and hence the number of goats equals G n = 100(2 n 1) + 2 n+1 for n = 0, 1, 2,,.... c) The recurrence is G n = 2G n 1 n for n = 1, 2,..., d) We observe that the recurrence gives the sequence 2,, 4, 5, 6,.... Using mathematical induction, we easily prove that indeed G n = n + 2 for n = 0, 1, 2,,.... 8.4.6** Find a closed form for the generating function for the sequence {a n } where a) a n = 1 for all n = 0, 1, 2,... b) a n = 2 n for n = 1, 2,, 4,... and a 0 = 0 c) a n = n 1 for n = 0, 1, 2,... d) a n = 1/(n + 1)! for 0, 1, 2,... e) a n = ( n 2) for n = 0, 1, 2,..., f) a n = ( 10 n+1) for n = 0, 1, 2,... The following generating functions represent the desired sequences: a) 1/(x 1). b) 2x/(1 2x) 6

c) (2x 1)/(1 x) 2 d) (e x 1)/x. e) x 2 /(1 x) f) ((x + 1) 10 1)/x 8.4.8 For each of these generating functions, provide a closed formula for the sequence it determines. a) (x 2 + 1) b) (x 1) c) 1/(1 2x 2 ) d) x 2 /(1 x) e) x 1 + (1/(1 x)) f) (1 + x )/(1 + x) g) x/(1 + x + x 2 ) h) e x2 1 a) ( n/2) if n is even, and 0 if n is odd b) ( ) n( ) n c) 2 n/2 if n is even, and 0 if n is odd d) ( ) n e) 0 for n = 0, 4 for n = 1, and n for n 2. f) 1 for n = 0, and ( 1) n n for n 1. g) 0 if n 0 (mod ), 1 if n 1 (mod ), 1 if n 2 (mod ). h) 2 n/2 /(n/2)! if n is even and positive, and 0 otherwise 8.4.14 Use generating functions to determine the number of different ways 12 identical action figures can be given to five children so that each child receives at most three action figures. This is the coefficient of x 12 in (1 + x + x 2 + x ) 5. It is found to be 5. So, there are 5 ways of distributing the 12 action figures. 8.4.20 What is the generating function for the sequence {c k }, where c k represents the number of ways to make change for k pesos using bills worth 10 pesos, 20 pesos, 50 pesos and 100 pesos? 7

The generating function for making change with these bills is x k = k=0 1 (1 x 10 )(1 x 20 )(1 x 50 )(1 x 100 ) 8.4.22 Give a combinatorial interpretation of the coefficient of x 6 in the expansion (1 + x + x 2 + x + ) n. Use this interpretation to find this number. This is the number of ways of giving n action figures to six children. While the action figures are indistinguishable, the children are very precious and thus we consider them to be distinguishable. More abstractly, that coefficient counts the n-combinations of a set of 6 elements with repetition allowed. The number equals ( ) n + 5. 6 8.4.6 Use generating functions to solve the recurrence relation a k = a k 1 + 2a k 2 + 2 k with initial conditions a 0 = 4 and a 1 = 12. From the initial conditions and the recurrence relation, we find that the generating function G(x) = k=0 a kx k satisfies the identity G(x) 4 12x = x(g(x) 4) + 2x 2 G(x) + We solve this equation for G(x) to find 1 1 2x 1 2x. G(x) = 4 (1 x 2 ) (1 2x) 2 (1 + x) = 4 + 12x + 24x 2 + 56x + 120x 4 + 8