Table of Contents
Fetching ...

Computing well-balanced spanning trees of unweighted networks

Lovro Šubelj

TL;DR

It is shown that the distances between the nodes are better preserved by a simpler algorithm based on breadth-first search, and the spanning trees are also more compact and well-balanced, as measured by classical graph indices.

Abstract

A spanning tree of a network or graph is a subgraph that connects all nodes with the least number or weight of edges. The spanning tree is one of the most straightforward techniques for network simplification and sampling, and for discovering its backbone or skeleton. Prim's algorithm and Kruskal's algorithm are well-known algorithms for computing a spanning tree of a weighted network, and are therefore also the default procedure for unweighted networks in the most popular network libraries. In this paper, we empirically study the performance of these algorithms on unweighted networks and compare them with different priority-first search algorithms. We show that the structure of a network, such as the distances between the nodes, is better preserved by a simpler algorithm based on breadth-first search. The spanning trees are also most compact and well-balanced as measured by classical graph indices. We support our findings with experiments on synthetic graphs and more than a thousand real networks, and demonstrate practical applications of the computed spanning trees. We conclude that if a spanning tree is to maintain the structure of an unweighted network, the breadth-first search algorithm should be the preferred choice, and it should be implemented as such in network libraries.

Computing well-balanced spanning trees of unweighted networks

TL;DR

It is shown that the distances between the nodes are better preserved by a simpler algorithm based on breadth-first search, and the spanning trees are also more compact and well-balanced, as measured by classical graph indices.

Abstract

A spanning tree of a network or graph is a subgraph that connects all nodes with the least number or weight of edges. The spanning tree is one of the most straightforward techniques for network simplification and sampling, and for discovering its backbone or skeleton. Prim's algorithm and Kruskal's algorithm are well-known algorithms for computing a spanning tree of a weighted network, and are therefore also the default procedure for unweighted networks in the most popular network libraries. In this paper, we empirically study the performance of these algorithms on unweighted networks and compare them with different priority-first search algorithms. We show that the structure of a network, such as the distances between the nodes, is better preserved by a simpler algorithm based on breadth-first search. The spanning trees are also most compact and well-balanced as measured by classical graph indices. We support our findings with experiments on synthetic graphs and more than a thousand real networks, and demonstrate practical applications of the computed spanning trees. We conclude that if a spanning tree is to maintain the structure of an unweighted network, the breadth-first search algorithm should be the preferred choice, and it should be implemented as such in network libraries.
Paper Structure (16 sections, 1 equation, 10 figures, 2 tables, 2 algorithms)

This paper contains 16 sections, 1 equation, 10 figures, 2 tables, 2 algorithms.

Figures (10)

  • Figure 1: Wiring diagrams of spanning trees of a small random graph. The spanning trees were computed with Prim's algorithm (left), Kruskal's algorithm (middle) and the breadth-first search algorithm (right). The size of the nodes is proportional to their degree, while the layouts were computed with the Large Graph Layout algorithm ADWM04.
  • Figure 2: The average distance $\langle d\rangle$ and the diameter $d_{\rm max}$ of triangular lattices (left), random graphs (middle) and scale-free graphs (right), and their spanning trees computed with different algorithms. The plots show estimates over $100$ realizations, where the shaded areas span between theoretical estimates for random graphs $\mathcal{O}(\log{n})$ and two-dimensional lattices $\mathcal{O}(\sqrt{n})$, and are consistent between the plots.
  • Figure 3: The coefficient of variation $c_d$ for random graphs (left) and scale-free graphs (right), and their spanning trees computed with different algorithms. The plots show estimates over $100$ realizations, while the error bars are smaller than the symbol sizes.
  • Figure 4: The average distance $\langle d\rangle$ in real networks and their spanning trees computed with different algorithms. The shaded areas are the same as in Fig \ref{['fig:graphs:distance']}.
  • Figure 5: The diameter $d_{\rm max}$ of real networks and their spanning trees computed with different algorithms. The shaded areas are the same as in Fig \ref{['fig:graphs:distance']}.
  • ...and 5 more figures