Loading in 5 sec....

8 The Mathematics of SchedulingPowerPoint Presentation

8 The Mathematics of Scheduling

- 145 Views
- Uploaded on
- Presentation posted in: General

8 The Mathematics of Scheduling

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

8 The Mathematics of Scheduling

8.1The Basic Elements of Scheduling

8.2Directed Graphs (Digraphs)

8.3 Scheduling with Priority Lists

8.4The Decreasing-Time Algorithm

8.5Critical Paths

8.6The Critical-Path Algorithm

8.7Scheduling with Independent Tasks

Directed Graph or Digraph

A directed graph, or digraph for short, is a graph in which the edges have adirection associated with them, typically indicated by an arrowhead. Digraphs areparticularly useful when we want to describe asymmetric relationships (X relatedto Y does not imply that Y must be related to X).

Directed Graph or Digraph

In a digraph, instead of talking about edges we talk about arcs. Every arc isdefined by its starting vertex and its ending vertex, and we respect that orderwhen we write the arc. Thus, if we write XY, we are describing the arc ,

as opposed to the arc YX .

Directed Graph or Digraph

A list of all the arcs in a digraph is called the arc-set of the digraph. This digraphhas arc-set A= { XY, YX }.

If XY is an arc in the digraph, we say that vertex X is incident to vertex Y, or,equivalently, that Y is incident fromX).

The arc YZ is said to be adjacent to the arc XY if the starting point of YZ isthe ending point of XY. (Essentially, this means one can go from X to Z byway of Y).

Directed Graph or Digraph

In a digraph, a path from vertex X to vertex W consists of a sequence of arcsXY, YZ, ZU ,…,VW such that each arc is adjacent to the one before it andno arc appears more than once in the sequence–it is essentially a trip fromX to W along the arcs in the digraph. The best way to describe the path is bylisting the vertices in the order of travel: X, Y, Z, and so on.

Directed Graph or Digraph

When the path starts and ends at the same vertex, we call it a cycle of thedigraph. Cycles in digraphs can be writtenin more than one way–the cycle X, Y, Z, X is the same as the cycles Y, Z, X, Yand Z, X, Y, Z.

Directed Graph or Digraph

In a digraph, the notion of the degree of a vertex is replaced by the conceptsof indegree and outdegree. The outdegree of X is the number of arcs that haveX as their starting point(outgoing arcs); the indegree of X is the number ofarcs that have X as their ending point (incoming arcs).

Example 8.3Digraph Basics

This digraph has vertex-set

V= {A, B, C, D, E}

and arc-set

A= {AB, AC, BD,CA, CD, CE,EA, ED}.

In this digraph,A is incident to Band C, but not to E. By the same token, A is incident from E as well as from C.

Example 8.3Digraph Basics

of vertex Dis 3, and the outdegree is 0.

In this digraph, there are several paths from A to D, such as A, C, D; A, C, E,D; A, B, D; and even A, C, A, B, D. On the other hand, A, E, D is not a path fromA to D

The indegree of vertex A is 2, and so is the outdegree. The indegree

Example 8.3Digraph Basics

(because you can’t travel from A to E). There are two cycles in thisdigraph: A, C, E, A (which can also be written as C, E, A, Cand

E, A,C,E), and A,C,A. Notice that there is no cyclepassing through D because D has outdegree 0 and thus is a“dead-end,” and there is no cycle passing through B becausefrom B you can only go to D.

Applications of Digraphs

Traffic flow.

In most cities some streets are one-way streets and others aretwo-way streets. In this situation, digraphs allow us to visualize the flow oftraffic through the city’s streets. The vertices are intersections, and the arcsrepresent one-way streets. (To represent a two-way street, we use two arcs,one for each direction.)

Applications of Digraphs

Telephone Traffic.

To track and analyze the traffic of telephone calls throughtheir network, telephone companies use “call digraphs.” In these digraphs thevertices are telephone numbers, and an arc from X to Y indicates that a callwas initiated from telephone number X to telephone number Y.

Applications of Digraphs

Tournaments.

Digraphs are frequently used to describe certain types of tournaments, with the vertices representing the teams (or individual players)and the arcs representing the outcomes of the games played in the tournament (the arc XY indicates that X defeated Y). Tournament digraphscan be used in any sport in which the games cannot end in a tie (basketball,tennis, etc.).

Applications of Digraphs

Organization charts.

In any large organization (a corporation, the military, auniversity, etc.) it is important to have a well-defined chain of command. Thebest way to describe the chain of command is by means of a digraph oftencalled an organization chart. In this digraph the vertices are the individuals inthe organization, and an arc from X to Y indicates that X is Y’s immediateboss (i.e.,Y takes orders directly from X).

Example 8.4Building That Dream Home on Mars: Part 2

Let’s return to the scheduling problem first discussed in Example 8.2. We cantake the tasks and precedence relations given in the table and create a digraphlike this one.

Example 8.4Building That Dream Home on Mars: Part 2

It is helpful to try to place the vertices of thedigraph so that the arcs point from left to right, and this can usually be done witha little trial-and-error. After this is done, it is customary to add two fictitious taskscalled START and END, where START indicates the imaginary task of gettingthe project started (cutting the red ribbon, so to speak), and END indicates the imaginary task of declaring the project complete (pop the champagne).

Example 8.4Building That Dream Home on Mars: Part 2

This modified digraph is called theproject digraph.The project digraph allows us to better visualize the execution ofthe project as a flow, moving from left to right.