
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Algorithms and Abstract Data Types; Subject: Computer Science; University: University of California-Santa Cruz; Term: Unknown 2009;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Consider the function T ( n )defined by the recurrence formula
T n n n
n T n
a. (1 Point) Use the iteration method to write a summation formula for T ( n ).
b. (1 Point) Use the summation in (a) to show that T ( n )= O ( n )
c. (1 Point) Use the Master Theorem to show that T ( n )=Θ( n )
Use the Master theorem to find asymptotic solutions to the following recurrences.
a. (1 Point) T ( n )= 7 T ( n / 4 )+ n
b. (1 Point)
2 T ( n )= 9 T ( n / 3 )+ n
c. (1 Point)
2 T ( n )= 6 T ( n / 5 )+ n
d. (1 Point) T ( n )= 6 T ( n / 5 )+ n log( n )
e. (1 Point)
2 T ( n )= 7 T ( n / 2 )+ n
f. (1 Point) (Note: your answer will depend on the parameter a .)
2 S ( n )= aS ( n / 4 )+ n
The recurrence describes the running time of an algorithm A. A competing
algorithm B has a running time of. What is the largest integer value for a such
that B is asymptotically faster than A?
2 T ( n )= 7 T ( n / 2 )+ n 2 S ( n )= aS ( n / 4 )+ n
Let G be an acyclic graph with n vertices, m edges, and k connected components. Show that
m = n − k. (Hint: use the fact that| E ( T )|= | V ( T )|− 1 for any tree T , from the induction handout.)
Show that any connected graph G satisfies E ( G ) ≥ V ( G ) − 1. (Hint: use induction on the number
of vertices.)
Figure 22.3, using vertex u as the source.
r s t u
v w x y
1