This preview shows pages 1–16. Sign up to view the full content.
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: return a b a 1 = a n1 ,,a [n/2] and a = a [n/2]1 ,, a Compute b 1 and b from b Mult ( a , b ) Let p = Mult ( x , y ), D = Mult ( a 1 , b 1 ), E = Mult ( a , b ) T(1) c T(n) 3T(n/2) + cn O(n log 3 ) = O(n 1.59 ) run time O(n log 3 ) = O(n 1.59 ) run time (Old) Reading Assignment Sec 5.2 of [KT] Rankings How close are two rankings? Rest of todays agenda Formal problem: Counting inversions Divide and Conquer algorithm Divide and Conquer Divide up the problem into at least two subproblems Recursively solve the subproblems Patch up the solutions to the subproblems for the final solution Solve all subproblems: Mergesort Solve some subproblems: Multiplication Solve stronger subproblems: Inversions...
View
Full
Document
This note was uploaded on 12/11/2011 for the course CSE 331 taught by Professor Rudra during the Fall '11 term at SUNY Buffalo.
 Fall '11
 RUDRA

Click to edit the document details