| Directed
Graphs (Digraphs) If tasks are represented by vertices and precedence relations are represented by arrows pointing from one vertex to another, then the essence of a scheduling problem can be displayed visually by a graph known as a directed graph (digraph, for short).
This digraph represents a project consisting of four tasks: task A (takes 3 hours), task Q (takes 2 hours), task X (takes 4 hours), and task F (takes 2 hours). The arrows reflect the precedence relations; namely, task X must precede (come before) tasks A & F and task Q must precede tasks X & A.
Before we continue using digraphs to help us solve scheduling problems, let's look more closely at digraphs. A digraph is a special type of graph--one in which the relationships among vertices are asymmetrical. These asymmetrical relationships are indicated by the arrows of the digraph. An asymmetrical relationship is one in which the relationship applies in one direction only. For instance, "is the father of" is an asymmetrical relationship. If "Paul Jones, Sr. is the father of Paul Jones, Jr." is a true statement, then it would be false to say that "Paul Jones, Jr. is the father of Paul Jones, Sr." In the same sense, precedence relationships in scheduling problems are asymmetrical. (As above, when task X must precede task A.) When dealing with ordinary graphs, the line segments connecting vertices were called edges. For digraphs, the arrows connecting edges will be called arcs. Just think of arcs as edges with arrows. In the language of digraphs, For ordinary graphs, we defined the degree of a vertex. For digraphs, we define the indegree of a vertex to be the number of arrows pointing in toward the vertex and the outdegree of a vertex to be the number of arrows pointing out away from the vertex.
For instance, in the digraph above, vertex A has an indegree of 2 (since 2 arrows point in toward A) and an outdgree of 1 (since 1 arrow points out away from A). In a digraph, a path from vertex A to vertex B is a sequence of arcs starting at A and ending at B in which no arc is repeated and each vertex in the sequence is incident to (precedes) the next one.
For instance, Q X A is a path from Q to
A.
In a digraph, a cycle is a path that starts and ends at the same vertex.
For instance, A F X A is a cycle.
Notice something VERY important here.
Project Digraphs
Schedulers often take digraphs representing scheduling problems (for example, the one above) and modify them slightly so that they have "ficticious" START and END tasks of 0 time duration (as shown below).
Notice that the START vertex has arrows pointing away from
it toward all tasks that could be the first task (as determined by the precedence
relations). Any vertex with an indegree of 0 could be
the first task of the project. The addition of START and END vertices does not change the analysis of the scheduling problem at all. It is simply a nice way to visualize a project, giving it a definite START and END. |