*Final Exam Review*** **

Section 11.2 # 6

- Howmany weighings of a balance scale are needed to find a lighter counterfeit coin among four coins? Describe an algorithm to find the lighter coin using this number of weighings.

Section 11.2 #8

**∗****8. **How many weighings of a balance scale are needed to find a counterfeit coin among eight coins if the counterfeit coin is either heavier or lighter than the others?

Describe an algorithm to find the counterfeit coin using this number of weighings.

Section 11.2 # 12

∗12. Find the least number of comparisons needed to sort five elements and devise an algorithm that sorts these elements using this number of comparisons.

11.2 # 38 Suppose that the first four moves of a tic-tac-toe game are as shown. Does the first player

(whose moves are marked by Xs) have a strategy that will always win?

Section 8.1 #2a

Find a recurrence relation for the number of permutations of a set with *n *elements.

Section 8.1 #8

- Find a recurrence relation for the number of bit strings of length
*n*that contain three consecutive 0s.

- What are the initial conditions?

**c)**How many bit strings of length seven contain three consecutive 0s?

Section 8.1 #14

- Find a recurrence relation for the number of ternary strings of length
*n*that contain two consecutive 0’s.

- What are the initial conditions?

**c)**How many ternary strings of length six contain two consecutive 0s?

Section 8.1 #28

Show that the Fibonacci numbers satisfy the

recurrence relation *f** _{n}* = 5

*f*

_{n}_{−4 }+ 3

*f*

_{n}_{−5 }for

*n*= 5

*,*6

*,*7

*, . . . ,*together with the initial conditions

*f*

_{0}= 0,

*f*

_{1}= 1,

*f*

_{2}= 1,

*f*

_{3}= 2, and

*f*

_{4}= 3 Use this recurrence relation to show that

*f*

_{5n}is divisible by 5, for

*n*= 1

*,*2

*,*3

*, . . . .*

Section 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 two previous years.

**a)**Find a recurrence relation for {*L*}, where_{n}*L*is the number of lobsters caught in year_{n}*n*, under the assumption for this model.

** **

**b)**Find*L*if 100,000 lobsters were caught in year 1 and 300,000 were caught in year 2._{n}

**8.3 #14.** Suppose that there are *n *= 2* ^{k}* teams in an elimination tournament, where there are

*n/*2 games in the first round, with the

*n/*2 = 2

^{k}^{−1 }winners playing in the second round, and so on. Develop a recurrence relation for the number of rounds in the tournament.

If there is only one team, then no rounds are needed, so the base case is R(l) = 0. Since it takes one round to cut the number of teams in half, we have *R(n) *= 1 + *R(n/2).*

8.3 #15. How many rounds are in the elimination tournament described in Exercise 14 when there are 32 teams?

8.3 #16. Solve the recurrence relation for the number of rounds in the tournament described in Exercise 14.

8.4 #2**. **Find the generating function for the finite sequence 1, 4, 16, 64, 256.

5.1 #6 Prove that 1 · 1! + 2 · 2!+· · ·+*n *· *n*! = *(n *+ 1*)*! – 1 whenever *n *is a positive integer.

5.1 #18 Let *P(n) *be the statement that *n*! *< n** ^{n}*, where

*n*is an integer greater than 1.

**a)**What is the statement*P(*2*)*?**b)**Show that*P(*2*)*is true, completing the basis step of the proof.**c)**What is the inductive hypothesis?**d)**What do you need to prove in the inductive step?

5.1 #18

**e)**Complete the inductive step.

**f ) **Explain why these steps show that this inequality is true whenever *n *is an

integer greater than 1.

5.2 #4 Let *P(n) *be the statement that a postage of *n *cents can be formed using just 4-cent stamps and 7-cent stamps. The parts of this exercise outline a strong induction proof that *P(n) *is true for *n *≥ 18.

**a)**Show statements*P(*18*)*,*P(*19*)*,*P(*20*)*, and*P(*21*)*are true, completing the basis step of the proof.**b)**What is the inductive hypothesis of the proof?

** **

**c)**What do you need to prove in the inductive step?**d)**Complete the inductive step for*k*≥ 21.**e)**Explain why these steps show that this statement is true whenever*n*≥ 18.

5.2 #12 Use strong induction to show that every positive integer *n *can be

written as a sum of distinct powers of two, that is, as a sum of a subset of the integers 2^{0} =1, 2^{1} =2, 2^{2} =4, and so on. [*Hint: *For the inductive step, separately consider the case where *k *+ 1 is even and where it is odd. When it is even, note that *(k *+ 1*)/*2 is an integer.]