The Elementary Circuits of a Graph [H] (Algorithm 459)

Description This algori thm investigates the existence of elementary circuits o f a directed graph G. Data: n is the number of vertices; arc(i,j) is the Boolean procedure with two parameters i, j o f type integer, which is equal to true if (i, j ) E G, and false otherwise. Results: (a) I f the graph has no circuits, then the following sequence of symbols will be printed: Graph without elementary circuits. Ordered numerat ion of vertices /1 i~ is . . i,, where (/1, i2, . . . , iv) is the permutat ion of numbers (1, 2, . . . , n), and a new numerat ion o f vertices such that if (j, i) E G, then j < i. (b) In the other case the following sequence of symbols will be printed: Graph contains the circuits: Circuit i~ i2 . . . ir fi Circuit j~ j~ . . . j , ]j