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.
翻译:为解决图论中的诸多问题,常采用图遍历算法,其经典变体包括深度优先搜索与广度优先搜索。通过实施图遍历,我们可依次访问属于同一连通分量的所有顶点。在构建高效的图连通分量查找算法时,广度优先搜索通常是首选方案。采用修正的图邻接矩阵及恰当设定的右端项,求解线性方程组的简单迭代法可被视为一类图遍历算法。这些遍历算法通常既不等价于深度优先搜索,亦不等价于广度优先搜索。此类算法的一个典型示例是与高斯-赛德尔迭代法相关联的遍历算法。对于任意连通图,该算法为访问全部顶点所需的迭代次数不超过广度优先搜索所需次数。针对大量问题实例,其所需迭代次数将更少。