Notes on Problems for Quiz 6 (11/7/97) from Epp:

8.1: 16, 18, 20, 24, 42, 45, 49, 50

8.2: 4, 6, 12, 25, 27, 41, 42

8.3: 8, 12, 14, 20, 23, 25

8.4: 2, 3, 14, 21 (not on Quiz 6)


Problem 8.1(16):

(1) Divide the expression for C_k by the expression for C_(k-1) and do the algebra to get (4k-2)/(k+1).

 

 


Problem 8.1(18)

(1) For one disc there are two moves, A-->B, B-->C, so a_1 = 2. For two discs the moves A-->B, B-->C, A-->B, C-->B, B-->A, B-->C, A-->B, B-->C are required. Thus a_2 = 8. The moves in boldface type are the moves of the larger of the two discs. Note that a_2 = 3 a_1 + 2. This is the general rule:

a_n = 3a_(n-1) + 2.


Problem 8.1(20)

(1) Suppose the poles are labeled A, B, C, and D. Part (a) is easy because there are more poles than discs. The answers are 1, 3, and 5 respectively. For part (b) the answer is 9. The general answer may be tricky, but a subcase of the general case is easily understood if we agree on a strategy. Suppose we first move the top p discs from A to B using pegs C and D in s_p moves. Next we move the remaining q discs (p+q = n) using m_q, the number of moves for the three-peg towers of Hanoi using A, C, D. The recursion is s_(p,q) = 2s_p + m_q for a fixed p and q. We want to choose the best split, p vs. q, for each n=p+q to get s_n. (optimal with respect to this splitting strategy).The following table is one way to do the calculations:

   q  1  2  3  4  5 6 
 p s_p\m_q  1  3  7  15  31 63 
 1  (1)  3  5  9  17  33  65
 2  (3)  7  9  13  21  37  
 3  (5)  11  13  17  25    
 4  (9)  19  21  25      
 5  (13)  27  29        
 6  (17) 35          

The numbers in the 6 x 6 submatrix are in boldface and the entry in row p and column q is s_(p,q)= 2s_p + m_q. The entries in parentheses are the optimal moves under this strategy. For example, the entry (17) is the minimum of the entries 28, 21, 17, 21, 33 going diagonally upward to the right along (p,q) pairs with p+q = 6. Thus s_6 = 17 under the (p,q)-splitting strategy. You should try to compute s_7.


Problem 8.1(24):

(1) For (a) factor the left-hand side (F_k)^2 - (F_(k-1))^2 as

(F_k - F_(k-1))(F_k + F_(k-1))

and use the basic recursion for F_(k+1) on the second term. For part (b), use the basic recursion for F_(k+1) where that term occurs on the left-hand side. For (c), proceed like in (a). For (d), start by removing the term F_(n+2) using the basic recursion. Group terms involving F_(n+1), factor out F_(n+1) and see if you can get -F_(n+1) F_(n-1) + (F_n)^2 which equals -(-1)^(n-1) by the induction hypothesis. A formal induction proof based on these calculations will be given in class.


Problem 8.1(42): The number of partitions of n things into k blocks (or cells) is S(n,k) (Stirling number of the second kind). The recursion for these numbers is S(n,k) = S(n-1,k-1) + kS(n-1,k). Make a table of these big enough to include all of the form S(5,k) for 1<=k<=5. Add up all numbers of the form S(5,k) to get the answer. The answer is 52. Be sure you can compute the next few rows of your table!


Problem 8.1(45)

(1) The solution given in the text, page 757 is the way to go...


Problem 8.1(49)

(1) The best way to view this problem is to use "cycle notation" for permutations. In this notation, each permutation is written as a "product" of "cycles." The permutation f = (1,3,5,2)(4,6,8)(7) has f(1)=3, f(3)=5, f(5)=2, f(2)=1, f(4)=6, f(6)=8, f(8)=4, f(7)=7. The cycle (1,3,5,2) can also be written (3,5,2,1) or (5,2,1,3) or (2,1,3,5). All of these define the same thing: f(1)=3, f(3)=5, f(5)=2, f(2)=1. The "length" of a cycle is the number of integers in it. Thus (1,3,5,2) has length 4. A cycle of length 1, such as (7), defines a "fixed point," in this case f(7)=7. A derangement is a permutation that has no fixed points (every element is moved away from its natural position, using the terminology of the text). In other words, in cycle notation, all cycles of a derangement have length 2 or greater. For part (a), d_1 = 0, d_2 = 1 ((1,2), in cycle notation), and d_3 = 2 ((1,2,3) and (1,3,2) in cycle notation). Here is the way to construct all derangements on S={1,2,3, ... ,n}. First form a cycle (1,k) with some k>1 and then form a derangement in cycle notation on {2,3, ... , k-1, k+1, ... , n}. There are exactly (n-1)d_(n-2) ways to do this.This gives all derangements on S with 1 in a cycle of length 2. This isn't all derangements on S however! To get the rest, form all derangements on S-{1} in cycle notation. For each cycle of length t, such as (3,5,2) for t=3, insert 1 in all possible ways to make a cycle of length t+1 (in this case (1,3,5,2), (3,1,5,2), (3,5,1,2) -- but not (3,5,2,1) since this is the same as (1,3,5,2)). There are t such "insertion points" in a cycle of length t for a total of n-1 insertion points for each derangement on S-{1}. Thus there are a total of (n-1)d_(n-1) derangements on S constructed by this second method. This latter method gives all derangements on S where 1 is a part of a cycle of length greater than 2. Combining the two constructions gives:

