Sacha Cerf,Benjamin Dayan,Umberto De Ambroggio,Marc Kaufmann,Johannes Lengler,Ulysse Schaller
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 $\tau \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^{(\tau-2)/(\tau-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.
What problem does this paper attempt to address?
### The problems the paper attempts to solve
This paper aims to improve the Bidirectional Breadth - First Search (BFS) algorithm for finding the shortest path between two nodes \( s_0 \) and \( s_1 \) in scale - free networks. Specifically, the paper proposes more refined balancing techniques to enhance the efficiency of bidirectional BFS.
#### Background and motivation
The traditional unidirectional BFS method starts from the starting node \( s_0 \) and expands layer by layer until the target node \( s_1 \) is found. Another method is to start two BFSs, one starting from \( s_0 \) and the other from \( s_1 \), and alternately expand their levels until the two search trees meet. This method is usually called bidirectional BFS. For further optimization, a "balancing" strategy can be adopted, that is, always expanding the side that discovers fewer nodes, thus achieving a faster search speed.
#### Main problems
The paper points out that in real - world networks, especially those scale - free networks with power - law degree distribution, the traditional bidirectional BFS can be further accelerated by more refined balancing techniques. Specifically, the paper proposes the following improvements:
1. **Vertex - level balancing**: Instead of comparing the sizes of the two BFS trees after each layer expansion, the comparison is made after each node expansion. This enables the algorithm to run faster in scale - free networks with a power - law exponent \( \tau\in(2, 3) \).
2. **Edge - level balancing**: Under adversarial conditions, that is, allowing an adversary to select the starting nodes \( s_0 \) and \( s_1 \) according to the expected degrees of the nodes, a new approximate shortest - path algorithm is proposed.
#### Specific contributions
The paper proposes three algorithms:
1. **Approximate shortest - path algorithm**: Outputs a path whose length is at most 1 longer than the shortest path, with a time complexity of \( n^{\frac{\tau - 2}{\tau - 1}+o(1)} \).
2. **Exact shortest - path algorithm**: Outputs a shortest path, with a time complexity of \( n^{\frac{1}{2}+o(1)} \).
3. **Edge - level - balanced approximate shortest - path algorithm**: Under adversarial conditions, outputs a path whose length is at most 1 longer than the shortest path, with a time complexity of \( n^{\frac{1}{2}+o(1)} \).
These algorithms show significant performance improvements in both theoretical analysis and experimental verification, especially on scale - free network models such as Chung - Lu graphs and Geometric Inhomogeneous Random Graphs (GIRGs).
### Summary
By introducing more refined balancing techniques and optimization strategies for different conditions, the paper significantly improves the efficiency of bidirectional BFS in scale - free networks. These improvements are not only proven theoretically but also verified on actual network data sets, showing their potential in practical applications.