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

Terminology

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

 

 

vertex v tex2html_wrap_inline71425 out-degree tex2html_wrap_inline71457 in-degree
a tex2html_wrap_inline71461 2 tex2html_wrap_inline71463 1
b tex2html_wrap_inline71467 1 tex2html_wrap_inline71469 1
c tex2html_wrap_inline71473 2 tex2html_wrap_inline71475 2
d tex2html_wrap_inline71479 1 tex2html_wrap_inline71481 2
Table: Emanating and Incident Edge Sets for Graph tex2html_wrap_inline71449 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_inline71355 is a non-empty sequence of vertices

displaymath71385

where tex2html_wrap_inline71485 for tex2html_wrap_inline63494 such that tex2html_wrap_inline71489 for tex2html_wrap_inline70677. The length of path P is k-1.

For example, consider again the graph tex2html_wrap_inline71449 shown in Figure gif. Among the paths contained in tex2html_wrap_inline71449 there is the path of length zero, tex2html_wrap_inline67118; the path of length one, tex2html_wrap_inline71503; the path of length two, tex2html_wrap_inline67128; and so on. In fact, this graph generates an infinite number of paths! (To see how this is possible, consider that tex2html_wrap_inline71507 is a path in tex2html_wrap_inline71449). Notice too the subtle distinction between a path of length zero, say tex2html_wrap_inline71511, and the path of length one tex2html_wrap_inline71513.


next up previous contents index

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