The problem of finding the connected components of a graph is considered. The algorithms addressed to solve the problem are used to solve such problems on graphs as problems of finding points of articulation, bridges, maximin bridge, etc. A natural approach to solving this problem is a breadth-first search, the implementations of which are presented in software libraries designed to maximize the use of the capabi\-lities of modern computer architectures. We present an approach using perturbations of adjacency matrix of a graph. We check wether the graph is connected or not by comparing the solutions of the two systems of linear algebraic equations (SLAE): the first SLAE with a perturbed adjacency matrix of the graph and the second SLAE with~unperturbed matrix. This approach makes it possible to use effective numerical implementations of SLAE solution methods to solve connectivity problems on graphs. Iterations of iterative numerical methods for solving such SLAE can be considered as carrying out a graph traversal. Generally speaking, the traversal is not equivalent to the traversal that is carried out with breadth-first search. An algorithm for finding the connected components of a graph using such a traversal is presented. For any instance of the problem, this algorithm has no greater computational complexity than breadth-first search, and for~most individual problems it has less complexity.
翻译:考虑寻找图的连通分量问题。解决该问题的算法被用于解决图上的其他问题,如寻找关节点、桥、最大化桥等。解决此问题的一种自然方法是广度优先搜索,其实现已集成于旨在最大化利用现代计算机架构能力的软件库中。我们提出一种利用图的邻接矩阵扰动的方法。通过比较两个线性代数方程组(SLAE)的解来检查图是否连通:第一个SLAE使用图的扰动邻接矩阵,第二个SLAE使用未扰动矩阵。该方法使得能够利用有效的数值SLAE求解方法来解决图连通性问题。求解此类SLAE的迭代数值方法的迭代过程可视为执行图遍历。一般而言,这种遍历不等同于广度优先搜索所执行的遍历。我们提出一种利用此类遍历寻找图连通分量的算法。对于任意问题实例,该算法的计算复杂度不超过广度优先搜索,且对于大多数具体问题,其复杂度更低。