Finding connected components of a graph using traversals associated with iterative methods for solving systems of linear equations

A.V. Prolubnikov
2024-10-04
Abstract: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.
Discrete Mathematics
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: **How to use the traversal algorithms related to iterative methods for solving linear equations to find the connected components of a graph**. Specifically, the author explores methods for solving linear equations using a modified graph adjacency matrix and appropriately specified right - hand sides. These methods can be regarded as graph traversal algorithms, and in some cases, they are neither depth - first search (DFS) nor breadth - first search (BFS). For example, the Gauss - Seidel method provides a traversal algorithm different from BFS. ### Core problems of the paper 1. **Selection of graph traversal algorithms**: - Traditional graph traversal methods such as DFS and BFS may have efficiency problems when dealing with large - scale graphs. - The author proposes a new traversal algorithm based on linear algebra methods, in particular, using simple iterative methods (such as the Jacobi method and the Gauss - Seidel method) to solve linear equations, thereby achieving graph traversal. 2. **Efficient search for connected components**: - For any connected graph, the number of iterations required for traversal using the Gauss - Seidel method will not exceed the number of iterations required for BFS. - In many cases, this method can even reduce the number of required iterations, thus improving efficiency. 3. **Utilization of correct chains**: - The Gauss - Seidel method utilizes the numbering order of vertices in the graph and traverses through correct chains (i.e., chains with vertex numbers arranged in ascending order). - This method can perform conversions along all vertices of the correct chain in the same iteration, thereby accelerating the traversal process. ### Formula representation - **Jacobi iteration formula**: \[ x^{(k + 1)}_i=\frac{1}{a_{ii}}\left(b_i-\sum_{j\neq i}a_{ij}x^{(k)}_j\right) \] - **Gauss - Seidel iteration formula**: \[ x^{(k + 1)}_i=\frac{1}{a_{ii}}\left(b_i-\sum_{j < i}a_{ij}x^{(k + 1)}_j-\sum_{j > i}a_{ij}x^{(k)}_j\right) \] ### Summary The main contribution of this paper lies in proposing a new graph traversal algorithm, which is based on the iterative solution method of linear equations. In this way, the author not only provides a traversal method different from traditional DFS and BFS, but also shows its higher efficiency in some cases. This is of great significance for dealing with the connectivity problems of large - scale graphs.