1
Review #1 -
chap. 1 - 3
Q1.
Is
2
n+1
= O(
2
n
)?
Is
2
2n
= O(
2
n
)?
Q2.
Let
f(n)
and
g(n)
be asymptotically nonnegative
functions. Use the basic definition of
O
-notation to prove
that
max(f(n),g(n))=O(f(n)+g(n)).
Q3.
Show that for any real constants
a
and
b
with
b>0,
we
have
(n+a)
b
=
θ
(n
b
).
Q4.
Use iteration to solve the recurrence
T(n)=T(n-
a)+T(a)+n,
where
a
≥
1
is a constant.

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*