Sunteți pe pagina 1din 8

MATH 260 2002/2003

Assignment 4
Due January 8, 2003
Late penalty: 5% for each school day.

1. §4.6 #10. A croissant shop has plain croissants, cherry croissants, chocolate croissants, almond crois-
sants, apple croissants and broccoli croissants. How many ways are there to choose

(a) (1 point) a dozen croissants?


¡ ¢
Solution: 12+6−1
12 = 6188
(b) (1 point) three dozen croissants?
¡ ¢
Solution: 36+6−1
36 = 749 398
(c) (2 points) two dozen croissants with at least two of each kind?
¡ ¢
Solution: To buy two from of each kind then buy the other twelve, there are 12+6−1
12 = 6188
ways.
(d) (2 points)two dozen croissants with no more than two broccoli croissants?
¡ ¢ ¡ ¢
Solution: To buy two broccoli croissants: 22+5−1 ; To buy one broccoli croissants: 23+5−1 ; To
¡24+5−1¢ 22 ¡22+5−1¢ ¡23+5−1¢ ¡24+5−1¢ 23
buy no broccoli croissants: 24 . The answer is 22 + 23 + 24 = 52 975.
(e) (2 points)two dozen croissants with at least five chocolate croissants and at least three almond
croissants?
¡ ¢
Solution: To buy five chocolate croissants and three almond croissants first, there are 16+6−1
16 =
20 349 ways.
(f) (3 points)two dozen croissants with at least one plain croissant, at least two cherry croissants, at
least three chocolate croissants, at least one almond croissant, at least two apple croissants, and
no more than three broccoli croissants?
¡ ¢
Solution: To buy no broccoli croissants and satisfy all the other conditions, there are 15+5−1
¡14+5−1¢ 15
ways; To buy one broccoli croissants and satisfy all the other conditions, there are ways;
¡13+5−114¢
To buy two broccoli croissants and satisfy all the other conditions, there are ways; To
¡ 13 ¢
buy three broccoli croissants and satisfy all the other conditions, there are 12+5−1 ways. The
¡ ¢ ¡14+5−1¢ ¡13+5−1¢ ¡12+5−1¢ 12
answer is 15+5−1
15 + 14 + 13 + 12 = 11 136. ¤

2. §4.6 #12. (3 points) How many different combinations of pennies, nickels, dimes, quarters, and half
dollars can a piggy ban contain if it has 20 coins in it?
Solution: The number of ways to select 20 coins from five kinds is C(20+5−1, 20) = C(24, 20) = 10 626.
¤

3. §4.6 #16. How many solutions are there to the equation

x1 + x2 + x3 + x4 + x5 + x6 = 29

where xi , i = 1, 2, 3, 4, 5, 6 is a nonnegative integer wuch that

(a) (2 points) xi > 1 for i = 1, 2, 3, 4, 5, 6?


(b) (2 points) x1 ≥ 1, x2 ≥ 2, x3 ≥ 3, x4 ≥ 4, x5 ≥ 5, and x6 ≥ 6?
(c) (2 points) x1 ≤ 5?
(d) (2 points) x1 < 8 and x2 > 8?

Solution:

1
(a) Since xi ≥ 2, we let yi = xi − 2, yi ≥ 0.

x1 + x2 + x3 + x4 + x5 + x6 = 29
(y1 + 2) + (y2 + 2) + (y3 + 2) + (y4 + 2) + (y5 + 2) + (y6 + 2) = 29
y1 + y2 + y3 + y4 + y5 + y6 = 17

There are C(17 + 6 − 1, 17) = 26 334 solutions.


(b) Let y1 = x1 − 1, y2 = x2 − 2, y3 = x3 − 3, y4 = x4 − 4, y5 = x5 − 5, y6 = x6 − 6.

x1 + x2 + x3 + x4 + x5 + x6 = 29
(y1 + 1) + (y2 + 2) + (y3 + 3) + (y4 + 4) + (y5 + 5) + (y6 + 6) = 29
y1 + y2 + y3 + y4 + y5 + y6 = 8

There are C(8 + 6 − 1, 8) = 1287 solutions.