d_n = (n-1)d_(n-2) + (n-1)d_(n-1) = (n-1) (d_(n-2) + d_(n-1)).

Given d_1 = 0, d_2 = 1, we find d_3 = 2(0+1) = 2, d_4 = 3(1+2)=9, etc. You should be able to list all derangements on {1,2,3,4} in cycle notation following the method discussed above.


Problem 8.1(50)

(1) Look at the case of six symbols a, b, c, d, e, f. First choose the "top-level" parentheses, such as (a,b)(c,d,e,f). There are now P_2P_4 ways to finish the job. If we had chosen (a,b,c)(d,e,f) for the top-level, then there would be P_3P_3 ways to finish the job, etc. The sum in problem 50 on page 441 represents all possible ways of forming the top level parentheses and then finishing the job (the product P_kP_(n-k)). We will discuss the formal induction proof in class.



Problem 8.2(4)

(1) b_0 = 1, b_1 = 1/2, b_2 = 1/3, etc. Make a guess as to the general formula. Be prepared to prove your guess by induction (Exercise 25).


Problem 8.2(6)

(1) One way to get a feeling for this type of problem is to compute terms, but not do the arithmetic, to see if you can get an idea. In this case d_1 = 2, d_2 = 2x2+3, d_3=2(2x2+3)+3=2^3+3(2+1), d_4=2(2^3+3(2+1))+3=2^4+3(2^2+2+1). It looks like d_n = 2^n + 3(2^(n-2)+2^(n-3)+ ... + 2 + 1) = 2^n + 3(2^(n-1) - 1). Does this check with the recursion d_n = 2d_(n-1) + 3, starting with d_1 = 2? Be prepared to give an induction proof (Exercise 27).

(2) Suppose 2 is replace by a constant a and 3 by a constant b. What can you say about solving the equation d_n = a d_(n-1) + b with initial condition d_1 = c?


Problem 8.2(12)

(1) u_2 - u_1 = 2^2, u_3 - u_2 = 3^2, u_4 - u_3 = 4^2, etc. You learned in calculus or in CSE20 (Epp page 204 problem 9) that

1^2 + 2^2 + 3^2 + ... + k^2 =k(k+1)(2k+1)/6.

Put these facts together to get formula for u_k.


Problem 8.2(25)

(1) We will do 27 which is very similar. This one will be done in class.


Problem 8.2(27)

(1) We wish to prove that if d_k = 2 d_(k-1) + 3 for k>1 and d_1 = 2, then

(*) d_k = 2^k + 3(2^(k-1) - 1) for all k>=1.

Proof: The proof is by induction.This checks for k=1. For k=2, d_2 = 2^2 + 3(2^1 - 1) = 7. This checks with the value computed from the recursion d_k = 2 d_(k-1) + 3, since d_2=2 d_1 + 3 = 4 + 3 = 7.

We now assume that the term d_(k-1) is correctly computed by the closed form expression (*) with k replaced by k-1. Precisely, our induction hypothesis is that

d_(k-1) = 2^(k-1) + 3(2^(k-2) - 1) for all k>1.

Combining this with the recursion d_k = 2 d_(k-1) + 3 we have

d_k = 2 d_(k-1) + 3 = 2(2^(k-1) + 3(2^(k-2)-1)) + 3 = 2^k +3(2^(k-1)-2) +3.

Note that 3(2^(k-1)-2) + 3 = 3(2^(k-1) - 2 +1) = 3(2^(k-1) - 1). Thus, we have

d_k = 2^k + 3(2^(k-1) - 1)

which was to be shown.

NOTE: We really only needed to verify (*) for k=1 to start the induction, but it is always a good idea to check a few consecutive base cases (k=1, k=2, in this proof).


Problem 8.2(41 and 42)

(1) 41 is false, 42 is true.


Problem 8.3(2)

(1) b and f are, the rest are not. Be prepared to explain why.


Problem 8.3(12)

(1) Writing out a few terms we get 0, 2, 0, 2x9, 0, 2x9^2, 0, 2x9^3, etc. This recurrence can be written e_k = 0 e_(k-1) + 9 e_(k-2) and is thus a linear recurrence with constant coefficients (0 and 9 are the A and B of the general discussion). The characteristic equation is t^2 - 0 t - 9 = 0 or (t-3)(t+3) = 0. Thus, r = -3 and s = +3 are the two roots of the charateristic equation. All solution to this recurrence are of the form C(-3)^n + D(+3)^n, depending on the initial conditions. For this problem the initial conditions are e_0 = 0 and e_1 = 2. So we get C=-1/3 and D=+1/3.


Problem 8.3(14)

(1) Another linear recurrence with constant coefficients. The characteristic equation is t^2 - 4t- 4= 0 which has two distinct roots 2 + 2^.5, 2 - 2^.5.


Problem 8.3(20)

(1) Hint: Compute the determinant of

 r^k  r^l
 kr^k lr^l 

 and remember your highschool algebra.


Problem 8.3(23)

(1) This is a linear recurrence with constant coefficients having characteristic equation t^2 - 2t + 5. The roots are 1+2i and 1-2i. This means that b_k=C(1+2i)^k + D(1-2i)^k, where C and D are chosen according to the initial conditions b_0 = 1, b_1 = 2. You should find C and D and compute a few terms. It is remarkable that complex numbers enter in to computing a sequence of integers.


Problem 8.3(25)

(1) This solution follows almost exactly the Gambler's Ruin discussion that starts with Example 8.3.6 on page 436. We will discuss the Gambler's Ruin problem in class and illustrate it with this exercise rather than with Example 8.3.6.