Algorithms and Data Structures (INF1, Autumn'05)

Exercise Set 3


In all exercises assume that n ranges over natural numbers and that all the functions are nonnegative.


Exercise 1:

Exercise 2.1 from Algorithms and Data Structures: Design, Correctness and Analysis by Jeffrey H. Kingston.

Exercise 2 (hand-in):

Solve the following recurrence equation.

T(1) = 7
T(n) = 2 + T(n-1)     n>1

Prove that your solution is correct.


Exercise 3:

Solve the following reccurrence equation.

T(0) = 1
T(n) = n.T(n-1)     n>1

Prove that your solution is correct.


Exercise 4:

Exercise 2.5 from Algorithms and Data Structures: Design, Correctness and Analysis by Jeffrey H. Kingston.

Solve the reccurrence equation (you may assume that n = 2k).

Prove that your solution is correct.


Exercise 5:

Exercise 2.11 from Algorithms and Data Structures: Design, Correctness and Analysis by Jeffrey H. Kingston.


Exercise 6:

Prove that
Exercise 7:

Give a simplified big-O notation for the following running times: Exercise 8:

It is true that 2n = Θ(3n)?


Exercise 9:

Prove that if f(n)=O(g(n)) and g(n)=O(h(n)) then also f(n)=O(h(n)).