Fully Dynamic 2-Hop Cover Labeling.
ACM Journal of Experimental Algorithmics（2019）
The 2-hop Cover labeling of a graph is currently the best data structure for answering shortest-path distance queries on large-scale networks, since it combines low query times, affordable space occupancy, and reasonable preprocessing effort. Its main limit resides in not being suited for dynamic networks since, after a network change, (1) queries on the distance can return incorrect values and (2) recomputing the labeling from scratch yields unsustainable time overhead. In this article, we overcome this limit by introducing the first decremental algorithm able to update 2-hop Cover labelings under node/edge removals and edge weight increases . We prove the new algorithm to be (1) correct, i.e., after each update operation queries on the updated labeling return exact values; (2) efficient with respect to the number of nodes that change their distance as a consequence of a graph update; and (3) able to preserve the minimality of the labeling, a desirable property that impacts on both query time and space occupancy. Furthermore, we provide an extensive experimental study to demonstrate the effectiveness of the new method. We consider it both alone and in combination with the unique known incremental approach (Akiba et al. 2014), thus obtaining the first fully dynamic algorithm for updating 2-hop Cover labelings under general graph updates. Our experiments show that the new dynamic algorithms are orders of magnitude faster than the from-scratch approach while at the same time being able to preserve the quality of the labeling in terms of query time and space occupancy, thus allowing one to employ the 2-hop Cover labeling approach in dynamic networks with practical performance.更多