the english courses and firstfor examplecfbaedgh this also satisfies all the prerequisites there are many other possible orderings as well when you use an algorithm to generate topological sortthe approach you take and the details of the code determine which of various valid sortings are generated topological sorting can model other situations besides course prerequisites job scheduling is an important example if you're building caryou want to arrange things so that brakes are installed before the wheels and the engine is assembled before it' bolted onto the chassis car manufacturers use graphs to model the thousands of operations in the manufacturing processto ensure that everything is done in the proper order modeling job schedules with graphs is called critical path analysis although we don' show it herea weighted graph (discussed in the next can be usedwhich allows the graph to include the time necessary to complete different tasks in project the graph can then tell you such things as the minimum time necessary to complete the project the graphd workshop applet the graphd workshop applet models directed graphs this applet operates in much the same way as graphn but provides dot near one end of each edge to show which direction the edge is pointing be carefulthe direction you drag the mouse to create the edge determines the direction of the edge figure shows the graphd workshop applet used to model the course-prerequisite situation of figure the idea behind the topological sorting algorithm is unusual but simple two steps are necessaryfigure the graphd workshop applet remember step find vertex that has no successors the successors to vertex are those vertices that are directly "downstreamfrom it--that isconnected to it by an edge that points in their direction if there is an edge pointing from to bthen is successor to in figure the only vertex with no successors is remember