Table of Contents
Fetching ...

Balanced Bidirectional Breadth-First Search on Scale-Free Networks

Sacha Cerf, Benjamin Dayan, Umberto De Ambroggio, Marc Kaufmann, Johannes Lengler, Ulysse Schaller

TL;DR

Two algorithms that run faster than the layer-balanced bidirectional BFS on scale-free networks with power-law exponent $\tau \in (2,3)$ and an edge-balanced bidirectional BFS algorithm that works under adversarial conditions are developed.

Abstract

To find a shortest path between two nodes $s_0$ and $s_1$ in a given graph, a classical approach is to start a Breadth-First Search (BFS) from $s_0$ and run it until the search discovers $s_1$. Alternatively, one can start two Breadth-First Searches, one from $s_0$ and one from $s_1$, and alternate their layer expansions until they meet. This bidirectional BFS can be balanced by always expanding a layer on the side that has discovered fewer vertices so far. This usually results in significant speedups in real-world networks, and it has been shown that this indeed yields sublinear running time on scale-free graph models such as Chung-Lu graphs and hyperbolic random graphs. We improve this layer-balanced bidirectional BFS approach by using a finer balancing technique. Instead of comparing the size of the two BFS trees after each layer expansion, we perform this comparison after each vertex expansion. This gives rise to two algorithms that run faster than the layer-balanced bidirectional BFS on scale-free networks with power-law exponent $τ\in (2,3)$. The first one is an approximate shortest-path algorithm that outputs a path of length at most 1 longer than the shortest path in time $n^{(τ-2)/(τ-1)+o(1)}$. The second one is an exact shortest-path algorithm running in time $n^{1/2+o(1)}$. These runtime bounds hold with high probability when $s_0$ and $s_1$ are chosen uniformly at random among the $n$ vertices of the graph. We also develop an edge-balanced bidirectional BFS algorithm that works under adversarial conditions. This approximate shortest-path algorithm runs in time $n^{1/2+o(1)}$ with high probability when the adversary is allowed to choose $s_0$ and $s_1$ based on their (expected) degree. We complement our theoretical results with experiments on Chung-Lu graphs, Geometric Inhomogeneous Random Graphs, and real-world networks.

Balanced Bidirectional Breadth-First Search on Scale-Free Networks

TL;DR

Two algorithms that run faster than the layer-balanced bidirectional BFS on scale-free networks with power-law exponent and an edge-balanced bidirectional BFS algorithm that works under adversarial conditions are developed.

Abstract

To find a shortest path between two nodes and in a given graph, a classical approach is to start a Breadth-First Search (BFS) from and run it until the search discovers . Alternatively, one can start two Breadth-First Searches, one from and one from , and alternate their layer expansions until they meet. This bidirectional BFS can be balanced by always expanding a layer on the side that has discovered fewer vertices so far. This usually results in significant speedups in real-world networks, and it has been shown that this indeed yields sublinear running time on scale-free graph models such as Chung-Lu graphs and hyperbolic random graphs. We improve this layer-balanced bidirectional BFS approach by using a finer balancing technique. Instead of comparing the size of the two BFS trees after each layer expansion, we perform this comparison after each vertex expansion. This gives rise to two algorithms that run faster than the layer-balanced bidirectional BFS on scale-free networks with power-law exponent . The first one is an approximate shortest-path algorithm that outputs a path of length at most 1 longer than the shortest path in time . The second one is an exact shortest-path algorithm running in time . These runtime bounds hold with high probability when and are chosen uniformly at random among the vertices of the graph. We also develop an edge-balanced bidirectional BFS algorithm that works under adversarial conditions. This approximate shortest-path algorithm runs in time with high probability when the adversary is allowed to choose and based on their (expected) degree. We complement our theoretical results with experiments on Chung-Lu graphs, Geometric Inhomogeneous Random Graphs, and real-world networks.

Paper Structure

