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).

wpeB.jpg (8293 bytes)

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, wpe9.jpg (904 bytes) is read "X is incident to Y" or "Y is incident from X."

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.

wpeC.jpg (4570 bytes)

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.

wpeB.jpg (8293 bytes)

For instance, Q X A is a path from Q to A.
Q A is also a path from Q to A.
X Q A is NOT a path from X to A (since X does not precede Q).

 

In a digraph, a cycle is a path that starts and ends at the same vertex.

wpe10.jpg (4775 bytes)

For instance, A F X A is a cycle.

 

Notice something VERY important here.
A digraph that represents a scheduling problem CANNOT have a cycle.
For instance, if vertices A, F, and X are tasks and the arrows represent the precedence relations, then task A must be incident to ( precede) task F, task F must be incident to (precede) task X, and task X must be incident to (precede) task A--CLEARLY AN IMPOSSIBLE SITUATION.  (Task A can't begin until task X is completed but task X can't begin until task F is completed and task F can't begin until task A is completed.)

 

Project Digraphs

wpe21.jpg (9262 bytes)

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).

wpe1F.jpg (11297 bytes)

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.
And, the END vertex has arrows pointing toward it away from all tasks that could be the last task (as determined by the precedence relations).  Any vertex with an outdegree of 0 could be the last 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.

Back