To solve many problems on graphs, graph traversals are used, the usual variants of which are the depth-first search and the breadth-first search. Implementing a graph traversal we consequently reach all vertices of the graph that belong to a connected component. The breadth-first search is the usual choice when constructing efficient algorithms for finding connected components of a graph. Methods of simple iteration for solving systems of linear equations with modified graph adjacency matrices and with the properly specified right-hand side can be considered as graph traversal algorithms. These traversal algorithms, generally speaking, turn out to be non-equivalent neither to the depth-first search nor the breadth-first search. The example of such a traversal algorithm is the one associated with the Gauss-Seidel method. For an arbitrary connected graph, to visit all its vertices, the algorithm requires not more iterations than that is required for BFS. For a large number of instances of the problem, fewer iterations will be required.
翻译:为解决图论中的诸多问题,常采用图遍历算法,其常规变体包括深度优先搜索与广度优先搜索。通过实施图遍历,我们可依次访问属于同一连通分量的所有顶点。在构建高效的图连通分量查找算法时,广度优先搜索通常是首选方案。采用修正后的图邻接矩阵及适当设定的右端项,通过简单迭代法求解线性方程组的过程可视为一类图遍历算法。这些遍历算法通常既不等价于深度优先搜索,亦不等价于广度优先搜索。例如,与高斯-赛德尔迭代法相关的遍历算法即属此类。对于任意连通图,该算法访问全部顶点所需的迭代次数不超过广度优先搜索所需次数。在大量问题实例中,其所需迭代次数更少。