Recognition of DFS trees: Sequential and parallel algorithms with refined verifications
The depth-first search (DFS) algorithm is one of the basic techniques used in a very large variety of graph algorithms. Every application of the DFS involves, besides traversing the graph, constructing a special structured tree, called a DFS tree, that may be used subsequently. In a previous work we have shown that the family of graphs in which every spanning tree is a DFS tree is quite limited. Therefore, the question: Given an undirected graph \(G = (V,E)\) and an undirected spanning tree \(T\), is \(T\) a DFS tree (\(T\)-DFS) in \(G\)? was naturally raised and answered by sequential linear-time algorithms. Here we present a parallel algorithm which solves this problem in \(O(t)\) time complexity and uses \(O(| E|/t)\) processors, where \(t \geq \log| V|\), on a CREW PRAM. We also study the problem for directed graphs. A linear \((O(| E|))\) time algorithm for solving it in the sequential case and a parallel implementation of it, which has \(O(\log^ 2| V|)\) time complexity and uses \(O(| V|^{2.376})\) processors on a CREW PRAM, are presented. An important feature of our algorithms, that we call refined verification, is that some of their decisions are endowed with proofs that can be verified with a better complexity than that of the algorithms themselves: In the undirected case, if the answer of the algorithm is negative then it outputs a proof for the fact that can be verified in \(O(t)\) time complexity with \(O(| V|/t)\) processors, where \(t\geq \log| V|\), on a CREW PRAM. In the directed case, if \(T\) is not a DFS tree in \(G\) then the sequential algorithm supplies an \(O(| V|)\) time proof for that fact and the parallel implementation supplies a proof for the fact that can be verified in \(O(t)\) time complexity with \(O(| V|/t)\) processors, where \(t\geq \log| V|\), on a CREW PRAM. If \(T\) is a DFS tree in \(G\) then the parallel implementation of the algorithm outputs a proof that can be verified in \(O(t)\) time complexity with \(O(| E|/t)\) processors, where \(t\geq \log| V|\), on a CREW PRAM. Hence, all the verifications have an optimal speed-up.
scientific article; zbMATH DE number 423584
scientific article