This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 2 n for n >= 2 Induction: Base Case: Induction Hypothesis: T(n/2) <= c(n/2) log 2 (n/2) A better mergesort (?) • Divide into 3 subarrays and recursively sort • Apply 3way merge What is the recurrence? Unroll recurrence for T(n) = 3T(n/3) + dn T(n) = aT(n/b) + f(n) T(n) = T(n/2) + cn Where does this recurrence arise? Solving the recurrence exactly T(n) = 4T(n/2) + cn T(n) = 2T(n/2) + n 2 T(n) = 2T(n/2) + n 1/2 Recurrences • Three basic behaviors – Dominated by initial case – Dominated by base case – All cases equal – we care about the depth...
View
Full Document
 Fall '06
 RichardAnderson
 Algorithms, Recursion, Sort, Recurrence relation, Divide and conquer algorithm, recurrence

Click to edit the document details