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的数值方法可视为执行图的遍历。一般而言,这种遍历与广度优先搜索执行的遍历不等价。本文提出一种利用此类遍历寻找图连通分量的算法。对于任意问题实例,该算法的计算复杂度不高于广度优先搜索,且对于大多数具体问题,其复杂度更低。