Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 34 CSE 331 Nov 18, 2011.

Similar presentations


Presentation on theme: "Lecture 34 CSE 331 Nov 18, 2011."— Presentation transcript:

1 Lecture 34 CSE 331 Nov 18, 2011

2 HW 9 due today I will not take any HW after 1:15pm
Q1, Q 2 and Q3 in separate piles I will not take any HW after 1:15pm

3 HW related stuff Solutions to HW 9 at the end of the lecture
Graded HW 8 will be available for pickup form Monday No HW handed out today!

4 Lecture on Monday I’ll be out of town
My student Swapnoneel will cover for me

5 A preview of what I’m up to
List Decoding: The master of disguise Practice talk: 3:15pm, Friday, Commons 9

6 Need volunteers for today/Mon

7 Dividing up P Q R First n/2 points according to the x-coord

8 Recursively find closest pairs
Q R δ = min (blue, green)

9 Pruning out some points
δ Q R > δ > δ > δ δ = min (blue, green)

10 All we have to do now δ R Q S
Figure if a pair in S has distance < δ S δ = min (blue, green)

11 Kickass Property Lemma
If s ≠ s’ in S have d(s,s’) ≤ δ, then s and s’ are within 15 positions of each other in Sy

12 Today’s Agenda Prove the kickass property lemma

13 HW 9 due today I will not take any HW after 1:15pm
Q1, Q 2 and Q3 in separate piles I will not take any HW after 1:15pm

14 Three general techniques
High level view of CSE 331 Problem Statement Problem Definition Three general techniques Algorithm “Implementation” Data Structures Analysis Correctness+Runtime Analysis

15 Greedy Algorithms Natural algorithms
Reduced exponential running time to polynomial

16 Divide and Conquer Recursive algorithmic paradigm
Reduced large polynomial time to smaller polynomial time

17 A new algorithmic technique
Dynamic Programming

18 Dynamic programming vs. Divide & Conquer

19 Same same because Both design recursive algorithms

20 Different because Dynamic programming is smarter about solving recursive sub-problems

21 Using Memory to be smarter
Pow (a,n) // n is even and ≥ 2 return t * t t= Pow(a,n/2) Pow (a,n) // n is even and ≥ 2 return Pow(a,n/2) * Pow(a, n/2) O(n) as we recompute! O(log n) as we compute only once

22 End of Semester blues Can only do one thing at any day: what is the optimal schedule to obtain maximum value? Write up a term paper (30) (3) (2) (5) (10) Party! Exam study 331 HW Project Monday Tuesday Wednesday Thursday Friday

23 Previous Greedy algorithm
Order by end time and pick jobs greedily Greedy value = 5+2+3= 10 Write up a term paper (10) OPT = 30 Party! (2) Exam study (5) 331 HW (3) Project (30) Monday Tuesday Wednesday Thursday Friday

24 Today’s agenda Formal definition of the problem
Start designing a recursive algorithm for the problem


Download ppt "Lecture 34 CSE 331 Nov 18, 2011."

Similar presentations


Ads by Google