Summary06

Lecture 6 (inspite of what the slide says).


This is the point in the course where new material is being introduced in the course, it was expected that much of the material from the previous lectures had been seen in other courses. The discussion of Greedy algorithms will emphasize simple algorithm with the goal of understanding why they work, and will cover different techniques for proving they are correct. The domain of today's lecture is Scheduling Theory.



The first problem is interval scheduling (which was introduced in the five problems lecture as well). The student submission activity is virtually the same as the one from the five problems lecture, so it can be done quickly.



Student solution


The lecture now describes what a greedy algorithm is for the problem with a general form of a greedy algorithm, where a different rule is used for selecting the next item. The student submission activity is to simulate three different greedy algorithms. These examples demonstrate that the greedy algorithms do not find the best solutions.


Student solution


The instructor now demonstrates the earliest deadline first algorithm, and shows it is better than the other heuristics. (Students correct the instructors mistaken choice).


The point being made on this slide is very important, since it gives a key idea for many proofs.


There is a student question at about 27:30. The question is hard to understand (the instructor didn't understand it very well either). The student is concerned that the two sequences might not have the same number of elements. The instructor goes back to the previous slide to say that the lemma is only concerned with indices up to the point where one of the sequences ends.

At 29:00 the instructor asks about the starting case of the proof. You should get a student answer to this before proceeding.

At 30:00 the instructor asks about the inductive part of the proof. There is no answer, so at 30:30, the instructor clarifies the question with some drawing.

At 33:00 the final detail of the proof is considered, with a student answering correctly. The student's answer isn't very clear (because of poor sound quality) - but the instructor repeats it.



This is the start of the second problem for the lecture.

At 34:56 the instructor asks if three processors would be sufficient. You could stop the lecture to have a student answer this one.

The student submission activity is to use as few processors as possible. The instructor specifies verbally (and then writes it on the slide), that the students should finds a solution of size five. (If students know the algorithm it is easy - if not, they may have difficulty finding the correct solution.)



Student submission


The next activity is to show a lower bound on the the number of processors. This activity was very quick - students just indicated places where at least three processors were needed.


Student submission


The remainder of the lecture is to define the lowerbound (the depth), and then show an algorithm which achieves this bound. The key to the algorithm is that when we come to a job, we always have an available slot. At 46:40 the instructors asks the class why there is an available processor. The answer is provided (but hard to hear), and then explained by the instructor.