Data Structures and Algorithms with Object-Oriented Design Patterns in Python
next up previous index

Terminology

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

 

 

vertex v tex2html_wrap_inline70619 out-degree tex2html_wrap_inline70651 in-degree
a tex2html_wrap_inline70655 2 tex2html_wrap_inline70657 1
b tex2html_wrap_inline70661 1 tex2html_wrap_inline70663 1
c tex2html_wrap_inline70667 2 tex2html_wrap_inline70669 2
d tex2html_wrap_inline70673 1 tex2html_wrap_inline70675 2
Table: Emanating and incident edge sets for graph tex2html_wrap_inline70643 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_inline70549 is a non-empty sequence of vertices

displaymath70579

where tex2html_wrap_inline70679 for tex2html_wrap_inline62857 such that tex2html_wrap_inline70683 for tex2html_wrap_inline69881. The length of path P is k-1.

For example, consider again the graph tex2html_wrap_inline70643 shown in Figure gif. Among the paths contained in tex2html_wrap_inline70643 there is the path of length zero, tex2html_wrap_inline66493; the path of length one, tex2html_wrap_inline70697; the path of length two, tex2html_wrap_inline66503; and so on. In fact, this graph generates an infinite number of paths! (To see how this is possible, consider that tex2html_wrap_inline70701 is a path in tex2html_wrap_inline70643). Notice too the subtle distinction between a path of length zero, say tex2html_wrap_inline70705, and the path of length one tex2html_wrap_inline70707.


next up previous index

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