(c) x1 + x2 + x3 + x4 + x5 + x6 = 29 has C (29 + 6 − 1, 29) = C (34, 29) = 278 256 solutions. Among
them, C (23 + 6 − 1, 23) = C (28, 23) = 98 280 solutions have x1 ≥ 6. Therefore, there are
C (34, 29) − C (28, 23) = 179 976 solutions have x1 ≤ 5.
(d) First, we count how many solutions are there such that x2 ≥ 9. Let y2 = x2 − 9, we find that there
are C(20+6−1, 20) = C(25, 20) such solutions. Then we count how many solutions are there such
that x1 ≥ 8 and x2 ≥ 9. Let y1 = x1 − 8 and y2 = x2 − 9, there are C(12 + 6 − 1, 12) = C(17, 12)
such solutions. Therefore there are C(25, 20) − C(17, 12) = 46 942 solutions such that x1 < 8 and
x2 > 8. ¤

4. §4.6 #22. (4 points) How many positive integers less than 1,000,000 have exactly one digit equal to 9
and have a sum of digits equal to 13?
Solution: Let the digits be x1 x2 x3 x4 x5 x6 . Suppose that x1 = 9, then x2 + x3 + x4 + x5 + x6 = 4. There
are C (4 + 5 − 1, 4) = C (8, 4) = 70 solutions to that equation. So there are 70 such numbers with the
first digit being 9. It is the same for the other digits. Therefore the answer is 6 × 70 = 420. ¤

5. §4.6 #28. (3 points) How many different strings can be made from the letters in AARDV ARK, using
all the letters, if all three As must be consecutive?
Solution: Since there are two Rs, one D, one V , one K and three As in one block (therefore the As
will be counted as one object), there are

6!
= 360
2!1!1!1!1!
such strings. ¤

6. §4.6 #38. (3 points) In bridge, the 52 cards of a standard deck are dealt to four players. How many
different ways are there to deal bridge hands to four players.
Solution: Notice that the players are distinct. (In bridge, they are called East, South, West and North.)
There are C (52, 13) ways to choose a hand for East, then C (39, 13) ways to choose a hand for South,
C (26, 13) ways to choose a hand for West and C (13, 13) ways to choose a hand for North. The number
of ways to deal the four hands is
52! 39! 26! 13! 52!
· · · = = 53 644 737 765 488 792 839 237 440 000
13!39! 13!26! 13!13! 13!0! 13! · 13! · 13! · 13!

7. §4.6 #40. In how many ways can a dozen books be placed on four distinguishable shelves

(a) (2 points) if the books are indistinguishable copies of the same title?
Solution: We can use 12 dots to represent the books and 3 bars to separate them into four groups
(to be placed on the four shelves). There are C (12 + 3, 3) = C (15, 3) = 455 such arrangements.

2
(b) (4 points) if no two books are the same, and the positions of the books on the shelves matter?
(Hint: Break this into 12 tasks, placing each book separately. Start with the sequence 1,2,3,4 to
represent the shelves. Represent the books by bi , i = 1, 2, ..., 12. Place b1 to the right of one of
the terms in 1, 2, 3, 4. Then successively place b2 , b3 , ..., and b12 .)
Solution: There are 4 ways to place b1 , 5 ways to place b2 , ..., 15 ways to place b12 . The answer is

4 × 5 × 6 × 7 × 8 × 9 × 10 × 11 × 12 × 13 × 14 × 15 = 217 945 728 000

8. §5.1 #10. An employee joined a company in 1987 with a starting salary of $50,000. Every year this
employee receives a raise of $1000 plus 5% of the salary of the previous year.

(a) (2 points) Set up a recurrence relation for the salary of this employee n years after 1987.
(b) (2 points) What is the salary of this employee in 1995?
(c) (4 points) Find an explicit formula for the salary of this employee n years after 1987.

Solution:

(a) an = an−1 + 0.05an−1 + 1000 = 1.05an−1 + 1000 for all n ≥ 1 and a0 = 50, 000
(b) The salary of this employee in 1995 is

