Lecture 30 CSE 331 Nov 13, 2009

advertisement
Lecture 30
CSE 331
Nov 13, 2009
To be strictly enforced
For the rest of the semester on Fridays
SUBMIT
your
HOMEWORKS
by
1:10 PM
At the end of the lecture
Graded HW 7 and HW 9
On Jaynee’s order
Reminder: Resignation deadline is today
Divide and Conquer
Divide up the problem into at least two sub-problems
Recursively solve the sub-problems
“Patch up” the solutions to the sub-problems for the final solution
Improvements on a smaller scale
Greedy algorithms: exponential  poly time
Divide and Conquer: O(n2)  asymptotically smaller running time
Multiplying two numbers
Given two numbers a and b as binary
a=(an-1,..,a0) and b = (bn-1,…,b0)
Compute c = a x b
Running time
of primary
school
algorithm?
To be strictly enforced
For the rest of the semester on Fridays
SUBMIT
your
HOMEWORKS
by
1:10 PM
Download