Homework 4 for CMSC 351 - Recurrence Relations - Prof. Clyde P. Kruskal, Assignments of Algorithms and Programming

The fourth homework assignment for the computer science course cmsc 351, focused on recurrence relations. The assignment, given by professor clyde kruskal, includes four problems. Students are required to use the iteration method and mathematical induction to solve recurrences, as well as use constructive induction to find a constant bound.

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-kx5-1
koofers-user-kx5-1 🇺🇸

8 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Summer 2008 CMSC 351: Homework 4 Clyde Kruskal
Due at the start of class Wednesday, June 18, 2008.
Problem 1. Consider the following recurrence, defined for na power of 5:
T(n) = (19 if n= 1
3T(n/5) + n4 otherwise
(a) Solve the recurrence exactly using the iteration method. Simplify as much as
possible.
(b) Use mathematical induction to verify your solution.
Problem 2. Use the formulas derived in class to obtain exact solutions to the following
two recurrences.
(a) Let nbe a power of 2.
T(n) = (4 if n= 1
5T(n/2) + 3n2otherwise
(b) Let nbe a power of 4.
T(n) = (3 if n= 1
2T(n/4) + 4n+ 1 otherwise
Problem 3. Consider the following recurrence.
T(n) = (0 if n= 0
T(n/2) + T(n/4) + 3notherwise
Use constructive induction to find a constant csuch that T(n)cn.
Problem 4. Do Problem 4-2 on page 85 of CLRS.

Partial preview of the text

Download Homework 4 for CMSC 351 - Recurrence Relations - Prof. Clyde P. Kruskal and more Assignments Algorithms and Programming in PDF only on Docsity!

Summer 2008 CMSC 351: Homework 4 Clyde Kruskal

Due at the start of class Wednesday, June 18, 2008.

Problem 1. Consider the following recurrence, defined for n a power of 5:

T (n) =

{ 19 if n = 1 3 T (n/5) + n − 4 otherwise

(a) Solve the recurrence exactly using the iteration method. Simplify as much as possible. (b) Use mathematical induction to verify your solution.

Problem 2. Use the formulas derived in class to obtain exact solutions to the following two recurrences.

(a) Let n be a power of 2.

T (n) =

{ 4 if n = 1 5 T (n/2) + 3n^2 otherwise

(b) Let n be a power of 4.

T (n) =

{ 3 if n = 1 2 T (n/4) + 4n + 1 otherwise

Problem 3. Consider the following recurrence.

T (n) =

{ 0 if n = 0 T (⌊n/ 2 ⌋) + T (⌊n/ 4 ⌋) + 3n otherwise

Use constructive induction to find a constant c such that T (n) ≤ cn.

Problem 4. Do Problem 4-2 on page 85 of CLRS.