a8 = 1.05a7 + 1000
= 1.05 (1.05a6 + 1000) + 1000 = 1. 102 5a6 + 2050
= 1. 102 5 (1.05a5 + 1000) + 2050 = 1. 157 6a5 + 3152. 5
= 1. 157 6 (1.05a4 + 1000) + 3152. 5 = 1. 215 5a4 + 4310. 1
= 1. 215 5 (1.05a3 + 1000) + 4310. 1 = 1. 276 3a3 + 5525. 6
= 1. 276 3 (1.05a2 + 1000) + 5525. 6 = 1. 340 1a2 + 6801. 9
= 1. 340 1 (1.05a1 + 1000) + 6801. 9 = 1. 407 1a1 + 8142.0
= 1. 407 1 (1.05a0 + 1000) + 8142.0 = 1. 407 1 (1.05 × 50000 + 1000) + 8142.0
= 83422.

(c) This is a nonhomogeneous recurrence relation. For the homogeneous recurrence relation

an = 1.05an−1
(h) (p)
the general solution is an = k1 (1.05)n . Since F (n) = 1000, we guess an = q0 . We have

q0 = 1.05q0 + 1000.

Therefore q0 = −20000. The general solution for the nonhomogeneous recurrence relation is
n
an = a(h) (p)
n + an = k1 (1.05) − 20000.

When n = 0, this is
a0 = k1 − 20000 = 50000.
So k1 = 70000. The formula is
n
an = 70000 (1.05) − 20000.

(When n = 8, this formula gives a8 = 70000 (1.05)8 − 20000 = 83422.) ¤

9. §5.1 #22.

3
(a) (3 points) Find a recurrence relation for the number of ways to climb n stairs if the person climbing
the stairs can take one, two, or three stairs at a time.
Solution: Since the last step one can take one, two or three stairs, an = an−1 + an−2 + an−3 .
(b) (1 point) What are the initial conditions?
Solution: a0 = a1 = 1, a2 = 2. Or, a1 = 1, a2 = 2 and a3 = 4.
(c) (1 point) How many ways can this person climb a flight of eight stairs?
Solution:

a3 = a0 + a1 + a2 =1+1+2=4
a4 = a1 + a2 + a3 =1+2+4=7
a5 = a2 + a3 + a4 = 2 + 4 + 7 = 13
a6 = a3 + a4 + a5 = 4 + 7 + 13 = 24
a7 = a4 + a5 + a6 = 7 + 13 + 24 = 44
a8 = a5 + a6 + a4 = 13 + 24 + 44 = 81

10. §5.1 #38. (6 points) Show that the Fibonacci numbers satisfy the recurrence relation fn = 5fn−4 +
3fn−5 for n = 5, 6, 7, ..., together with the initial conditions f0 = 0, f1 = 1, f2 = 1, f3 = 2, and f4 = 3.
Use this recurrence relation to show that f5n is divisible by 5, for n = 1, 2, 3, ...
Solution: The original definition of the Fibonacci numbers gives fn = fn−1 + fn−2 for all n ≥ 2 and
f0 = 0, f1 = 1. It is straightforward to verify that f2 = 1, f3 = 2, and f4 = 3. Since fn−3 = fn−4 +fn−5 ,
fn−2 = fn−3 + fn−4 , fn−1 = fn−2 + fn−3 , we have

fn = fn−1 + fn−2 = (fn−2 + fn−3 ) + fn−2 = 2fn−2 + fn−3


= 2 (fn−3 + fn−4 ) + fn−3 = 3fn−3 + 2fn−4
= 3 (fn−4 + fn−5 ) + 2fn−4 = 5fn−4 + 3fn−5 .

Next we prove P (n) : f5n is divisible by 5 for all n ≥ 1 by mathematical induction.


Since f5 = f3 + f4 = 5, P (1) is true. We assume that P (n) is true, i.e., f5n = 5k for some integer k.
Then f5(n+1) = f5n+5 = 5f5(n+1)−4 + 3f5(n+1)−5 = 5f5n+1 + 3f5n = 5f5n+1 + 15k = 5 (f5n+1 + 3k)
which is divisible by 5. Therefore P (N + 1) is true. ¤

11. §5.2 #4 (3 points each part) Solve the following recurrence relations toghether with the initial conditions
given.
(a) an = an−1 + 6an−2 for n ≥ 2, a0 = 3, a1 = 6.

(a) Solution: The characteristic equation is

x2 − x − 6 = 0
(x + 2) (x − 3) = 0

The general solution is an = k1 (−2)n + k2 3n . Solving

k1 + k2 = 3, −2k1 + 3k2 = 6

¤
3 12 3 n 12 n
we have k1 = 5 and k2 = 5 . So an = 5 (−2) + 5 3 .

