Posts

Showing posts with the label graphs

2.6.1 DAGs Video

PROFESSOR: Directed acyclic graphs are a special class of graphs that really have and warrant a theory of their own. Of course, "directed acyclic graphs" is lot of syllables, so they're called "DAGs" for short. OK. So here's why they come up all the time. Let's look at a diagram that may be familiar to you. This shows the prerequisite structure of required courses in the 6-3 program of MIT Electrical Engineering and Computer Science department. There are similar charts for the other sub-majors of EECS and in other departments as well. So what does it mean? Well, let's look at this vertex corresponding to the first term calculus class 18.01. And there's an edge that points to 6.042. And that's because, if you look at the catalogue, 6.042 lists 18.01 as a prerequisite. If you look at the algorithms-- introductory algorithms-- class 6.006, you'll find, if you look in the catalog, that it has listed two prerequisites, 6.042 and ...

2.11.1 Stable Matching Video

We've seen graphs involving boys and girls and connections between them in the context of our sexual demographics calculation and study. A similar problem comes up in terms of what I call stable matching, which is again the issue of matching up boys and girls in a special way according to some constraints. It turns out to have a lot of applications which we'll discuss toward the end. Let's just look at what the problem is. The setup is that there's some number of boys, in this case 5, 1 through 5, and an equal number of girls labeled A through E. And each of the boys has a ranking of the girls. Different rankings, because different boys have different preferences. And likewise, the girls have rankings of the boys. Different girls have different preferences. So here, girl A likes boy 3 best and boy 5 second best, and boy 1 likes girls C best and girl D least. So the problem, basically, is that we want to get all the boys married to all the girls. We want to...