hw4 - algorithm B has a running time of 2 ) 4 / ( ) ( n n...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMPS 101 Summer 2009 Homework Assignment 4 1. (3 Points) Consider the function ) ( n T defined by the recurrence formula   + < = 3 ) 3 / ( 2 3 1 6 ) ( n n n T n n T a. (1 Point) Use the iteration method to write a summation formula for ) ( n T . b. (1 Point) Use the summation in (a) to show that ) ( ) ( n O n T = c. (1 Point) Use the Master Theorem to show that ) ( ) ( n n T Θ = 2. (6 Points) Use the Master theorem to find asymptotic solutions to the following recurrences. a. (1 Point) n n T n T + = ) 4 / ( 7 ) ( b. (1 Point) 2 ) 3 / ( 9 ) ( n n T n T + = c. (1 Point) 2 ) 5 / ( 6 ) ( n n T n T + = d. (1 Point) ) log( ) 5 / ( 6 ) ( n n n T n T + = e. (1 Point) 2 ) 2 / ( 7 ) ( n n T n T + = f. (1 Point) 2 ) 4 / ( ) ( n n aS n S + = (Note: your answer will depend on the parameter a .) 3. (1 Point) p.75: 4.3-2 The recurrence 2 ) 2 / ( 7 ) ( n n T n T + = describes the running time of an algorithm A . A competing
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: algorithm B has a running time of 2 ) 4 / ( ) ( n n aS n S + = . What is the largest integer value for a such that B is asymptotically faster than A (i.e. such that ) ( n S has an asymptotically slower growth rate than ) ( n T .) ? 4. (1 Points) Let G be an acyclic graph with n vertices, m edges, and k connected components. Show that k n m-= . (Hint: use the fact that 1 | ) ( | | ) ( |-= T V T E for any tree T , from the induction handout.) 5. (1 Point) (Appendix B.4 problem 3) Show that any connected graph G satisfies 1 ) ( ) (- G V G E . (Hint: use induction on the number of edges.)...
View Full Document

This note was uploaded on 12/03/2009 for the course CS CS101 taught by Professor Agoreback during the Spring '09 term at American College of Gastroenterology.

Ask a homework question - tutors are online