A Decision Algorithm of Strong Connexity Convenient for Parallel Computation

In this article, the author puts forward a new decision algorithm of strong connexity, which can conduct the two-time search in the decision process simultaneously, and this algorithm is convenient for the parallel computation.


Introduction
For the strong connexity decision of the oriented graph, the general algorithm is to implement the deeply first search (DFS) from certain peak V, and then reversely search from the last peak W to obtain the decision result.The characteristic of this algorithm is that the start of the second search is the terminal of the first search, i.e. the start time of the second search is limited by the first search.
For the decision algorithm of strong connexity in this article, both two searching processes start from the same peak, and they respectively search in the original graph and in the reverse graph.Therefore, two searches can be implemented at the same time, and this algorithm is convenient for the parallel computation.

Definition of the reverse graph
Set the graph G(V, E), and the graph G'(V, E') is the reverse graph of G, where, for any < V i , V j >∈E, < V j ,V i > ∈E' (seen in Figure 1).

The strong connexity decision theorem of the oriented graph
In an oriented graph G(V, E), for any peak V 0 ∈V, if it fulfills two following conditions, (a) Start from V 0 , all peaks can be traversed through DFS in G.
(b) Start from V 0 , all peaks can be traversed through DFS in G', and G'(V, E') is the reverse graph of the graph G(V, E).
So the oriented graph G(V, E) has strong connexity.

Prove:
Suppose the peak number in the graph is N. i.When K=2, there are only two peaks in the oriented graph G, and if G fulfills (a) and (b), so it is seen in Figure 2. Obviously, Figure 2 has strong connexity.
ii. Suppose that when the peak number is N, the proposition comes into existence.When the peak number in G is N, and these peaks fulfill the conditions (a) and (b), so the graph G has strong connexity.Next, we will prove when the peak number is N+1, the proposition comes into existence.Suppose that increasing a new peak V (seen in Figure 3), if it fulfills the condition (a), a peak A certainly exists in G, and it appoints to the peak V.In the same way, if it fulfills the condition (b), a peak B certainly exists in G, and the peak V appoints to Q (seen in Figure 3).For any peak in G, because G has strong connexity, there is an approach leading to A and V, on the contrary, the peak V can arrive any peak in G through B. So the graph with the peak V has strong connexity.
From i and ii, to any peak number N, if the oriented graph fulfills (a) and (b), the graph has strong connexity.

The strong connexity decision algorithm of the oriented graph
From the decision theorem, the strong connexity decision algorithm of the oriented graph can be obtained (seen in Figure 4).
Supposing that set the graph G, and the reverse graph is G', and the peak number is N, and start from the peak V to search.

Implementation of the strong connexity decision algorithm of the oriented graph
When implementing the algorithm, the adjacency matrix can be adopted to store the graph G.Because the adjacency matrix of its reverse graph is the transpose of the adjacency matrix of G, it needs not to be stored specially, and the information of the reverse graph can be obtained from the adjacency matrix of G.
In the following program, MAXNODE is the constant, and it denotes the maximum peak number which can be computed."nodecount" is the peak number of the oriented graph G.

Figure 1 .
Figure 1.Examples of Reverse Graphs

Figure 4 .
Figure 4. Flow Chart of the Algorithm void connexity1(bool matrix[][MAXNODE],int startnode)// Implement DFS in the oriented graph which adjacency matrix is "matrix" from "startnode", and the peak numbers searched are stored in the global variable count1