Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Terminology

Consider a directed graph tex2html_wrap_inline69997 as given by Definition gif.

For example, Table gif enumerates the sets of emanating and incident edges and the in- and out-degrees for each of the vertices in graph tex2html_wrap_inline70091 shown in Figure gif.

 

 

vertex v tex2html_wrap_inline70067 out-degree tex2html_wrap_inline70099 in-degree
a tex2html_wrap_inline70103 2 tex2html_wrap_inline70105 1
b tex2html_wrap_inline70109 1 tex2html_wrap_inline70111 1
c tex2html_wrap_inline70115 2 tex2html_wrap_inline70117 2
d tex2html_wrap_inline70121 1 tex2html_wrap_inline70123 2
Table: Emanating and incident edge sets for graph tex2html_wrap_inline70091 in Figure gif.

There is still more terminology to be introduced, but in order to do that, we need the following definition:

Definition (Path and Path Length) 

A path  in a directed graph tex2html_wrap_inline69997 is a non-empty sequence of vertices

displaymath70027

where tex2html_wrap_inline70127 for tex2html_wrap_inline62372 such that tex2html_wrap_inline70131 for tex2html_wrap_inline69393. The length of path P is k-1.

For example, consider again the graph tex2html_wrap_inline70091 shown in Figure gif. Among the paths contained in tex2html_wrap_inline70091 there is the path of length zero, tex2html_wrap_inline65988; the path of length one, tex2html_wrap_inline70145; the path of length two, tex2html_wrap_inline65998; and so on. In fact, this graph generates an infinite number of paths! (To see how this is possible, consider that tex2html_wrap_inline70149 is a path in tex2html_wrap_inline70091). Notice too the subtle distinction between a path of length zero, say tex2html_wrap_inline70153, and the path of length one tex2html_wrap_inline70155.


next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.