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

Terminology

Consider a directed graph tex2html_wrap_inline70093 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_inline70187 shown in Figure gif.

 

 

vertex v tex2html_wrap_inline70163 out-degree tex2html_wrap_inline70195 in-degree
a tex2html_wrap_inline70199 2 tex2html_wrap_inline70201 1
b tex2html_wrap_inline70205 1 tex2html_wrap_inline70207 1
c tex2html_wrap_inline70211 2 tex2html_wrap_inline70213 2
d tex2html_wrap_inline70217 1 tex2html_wrap_inline70219 2
Table: Emanating and incident edge sets for graph tex2html_wrap_inline70187 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_inline70093 is a non-empty sequence of vertices

displaymath70123

where tex2html_wrap_inline70223 for tex2html_wrap_inline62452 such that tex2html_wrap_inline70227 for tex2html_wrap_inline69489. The length of path P is k-1.

For example, consider again the graph tex2html_wrap_inline70187 shown in Figure gif. Among the paths contained in tex2html_wrap_inline70187 there is the path of length zero, tex2html_wrap_inline66084; the path of length one, tex2html_wrap_inline70241; the path of length two, tex2html_wrap_inline66094; and so on. In fact, this graph generates an infinite number of paths! (To see how this is possible, consider that tex2html_wrap_inline70245 is a path in tex2html_wrap_inline70187). Notice too the subtle distinction between a path of length zero, say tex2html_wrap_inline70249, and the path of length one tex2html_wrap_inline70251.


next up previous contents index

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