(c) an = 6an−1 − 8an−2 for n ≥ 2, a0 = 4, a1 = 10.

(a) Solution: The characteristic equation is

x2 − 6x + 8 = 0
(x − 2) (x − 4) = 0

4
The general solution is an = k1 2n + k2 4n . Solving
k1 + k2 = 4, 2k1 + 4k2 = 10
we have k1 = 3 and k2 = 1. So an = 3 · 2n + 4n . ¤

(f) an = −6an−1 − 9an−2 for n ≥ 2, a0 = 3, a1 = −3.

(a) Solution: The characteristic equation is

r2 + 6r + 9 = (r + 3)2 .
The root is r = −3 with multiplicity two. The general solution is
n
an = (k1 + k2 n) · (−3)
With the initial conditions, we have
k1 = 3
(k1 + k2 ) (−3) = −3.
n
Solving this system of equations, we have k1 = 3 and k2 = −2. Therefore, an = (3 − 2n) (−3) .¤

(g) an+2 = −4an+1 + 5an for n ≥ 0, a0 = 2, a1 = 8.

(a) Solution: The characteristic equation is


x2 + 4x − 5 = 0
(x + 5) (x − 1) = 0
The general solution is an = k1 (−5)n + k2 1n . Solving
k1 + k2 = 2, −5k1 + k2 = 8
¤
n
we have k1 = −1 and k2 = 3. So an = − (−5) + 3.

12. §5.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 two previous years.

(a) (2 points) Find a recurrence relation for {Ln } , where Ln is the number of lobsters caught in year
n, under the assumption for this model.
Solution:
1 1
Ln = Ln−1 + Ln−2 .
2 2
(b) (3 points) Find Ln if 100, 000 lobsters were caught in year 1 and 300, 000 were caught in year 2.
Solution: The characteristic equation is
1 1
r2 − r − = 0
2 2
1
(2r + 1) (r − 1) = 0
2
¡ ¢n
The roots are r = − 12 , and r = 1. The general solution is an = k1 − 12 + k2 . Considering the
initial conditions, we have
µ ¶
1
− k1 + k2 = 100000
2
1
k1 + k2 = 300000.
4
¡ 1 ¢n 700000
Solving this system of equations, we have k1 = 800000
3 , k2 = 700000
3 and an = 800000
3 −2 + 3 .
¤

5
13. §5.2 #12. (4 points) Find the solution to an = 2an−1 + an−2 − 2an−3 for n = 3, 4, 5, ..., with a0 = 3,
a1 = 6 and a2 = 0.
Solution: The characteristic equation is

r3 − 2r2 − r + 2 = 0
(r − 1) (r − 2) (r + 1) = 0

The roots are r = 1, r = 2 and r = −1. The general solution is

an = k1 + k2 2n + k3 (−1)n .

Considering the initial conditions, we have

k1 + k2 + k3 = 3
k1 + 2k2 − k3 = 6
k1 + 4k2 + k3 = 0

Solving this system of equations, we have k1 = 6, k2 = −1, k3 = −2 and an = 6 − 2n − 2 (−1)n . ¤


14. §5.2 #18. (5 points) Solve the recurrence relation an = 6an−1 − 12an−2 + 8an−3 with with a0 = −5,
a1 = 4, and a2 = 88.
Solution: The characteristic equation is

r3 − 6r2 + 12r − 8 = 0
3
(r − 2) = 0
¡ ¢
The root is r = 2 with multiplicity 3. an = k1 + k2 n + k3 n2 2n . Substitute in the initial conditions,
we have

k1 = −5
2k1 + 2k2 + 2k3 = 4
4k1 + 8k2 + 16k3 = 88
© ª ¡ ¢
The solution is: k1 = −5, k2 = 12 , k3 = 13
2 . Therefore an = −5 + 12 n + 13 2
2 n 2n . ¤

15. §5.2 #26. What is the general form of the particular solution of the linear nonhomogeneous recurrence
relation an = 6an−1 − 12an−2 + 8an−3 + F (n) if

(a) (1 point) F (n) = n2 ?


Solution: We use the notations as in Theorem 6 of 5.2.
t = 2 and s = 1 for F (n) = n2 . The characteristic equation of the homogeneous relation is