This paper contains 21 sections, 37 theorems, 113 equations, 7 figures, 3 algorithms.

Key Result

Theorem 1.1

Let $\mathcal{G}$ be a Chung-Lu graph or a GIRG on $n$ vertices with power-law parameter $\tau \in (2,3)$ and let $s_0$ and $s_1$ be two vertices of $\mathcal{G}$ chosen uniformly at random. Then $\textnormal{V-BFS}_{approx}(\mathcal{G},s_0,s_1)$ is a correct algorithm outputting a path of length at

Figures (7)

  • Figure 1: Illustration of the balancing of the BFS trees done by the vertex-balanced algorithms. Filled dots denote expanded vertices, while hollow dots mark non-expanded vertices that have already been discovered. The red filled dot is the most recently expanded vertex, which increased the size of the left BFS tree from 12 to 14. The right BFS tree is now smaller, so the hollow red vertex will be expanded next.
  • Figure 2: Illustration of the $\textnormal{V-BFS}_{approx}$ algorithm finding a path of length $d(s_0,s_1)+1$. Expanded vertices are solid disks, non-expanded vertices are hollow. The connection found by the algorithm between the two search trees is shown in red. The connection which yields the actual shortest path is in green. To find the actual shortest path and make the algorithm exact, it suffices to expand all vertices in $Q_{s_0}^-$ or in $Q_{s_1}^-$ (the $\textnormal{V-BFS}_{exact}$ algorithm picks the queue containing fewest vertices, in the above example $Q_{s_1}^-$) after finding the red connection.
  • Figure 3: Plot of the runtime exponent $\rho$ of the cost for the four algorithms VBA, VBE, LB and LBES on three graphs models. For each data point, three different connected graphs with $n\approx80'000$ nodes and $m\approx 1'200'000$ edges were generated, and on each of these graphs the algorithms were run for 100 random pairs of nodes $(s,t)$. The runtime $\mathcal{C}$ is then taken as the median cost over these 300 algorithm runs, and $\rho$ is computed by solving the equation $\mathcal{C}=m^{\rho}$. The theoretical guarantees on the exponent $\rho$ (up to a $o(1)$ term) are also plotted for comparison (as VBA bound, VBE bound, and LB bound). The generated GIRGs have underlying dimension $d=2$. We performed the same experiment for higher dimension $d$ and obtained very similar plots.
  • Figure 4: Log-log plots of the runtime (or cost) of the VBA and VBE algorithms compared to the number of edges in the graph. The two leftmost subfigures show Chung-Lu graphs, the two middle subfigures GIRGs with $\alpha=1.5$, and the two rightmost subfigures GIRGs with $\alpha=5$. In the top row all graphs are generated with power-law parameter $\tau=2.3$ and in the bottom row with $\tau=2.7$. All graphs have average degree 10, and all GIRGs have dimension $d=2$. The dashed lines (VBA bound and VBE bound) indicate the theoretical bounds from Theorem \ref{['thm:vertex-approx-intro']}-\ref{['thm:vertex-exact-intro']}, and are shifted up for ease of comparison. Each datapoint is the median value obtained from first sampling three graph instances with the same parameters and aggregating the runs over 100 random pairs of nodes $(s,t)$ on each graph instance.
  • Figure 5: Heterogeneity and locality of the generated networks from the different models. Each point is the average of five samples with the given parameter configuration. This is a slightly adapted version of Figure 3 in blasius2024external.
  • ...and 2 more figures

Theorems & Definitions (70)

  • Theorem 1.1
  • Theorem 1.2
  • Theorem 1.3
  • Theorem 2.1: Chernoff-Hoeffding bound, Theorem 1.1 in dubhashi2009concentration
  • Lemma 2.2
  • proof
  • Definition 3.1
  • Definition 4.1
  • Definition 4.2: Chung-Lu graph chung2002average
  • Definition 4.3: GIRG bringmann2019geometric
  • ...and 60 more