Lecture13Ink

This lecture finishes up the discussion of recurrences, and introduces two new Divide and Conquer algorithms, showing how these algorithms fit into the Divide and Conquer paradigm.



The instructor makes a number of announcements. Some concern the content of the exam, so you may wish to show this part.


This slide is used to convey the intuition behind determining if a recurrence is balanced, increasing, or decreasing.

At 2:08 the instructor asks a question about how different parts of the recurrence affect whether it is balanced, etc; it is worthwhile to stop the video here and discuss.


Going from intuition to the mathematical formulation for determining if a recurrence is balanced, increasing, or decreasing.


For this activity, they will want to be able to see the previous slide. This is a fairly mechanical application of the formula just seen; if they seem to understand this you can skip the discussion.

At 7:17 there is a student question about logarithmic terms showing up in the recurrence. The point here is that logarithmic terms will be dominated by polynomial terms. It probably isn't worthwhile to ask the students to answer this question.


Here we are transitioning to putting algorithms into the context of the Divide and Conquer paradigm.

At 11:07 there is a student question that is hard to hear. The student asks "If it's decreasing, will it just be O(n^3)?" The answer is yes. It probably isn't necessary to stop the video.


At 15:35, the instructor asks "what is the closest pair here?" There is no need to stop for discussion here.

The main point of this slide is showing how to decide the best way to do the "divide" step.

At 17:50, the instructor asks how the students would divide the problem into subproblems. Stop here for discussion.


At 19:55, the instructor asks "How does it help to know the closest pair on each side?" Stop here for discussion.

At 20:23, the instructor proposes an algorithm and asks if it is a good one. It might be useful to stop the video here and let students respond.


This is an activity slide. If students need a hint, I would suggest the phrase "delta is both the radius and the distance between points."

If the students want to see more of an argument for the answer of 7, I would suggest looking at equilateral triangles of side length delta with one vertex at the center and two on the circumference. We can clearly put 6 of these triangles into the circle, forming the hexagon.



At 27:50 a student asks about avoiding the pathological case (having a very uneven division), the instructor says that they will discuss this point soon. No need to stop the video.




This is an activity slide. This can be done very quickly; the purpose is just to give intuition as to how this works.

At 34:15 a student asks "Isn't there a better way to do this?" The answer is no. There is no need to stop the video.


At 35:05, a student asks about the cost of the pre-processing step. It might be worthwhile to stop here for discussion.


Introducing the counting inversions problem.

At 40:00 there is a student question that is hard to hear, about whether we could use quicksort to do this. It's not that important.


The instructor refers here to "restaurants on the Ave." The Ave is a street near the University of Washington with a lot of restaurants. This isn't important.

At 45:15 the instructor asks if there are any questions. There are none, but you might want to stop and ask for questions here.


The point here is that combining subresults is the hard part of this algorithm.


This is an activity slide. If you are short on time, you may wish to restrict the problem to the portion that the instructor did with the class.