r3 − 6r2 + 12r − 8 = 0
(r − 2)3 = 0

The only root is r = 2 with multiplicity three. Since 1 is not a root, the particular solution has
the form
a(p) 2
n = p2 n + p1 n + p0

(b) (1 point) F (n) = 2n ?


Solution: In this case t = 0 and s = 2, which is the root with multiplicity 3. The particular
solution has the form
a(p) 3 n
n = p0 n 2 .

(c) (1 point) F (n) = n2n ?


Solution:
a(p) 3 n
n = n (p1 n + p0 ) 2 .

6
(d) (1 point) F (n) = (−2)n ?
Solution:
n
a(p)
n = p0 (−2) .

(e) (1 point) F (n) = n2 2n ?


Solution: ¡ ¢
a(p)
n =n
3
p2 n2 + p1 n + p0 2n .
(f) (1 point) F (n) = n3 (−2)n ?
Solution: ¡ ¢ n
a(p) 3 2
n = p3 n + p2 n + p1 n + p0 (−2) .

(g) (1 point) F (n) = 3?


Solution:
a(p)
n = p0

16. §5.2 #30. (6 points)

(a) Find all solution s of the recurrence relation an = −5an−1 − 6an−2 + 42 · 4n .


(b) Find the solution of this recurrence relation with a1 = 56 and a2 = 278.

Solution:

(a) The characteristic equation is

r2 + 5r + 6 = 0
(r + 3) (r + 2) = 0

The roots are r = −2 and r = −3. We have


n n
a(h)
n = k1 · (−2) + k2 · (−3)

The particular solution has the form


a(p)
n = q0 · 4
n

Substitute it in the recurrence relation, we have

q0 · 4n = −5 · q0 · 4n−1 − 6 · q0 · 4n−2 + 42 · 4n
16 · q0 = −5 · q0 · 4 − 6 · q0 + 42 · 16
42 · q0 = 42 · 16
q0 = 16
a(p)
n = 16 · 4n

Therefore the general solution is

an = k1 · (−2)n + k2 · (−3)n + 16 · 4n .

(b) Substituting in the initial conditions, we have

−2 · k1 − 3 · k2 + 64 = 56
4 · k1 + 9 · k2 + 256 = 278

The solution is: {k1 = 1, k2 = 2} . Therefore

an = (−2)n + 2 · (−3)n + 16 · 4n .

7
17. §5.2 #34. (6 points) Find all solutions of the recurrence relation an = 7an−1 − 16an−2 + 12an−3 + n4n
with a0 = −2, a1 = 0, and a2 = 5.
Solution: The characteristic equation for the homogeneous recurrence relation is

r3 − 7r2 + 16r − 12 = 0
2
(r − 3) (r − 2) = 0

The roots are r = 3 with multiplicity 1 and r = 2 with multiplicity 2.

a(h) n
n = k1 3 + (k2 + k3 n) 2
n

a(p)
n = (p1 n + p0 ) 4
n

(p1 n + p0 ) 4n = 7 (p1 (n − 1) + p0 ) 4n−1 − 16 (p1 (n − 2) + p0 ) 4n−2 + 12 (p1 (n − 3) + p0 ) 4n−3 + n4n


Divide both sides with 4n−3 , we have

(p1 n + p0 ) 43 = 7 (p1 (n − 1) + p0 ) 42 − 16 (p1 (n − 2) + p0 ) 4 + 12 (p1 (n − 3) + p0 ) + n43


64p1 n + 64p0 = n (60p1 + 64) + 60p0 − 20p1

Comparing the coefficients of n and the constant terms of both sides, we have

64p1 = 60p1 + 64
64p0 = 60p0 − 20p1 .

Solving that system of equations, we have p0 = −80, p1 = 16 and

a(p)
n = (16n − 80) 4n
an = k1 3n + (k2 + k3 n) 2n + (16n − 80) 4n

By letting n = 0, 1, 2, we have

k1 + k2 − 80 = −2
3k1 + 2k2 + 2k3 − 256 = 0
9k1 + 4k2 + 8k3 − 768 = 5
39
and k1 = 61, k2 = 17, k3 = 2 . Therefore
µ ¶
39
an = 61 · 3n + 17 + n 2n + (16n − 80) 4n
2

S-ar putea să vă placă și