Do the following exercises.
1. This exercise is similar to Exercise 2 on p.12 of your text. Instead write an algorithm
that determines if a list of four numbers are in ascending order. Remember that an
input class is distinguished by the common number of comparisons required to process
its members.
2. This exercise is like Exercise 2 on p. 17 of your text. Instead of a 5-sided die, you are
working with 7-sided dice, each die has numbers 1 through 7.
3. Do the following exercises. Show your work.
a. Do Exercises 7.d on p. 19 of your text,.
b. Do Exercises 7.f on p. 19 of your text,.
4. Do the following exercise that is similar to Exercise 1. on p. 22 of your text. Use the
following functions instead.
$3n$, $5^n$, $n^2 + 2n$, $n - 2n^2 + n^2$, $5^{n+1}$, $\lg n + \lg(n^2)$, $2n^2 - 4$, $n!$, $(3/2)^n$, $n^{12}$, $(\lg n)^2$, $9n^2$,
$n \lg n$, $6n^2$, 103,
5. Do Exercise 2.g on p. 23 of your text, and the following problem as well. Supply
proofs of your answers.
$f(n) = 3n^3 - 7n$, $g(n) = 6n^2$
6. Show that the following are true.
a. $2^n = \Theta(2^{n+1})$
b. $5^n = \Theta(5^{n-1} + 5n)$