Abstract

Let G be an unweighted and undirected graph of n nodes, and let D be the n × n matrix storing the All-Pairs-Shortest-Path Distances in G . Since D contains integers in [ n ] ∪ + ∞ , its plain storage takes n 2 log ( n + 1 ) bits. However, a simple counting argument shows that n 2 / 2 bits are necessary to store D . In this paper we investigate the question of finding a succinct representation of D that requires O ( n 2 ) bits of storage and still supports constant-time access to each of its entries. This is asymptotically optimal in the worst case, and far from the information-theoretic lower bound by a multiplicative factor log 2 3 ≃ 1.585 . As a result O ( 1 ) bits per pairs of nodes in G are enough to retain constant-time access to their shortest-path distance. We achieve this result by reducing the storage of D to the succinct storage of labeled trees and ternary sequences, for which we properly adapt and orchestrate the use of known compressed data structures. This approach can be easily and optimally extended to graphs whose edge weights are positive integers bounded by a constant value.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.