Succinct Data Structures for Representing Equivalence Classes

  • Moshe Lewenstein
  • J. Ian Munro
  • Venkatesh Raman
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8283)

Abstract

Given a partition of an n element set into equivalence classes, we consider time-space tradeoffs for representing it to support the query that asks whether two given elements are in the same equivalence class. This has various applications including for testing whether two vertices are in the same connected component in an undirected graph or in the same strongly connected component in a directed graph.

We consider the problem in several models.
  • Concerning labeling schemes where we assign labels to elements and the query is to be answered just by examining the labels of the queried elements (without any extra space): if each vertex is required to have a unique label, then we show that a label space of \(\sum_{i=1}^n \lfloor{n \over i} \rfloor\) is necessary and sufficient. In other words, \(\lg n + \lg \lg n + O(1)\) bits of space are necessary and sufficient for representing each of the labels. This slightly strengthens the known lower bound and is in contrast to the known necessary and sufficient bound of \(\lceil \lg n \rceil\) for the label length, if each vertex need not get a unique label.

  • Concerning succinct data structures for the problem when the n elements are to be uniquely assigned labels from label set {1,…, n}, we first show that \(\Theta(\sqrt n)\) bits are necessary and sufficient to represent the equivalence class information. This space includes the space for implicitly encoding the vertex labels. We can support the query in such a structure in \(O(\lg n)\) time in the standard word RAM model.

    We then develop structures where the queries can be answered
    • in \(O(\lg \lg n)\) time using \(O(\sqrt n \lg n/\lg \lg n)\) bits, and

    • in O(1) time using \(O({\sqrt n} \lg n)\) bits of space.

We also develop a dynamic structure that uses \(O(\sqrt n \lg n)\) bits to support equivalence queries and unions in \(O(\lg n/\lg \lg n)\) worst case time or O(α(n)) expected amortized time where α(n) is the inverse Ackermann function.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Alstrup, S., Ben-Amram, A.M., Rauhe, T.: Worst-case and amortised optimality in union-find. In: Proceedings of the 31st ACM Symposium on Theory of Computing (STOC), pp. 499–506 (1999)Google Scholar
  2. 2.
    Alstrup, S., Bille, P., Rauhe, T.: Labeling schemes for small distances in trees. SIAM Journal on Discrete Math. 19(2), 448–462 (2005)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Andersson, A., Miltersen, P.B., Thorup, M.: Fusion trees can be implemented with AC0 instructions only. Theoretical Computer Science 215, 337–344 (1999)MathSciNetCrossRefMATHGoogle Scholar
  4. 4.
    Barbay, J., Castelli Aleardi, L., He, M., Munro, J.I.: Succinct representation of labeled graphs. Algorithmica 62(1-2), 224–257 (2012)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Barbay, J., Gagie, T., Navarro, G., Nekrich, Y.: Alphabet partitioning for compressed rank/select and applications. In: Cheong, O., Chwa, K.-Y., Park, K. (eds.) ISAAC 2010, Part II. LNCS, vol. 6507, pp. 315–326. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Blum, N.: On the single-operation worst-case time complexity of the disjoint set union problem. SIAM Journal on Computing 15(4), 1021–1024 (1986)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Blandford, D.K., Blelloch, G.E.: Compact representations of ordered sets. In: Proceedings of ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 11–19 (2004)Google Scholar
  8. 8.
    Brodnik, A., Munro, J.I.: Membership in constant time and almost-minimum space. SIAM Journal on Computing 5, 1627–1640 (1999)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Delpratt, O., Rahman, N., Raman, R.: Compressed prefix sums. SOFSEM (1), 235–247 (2007)Google Scholar
  10. 10.
    Dietzfelbinger, M., Karlin, A., Mehlhorn, K., Meyer auf der Heide, F., Rohnert, H., Tarjan, R.E.: Dynamic perfect hashing: upper and lower bounds. SIAM Journal on Computing 23 (4), 738–761 (1994)Google Scholar
  11. 11.
    Farzan, A., Munro, J.I.: Succinct representations of arbitrary graph. In: Proceedings of the European Symposium on Algorithms, pp. 393–404 (2008)Google Scholar
  12. 12.
    Franceschini, G., Muthukrishnan, S.M., Pǎtraşcu, M.: Radix sorting with no extra space. In: Arge, L., Hoffmann, M., Welzl, E. (eds.) ESA 2007. LNCS, vol. 4698, pp. 194–205. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  13. 13.
    Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47(3), 424–436 (1993)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Grossi, R., Orlandi, A., Raman, R., Srinivasa Rao, S.: More haste, less waste: lowering the redundancy in fully indexable dictionaries. In: Proceedings of the 26th international symposium on Theoretical Aspects of Computer Science, STACS, pp. 517–528 (2009)Google Scholar
  15. 15.
    Gupta, A., Hon, W.-K., Shah, R., Vitter, J.S.: Compressed data structures: dictionaries and data-aware measures. Theoretical Computer Science 387(3), 313–331 (2007)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Hagerup, T.: Sorting and searching on the word RAM. In: Meinel, C., Morvan, M. (eds.) STACS 1998. LNCS, vol. 1373, pp. 366–398. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  17. 17.
    Hardy, G.H., Ramanujan, S.: Asymptotic formulae in combinatory analysis. Proceedings of the London Mathematical Society 17, 75–115 (1918)CrossRefGoogle Scholar
  18. 18.
    Katz, M., Katz, N.A., Korman, A., Peleg, D.: Labeling schemes for flow and connectivity. SIAM Journal on Computing 34(1), 23–40 (2004)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Munro, J.I., Nicholson, P.K.: Succinct posets. In: Epstein, L., Ferragina, P. (eds.) ESA 2012. LNCS, vol. 7501, pp. 743–754. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  20. 20.
    Raman, R.: Generating random graphs efficiently. In: Dehne, F., Fiala, F., Koczkodaj, W.W. (eds.) ICCI 1991. LNCS, vol. 497, pp. 149–160. Springer, Heidelberg (1991)CrossRefGoogle Scholar
  21. 21.
    Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding k-ary trees, multisets and prefix sums. ACM Transactions on Algorithms 3, 25 (2007)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Smid, M.H.M.: A data structure for the union-find problem having good single-operation complexity, ALCOM: Algorithms Review, Newsletter of the ESPRIT II Basic Research Actions Program (1990)Google Scholar
  23. 23.
    Willard, D.E.: Log-logarithmic worst-case range queries are possible in space Θ(N). Information Processing Letters 17 (2), 81–84 (1983)MathSciNetCrossRefMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Moshe Lewenstein
    • 1
  • J. Ian Munro
    • 2
  • Venkatesh Raman
    • 3
  1. 1.Department of Computer ScienceBar Ilan UniversityIsrael
  2. 2.Cheriton School of Computer ScienceUniversity of WaterlooCanada
  3. 3.The Institute of Mathematical SciencesChennaiIndia

Personalised recommendations